diff options
author | KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> | 2009-01-07 21:08:10 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:06 -0500 |
commit | 2c26fdd70c3094fa3e84caf9ef434911933d5477 (patch) | |
tree | 06a3bafc12f5f8fd91d9ed1fca5ea0a632ef2004 /mm/shmem.c | |
parent | 887007561ae58628f03aa9046949747c04f63be8 (diff) |
memcg: revert gfp mask fix
My patch, memcg-fix-gfp_mask-of-callers-of-charge.patch changed gfp_mask
of callers of charge to be GFP_HIGHUSER_MOVABLE for showing what will
happen at memory reclaim.
But in recent discussion, it's NACKed because it sounds ugly.
This patch is for reverting it and add some clean up to gfp_mask of
callers of charge. No behavior change but need review before generating
HUNK in deep queue.
This patch also adds explanation to meaning of gfp_mask passed to charge
functions in memcontrol.h.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Balbir Singh <balbir@in.ibm.com>
Cc: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
Cc: Hugh Dickins <hugh@veritas.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index adf5c3eedbc9..bbb7b043c986 100644 --- a/mm/shmem.c +++ b/mm/shmem.c | |||
@@ -932,8 +932,8 @@ found: | |||
932 | * Charge page using GFP_HIGHUSER_MOVABLE while we can wait. | 932 | * Charge page using GFP_HIGHUSER_MOVABLE while we can wait. |
933 | * charged back to the user(not to caller) when swap account is used. | 933 | * charged back to the user(not to caller) when swap account is used. |
934 | */ | 934 | */ |
935 | error = mem_cgroup_cache_charge_swapin(page, | 935 | error = mem_cgroup_cache_charge_swapin(page, current->mm, GFP_KERNEL, |
936 | current->mm, GFP_HIGHUSER_MOVABLE, true); | 936 | true); |
937 | if (error) | 937 | if (error) |
938 | goto out; | 938 | goto out; |
939 | error = radix_tree_preload(GFP_KERNEL); | 939 | error = radix_tree_preload(GFP_KERNEL); |
@@ -1275,7 +1275,7 @@ repeat: | |||
1275 | * charge against this swap cache here. | 1275 | * charge against this swap cache here. |
1276 | */ | 1276 | */ |
1277 | if (mem_cgroup_cache_charge_swapin(swappage, | 1277 | if (mem_cgroup_cache_charge_swapin(swappage, |
1278 | current->mm, gfp, false)) { | 1278 | current->mm, gfp & GFP_RECLAIM_MASK, false)) { |
1279 | page_cache_release(swappage); | 1279 | page_cache_release(swappage); |
1280 | error = -ENOMEM; | 1280 | error = -ENOMEM; |
1281 | goto failed; | 1281 | goto failed; |
@@ -1393,7 +1393,7 @@ repeat: | |||
1393 | 1393 | ||
1394 | /* Precharge page while we can wait, compensate after */ | 1394 | /* Precharge page while we can wait, compensate after */ |
1395 | error = mem_cgroup_cache_charge(filepage, current->mm, | 1395 | error = mem_cgroup_cache_charge(filepage, current->mm, |
1396 | GFP_HIGHUSER_MOVABLE); | 1396 | GFP_KERNEL); |
1397 | if (error) { | 1397 | if (error) { |
1398 | page_cache_release(filepage); | 1398 | page_cache_release(filepage); |
1399 | shmem_unacct_blocks(info->flags, 1); | 1399 | shmem_unacct_blocks(info->flags, 1); |