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

H. Peter Anvin
2002-03-08T23:45:25Z

Followup to: <20020308225425.772D13FE06@smtp.linux.ibm.com>
By author: Hubertus Franke <frankeh@watson.ibm.com>
In newsgroup: linux.dev.kernel
> >
> > 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.
>

Not just cache, but programmer-friendly as well. Data structures
containing locks (sometimes multiple and related) are really the
common case.

-hpa
--
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
"Unix gives you enough rope to shoot yourself in the foot."
http://www.zytor.com/~hpa/puzzle.txt <amsp@zytor.com>