History

mm/hmm: remove HMM_FAULT_SNAPSHOT

Now that flags are handled on a fine-grained per-page basis this global flag is redundant and has a confusing overlap with the pfn_flags_mask and default_flags. Normalize the HMM_FAULT_SNAPSHOT behavior into one place. Callers needing the SNAPSHOT behavior should set a pfn_flags_mask and default_flags that always results in a cleared HMM_PFN_VALID. Then no pages will be faulted, and HMM_FAULT_SNAPSHOT is not a special flow that overrides the masking mechanism. As this is the last flag, also remove the flags argument. If future flags are needed they can be part of the struct hmm_range function arguments.

Jason Gunthorpe committed 6 years ago

Commit 6bfef2f1 parent f970b975 files · +17 −21Browse files

Showing the changes to include/linux (1 of 5 files). Show all

Unified · Split

include/linux/hmm.h+1−4
@@ -117,13 +117,10 @@ static inline struct page *hmm_device_entry_to_page(const struct hmm_range *rang · 116 unmodified lines
117 return pfn_to_page(entry >> range->pfn_shift);117 return pfn_to_page(entry >> range->pfn_shift);
118}118}
119 119
120/* Don't fault in missing PTEs, just snapshot the current state. */
121#define HMM_FAULT_SNAPSHOT (1 << 1)
122
123/*120/*
124 * Please see Documentation/vm/hmm.rst for how to use the range API.121 * Please see Documentation/vm/hmm.rst for how to use the range API.
125 */122 */
126long hmm_range_fault(struct hmm_range *range, unsigned int flags);123long hmm_range_fault(struct hmm_range *range);
127 124
128/*125/*
129 * HMM_RANGE_DEFAULT_TIMEOUT - default timeout (ms) when waiting for a range126 * HMM_RANGE_DEFAULT_TIMEOUT - default timeout (ms) when waiting for a range

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t