History

mm: mempolicy: Add MPOL_NOOP

This patch augments the MPOL_MF_LAZY feature by adding a "NOOP" policy to mbind(). When the NOOP policy is used with the 'MOVE and 'LAZY flags, mbind() will map the pages PROT_NONE so that they will be migrated on the next touch. This allows an application to prepare for a new phase of operation where different regions of shared storage will be assigned to worker threads, w/o changing policy. Note that we could just use "default" policy in this case. However, this also allows an application to request that pages be migrated, only if necessary, to follow any arbitrary policy that might currently apply to a range of pages, without knowing the policy, or without specifying multiple mbind()s for ranges with different policies. [ Bug in early version of mpol_parse_str() reported by Fengguang Wu. ]

Lee Schermerhorn committed 14 years ago

Commit d3a71031 parent 479e2802 files · +7 −5Browse files

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

Unified · Split

include/uapi/linux/mempolicy.h+1−0
@@ -21,6 +21,7 @@ enum { · 20 unmodified lines
21 MPOL_BIND,21 MPOL_BIND,
22 MPOL_INTERLEAVE,22 MPOL_INTERLEAVE,
23 MPOL_LOCAL,23 MPOL_LOCAL,
24 MPOL_NOOP, /* retain existing policy for range */
24 MPOL_MAX, /* always last member of enum */25 MPOL_MAX, /* always last member of enum */
25};26};
26 27

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