From: John Dykstra Date: Fri, 25 May 2012 21:12:46 +0000 (-0500) Subject: x86/mm/pat: Improve scaling of pat_pagerange_is_ram() X-Git-Tag: v3.5-rc1~32^2~4 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fa83523f45fbb403eba4ebc5704bf98aa4da0163;p=pandora-kernel.git x86/mm/pat: Improve scaling of pat_pagerange_is_ram() Function pat_pagerange_is_ram() scales poorly to large address ranges, because it probes the resource tree for each page. On a 2.6 GHz Opteron, this function consumes 34 ms for a 1 GB range. It is called twice during untrack_pfn_vma(), slowing process cleanup and handicapping the OOM killer. This replacement consumes less than 1ms, under the same conditions. Signed-off-by: John Dykstra on behalf of Cray Inc. Acked-by: Suresh Siddha Cc: Linus Torvalds Cc: Andrew Morton Cc: Peter Zijlstra Link: http://lkml.kernel.org/r/1337980366.1979.6.camel@redwood [ Small stylistic cleanups and renames ] Signed-off-by: Ingo Molnar --- Reading git-diff-tree failed