Re: mmotm 2011-05-06-16-39 uploaded

From: KAMEZAWA Hiroyuki
Date: Tue May 10 2011 - 05:04:46 EST


On Fri, 06 May 2011 16:39:31 -0700
akpm@xxxxxxxxxxxxxxxxxxxx wrote:


> memcg-reclaim-memory-from-nodes-in-round-robin-order.patch
> memcg-reclaim-memory-from-nodes-in-round-robin-fix.patch

I'm very sorry that this fix is required for this logic.
==

next_scan_node_update is the time when scan_nodes nodemask should be updated.
Then, time_after() is correct. Otherwise, next-scan_node_update is intialized
to be 0 and time_before() returns always true, scan_nodes never be updated.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx>
---
mm/memcontrol.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Index: mmotm-May6/mm/memcontrol.c
===================================================================
--- mmotm-May6.orig/mm/memcontrol.c
+++ mmotm-May6/mm/memcontrol.c
@@ -1517,7 +1517,7 @@ static void mem_cgroup_may_update_nodema
{
int nid;

- if (time_before(mem->next_scan_node_update, jiffies))
+ if (time_after(mem->next_scan_node_update, jiffies))
return;

mem->next_scan_node_update = jiffies + 10*HZ;

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