From: Ingo Molnar <mingo@elte.hu>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@zip.com.au>
Subject: Re: [patch] scheduler fixes, 2.5.32-BK
Date: Fri, 30 Aug 2002 19:28:03 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.44.0208301916370.910-100000@localhost.localdomain> (raw)
In-Reply-To: <Pine.LNX.4.44.0208301012480.2163-100000@home.transmeta.com>
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
next prev parent reply other threads:[~2002-08-30 17:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-30 7:43 [patch] scheduler fixes, 2.5.32-BK Ingo Molnar
2002-08-30 7:55 ` Ingo Molnar
2002-08-30 8:12 ` Andrew Morton
2002-08-30 8:22 ` Ingo Molnar
2002-08-30 17:03 ` Linus Torvalds
2002-08-30 17:05 ` Ingo Molnar
2002-08-30 17:16 ` Ingo Molnar
2002-08-30 17:19 ` Linus Torvalds
2002-08-30 17:28 ` Ingo Molnar [this message]
2002-08-30 17:47 ` Linus Torvalds
2002-08-30 18:05 ` Ingo Molnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.LNX.4.44.0208301916370.910-100000@localhost.localdomain \
--to=mingo@elte.hu \
--cc=akpm@zip.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).