RE: [PATCH] slub: move kmem_cache_node into it's own cacheline

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Fri, 21 May 2010, Duyck, Alexander H wrote:

> Christoph Lameter wrote:
> > On Thu, 20 May 2010, Alexander Duyck wrote:
> >
> >> diff --git a/include/linux/slub_def.h b/include/linux/slub_def.h
> >> index 0249d41..e6217bb 100644 --- a/include/linux/slub_def.h
> >> +++ b/include/linux/slub_def.h
> >> @@ -52,7 +52,7 @@ struct kmem_cache_node {
> >>  	atomic_long_t total_objects;
> >>  	struct list_head full;
> >>  #endif
> >> -};
> >> +} ____cacheline_internodealigned_in_smp;
> >
> > What does this do? Leftovers?
>
> It aligns it to the correct size so that no two instances can occupy a shared cacheline.  I put that in place to avoid any false sharing of the objects should they fit into a shared cacheline on a NUMA system.

It has no effect in the NUMA case since the slab allocator is used to
allocate the object. Alignments would have to be specified at slab creation.

Maybe in the SMP case? But then struct kmem_cache_node is part of the
struct kmem_cache.

internode aligned? This creates > 4k kmem_cache structures on some
platforms.

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

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]