lkml.org 
[lkml]   [2013]   [Jun]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH RFC ticketlock] Auto-queued ticketlock
On Tue, Jun 11, 2013 at 10:17:52AM -0700, Linus Torvalds wrote:
> On Tue, Jun 11, 2013 at 9:48 AM, Paul E. McKenney
> <paulmck@linux.vnet.ibm.com> wrote:
> >
> > Another approach is to permanently associate queues with each lock,
> > but that increases the size of the lock -- something that has raised
> > concerns in the past. But if adding 32 bytes to each ticketlock was OK,
> > this simplifies things quite a bit.
>
> Yeah, no. The spinlocks need to be small. We have them in
> size-conscious data structures like "struct dentry" and "struct page",
> and they really must not be bigger than an "int" in the non-debug
> case.
>
> In fact, I've occasionally thought about combining a spinlock with a
> refcounter if that could make things fit in 32 bits on smaller
> machines, because we also have ops like "atomic_dec_and_lock()" that
> could possibly be optimized if they fit in one word. That is probably
> not worth it, but spinlocks do need to remain small.

I was afraid of that. On the other hand, I guess that this means that
I sent out the correct patch of the two that I prepared. ;-)

Thanx, Paul



\
 
 \ /
  Last update: 2013-06-11 20:01    [W:0.105 / U:0.476 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site