public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance
@ 2007-07-08  3:49 Christoph Lameter
  2007-07-08  3:49 ` [patch 01/10] SLUB: Direct pass through of page size or higher kmalloc requests Christoph Lameter
                   ` (11 more replies)
  0 siblings, 12 replies; 86+ messages in thread
From: Christoph Lameter @ 2007-07-08  3:49 UTC (permalink / raw)
  To: linux-kernel; +Cc: linux-mm, suresh.b.siddha, corey.d.gough, Pekka Enberg, akpm

This series here contains a number of patches that need some discussion or
evaluation. They apply on top of 2.6.22-rc6-mm1 + slub patches already
in mm.

1. Page allocator pass through

SLOB does pass through all larger kmalloc requests directly to the page
allocator. The advantage is that the allocator overhead is eliminated
and that we do not need to provide kmalloc slabs >= PAGE_SIZE.
This patch does the same thing in SLUB.

For allocation whose size is know the call to the slab may be converted to
a call to the page allocator at compile time.

The result of doing so is also that the behavior of SLUB for pagesize
and higher kmalloc allocation will conform to SLAB. Meaning large
kmalloc allocations are no longer debuggable and are guaranteed to be
page aligned.

Do we want this?

2. A series of performance enhancements patches

The patches improve the producer / consumer scenario. If objects are
always allocated on one processor and released on another then both
will use distinct cachelines to store their information in order to
avoid a bouncing cacheline.

In order to do so we have to introduce a per cpu structure to keep
per cpu allocation lists in distinct cachelines from the remote free
information in the page struct. If we introduce a per cpu structure
then we also need to allocate that in a NUMA aware fashion from the
local node.

Having a per cpu structure allows to avoid the use of certain fields
in the page struct which in turn allows us to avoid using page->mapping
and increasing the maximum number of objects per slab. More optimizations
become possible by shifting information from the kmem_cache structure
that is used in the hotpath to the per cpu structure thereby minimizing
cacheline coverage.

Finally there is an implementation of slab_alloc/slab_free using a cmpxchg
instead of current interrupt enable disable approach. This was inspired by
LTTng's approach. A cmpxchg is less costly than interrupt enabe/disable
but means more complexity in managing the resulting race conditions.
The disadvantage is that the allocation / free paths become very
complex and fragile.

All of these patches need to be evaluated as to what impact they
have on a variety of loads.

3. Removal of SLOB and SLAB.

We would like to consolidate and only have one slab allocator in the future.
Two patches are included that remove SLOB and SLAB. There is only minimal
justification for retaining SLOB. So I think we could remove SLOB for 2.6.23.

SLAB is the reference that SLUB must be measured against to avoid regressions.
On the other hand it will be a problem to support new functionality like
Slab defragmentation since its design makes it difficult to implement comparable
features. So I think that we need to keep SLAB around for one more cycle and
then we may be able to get rid of it. Or we can keep it in the tree for
awhile and produce more and more shims for new slab functionality.

-- 

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

end of thread, other threads:[~2007-08-13 22:28 UTC | newest]

