Searched hist:a6dc60f8975ad96d162915e07703a4439c80dcf0 (Results 1 – 1 of 1) sorted by relevance
/openbmc/linux/mm/ |
H A D | vmscan.c | diff 2e2e425989080cc534fc0fca154cae515f971cf5 Tue Apr 21 14:24:57 CDT 2009 KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> vmscan,memcg: reintroduce sc->may_swap
Commit a6dc60f8975ad96d162915e07703a4439c80dcf0 ("vmscan: rename sc.may_swap to may_unmap") removed the may_swap flag, but memcg had used it as a flag for "we need to use swap?", as the name indicate.
And in the current implementation, memcg cannot reclaim mapped file caches when mem+swap hits the limit.
re-introduce may_swap flag and handle it at get_scan_ratio(). This patch doesn't influence any scan_control users other than memcg.
Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Daisuke Nishimura <nishimura@mxp.nes.nec.co.jp> Acked-by: Johannes Weiner <hannes@cmpxchg.org> Cc: Balbir Singh <balbir@linux.vnet.ibm.com> Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> diff a6dc60f8975ad96d162915e07703a4439c80dcf0 Tue Mar 31 17:19:30 CDT 2009 Johannes Weiner <hannes@cmpxchg.org> vmscan: rename sc.may_swap to may_unmap
sc.may_swap does not only influence reclaiming of anon pages but pages mapped into pagetables in general, which also includes mapped file pages.
In shrink_page_list():
if (!sc->may_swap && page_mapped(page)) goto keep_locked;
For anon pages, this makes sense as they are always mapped and reclaiming them always requires swapping.
But mapped file pages are skipped here as well and it has nothing to do with swapping.
The real effect of the knob is whether mapped pages are unmapped and reclaimed or not. Rename it to `may_unmap' to have its name match its actual meaning more precisely.
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org> Reviewed-by: MinChan Kim <minchan.kim@gmail.com> Reviewed-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Cc: Lee Schermerhorn <lee.schermerhorn@hp.com> Cc: Rik van Riel <riel@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|