LWN.net Logo

slub: RFC lockless allocation paths V1

From:  Christoph Lameter <cl@linux.com>
To:  Pekka Enberg <penberg@cs.helsinki.fi>
Subject:  [slub rfc1 00/12] slub: RFC lockless allocation paths V1
Date:  Fri, 02 Sep 2011 15:46:57 -0500
Message-ID:  <20110902204657.105194589@linux.com>
Cc:  David Rientjes <rientjes@google.com>
Archive-link:  Article, Thread

Draft of a patchset to make the allocation paths lockless as well.

I have done just a hackbench test on this to make sure that it works.
Various additional overhead is added to the fastpaths so this may
require additional work before it becomes mergeable.

The first two patches are cleanup patches that have been posted a couple of
times. Those can be merged.

The basic principle is to use double word atomic allocations to check
lists of objects in and out of the per cpu structures and the
per page structures.

Since we can only handle two words atomically we need to reduce the
state being kept for per cpu queues. Thus the page and the node field
in kmem_cache_cpu have to be dropped. Both of those values can be
determined from an object pointer after all but the calculation of
those values impacts the performance of the allocator. Not sure what
the impact is. Could be offset by the removal of the overhead for
interrupt disabling/enabling and the code savings because the per
cpu state for queueing is much less.

--
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/ .
Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>


Copyright © 2011, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds