From: Mel Gorman Date: Thu, 3 Jul 2008 04:27:51 +0000 (+0100) Subject: Do not overwrite nr_zones on !NUMA when initialising zlcache_ptr X-Git-Tag: v2.6.26-rc9~67 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=494de90098784b8e2797598cefdd34188884ec2e;p=pandora-kernel.git Do not overwrite nr_zones on !NUMA when initialising zlcache_ptr The non-NUMA case of build_zonelist_cache() would initialize the zlcache_ptr for both node_zonelists[] to NULL. Which is problematic, since non-NUMA only has a single node_zonelists[] entry, and trying to zero the non-existent second one just overwrote the nr_zones field instead. As kswapd uses this value to determine what reclaim work is necessary, the result is that kswapd never reclaims. This causes processes to stall frequently in low-memory situations as they always direct reclaim. This patch initialises zlcache_ptr correctly. Signed-off-by: Mel Gorman Tested-by: Dan Williams [ Simplified patch a bit ] Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed