]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mm: compaction: iron out isolate_freepages_block() and isolate_freepages_range()
authorMel Gorman <mgorman@suse.de>
Fri, 28 Sep 2012 00:19:46 +0000 (10:19 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Mon, 8 Oct 2012 03:00:12 +0000 (14:00 +1100)
commit7671c953250ea8188f7131a6b1133937c08866af
treec77bc22d8dacb7f122dc9bb69273ed96e5fe561b
parentd0370a54699f5682ed1b55bbd8a2ad61a13b4eac
mm: compaction: iron out isolate_freepages_block() and isolate_freepages_range()

Andrew pointed out that isolate_freepages_block() is "straggly" and
isolate_freepages_range() is making assumptions on how compact_control is
used which is delicate.  This patch straightens isolate_freepages_block()
and makes it fly straight and initialses compact_control to zeros in
isolate_freepages_range().  The code should be easier to follow and is
functionally equivalent.  The CMA failure path is now a little more
expensive but that is a marginal corner-case.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Richard Davies <richard@arachsys.com>
Cc: Shaohua Li <shli@kernel.org>
Cc: Avi Kivity <avi@redhat.com>
Cc: Rafael Aquini <aquini@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/compaction.c