linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/5] mm, slab: Remove silly function slab_buffer_size()
@ 2012-09-05 22:48 Ezequiel Garcia
  2012-09-05 22:48 ` [PATCH 2/5] mm, slob: Add support for kmalloc_track_caller() Ezequiel Garcia
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: Ezequiel Garcia @ 2012-09-05 22:48 UTC (permalink / raw)
  To: linux-mm; +Cc: Ezequiel Garcia, Pekka Enberg, Christoph Lameter

This function is seldom used, and can be simply replaced with cachep->size.

Cc: Pekka Enberg <penberg@kernel.org>
Cc: Christoph Lameter <cl@linux.com>
Signed-off-by: Ezequiel Garcia <elezegarcia@gmail.com>
---
 mm/slab.c |   12 ++----------
 1 files changed, 2 insertions(+), 10 deletions(-)

diff --git a/mm/slab.c b/mm/slab.c
index 3b4587b..53e41de 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -498,14 +498,6 @@ static void **dbg_userword(struct kmem_cache *cachep, void *objp)
 
 #endif
 
-#ifdef CONFIG_TRACING
-size_t slab_buffer_size(struct kmem_cache *cachep)
-{
-	return cachep->size;
-}
-EXPORT_SYMBOL(slab_buffer_size);
-#endif
-
 /*
  * Do not go above this order unless 0 objects fit into the slab or
  * overridden on the command line.
@@ -3849,7 +3841,7 @@ kmem_cache_alloc_trace(size_t size, struct kmem_cache *cachep, gfp_t flags)
 	ret = __cache_alloc(cachep, flags, __builtin_return_address(0));
 
 	trace_kmalloc(_RET_IP_, ret,
-		      size, slab_buffer_size(cachep), flags);
+		      size, cachep->size, flags);
 	return ret;
 }
 EXPORT_SYMBOL(kmem_cache_alloc_trace);
@@ -3880,7 +3872,7 @@ void *kmem_cache_alloc_node_trace(size_t size,
 	ret = __cache_alloc_node(cachep, flags, nodeid,
 				  __builtin_return_address(0));
 	trace_kmalloc_node(_RET_IP_, ret,
-			   size, slab_buffer_size(cachep),
+			   size, cachep->size,
 			   flags, nodeid);
 	return ret;
 }
-- 
1.7.8.6

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply related	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2012-09-08 13:26 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-05 22:48 [PATCH 1/5] mm, slab: Remove silly function slab_buffer_size() Ezequiel Garcia
2012-09-05 22:48 ` [PATCH 2/5] mm, slob: Add support for kmalloc_track_caller() Ezequiel Garcia
2012-09-06  0:57   ` David Rientjes
2012-09-06  1:10     ` Ezequiel Garcia
2012-09-06  7:17       ` Pekka Enberg
2012-09-05 22:48 ` [PATCH 3/5] mm, util: Do strndup_user allocation directly, instead of through memdup_user Ezequiel Garcia
2012-09-06  0:59   ` David Rientjes
2012-09-06  1:06     ` Ezequiel Garcia
2012-09-06 19:27       ` JoonSoo Kim
2012-09-07  0:00         ` Ezequiel Garcia
2012-09-07 21:12           ` JoonSoo Kim
2012-09-05 22:48 ` [PATCH 4/5] mm, slob: Use only 'ret' variable for both slob object and returned pointer Ezequiel Garcia
2012-09-06 14:18   ` Christoph Lameter
2012-09-06 15:04     ` Ezequiel Garcia
2012-09-05 22:48 ` [PATCH 5/5] mm, slob: Trace allocation failures consistently Ezequiel Garcia
2012-09-06 19:09   ` JoonSoo Kim
2012-09-07  0:03     ` Ezequiel Garcia
2012-09-07 21:23       ` JoonSoo Kim
2012-09-08 13:26         ` Ezequiel Garcia
2012-09-07 21:50   ` JoonSoo Kim
2012-09-07 22:00     ` JoonSoo Kim
2012-09-06  0:54 ` [PATCH 1/5] mm, slab: Remove silly function slab_buffer_size() David Rientjes
2012-09-06  1:07   ` Ezequiel Garcia

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).