History

mm: mempolicy: Check for misplaced page

This patch provides a new function to test whether a page resides on a node that is appropriate for the mempolicy for the vma and address where the page is supposed to be mapped. This involves looking up the node where the page belongs. So, the function returns that node so that it may be used to allocated the page without consulting the policy again. A subsequent patch will call this function from the fault path. Because of this, I don't want to go ahead and allocate the page, e.g., via alloc_page_vma() only to have to free it if it has the correct policy. So, I just mimic the alloc_page_vma() node computation logic--sort of. Note: we could use this function to implement a MPOL_MF_STRICT behavior when migrating pages to match mbind() mempolicy--e.g., to ensure that pages in an interleaved range are reinterleaved rather than left where they are when they reside on any page in the interleave nodemask.

Lee Schermerhorn committed 14 years ago

Commit 771fb4d1 parent d3a71033 files · +85 −0Browse files

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

Unified · Split

include/uapi/linux/mempolicy.h+1−0
@@ -61,6 +61,7 @@ enum mpol_rebind_step { · 60 unmodified lines
6161 #define MPOL_F_SHARED (1 << 0) /* identify shared policies */
6262 #define MPOL_F_LOCAL (1 << 1) /* preferred local allocation */
6363 #define MPOL_F_REBINDING (1 << 2) /* identify policies in rebinding */
64+#define MPOL_F_MOF (1 << 3) /* this policy wants migrate on fault */
6465
6566
6667 #endif /* _UAPI_LINUX_MEMPOLICY_H */

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