projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
06b078f
)
mm: memcontrol: reclaim at least once for __GFP_NORETRY
author
Johannes Weiner
<
[email protected]
>
Wed, 6 Aug 2014 23:05:47 +0000
(16:05 -0700)
committer
Linus Torvalds
<
[email protected]
>
Thu, 7 Aug 2014 01:01:17 +0000
(18:01 -0700)
Currently, __GFP_NORETRY tries charging once and gives up before even
trying to reclaim. Bring the behavior on par with the page allocator
and reclaim at least once before giving up.
Signed-off-by: Johannes Weiner <
[email protected]
>
Acked-by: Michal Hocko <
[email protected]
>
Cc: Hugh Dickins <
[email protected]
>
Cc: Tejun Heo <
[email protected]
>
Cc: Vladimir Davydov <
[email protected]
>
Signed-off-by: Andrew Morton <
[email protected]
>
Signed-off-by: Linus Torvalds <
[email protected]
>
mm/memcontrol.c
patch
|
blob
|
history
diff --git
a/mm/memcontrol.c
b/mm/memcontrol.c
index f7b6bec9f53876c2a8aedcf7b9cb8cb23e54afc0..a73f3947f5d92cec5ed7d206cad54be09c81bc66 100644
(file)
--- a/
mm/memcontrol.c
+++ b/
mm/memcontrol.c
@@
-2613,13
+2613,13
@@
retry:
if (!(gfp_mask & __GFP_WAIT))
goto nomem;
- if (gfp_mask & __GFP_NORETRY)
- goto nomem;
-
nr_reclaimed = mem_cgroup_reclaim(mem_over_limit, gfp_mask, flags);
if (mem_cgroup_margin(mem_over_limit) >= batch)
goto retry;
+
+ if (gfp_mask & __GFP_NORETRY)
+ goto nomem;
/*
* Even though the limit is exceeded at this point, reclaim
* may have been able to free some pages. Retry the charge