]> git.karo-electronics.de Git - karo-tx-linux.git/commit
numa, mm: Support NUMA hinting page faults from gup/gup_fast
authorAndrea Arcangeli <aarcange@redhat.com>
Fri, 5 Oct 2012 19:36:27 +0000 (21:36 +0200)
committerIngo Molnar <mingo@kernel.org>
Sun, 28 Oct 2012 16:31:05 +0000 (17:31 +0100)
commitdb4aa58db59a2a296141c698be8b4535d0051ca1
treead06b570f48e70d2f916b0b8548bb6ad4351b0e6
parentca2ea0747a5b44aaa3e05284a3a339145a1cc5a4
numa, mm: Support NUMA hinting page faults from gup/gup_fast

Introduce FOLL_NUMA to tell follow_page to check
pte/pmd_numa. get_user_pages must use FOLL_NUMA, and it's safe to do
so because it always invokes handle_mm_fault and retries the
follow_page later.

KVM secondary MMU page faults will trigger the NUMA hinting page
faults through gup_fast -> get_user_pages -> follow_page ->
handle_mm_fault.

Other follow_page callers like KSM should not use FOLL_NUMA, or they
would fail to get the pages if they use follow_page instead of
get_user_pages.

[ This patch was picked up from the AutoNUMA tree. ]

Originally-by: Andrea Arcangeli <aarcange@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
[ ported to this tree. ]
Signed-off-by: Ingo Molnar <mingo@kernel.org>
include/linux/mm.h
mm/memory.c