mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
mm: filter based on a nodemask as well as a gfp_mask
The MPOL_BIND policy creates a zonelist that is used for allocations controlled by that mempolicy. As the per-node zonelist is already being filtered based on a zone id, this patch adds a version of __alloc_pages() that takes a nodemask for further filtering. This eliminates the need for MPOL_BIND to create a custom zonelist. A positive benefit of this is that allocations using MPOL_BIND now use the local node's distance-ordered zonelist instead of a custom node-id-ordered zonelist. I.e., pages will be allocated from the closest allowed node with available memory. [[email protected]: Mempolicy: update stale documentation and comments] [[email protected]: Mempolicy: make dequeue_huge_page_vma() obey MPOL_BIND nodemask] [[email protected]: Mempolicy: make dequeue_huge_page_vma() obey MPOL_BIND nodemask rework] Signed-off-by: Mel Gorman <[email protected]> Acked-by: Christoph Lameter <[email protected]> Signed-off-by: Lee Schermerhorn <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Mel Gorman <[email protected]> Cc: Hugh Dickins <[email protected]> Cc: Nick Piggin <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
dd1a239f6f
commit
19770b3260
11 changed files with 224 additions and 191 deletions
|
|
@ -182,14 +182,9 @@ Components of Memory Policies
|
|||
The Default mode does not use the optional set of nodes.
|
||||
|
||||
MPOL_BIND: This mode specifies that memory must come from the
|
||||
set of nodes specified by the policy.
|
||||
|
||||
The memory policy APIs do not specify an order in which the nodes
|
||||
will be searched. However, unlike "local allocation", the Bind
|
||||
policy does not consider the distance between the nodes. Rather,
|
||||
allocations will fallback to the nodes specified by the policy in
|
||||
order of numeric node id. Like everything in Linux, this is subject
|
||||
to change.
|
||||
set of nodes specified by the policy. Memory will be allocated from
|
||||
the node in the set with sufficient free memory that is closest to
|
||||
the node where the allocation takes place.
|
||||
|
||||
MPOL_PREFERRED: This mode specifies that the allocation should be
|
||||
attempted from the single node specified in the policy. If that
|
||||
|
|
|
|||
Loading…
Reference in a new issue