diff options
author | Gleb Natapov <gleb@redhat.com> | 2011-03-22 16:30:51 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-03-22 17:44:02 -0700 |
commit | 318b275fbca1ab9ec0862de71420e0e92c3d1aa7 (patch) | |
tree | aa4984469443ed53b4e7fa23d3f91966e536a803 /Makefile | |
parent | 5fda1bd5b8869574dad8e1f9f71e23bf0c186274 (diff) | |
download | linux-318b275fbca1ab9ec0862de71420e0e92c3d1aa7.tar.gz linux-318b275fbca1ab9ec0862de71420e0e92c3d1aa7.tar.bz2 linux-318b275fbca1ab9ec0862de71420e0e92c3d1aa7.zip |
mm: allow GUP to fail instead of waiting on a page
GUP user may want to try to acquire a reference to a page if it is already
in memory, but not if IO, to bring it in, is needed. For example KVM may
tell vcpu to schedule another guest process if current one is trying to
access swapped out page. Meanwhile, the page will be swapped in and the
guest process, that depends on it, will be able to run again.
This patch adds FAULT_FLAG_RETRY_NOWAIT (suggested by Linus) and
FOLL_NOWAIT follow_page flags. FAULT_FLAG_RETRY_NOWAIT, when used in
conjunction with VM_FAULT_ALLOW_RETRY, indicates to handle_mm_fault that
it shouldn't drop mmap_sem and wait on a page, but return VM_FAULT_RETRY
instead.
[akpm@linux-foundation.org: improve FOLL_NOWAIT comment]
Signed-off-by: Gleb Natapov <gleb@redhat.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Hugh Dickins <hughd@google.com>
Acked-by: Rik van Riel <riel@redhat.com>
Cc: Michel Lespinasse <walken@google.com>
Cc: Avi Kivity <avi@redhat.com>
Cc: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'Makefile')
0 files changed, 0 insertions, 0 deletions