]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: reduce the amount of work done when updating min_free_kbytes
authorMel Gorman <mgorman@suse.de>
Wed, 30 Nov 2011 04:11:06 +0000 (15:11 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 30 Nov 2011 04:13:46 +0000 (15:13 +1100)
commitafbb84d9eb55431ee4041f6a4dc6dbea2829a850
tree6c609200870395aacf18d90f5e8889614aecb04d
parent5a053f3c50ea3a4e7061899ef72b909c7ec663c0
mm: reduce the amount of work done when updating min_free_kbytes

When min_free_kbytes is updated, some pageblocks are marked
MIGRATE_RESERVE.  Ordinarily, this work is unnoticable as it happens early
in boot but on large machines with 1TB of memory, this has been reported
to delay boot times, probably due to the NUMA distances involved.

The bulk of the work is due to calling calling pageblock_is_reserved() an
unnecessary amount of times and accessing far more struct page metadata
than is necessary.  This patch significantly reduces the amount of work
done by setup_zone_migrate_reserve() improving boot times on 1TB machines.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/page_alloc.c