public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Rusty Russell <rusty@rustcorp.com.au>
To: Ulrich Drepper <drepper@redhat.com>
Cc: Andrew Morton <akpm@osdl.org>,
	inaky.perez-gonzalez@intel.com,
	lkml - Kernel Mailing List <linux-kernel@vger.kernel.org>,
	robustmutexes@lists.osdl.org, Ingo Molnar <mingo@elte.hu>,
	jamie@shareable.org
Subject: Re: [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux, v2.3.1
Date: Thu, 05 Aug 2004 21:48:05 +1000	[thread overview]
Message-ID: <1091704539.5031.42.camel@bach> (raw)
In-Reply-To: <4111E3B5.1070608@redhat.com>

On Thu, 2004-08-05 at 17:37, Ulrich Drepper wrote:
> Andrew Morton wrote:
> > Passing the lock to a non-rt task when there's an rt-task waiting for it
> > seems pretty poor form, too.
> 
> No no, that's not what is wanted.  Robust mutexes are a special kind of
> mutex and not related to rt issues.  Lockers of robust mutexes have to
> register with the kernel (i.e., the locking must actually be performed
> by the kernel) so that in case the thread goes away or the entire
> process dies, the mutex is unlocked and other waiters (other threads, in
> the same or other processes) can get the lock.

I don't think this is neccessarily true: I think that platforms with
64-bit compare-and-exchange can do the whole thing in userspace.  They
would set the mutex and stamp in the thread ID simultanously, allowing
for "dead thread" detection (ie. I didn't get the lock, and it's a
robust mutex: check the holder is still alive).

W/o 64-bit compare-and-exchange a 100% robust solution may not be
possible though.

Thoughts?
Rusty.
-- 
Anyone who quotes me in their signature is an idiot -- Rusty Russell


  parent reply	other threads:[~2004-08-05 11:48 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-04  9:13 [RFC/PATCH] FUSYN Realtime & robust mutexes for Linux, v2.3.1 Perez-Gonzalez, Inaky
2004-08-05  6:21 ` Andrew Morton
2004-08-05  7:06   ` Ulrich Drepper
2004-08-05  7:17     ` Andrew Morton
2004-08-05  7:37       ` Ulrich Drepper
2004-08-05  7:40         ` Andrew Morton
2004-08-05  8:22           ` Ulrich Drepper
2004-08-05 10:42         ` Ingo Molnar
2004-08-05 11:48         ` Rusty Russell [this message]
2004-08-05 13:23           ` Linh Dang
2004-08-05 13:26         ` Linh Dang
2004-08-05 14:02         ` Chris Friesen
2004-08-05 10:34 ` Ingo Molnar
2004-08-05 10:59   ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-08-05  8:39 Eric Valette
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:16 Perez-Gonzalez, Inaky
2004-08-05 18:22 Perez-Gonzalez, Inaky
2004-08-05 18:37 Perez-Gonzalez, Inaky
2004-08-05 18:39 Perez-Gonzalez, Inaky
2004-08-05 18:39 Perez-Gonzalez, Inaky

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=1091704539.5031.42.camel@bach \
    --to=rusty@rustcorp.com.au \
    --cc=akpm@osdl.org \
    --cc=drepper@redhat.com \
    --cc=inaky.perez-gonzalez@intel.com \
    --cc=jamie@shareable.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=robustmutexes@lists.osdl.org \
    /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