public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: pj@sgi.com, mingo@elte.hu, linux-kernel@vger.kernel.org
Subject: Re: Robust futexes
Date: Thu, 16 Feb 2006 23:29:50 -0800	[thread overview]
Message-ID: <20060216232950.efa39e13.pj@sgi.com> (raw)
In-Reply-To: <1140160371.25078.81.camel@localhost.localdomain>

Ah - that makes more sense - thanks.

So the point is that we only have to cleanup the stale locks of dead
threads when some other task has the misfortune of trying to take
the orphaned lock and gets forced into a wait.

The wait call essentially becomes a "wait unless said other TID is
dead, in which case, a new owner is summarily declared."

Hmmm ...

How do you handle the case where the wait occurred before the death,
not after, and the case where the problem is caused by a task dying
that was not the task that held the lock when the wait was called.

Say task A is holding the lock for a while, during which tasks B,
C and D queue up waiting for the lock, then task A releases and task
B gets it, then task B drops dead unexpectedly.

When C and D began their wait, A owned the lock.  Now it is the death
of B that should lead to the awakening of C.

What does you solution look like in that case?

-- 
                  I won't rest till it's the best ...
                  Programmer, Linux Scalability
                  Paul Jackson <pj@sgi.com> 1.925.600.0401

  reply	other threads:[~2006-02-17  7:30 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-17  4:57 Robust futexes Rusty Russell
2006-02-17  6:42 ` Paul Jackson
2006-02-17  7:12   ` Rusty Russell
2006-02-17  7:29     ` Paul Jackson [this message]
2006-02-17  9:13       ` Ingo Molnar
2006-02-18  3:53         ` Rusty Russell
2006-02-19  4:11           ` Paul Jackson
2006-02-20  9:06           ` Ingo Molnar
2006-02-20 22:33             ` Paul Jackson
2006-02-17 15:47 ` Daniel Walker
2006-02-17 16:23 ` Darren Hart
2006-03-09 23:17   ` 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=20060216232950.efa39e13.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rusty@rustcorp.com.au \
    /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