diff options
author | KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> | 2009-01-07 21:08:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-01-08 11:31:08 -0500 |
commit | a7885eb8ad465ec9db99ac5b5e6680f0ca8e11c8 (patch) | |
tree | 4f3ffaa399fbc16003cc1787228f10543dc9c3ef /mm/vmscan.c | |
parent | 2733c06ac864ed40b9dfbbd5270f3f16949bd4a1 (diff) |
memcg: swappiness
Currently, /proc/sys/vm/swappiness can change swappiness ratio for global
reclaim. However, memcg reclaim doesn't have tuning parameter for itself.
In general, the optimal swappiness depend on workload. (e.g. hpc
workload need to low swappiness than the others.)
Then, per cgroup swappiness improve administrator tunability.
Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@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/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index f03c239440ad..ece2f405187f 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1707,14 +1707,15 @@ unsigned long try_to_free_pages(struct zonelist *zonelist, int order, | |||
1707 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR | 1707 | #ifdef CONFIG_CGROUP_MEM_RES_CTLR |
1708 | 1708 | ||
1709 | unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont, | 1709 | unsigned long try_to_free_mem_cgroup_pages(struct mem_cgroup *mem_cont, |
1710 | gfp_t gfp_mask, | 1710 | gfp_t gfp_mask, |
1711 | bool noswap) | 1711 | bool noswap, |
1712 | unsigned int swappiness) | ||
1712 | { | 1713 | { |
1713 | struct scan_control sc = { | 1714 | struct scan_control sc = { |
1714 | .may_writepage = !laptop_mode, | 1715 | .may_writepage = !laptop_mode, |
1715 | .may_swap = 1, | 1716 | .may_swap = 1, |
1716 | .swap_cluster_max = SWAP_CLUSTER_MAX, | 1717 | .swap_cluster_max = SWAP_CLUSTER_MAX, |
1717 | .swappiness = vm_swappiness, | 1718 | .swappiness = swappiness, |
1718 | .order = 0, | 1719 | .order = 0, |
1719 | .mem_cgroup = mem_cont, | 1720 | .mem_cgroup = mem_cont, |
1720 | .isolate_pages = mem_cgroup_isolate_pages, | 1721 | .isolate_pages = mem_cgroup_isolate_pages, |