]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: numa: take THP into account when migrating pages for NUMA balancing
authorMel Gorman <mgorman@suse.de>
Wed, 20 Feb 2013 02:14:37 +0000 (13:14 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 20 Feb 2013 05:52:44 +0000 (16:52 +1100)
commit4e089822144dcdfdb02edbbc85b72f1e135cc7ed
tree0f7d5cb0b65606a21fcdbc791c75c55932ab627b
parenta44e687aad8e7657e01103011cd593d92e5b3149
mm: numa: take THP into account when migrating pages for NUMA balancing

Wanpeng Li pointed out that numamigrate_isolate_page() assumes that only
one base page is being migrated when in fact it can also be checking THP.
The consequences are that a migration will be attempted when a target node
is nearly full and fail later.  It's unlikely to be user-visible but it
should be fixed.  While we are there, migrate_balanced_pgdat() should
treat nr_migrate_pages as an unsigned long as it is treated as a
watermark.

Signed-off-by: Mel Gorman <mgorman@suse.de>
Suggested-by: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Simon Jeons <simon.jeons@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/migrate.c