]> 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>
Wed, 26 Sep 2012 01:33:51 +0000 (11:33 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 27 Sep 2012 07:26:50 +0000 (17:26 +1000)
commitcde7fea9da9a7421fa8d4053f6e18ad384e83cc4
treedd6f82276cc3e97724fe4992a61d91d85a4397cf
parent2b6a5e8652784290241e92e2075c792a84d98084
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