lkml.org 
[lkml]   [2011]   [Aug]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH v2] vmscan: reverse lru scanning order
From
Date
LRU scanning order was accidentially changed in commit v2.6.27-5584-gb69408e:
"vmscan: Use an indexed array for LRU variables".
Before that commit reclaimer always scan active lists first.

This patch just reverse it back.

Signed-off-by: Konstantin Khlebnikov <khlebnikov@openvz.org>
---
include/linux/mmzone.h | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h
index be1ac8d..0094389 100644
--- a/include/linux/mmzone.h
+++ b/include/linux/mmzone.h
@@ -141,7 +141,8 @@ enum lru_list {

#define for_each_lru(l) for (l = 0; l < NR_LRU_LISTS; l++)

-#define for_each_evictable_lru(l) for (l = 0; l <= LRU_ACTIVE_FILE; l++)
+#define for_each_evictable_lru(l) \
+ for (l = LRU_ACTIVE_FILE; (int)l >= LRU_INACTIVE_ANON; l--)

static inline int is_file_lru(enum lru_list l)
{


\
 
 \ /
  Last update: 2011-08-08 13:05    [from the cache]
©2003-2011 Jasper Spaans