From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: <linux-mm@kvack.org>, <linux-kernel@vger.kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [PATCH v2] vmscan: reverse lru scanning order
Date: Mon, 8 Aug 2011 15:02:07 +0400 [thread overview]
Message-ID: <20110808110207.30777.30800.stgit@localhost6> (raw)
In-Reply-To: <20110727111002.9985.94938.stgit@localhost6>
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)
{
WARNING: multiple messages have this Message-ID (diff)
From: Konstantin Khlebnikov <khlebnikov@openvz.org>
To: linux-mm@kvack.org, linux-kernel@vger.kernel.org
Cc: Andrew Morton <akpm@linux-foundation.org>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Subject: [PATCH v2] vmscan: reverse lru scanning order
Date: Mon, 8 Aug 2011 15:02:07 +0400 [thread overview]
Message-ID: <20110808110207.30777.30800.stgit@localhost6> (raw)
In-Reply-To: <20110727111002.9985.94938.stgit@localhost6>
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)
{
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2011-08-08 11:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-07-27 11:10 [PATCH RFC] mm: reverse lru scanning order Konstantin Khlebnikov
2011-07-27 11:10 ` Konstantin Khlebnikov
2011-08-01 16:15 ` Konstantin Khlebnikov
2011-08-01 16:15 ` Konstantin Khlebnikov
2011-08-01 23:45 ` KOSAKI Motohiro
2011-08-01 23:45 ` KOSAKI Motohiro
2011-08-08 11:02 ` Konstantin Khlebnikov [this message]
2011-08-08 11:02 ` [PATCH v2] vmscan: " Konstantin Khlebnikov
2011-08-08 12:22 ` Michal Hocko
2011-08-08 12:22 ` Michal Hocko
2011-08-08 22:30 ` Minchan Kim
2011-08-08 22:30 ` Minchan Kim
2011-08-08 23:48 ` KAMEZAWA Hiroyuki
2011-08-08 23:48 ` KAMEZAWA Hiroyuki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110808110207.30777.30800.stgit@localhost6 \
--to=khlebnikov@openvz.org \
--cc=akpm@linux-foundation.org \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.