linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] common entry point for kmem_cache_free
@ 2012-10-24 13:59 Glauber Costa
  2012-10-24 13:59 ` [PATCH v2 1/2] kmem_cache: include allocators code directly into slab_common Glauber Costa
  2012-10-24 13:59 ` [PATCH v2 2/2] slab: move kmem_cache_free to common code Glauber Costa
  0 siblings, 2 replies; 13+ messages in thread
From: Glauber Costa @ 2012-10-24 13:59 UTC (permalink / raw)
  To: linux-mm
  Cc: linux-kernel, Joonsoo Kim, David Rientjes, Pekka Enberg,
	Christoph Lameter

The goal of this patchset is to provide a single entry point for
kmem_cache_free. Other functions, such as the allocation itself, and kmalloc
could easily follow.

The main problem here, is that if we keep the allocator-specific functions
in their .c file, we lose the ability to inline their fast paths. Being this
such a critical path, we would like to keep doing so.

During the last discussion around this (https://lkml.org/lkml/2012/10/22/639),
JoonSoo Kim suggested that we could achieve this by just including the
allocator-specific .c files in slab_common.c, a suggestion I considered but
quickly disregarding fearing a quite ugly end result.

Turns out it doesn't look so bad. So please let me know what you think.

Thanks

Glauber Costa (2):
  kmem_cache: include allocators code directly into slab_common
  slab: move kmem_cache_free to common code

 mm/Makefile      |  3 ---
 mm/slab.c        | 23 ++---------------------
 mm/slab_common.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 mm/slob.c        | 11 ++++-------
 mm/slub.c        |  5 +----
 5 files changed, 57 insertions(+), 35 deletions(-)

-- 
1.7.11.7


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

end of thread, other threads:[~2012-10-30 20:27 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-24 13:59 [PATCH v2 0/2] common entry point for kmem_cache_free Glauber Costa
2012-10-24 13:59 ` [PATCH v2 1/2] kmem_cache: include allocators code directly into slab_common Glauber Costa
2012-10-24 14:29   ` Christoph Lameter
2012-10-24 14:35     ` Glauber Costa
2012-10-24 17:29       ` JoonSoo Kim
2012-10-24 15:33     ` Andi Kleen
2012-10-24 18:02   ` Pekka Enberg
2012-10-24 19:34     ` Christoph Lameter
2012-10-26 14:15       ` JoonSoo Kim
2012-10-30 15:31         ` Christoph Lameter
2012-10-30 15:35           ` Glauber Costa
2012-10-30 20:27           ` Andi Kleen
2012-10-24 13:59 ` [PATCH v2 2/2] slab: move kmem_cache_free to common code Glauber Costa

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).