Re: [PATCH 0/12] memcg updates v5

From: KAMEZAWA Hiroyuki
Date: Thu Sep 25 2008 - 22:57:56 EST


On Fri, 26 Sep 2008 11:58:10 +0900
KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> wrote:

> Thank you.
>
> How about following ?
> -Kame
> ==
> Index: mmotm-2.6.27-rc7+/mm/memcontrol.c
> ===================================================================
> --- mmotm-2.6.27-rc7+.orig/mm/memcontrol.c
> +++ mmotm-2.6.27-rc7+/mm/memcontrol.c
> @@ -597,8 +597,8 @@ __set_page_cgroup_lru(struct memcg_percp
> spin_lock(&mz->lru_lock);
> }
> if (PageCgroupUsed(pc) && !PageCgroupLRU(pc)) {
> - SetPageCgroupLRU(pc);
> __mem_cgroup_add_list(mz, pc);
> + SetPageCgroupLRU(pc);
> }
> }
>
Of course, remove side should be..
-Kame
==
Index: mmotm-2.6.27-rc7+/mm/memcontrol.c
===================================================================
--- mmotm-2.6.27-rc7+.orig/mm/memcontrol.c
+++ mmotm-2.6.27-rc7+/mm/memcontrol.c
@@ -564,8 +564,8 @@ __release_page_cgroup(struct memcg_percp
spin_lock(&mz->lru_lock);
}
if (!PageCgroupUsed(pc) && PageCgroupLRU(pc)) {
- __mem_cgroup_remove_list(mz, pc);
ClearPageCgroupLRU(pc);
+ __mem_cgroup_remove_list(mz, pc);
}
}
if (prev_mz)
@@ -597,8 +597,8 @@ __set_page_cgroup_lru(struct memcg_percp
spin_lock(&mz->lru_lock);
}
if (PageCgroupUsed(pc) && !PageCgroupLRU(pc)) {
- SetPageCgroupLRU(pc);
__mem_cgroup_add_list(mz, pc);
+ SetPageCgroupLRU(pc);
}
}


--
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/