diff options
author | Joonsoo Kim <iamjoonsoo.kim@lge.com> | 2014-10-09 18:26:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-10-09 22:25:50 -0400 |
commit | 61f47105a2c9c60e950ca808b7560f776f9bfa31 (patch) | |
tree | 10bbc7fb213285e1e673073eedf21a1991a22ea1 /mm/slob.c | |
parent | 07f361b2bee38896df8be17d8c3f8af3f3610606 (diff) |
mm/sl[ao]b: always track caller in kmalloc_(node_)track_caller()
Now, we track caller if tracing or slab debugging is enabled. If they are
disabled, we could save one argument passing overhead by calling
__kmalloc(_node)(). But, I think that it would be marginal. Furthermore,
default slab allocator, SLUB, doesn't use this technique so I think that
it's okay to change this situation.
After this change, we can turn on/off CONFIG_DEBUG_SLAB without full
kernel build and remove some complicated '#if' defintion. It looks more
benefitial to me.
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/slob.c')
-rw-r--r-- | mm/slob.c | 2 |
1 files changed, 0 insertions, 2 deletions
@@ -468,7 +468,6 @@ void *__kmalloc(size_t size, gfp_t gfp) | |||
468 | } | 468 | } |
469 | EXPORT_SYMBOL(__kmalloc); | 469 | EXPORT_SYMBOL(__kmalloc); |
470 | 470 | ||
471 | #ifdef CONFIG_TRACING | ||
472 | void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) | 471 | void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) |
473 | { | 472 | { |
474 | return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); | 473 | return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); |
@@ -481,7 +480,6 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, | |||
481 | return __do_kmalloc_node(size, gfp, node, caller); | 480 | return __do_kmalloc_node(size, gfp, node, caller); |
482 | } | 481 | } |
483 | #endif | 482 | #endif |
484 | #endif | ||
485 | 483 | ||
486 | void kfree(const void *block) | 484 | void kfree(const void *block) |
487 | { | 485 | { |