From: Kent Liu Date: Thu, 24 Jul 2008 04:28:18 +0000 (-0700) Subject: memory-hotplug: don't calculate vm_total_pages twice when rebuilding zonelists in... X-Git-Tag: v2.6.27-rc1~754 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=2f7f24eca31c4fc2fdb134b2ef743ccd67cfb9a9;p=linux-2.6-omap-h63xx.git memory-hotplug: don't calculate vm_total_pages twice when rebuilding zonelists in online_pages() If zonelist is required to be rebuilt in online_pages(), there is no need to recalculate vm_total_pages in that function, as it has been updated in the call build_all_zonelists(). Signed-off-by: Kent Liu Acked-by: KAMEZAWA Hiroyuki Cc: Yasunori Goto Cc: Andy Whitcroft Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/mm/memory_hotplug.c b/mm/memory_hotplug.c index 0fb05b258f0..93aba78dc8b 100644 --- a/mm/memory_hotplug.c +++ b/mm/memory_hotplug.c @@ -429,7 +429,9 @@ int online_pages(unsigned long pfn, unsigned long nr_pages) if (need_zonelists_rebuild) build_all_zonelists(); - vm_total_pages = nr_free_pagecache_pages(); + else + vm_total_pages = nr_free_pagecache_pages(); + writeback_set_ratelimit(); if (onlined_pages)