aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorZhouping Liu <zliu@redhat.com>2013-05-15 23:36:23 -0400
committerPekka Enberg <penberg@kernel.org>2013-06-08 07:30:42 -0400
commitd0d04b78f403b0bcfe03315e16b50d196610720d (patch)
treee37ddc853888ebee6dcdc0dee75c10139171ad30 /mm/slab.c
parent8a965b3baa89ffedc73c0fbc750006c631012ced (diff)
mm, slab: moved kmem_cache_alloc_node comment to correct place
After several fixing about kmem_cache_alloc_node(), its comment was splitted. This patch moved it on top of kmem_cache_alloc_node() definition. Signed-off-by: Zhouping Liu <zliu@redhat.com> Signed-off-by: Pekka Enberg <penberg@kernel.org>
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/mm/slab.c b/mm/slab.c
index a98f8db93670..273a5ac2ade3 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -3340,18 +3340,6 @@ done:
3340 return obj; 3340 return obj;
3341} 3341}
3342 3342
3343/**
3344 * kmem_cache_alloc_node - Allocate an object on the specified node
3345 * @cachep: The cache to allocate from.
3346 * @flags: See kmalloc().
3347 * @nodeid: node number of the target node.
3348 * @caller: return address of caller, used for debug information
3349 *
3350 * Identical to kmem_cache_alloc but it will allocate memory on the given
3351 * node, which can improve the performance for cpu bound structures.
3352 *
3353 * Fallback to other node is possible if __GFP_THISNODE is not set.
3354 */
3355static __always_inline void * 3343static __always_inline void *
3356slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, 3344slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
3357 unsigned long caller) 3345 unsigned long caller)
@@ -3645,6 +3633,17 @@ EXPORT_SYMBOL(kmem_cache_alloc_trace);
3645#endif 3633#endif
3646 3634
3647#ifdef CONFIG_NUMA 3635#ifdef CONFIG_NUMA
3636/**
3637 * kmem_cache_alloc_node - Allocate an object on the specified node
3638 * @cachep: The cache to allocate from.
3639 * @flags: See kmalloc().
3640 * @nodeid: node number of the target node.
3641 *
3642 * Identical to kmem_cache_alloc but it will allocate memory on the given
3643 * node, which can improve the performance for cpu bound structures.
3644 *
3645 * Fallback to other node is possible if __GFP_THISNODE is not set.
3646 */
3648void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) 3647void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid)
3649{ 3648{
3650 void *ret = slab_alloc_node(cachep, flags, nodeid, _RET_IP_); 3649 void *ret = slab_alloc_node(cachep, flags, nodeid, _RET_IP_);