Commit:     417eead30434b4bd09a54455e839cf9a62c05460
Parent:     fa1de9008c9bcce8ab5122529dd19b24c273eba2
Author:     KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 7 00:14:14 2008 -0800
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Thu Feb 7 08:42:20 2008 -0800

    memory cgroup enhancements: fix zone handling in try_to_free_mem_cgroup_page
    Because NODE_DATA(node)->node_zonelists[] is guaranteed to contain all
    necessary zones, it is not necessary to use for_each_online_node.
    And this for_each_online_node() makes reclaim routine start always
    from node 0. This is not good. This patch makes reclaim start from
    caller's node and just use usual (default) zonelist order.
    [EMAIL PROTECTED]: fix warning]
    Signed-off-by: KAMEZAWA Hiroyuki <[EMAIL PROTECTED]>
    Cc: Balbir Singh <[EMAIL PROTECTED]>
    Cc: Pavel Emelianov <[EMAIL PROTECTED]>
    Cc: Paul Menage <[EMAIL PROTECTED]>
    Cc: Peter Zijlstra <[EMAIL PROTECTED]>
    Cc: "Eric W. Biederman" <[EMAIL PROTECTED]>
    Cc: Nick Piggin <[EMAIL PROTECTED]>
    Cc: Kirill Korotaev <[EMAIL PROTECTED]>
    Cc: Herbert Poetzl <[EMAIL PROTECTED]>
    Cc: David Rientjes <[EMAIL PROTECTED]>
    Cc: Vaidyanathan Srinivasan <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
 mm/vmscan.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1b85217..159e6c7 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -1365,15 +1365,12 @@ unsigned long try_to_free_mem_cgroup_pages(struct 
mem_cgroup *mem_cont,
                .mem_cgroup = mem_cont,
                .isolate_pages = mem_cgroup_isolate_pages,
-       int node;
        struct zone **zones;
        int target_zone = gfp_zone(GFP_HIGHUSER_MOVABLE);
-       for_each_online_node(node) {
-               zones = NODE_DATA(node)->node_zonelists[target_zone].zones;
-               if (do_try_to_free_pages(zones, sc.gfp_mask, &sc))
-                       return 1;
-       }
+       zones = NODE_DATA(numa_node_id())->node_zonelists[target_zone].zones;
+       if (do_try_to_free_pages(zones, sc.gfp_mask, &sc))
+               return 1;
        return 0;
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at

Reply via email to