]> git.karo-electronics.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>
Wed, 3 Oct 2012 06:49:32 +0000 (16:49 +1000)
commit52c18fa7892e33380b27a0adee2f7a66e4e538cd
treeffe0accceecda7e55d0b33b05fdb6dcc8f9b1931
parent67feb0689afc768962132761f3b8089e59a97fe2
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