lkml.org 
[lkml]   [2008]   [Mar]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [rfc][patch 1/3] slub: fix small HWCACHE_ALIGN alignment
On Mon, Mar 03, 2008 at 01:32:54PM -0800, Christoph Lameter wrote:
> On Mon, 3 Mar 2008, Pekka Enberg wrote:
>
> > Well, not my definition either but SLAB has guaranteed that for small
> > objects in the past, so I think Nick has a point here. However, with
> > all this back and forth, I've lost track why this matters. I suppose
> > it causes regression on some workload?
>
> Well the guarantee can only be exploited if you would check the cacheline
> sizes and the object size from the code that creates the slab cache.
> Basically you would have to guestimate what the slab allocator is doing.
>
> So the guarantee is basically meaningless. If the object is larger than a
> cacheline then this will never work.

Of course it works. It fits the object into the fewest number of cachelines
possible. If you need to be accessing such objects in a random manner, then
for highest performance you want to touch as few cachelines as possible.



\
 
 \ /
  Last update: 2008-03-05 01:11    [W:0.136 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site