diff options
author | Kirill A. Shutemov <kirill.shutemov@linux.intel.com> | 2013-09-12 18:14:05 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-09-12 18:38:03 -0400 |
commit | c02925540ca7019465a43c00f8a3c0186ddace2b (patch) | |
tree | 3097ece86eedd0a01cf5dbc0a8f6c28fcbd1f4f7 /include/linux/mm.h | |
parent | 128ec037bafe5905b2e6f2796f426a1d247d0066 (diff) |
thp: consolidate code between handle_mm_fault() and do_huge_pmd_anonymous_page()
do_huge_pmd_anonymous_page() has copy-pasted piece of handle_mm_fault()
to handle fallback path.
Let's consolidate code back by introducing VM_FAULT_FALLBACK return
code.
Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
Acked-by: Hillf Danton <dhillf@gmail.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Hugh Dickins <hughd@google.com>
Cc: Wu Fengguang <fengguang.wu@intel.com>
Cc: Jan Kara <jack@suse.cz>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Matthew Wilcox <willy@linux.intel.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 928df792c005..8b6e55ee8855 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -877,11 +877,12 @@ static inline int page_mapped(struct page *page) | |||
877 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ | 877 | #define VM_FAULT_NOPAGE 0x0100 /* ->fault installed the pte, not return page */ |
878 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ | 878 | #define VM_FAULT_LOCKED 0x0200 /* ->fault locked the returned page */ |
879 | #define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */ | 879 | #define VM_FAULT_RETRY 0x0400 /* ->fault blocked, must retry */ |
880 | #define VM_FAULT_FALLBACK 0x0800 /* huge page fault failed, fall back to small */ | ||
880 | 881 | ||
881 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ | 882 | #define VM_FAULT_HWPOISON_LARGE_MASK 0xf000 /* encodes hpage index for large hwpoison */ |
882 | 883 | ||
883 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ | 884 | #define VM_FAULT_ERROR (VM_FAULT_OOM | VM_FAULT_SIGBUS | VM_FAULT_HWPOISON | \ |
884 | VM_FAULT_HWPOISON_LARGE) | 885 | VM_FAULT_FALLBACK | VM_FAULT_HWPOISON_LARGE) |
885 | 886 | ||
886 | /* Encode hstate index for a hwpoisoned large page */ | 887 | /* Encode hstate index for a hwpoisoned large page */ |
887 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) | 888 | #define VM_FAULT_SET_HINDEX(x) ((x) << 12) |