lkml.org 
[lkml]   [2009]   [Mar]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [BUGFIX][PATCH 1/5] memcg use correct scan number at reclaim
* KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> [2009-03-12 09:55:16]:

> Andrew, this [1/5] is a bug fix, others are not.
>
> ==
> From: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
>
> Even when page reclaim is under mem_cgroup, # of scan page is determined by
> status of global LRU. Fix that.
>
> Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
> Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
> ---
> mm/vmscan.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> Index: mmotm-2.6.29-Mar10/mm/vmscan.c
> ===================================================================
> --- mmotm-2.6.29-Mar10.orig/mm/vmscan.c
> +++ mmotm-2.6.29-Mar10/mm/vmscan.c
> @@ -1470,7 +1470,7 @@ static void shrink_zone(int priority, st
> int file = is_file_lru(l);
> int scan;
>
> - scan = zone_page_state(zone, NR_LRU_BASE + l);
> + scan = zone_nr_pages(zone, sc, l);

I have the exact same patch in my patch queue. BTW, mem_cgroup_zone_nr_pages is
buggy. We don't hold any sort of lock while extracting
MEM_CGROUP_ZSTAT (ideally we need zone->lru_lock). Without that how do
we guarantee that MEM_CGRUP_ZSTAT is not changing at the same time as
we are reading it?

> if (priority) {
> scan >>= priority;
> scan = (scan * percent[file]) / 100;
>
>

--
Balbir


\
 
 \ /
  Last update: 2009-03-12 04:51    [from the cache]
©2003-2011 Jasper Spaans