[PATCH] memcg reclaim shouldn't change zone->recent_rotated statics.

From: KOSAKI Motohiro
Date: Mon Nov 24 2008 - 22:23:11 EST


Hi

this is a trivial bugfix.
I think this is not serious bug.
but if memcgroup reclaim change zone statics, global reclaim can confusion a bit.


================================================
memcg reclaim shouldn't change zone->recent_rotated statics.


Signed-off-by: KOSAKI Motohiro <kosaki.motohiro@xxxxxxxxxxxxxx>
CC: Rik van Riel <riel@xxxxxxxxxx>
---
mm/vmscan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Index: b/mm/vmscan.c
===================================================================
--- a/mm/vmscan.c 2008-11-24 06:20:24.000000000 +0900
+++ b/mm/vmscan.c 2008-11-25 01:29:16.000000000 +0900
@@ -1254,7 +1254,8 @@ static void shrink_active_list(unsigned
* This helps balance scan pressure between file and anonymous
* pages in get_scan_ratio.
*/
- zone->recent_rotated[!!file] += pgmoved;
+ if (scan_global_lru(sc))
+ zone->recent_rotated[!!file] += pgmoved;

/*
* Move the pages to the [file or anon] inactive list.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/