Re: [PATCH] Futexes IV (Fast Lightweight Userspace Semaphores)

Hubertus Franke
2002-03-08T22:54:59Z

On Friday 08 March 2002 03:40 pm, Alan Cox wrote:
> > So I would suggest making the size (and thus alignment check) of locks at
> > least 8 bytes (and preferably 16). That makes it slightly harder to put
> > locks on the stack, but gcc does support stack alignment, even if the
> > code sucks right now.
>
> Can we go to cache line alignment - for an array of locks thats clearly
> advantageous

NO and let me explain.

I would to be able to integrate the lock with the data.
This is much more cache friendly then putting the lock on a different
cacheline.

If you want an array you need to pad each element.
That's easy enough to do....
Can't shrink a datastructure on the other hand :-)

--
-- Hubertus Franke (frankeh@watson.ibm.com)