diff options
author | Vladimir Davydov <[email protected]> | 2014-12-12 16:58:28 -0800 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2014-12-13 12:42:53 -0800 |
commit | dee2f8aaabccb64a67166bd8ab27d95cfbdc7704 (patch) | |
tree | c552c388c5b3a5c3e02f0d987dde9346b9b542be | |
parent | 061d7074e1eb4e663058e70d409a3cc00634232d (diff) |
slub: fix cpuset check in get_any_partial
If we fail to allocate from the current node's stock, we look for free
objects on other nodes before calling the page allocator (see
get_any_partial). While checking other nodes we respect cpuset
constraints by calling cpuset_zone_allowed. We enforce hardwall check.
As a result, we will fallback to the page allocator even if there are some
pages cached on other nodes, but the current cpuset doesn't have them set.
However, the page allocator uses softwall check for kernel allocations,
so it may allocate from one of the other nodes in this case.
Therefore we should use softwall cpuset check in get_any_partial to
conform with the cpuset check in the page allocator.
Signed-off-by: Vladimir Davydov <[email protected]>
Acked-by: Zefan Li <[email protected]>
Acked-by: Christoph Lameter <[email protected]>
Cc: Pekka Enberg <[email protected]>
Cc: David Rientjes <[email protected]>
Cc: Joonsoo Kim <[email protected]>
Cc: Tejun Heo <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r-- | mm/slub.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c index fe4db9c17238..fe376fe1f4fe 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -1670,8 +1670,7 @@ static void *get_any_partial(struct kmem_cache *s, gfp_t flags, n = get_node(s, zone_to_nid(zone)); - if (n && cpuset_zone_allowed(zone, - flags | __GFP_HARDWALL) && + if (n && cpuset_zone_allowed(zone, flags) && n->nr_partial > s->min_partial) { object = get_partial_node(s, n, c, flags); if (object) { |