lkml.org 
[lkml]   [2002]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [patch] scheduler fixes, 2.5.32-BK

On Fri, 30 Aug 2002, Linus Torvalds wrote:

> So why couldn't this happen? This is what used to happen before, I don't
> see that consolidating the spinlock had any impact at all.
>
> CPU #0 CPU #1
>
> down() up()
>
> lock decl (negative)
> __down() lock incl
> spinlock() __up()
> atomic_add_negative()
> success - break
> spinunlock();
> } wake_up()
> return - semaphore is now invalid spin_lock()
>
> BOOM!

hm, indeed, you are right - completions are the only safe method.

i'm starting to wonder whether it's possible at all (theoretically) to
have a mutex design which has the current semaphore implementation's good
fastpath properties, but could also be used on stack.

Ingo

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:28    [W:0.040 / U:2.320 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site