diff options
author | Zhouping Liu <zliu@redhat.com> | 2013-05-15 23:36:23 -0400 |
---|---|---|
committer | Pekka Enberg <penberg@kernel.org> | 2013-06-08 07:30:42 -0400 |
commit | d0d04b78f403b0bcfe03315e16b50d196610720d (patch) | |
tree | e37ddc853888ebee6dcdc0dee75c10139171ad30 /mm | |
parent | 8a965b3baa89ffedc73c0fbc750006c631012ced (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')
-rw-r--r-- | mm/slab.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -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 | */ | ||
3355 | static __always_inline void * | 3343 | static __always_inline void * |
3356 | slab_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid, | 3344 | slab_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 | */ | ||
3648 | void *kmem_cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid) | 3647 | void *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_); |