diff options
author | David Rientjes <rientjes@google.com> | 2014-04-07 18:37:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-04-07 19:35:54 -0400 |
commit | 2a389610a7331d22344698f23ef2e8c55b2cde7b (patch) | |
tree | bfb35d93c238bb25c5ffed0f66aabc750925c556 /mm/slab.c | |
parent | 514ddb446c5c5a238eca32b7052b7a8accae4e93 (diff) |
mm, mempolicy: rename slab_node for clarity
slab_node() is actually a mempolicy function, so rename it to
mempolicy_slab_node() to make it clearer that it used for processes with
mempolicies.
At the same time, cleanup its code by saving numa_mem_id() in a local
variable (since we require a node with memory, not just any node) and
remove an obsolete comment that assumes the mempolicy is actually passed
into the function.
Signed-off-by: David Rientjes <rientjes@google.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Michal Hocko <mhocko@suse.cz>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Christoph Lameter <cl@linux-foundation.org>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: Tejun Heo <tj@kernel.org>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Oleg Nesterov <oleg@redhat.com>
Cc: Rik van Riel <riel@redhat.com>
Cc: Jianguo Wu <wujianguo@huawei.com>
Cc: Tim Hockin <thockin@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r-- | mm/slab.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -3042,7 +3042,7 @@ static void *alternate_node_alloc(struct kmem_cache *cachep, gfp_t flags) | |||
3042 | if (cpuset_do_slab_mem_spread() && (cachep->flags & SLAB_MEM_SPREAD)) | 3042 | if (cpuset_do_slab_mem_spread() && (cachep->flags & SLAB_MEM_SPREAD)) |
3043 | nid_alloc = cpuset_slab_spread_node(); | 3043 | nid_alloc = cpuset_slab_spread_node(); |
3044 | else if (current->mempolicy) | 3044 | else if (current->mempolicy) |
3045 | nid_alloc = slab_node(); | 3045 | nid_alloc = mempolicy_slab_node(); |
3046 | if (nid_alloc != nid_here) | 3046 | if (nid_alloc != nid_here) |
3047 | return ____cache_alloc_node(cachep, flags, nid_alloc); | 3047 | return ____cache_alloc_node(cachep, flags, nid_alloc); |
3048 | return NULL; | 3048 | return NULL; |
@@ -3074,7 +3074,7 @@ static void *fallback_alloc(struct kmem_cache *cache, gfp_t flags) | |||
3074 | 3074 | ||
3075 | retry_cpuset: | 3075 | retry_cpuset: |
3076 | cpuset_mems_cookie = read_mems_allowed_begin(); | 3076 | cpuset_mems_cookie = read_mems_allowed_begin(); |
3077 | zonelist = node_zonelist(slab_node(), flags); | 3077 | zonelist = node_zonelist(mempolicy_slab_node(), flags); |
3078 | 3078 | ||
3079 | retry: | 3079 | retry: |
3080 | /* | 3080 | /* |