public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andi Kleen <ak@suse.de>
Cc: Christopher Friesen <cfriesen@nortel.com>,
	Ulrich Drepper <drepper@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	Arjan van de Ven <arjan@infradead.org>,
	David Singleton <dsingleton@mvista.com>,
	Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [patch 0/5] lightweight robust futexes: -V1
Date: Wed, 15 Feb 2006 21:59:10 +0100	[thread overview]
Message-ID: <20060215205910.GA11130@elte.hu> (raw)
In-Reply-To: <200602152102.12795.ak@suse.de>


* Andi Kleen <ak@suse.de> wrote:

> On Wednesday 15 February 2006 20:49, Christopher Friesen wrote:
> 
> > The goal is for the kernel to unlock the mutex, but the next task to 
> > aquire it gets some special notification that the status is unknown.  At 
> > that point the task can either validate/clean up the data and reset the 
> > mutex to clean (if it can) or it can give up the mutex and pass it on to 
> > some other task that does know how to validate/clean up.
> 
> The "send signal when any mapper dies" proposal would do that. The 
> other process could catch the signal and do something with it.

the last time we had special signals for glibc-internal purpose it was 
called 'LinuxThreads'. The concept sucked big big time. Using internal 
signals means playing with the signal mask - this could conflict with 
the application, etc. etc. It's simply out of question to play signal 
games. Not to mention the problem of multiple mappers dying. Should thus 
queued signals be used? How about if the signal queue overflows.

Signals are really not for stuff like this. Signals are an old, 
semantics-laden and thus fragile concept that are not suited for 
abstractions like that.

Another flaw with your suggestion is that the mapper _might not know_ at 
the time of mmap() that this memory includes a robust futex. So that 
brings us back to the per-lock registration syscall approach (and 
overhead) that our patch avoids. Furthermore, glibc would have to track 
whether a thread used a robust mutex for the first time - which means 
external object to pthread_mutex_t - additional complications, overhead 
and design weaknesses.

If you take a look at the list-based robust futex code and the concept, 
you'll see that a lightweight userspace list of futexes, optionally 
parsed by the kernel, mixes very well with the existing futex philosophy 
and methodology. It doesnt have any of these complications and 
cornercases, precisely because its design aligns naturally with the 
futex philosophy: futexes are primarily memory based objects. They are 
not signals. They are not in-kernel structures. They are primarily a 
piece of userspace memory.

	Ingo

  parent reply	other threads:[~2006-02-15 21:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-15 15:17 [patch 0/5] lightweight robust futexes: -V1 Ingo Molnar
2006-02-15 15:22 ` Ingo Molnar
2006-02-15 17:35 ` Andi Kleen
2006-02-15 17:50   ` Ulrich Drepper
2006-02-15 18:42     ` Andi Kleen
2006-02-15 19:49       ` Christopher Friesen
2006-02-15 20:02         ` Andi Kleen
2006-02-15 20:13           ` Antonio Vargas
2006-02-15 20:25             ` Andi Kleen
2006-02-15 20:59           ` Ingo Molnar [this message]
2006-02-15 20:43       ` Ingo Molnar
2006-02-15 19:05 ` Daniel Walker
2006-02-15 19:11   ` Arjan van de Ven
2006-02-15 19:13     ` Daniel Walker
2006-02-15 21:31   ` Ingo Molnar
2006-02-16 15:43     ` Daniel Walker
2006-02-15 21:45 ` Andrew Morton
2006-02-15 22:14   ` Ingo Molnar
2006-02-17 21:59     ` Daniel Jacobowitz
2006-02-16  3:57 ` Darren Hart
2006-02-16 14:58 ` Johannes Stezenbach
2006-02-16 17:20   ` Ingo Molnar
2006-02-16 19:04     ` Daniel Walker
2006-02-17  9:09       ` Avi Kivity
2006-02-17 19:55     ` Johannes Stezenbach
2006-02-17 20:02       ` Arjan van de Ven

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=20060215205910.GA11130@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=cfriesen@nortel.com \
    --cc=drepper@redhat.com \
    --cc=dsingleton@mvista.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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