UPSTREAM: mm: add FAULT_FLAG_VMA_LOCK flag
Add a new flag to distinguish page faults handled under protection of per-vma lock. [surenb@google.com: document FAULT_FLAG_VMA_LOCK flag] Link: https://lkml.kernel.org/r/20230301022720.1380780-2-surenb@google.com Link: https://lore.kernel.org/all/20230301113648.7c279865@canb.auug.org.au/ Link: https://lkml.kernel.org/r/20230227173632.3292573-26-surenb@google.com Signed-off-by: Suren Baghdasaryan <surenb@google.com> Reviewed-by: Laurent Dufour <laurent.dufour@fr.ibm.com> Cc: Dan Carpenter <error27@gmail.com> Cc: David Hildenbrand <david@redhat.com> Cc: David Howells <dhowells@redhat.com> Cc: Hugh Dickins <hughd@google.com> Cc: Jason Gunthorpe <jgg@ziepe.ca> Cc: Liam R. Howlett <Liam.Howlett@oracle.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Matthew Wilcox <willy@infradead.org> Cc: Pavel Tatashin <pasha.tatashin@soleen.com> Cc: Yu Zhao <yuzhao@google.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> (cherry picked from commit 55324e46eb8b886ecd08c9a089d3a694c705b3b0) Bug: 161210518 Change-Id: I53d01a529e75307dd613654732eadb46cf17f1e2 Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
parent
c06661eab5
commit
318bf22529
2 changed files with 4 additions and 1 deletions
|
|
@ -474,7 +474,8 @@ static inline bool fault_flag_allow_retry_first(enum fault_flag flags)
|
|||
{ FAULT_FLAG_USER, "USER" }, \
|
||||
{ FAULT_FLAG_REMOTE, "REMOTE" }, \
|
||||
{ FAULT_FLAG_INSTRUCTION, "INSTRUCTION" }, \
|
||||
{ FAULT_FLAG_INTERRUPTIBLE, "INTERRUPTIBLE" }
|
||||
{ FAULT_FLAG_INTERRUPTIBLE, "INTERRUPTIBLE" }, \
|
||||
{ FAULT_FLAG_VMA_LOCK, "VMA_LOCK" }
|
||||
|
||||
/*
|
||||
* vm_fault is filled by the pagefault handler and passed to the vma's
|
||||
|
|
|
|||
|
|
@ -997,6 +997,7 @@ typedef struct {
|
|||
* mapped R/O.
|
||||
* @FAULT_FLAG_ORIG_PTE_VALID: whether the fault has vmf->orig_pte cached.
|
||||
* We should only access orig_pte if this flag set.
|
||||
* @FAULT_FLAG_VMA_LOCK: The fault is handled under VMA lock.
|
||||
*
|
||||
* About @FAULT_FLAG_ALLOW_RETRY and @FAULT_FLAG_TRIED: we can specify
|
||||
* whether we would allow page faults to retry by specifying these two
|
||||
|
|
@ -1034,6 +1035,7 @@ enum fault_flag {
|
|||
FAULT_FLAG_INTERRUPTIBLE = 1 << 9,
|
||||
FAULT_FLAG_UNSHARE = 1 << 10,
|
||||
FAULT_FLAG_ORIG_PTE_VALID = 1 << 11,
|
||||
FAULT_FLAG_VMA_LOCK = 1 << 12,
|
||||
};
|
||||
|
||||
typedef unsigned int __bitwise zap_flags_t;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue