linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [BUGFIX] [mmotm] Reduce memory resource controller overhead fixes
@ 2009-06-29 17:09 Balbir Singh
  0 siblings, 0 replies; only message in thread
From: Balbir Singh @ 2009-06-29 17:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-mm, KAMEZAWA Hiroyuki, nishimura, menage


From: Balbir Singh <balbir@linux.vnet.ibm.com>

Fix an incorrect condition in memcg lru manipulation

The PageAcctLRU bit itself does not mean a lot without checking
if the mem cgroup is the same as the root cgroup. This patch
fixes a left over from the previous versions.

Reported-by:KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>

---

 mm/memcontrol.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 4cc9d0d..0608719 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -414,7 +414,7 @@ void mem_cgroup_rotate_lru_list(struct page *page, enum lru_list lru)
 	 */
 	smp_rmb();
 	/* unused or root page is not rotated. */
-	if (!PageCgroupUsed(pc) || PageCgroupAcctLRU(pc))
+	if (!PageCgroupUsed(pc) || mem_cgroup_is_root(pc->mem_cgroup))
 		return;
 	mz = page_cgroup_zoneinfo(pc);
 	list_move(&pc->lru, &mz->lists[lru]);

-- 
	Balbir

--
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/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-29 17:09 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-29 17:09 [BUGFIX] [mmotm] Reduce memory resource controller overhead fixes Balbir Singh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox