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/memcontrol.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/memcontrol.c')
-rw-r--r-- | mm/memcontrol.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 9bf5d7c8ede7..b9cd57b667d6 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c | |||
@@ -1248,7 +1248,7 @@ int mem_cgroup_prepare_migration(struct page *page, struct mem_cgroup **ptr) | |||
1248 | unlock_page_cgroup(pc); | 1248 | unlock_page_cgroup(pc); |
1249 | 1249 | ||
1250 | if (mem) { | 1250 | if (mem) { |
1251 | ret = mem_cgroup_try_charge(NULL, GFP_HIGHUSER_MOVABLE, &mem); | 1251 | ret = mem_cgroup_try_charge(NULL, GFP_KERNEL, &mem); |
1252 | css_put(&mem->css); | 1252 | css_put(&mem->css); |
1253 | } | 1253 | } |
1254 | *ptr = mem; | 1254 | *ptr = mem; |
@@ -1378,7 +1378,7 @@ static int mem_cgroup_resize_limit(struct mem_cgroup *memcg, | |||
1378 | break; | 1378 | break; |
1379 | 1379 | ||
1380 | progress = try_to_free_mem_cgroup_pages(memcg, | 1380 | progress = try_to_free_mem_cgroup_pages(memcg, |
1381 | GFP_HIGHUSER_MOVABLE, false); | 1381 | GFP_KERNEL, false); |
1382 | if (!progress) retry_count--; | 1382 | if (!progress) retry_count--; |
1383 | } | 1383 | } |
1384 | return ret; | 1384 | return ret; |
@@ -1418,7 +1418,7 @@ int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, | |||
1418 | break; | 1418 | break; |
1419 | 1419 | ||
1420 | oldusage = res_counter_read_u64(&memcg->memsw, RES_USAGE); | 1420 | oldusage = res_counter_read_u64(&memcg->memsw, RES_USAGE); |
1421 | try_to_free_mem_cgroup_pages(memcg, GFP_HIGHUSER_MOVABLE, true); | 1421 | try_to_free_mem_cgroup_pages(memcg, GFP_KERNEL, true); |
1422 | curusage = res_counter_read_u64(&memcg->memsw, RES_USAGE); | 1422 | curusage = res_counter_read_u64(&memcg->memsw, RES_USAGE); |
1423 | if (curusage >= oldusage) | 1423 | if (curusage >= oldusage) |
1424 | retry_count--; | 1424 | retry_count--; |
@@ -1464,7 +1464,7 @@ static int mem_cgroup_force_empty_list(struct mem_cgroup *mem, | |||
1464 | } | 1464 | } |
1465 | spin_unlock_irqrestore(&zone->lru_lock, flags); | 1465 | spin_unlock_irqrestore(&zone->lru_lock, flags); |
1466 | 1466 | ||
1467 | ret = mem_cgroup_move_parent(pc, mem, GFP_HIGHUSER_MOVABLE); | 1467 | ret = mem_cgroup_move_parent(pc, mem, GFP_KERNEL); |
1468 | if (ret == -ENOMEM) | 1468 | if (ret == -ENOMEM) |
1469 | break; | 1469 | break; |
1470 | 1470 | ||
@@ -1550,7 +1550,7 @@ try_to_free: | |||
1550 | goto out; | 1550 | goto out; |
1551 | } | 1551 | } |
1552 | progress = try_to_free_mem_cgroup_pages(mem, | 1552 | progress = try_to_free_mem_cgroup_pages(mem, |
1553 | GFP_HIGHUSER_MOVABLE, false); | 1553 | GFP_KERNEL, false); |
1554 | if (!progress) { | 1554 | if (!progress) { |
1555 | nr_retries--; | 1555 | nr_retries--; |
1556 | /* maybe some writeback is necessary */ | 1556 | /* maybe some writeback is necessary */ |