lkml.org 
[lkml]   [2011]   [Aug]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 06/18] x86/ticketlock: make __ticket_spin_trylock common
On Wed, Aug 24, 2011 at 1:00 PM, Andi Kleen <andi@firstfloor.org> wrote:
>
> Can't we just get rid of the small ticket size code path?
>
> I couldn't benchmark any difference between the two last time
> I tried.

The small locks aren't any faster. They are just smaller.

Many data structures have spinlocks inside of them, and the smaller
spinlock *should* be able to result in smaller data structures.

Of course, that assumes that they have been packed correctly. And they
seldom are ;(

Looking at 'struct task_struct', for example, the spinlocks there
aren't next to each other, and have pointers and 'unsigned int's
around them, so rather than shrinking the data structure, it just
results in holes.

Linus


\
 
 \ /
  Last update: 2011-08-24 23:41    [W:0.066 / U:0.492 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site