From: "Peter Wächtler" <pwaechtler@loewe-komp.de>
To: Hubertus Franke <frankeh@watson.ibm.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>,
Linus Torvalds <torvalds@transmeta.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Futex Asynchronous Interface
Date: Wed, 12 Jun 2002 18:50:03 +0200 [thread overview]
Message-ID: <3D077BBB.6090708@loewe-komp.de> (raw)
In-Reply-To: <E17I0ji-0004xO-00@wagner.rustcorp.com.au> <3D071153.9020607@loewe-komp.de> <20020612152042.27C463FE09@smtp.linux.ibm.com>
Hubertus Franke wrote:
> On Wednesday 12 June 2002 05:16 am, Peter Wächtler wrote:
>
>>Rusty Russell wrote:
>>
>>>In message <Pine.LNX.4.44.0206110951380.2712-100000@home.transmeta.com>
>>>you wri
>>>
>>>te:
>>>
>>>>Rusty,
>>>>this makes no sense:
>>>>
>>>>D: This changes the implementation so that the waker actually unpins
>>>>D: the page. This is preparation for the async interface, where the
>>>>D: process which registered interest is not in the kernel.
>>>>
>>>>Whazzup? The closing of the fd will unpin the page, the waker has no
>>>>reason to do so. It is very much against the linux philosophy (and a
>>>>design disaster anyway) to have the waker muck with the data structures
>>>>of anything waiting.
>>>>
>>>Good catch: now the fd is a "one-shot" thing anyway, making close
>>>unpin the page makes more sense. Tested patch below (against 2.5.21).
>>>
>>>FYI: I already violate this philosophy as I remove the waiter from the
>>>queue when I wake them: this allows them to tell that they were woken
>>>(waker does a list_del_init() on the waiting entry, so waiting knows
>>>if (list_empty()) I was woken).
>>>
>>>It would be more natural for the waiter to examine the futex value,
>>>and if it's still unchanged go back to sleep. But this makes
>>>assumptions about what they're using the futex value for. For
>>>example, we "PASS_THIS_DIRECTLY" value into the futex. This requires
>>>that one (and ONLY one) process waiting actually wakes up.
>>>
>>>This is why coming up with a primitive which allowed us to build posix
>>>threads and fair queueing as well as "normal" unfair semantics took so
>>>damn long.
>>>
>>What are the plans on how to deal with a waiter when the lock holder
>>dies abnormally?
>>
>>What about sending a signal (SIGTRAP or SIGLOST), returning -1 and
>>setting errno to a reasonable value (EIO?)
>>
>>I couldn't find anything in susv3
>>
>
> I thing this was decided some time ago that we won't deal with this situation.
> If we need to, the following needs to happen.
>
> A) we need to follow a protocol to register the PID/TID id within the lock.
> Example of this is described in
> "Recoverable User-Level Mutual Exclusion" by Phiilip Bohannon
> Proceedings of the 7th IEEE Symposium on Parallel and Distributed
> Systems, 1995.
>
> B) this again requires that some entity (kernel ?) knows about all locks,
> whether waited on in the kernel or not.
>
> C) I believe we need a deamon that occasinally identifies dead locks.
>
> Is it worth all this trouble? Or do we need two versions of the ?
>
> The paper describes that for a Sun SS20/61 the safe spin locks obtained
> only 25% of the performance of spinlocks.
>
Oops, I see it already myself. We lack a way for saying who is/was owning
the futex and so we can hardly tell who is waiting on this "unknown" lock.
:-(
next prev parent reply other threads:[~2002-06-12 16:48 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-06 7:26 [PATCH] Futex Asynchronous Interface Rusty Russell
2002-06-02 0:10 ` Pavel Machek
2002-06-10 6:57 ` Rusty Russell
2002-06-06 16:36 ` Linus Torvalds
2002-06-06 19:27 ` Alan Cox
2002-06-06 23:21 ` Rusty Russell
2002-06-07 8:33 ` Peter Wächtler
2002-06-08 22:28 ` Linus Torvalds
2002-06-09 9:49 ` Kai Henningsen
2002-06-09 18:09 ` Linus Torvalds
2002-06-09 19:06 ` Thunder from the hill
2002-06-10 6:39 ` Kai Henningsen
2002-06-10 7:55 ` Helge Hafting
2002-06-10 14:10 ` Thunder from the hill
2002-06-10 20:46 ` Kai Henningsen
2002-06-11 14:14 ` john slee
2002-06-10 15:11 ` Linus Torvalds
2002-06-11 15:06 ` Eric W. Biederman
2002-06-10 20:57 ` H. Peter Anvin
2002-06-09 10:07 ` Peter Wächtler
2002-06-09 17:49 ` Linus Torvalds
2002-06-07 9:06 ` Rusty Russell
2002-06-08 22:42 ` Linus Torvalds
2002-06-11 9:15 ` Rusty Russell
2002-06-11 16:53 ` Linus Torvalds
2002-06-12 5:32 ` Rusty Russell
2002-06-12 9:16 ` Peter Wächtler
2002-06-12 14:19 ` Hubertus Franke
2002-06-12 16:50 ` Peter Wächtler [this message]
2002-06-12 18:15 ` Vladimir Zidar
2002-06-12 15:39 ` Linus Torvalds
2002-06-12 16:29 ` Peter Wächtler
2002-06-12 16:52 ` Linus Torvalds
2002-06-12 17:07 ` Peter Wächtler
2002-06-12 18:32 ` Saurabh Desai
2002-06-12 20:05 ` Oliver Xymoron
2002-06-12 20:16 ` Linus Torvalds
2002-06-13 2:57 ` Rusty Russell
2002-06-13 9:37 ` Peter Wächtler
2002-06-13 9:55 ` Rusty Russell
2002-06-13 16:38 ` Gabriel Paubert
2002-06-13 16:40 ` Linus Torvalds
2002-06-13 1:32 ` Rusty Russell
-- strict thread matches above, loose matches on Subject: below --
2002-06-06 16:08 Martin Wirth
2002-06-06 22:59 ` Rusty Russell
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=3D077BBB.6090708@loewe-komp.de \
--to=pwaechtler@loewe-komp.de \
--cc=frankeh@watson.ibm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rusty@rustcorp.com.au \
--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