mm: clear node in N_HIGH_MEMORY and stop kswapd when all memory is offlined
[linux-2.6.git] / mm / memory_hotplug.c
index e8116f8..bc5a081 100644 (file)
@@ -853,6 +853,10 @@ repeat:
 
        setup_per_zone_wmarks();
        calculate_zone_inactive_ratio(zone);
+       if (!node_present_pages(node)) {
+               node_clear_state(node, N_HIGH_MEMORY);
+               kswapd_stop(node);
+       }
 
        vm_total_pages = nr_free_pagecache_pages();
        writeback_set_ratelimit();