Thread overview: 86+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-08  3:49 [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance Christoph Lameter
2007-07-08  3:49 ` [patch 01/10] SLUB: Direct pass through of page size or higher kmalloc requests Christoph Lameter
2007-07-08  3:49 ` [patch 02/10] SLUB: Avoid page struct cacheline bouncing due to remote frees to cpu slab Christoph Lameter
2007-07-08  3:49 ` [patch 03/10] SLUB: Do not use page->mapping Christoph Lameter
2007-07-08  3:49 ` [patch 04/10] SLUB: Move page->offset to kmem_cache_cpu->offset Christoph Lameter
2007-07-08  3:49 ` [patch 05/10] SLUB: Avoid touching page struct when freeing to per cpu slab Christoph Lameter
2007-07-08  3:49 ` [patch 06/10] SLUB: Place kmem_cache_cpu structures in a NUMA aware way Christoph Lameter
2007-07-08  3:49 ` [patch 07/10] SLUB: Optimize cacheline use for zeroing Christoph Lameter
2007-07-08  3:50 ` [patch 08/10] SLUB: Single atomic instruction alloc/free using cmpxchg Christoph Lameter
2007-07-08  3:50 ` [patch 09/10] Remove the SLOB allocator for 2.6.23 Christoph Lameter
2007-07-08  7:51   ` Ingo Molnar
2007-07-08  9:43     ` Nick Piggin
2007-07-08  9:54       ` Ingo Molnar
2007-07-08 10:23         ` Nick Piggin
2007-07-08 10:42           ` Ingo Molnar
2007-07-08 18:02     ` Andrew Morton
2007-07-09  2:57       ` Nick Piggin
2007-07-09 11:04         ` Pekka Enberg
2007-07-09 11:16           ` Nick Piggin
2007-07-09 12:47             ` Pekka Enberg
2007-07-09 13:46             ` Pekka J Enberg
2007-07-09 16:08           ` Christoph Lameter
2007-07-10  8:17             ` Pekka J Enberg
2007-07-10  8:27               ` Nick Piggin
2007-07-10  9:31                 ` Pekka Enberg
2007-07-10 10:09                   ` Nick Piggin
2007-07-10 12:02                   ` Matt Mackall
2007-07-10 12:57                     ` Pekka J Enberg
2007-07-10 22:12                     ` Christoph Lameter
2007-07-10 22:40                       ` Matt Mackall
2007-07-10 22:50                         ` Christoph Lameter
2007-07-09 16:06         ` Christoph Lameter
2007-07-09 16:51           ` Andrew Morton
2007-07-09 17:26             ` Christoph Lameter
2007-07-09 18:00               ` Andrew Morton
2007-07-10  1:43               ` Nick Piggin
2007-07-10  1:56                 ` Christoph Lameter
2007-07-10  2:02                   ` Nick Piggin
2007-07-10  2:11                     ` Christoph Lameter
2007-07-10  7:09                       ` Nick Piggin
2007-07-10 22:09                         ` Christoph Lameter
2007-07-10 23:12                           ` Matt Mackall
2007-07-10  8:32                       ` Matt Mackall
2007-07-10  9:01                         ` Håvard Skinnemoen
2007-07-10  9:11                           ` Nick Piggin
2007-07-10  9:21                             ` Håvard Skinnemoen
2007-07-11  1:37                         ` Christoph Lameter
2007-07-11  2:06                           ` Matt Mackall
2007-07-11 18:06                             ` Christoph Lameter
2007-07-11 18:25                               ` Pekka J Enberg
2007-07-11 18:33                                 ` Christoph Lameter
2007-07-11 18:36                                   ` Pekka J Enberg
2007-07-12  0:33                                 ` Nick Piggin
2007-07-09 23:09             ` Matt Mackall
2007-07-10  1:41           ` Nick Piggin
2007-07-10  1:51             ` Christoph Lameter
2007-07-10  1:58               ` Nick Piggin
2007-07-10  6:22                 ` Matt Mackall
2007-07-10  7:03                   ` Nick Piggin
2007-07-10  2:32               ` Matt Mackall
2007-07-09 21:57       ` Matt Mackall
2007-07-09 12:31     ` Matthieu CASTET
2007-07-09 16:00     ` Christoph Lameter
2007-07-09 20:52   ` Matt Mackall
2007-07-08  3:50 ` [patch 10/10] Remove slab in 2.6.24 Christoph Lameter
2007-07-08  4:37 ` [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance David Miller
2007-07-09 15:45   ` Christoph Lameter
2007-07-09 19:43     ` David Miller
2007-07-09 21:21       ` Christoph Lameter
2007-07-08 11:20 ` Andi Kleen
2007-07-09 15:50   ` Christoph Lameter
2007-07-09 15:59     ` Martin Bligh
2007-07-09 18:11       ` Christoph Lameter
2007-07-09 21:00         ` Martin Bligh
2007-07-09 21:44           ` Mathieu Desnoyers
2007-07-09 21:55             ` Christoph Lameter
2007-07-09 22:58               ` Mathieu Desnoyers
2007-07-09 23:08                 ` Christoph Lameter
2007-07-10  5:16                   ` [PATCH] x86_64 - Use non locked version for local_cmpxchg() Mathieu Desnoyers
2007-07-10 20:46                     ` Christoph Lameter
2007-07-10  0:55                 ` [patch 00/10] [RFC] SLUB patches for more functionality, performance and maintenance Christoph Lameter
2007-07-10  8:27                   ` Mathieu Desnoyers
2007-07-10 18:38                     ` Christoph Lameter
2007-07-10 20:59                     ` Mathieu Desnoyers
2007-08-13 22:18                   ` Mathieu Desnoyers
2007-08-13 22:28                     ` Christoph Lameter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox