lkml.org 
[lkml]   [2008]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH v2 3/6] sched: make double-lock-balance fair
From
Date
On Wed, 2008-08-27 at 12:26 +0200, Nick Piggin wrote:
> On Wed, Aug 27, 2008 at 10:21:35AM +0200, Peter Zijlstra wrote:

> > I suppose one could then write it like:
> >
> > if (spin_is_contended(&this_rq->lock) || !spin_trylock(&busiest->lock)) {
> > spin_unlock(&this_rq->lock);
> > double_rq_lock(this_rq, busiest);
> > }
> >
> > But, I'm not sure that's worth the effort at that point..
>
> Yeah, that could work, but hmm it might cause 2 cache coherency transactions
> anyway even in the fastpath, so it might even be slower than just unlocking
> unconditionally and taking both locks :(

right,..

> > Anyway - I think all this is utterly defeated on CONFIG_PREEMPT by the
> > spin with IRQs enabled logic in kernel/spinlock.c.
> >
> > Making this an -rt only patch...
>
> Hmm, and also on x86 with ticket locks we don't spin with preempt or
> interrupts enabled any more (although we still do of course on other
> architectures)

Aah, we don't do CONFIG_GENERIC_LOCKBREAK anymore?

Does it make sense to make this _double_lock_balance() thing depend on
that too?



\
 
 \ /
  Last update: 2008-08-27 12:45    [from the cache]
©2003-2011 Jasper Spaans