On Wed, Oct 24, 2012 at 4:59 PM, Glauber Costa <glommer@xxxxxxxxxxxxx> wrote: > While the goal of slab_common.c is to have a common place for all > allocators, we face two different goals that are in opposition to each > other: > > 1) Have the different layouts be the business of each allocator, in > their .c > 2) inline as much as we can for fast paths > > Because of that, we either have to move all the entry points to the > mm/slab.h and rely heavily on the pre-processor, or include all .c files > in here. > > The pre-processor solution has the disadvantage that some quite > non-trivial code gets even more non-trivial, and we end up leaving for > readers a non-pleasant indirection. > > To keep this sane, we'll include the allocators .c files in here. Which > means we will be able to inline any code they produced, but never the > other way around! > > Doing this produced a name clash. This was resolved in this patch > itself. > > Signed-off-by: Glauber Costa <glommer@xxxxxxxxxxxxx> > CC: Joonsoo Kim <js1304@xxxxxxxxx> > CC: David Rientjes <rientjes@xxxxxxxxxx> > CC: Pekka Enberg <penberg@xxxxxxxxxx> > CC: Christoph Lameter <cl@xxxxxxxxx> So I hate this patch with a passion. We don't have any fastpaths in mm/slab_common.c nor should we. Those should be allocator specific. Pekka -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>