]> 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, 16 Nov 2011 23:41:27 +0000 (10:41 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 18 Nov 2011 03:49:52 +0000 (14:49 +1100)
commitd982f70844679ec5b59136c1d72f70b8eda51e96
tree91d945ee737dab04ea9f6abc4f3d083ecc4f3d06
parent336bffdb599b857ad9b3d1967cc074d7b4c2c998
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