public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Darren Hart <dvhltc@us.ibm.com>
Cc: "lkml," <linux-kernel@vger.kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Rusty Russell <rusty@rustcorp.com.au>,
	Nick Piggin <npiggin@suse.de>
Subject: Re: Update futex_q to clarify single waiter symmantics
Date: Thu, 18 Dec 2008 11:44:08 +0100	[thread overview]
Message-ID: <20081218104408.GA14332@elte.hu> (raw)
In-Reply-To: <4949A794.8000502@us.ibm.com>


* Darren Hart <dvhltc@us.ibm.com> wrote:

> From: Darren Hart <dvhltc@us.ibm.com>
>
> I've tripped over this a couple times.  The futex_q uses a waiters list
> to represent a single blocked task and then calles wake_up_all().  This
> can lead to confusion in trying to understand the intent of the code,
> which is to have a single futex_q for every task waiting on a futex.
> This patch corrects the problem, using a single pointer to the waiting
> task, and an appropriate call to wake_up, rather than wake_up_all.
>
> Compile and boot tested on an 8way x86_64 machine.
>
> Signed-off-by: Darren Hart <dvhltc@us.ibm.com>
> ---
>
> kernel/futex.c |   11 ++++++-----
> 1 files changed, 6 insertions(+), 5 deletions(-)

applied to tip/core/futexes, thanks Darren!

> -	wake_up_all(&q->waiters);
> +	wake_up(&q->waiter);

yeah, the naming and the wake_up_all is a relic from the FUTEX_FD days - 
but we removed that earlier this year:

| commit 82af7aca56c67061420d618cc5a30f0fd4106b80
| Author: Eric Sesterhenn <snakebyte@gmx.de>
| Date:   Fri Jan 25 10:40:46 2008 +0100
|
|     Removal of FUTEX_FD

	Ingo

      reply	other threads:[~2008-12-18 10:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-18  1:29 Update futex_q to clarify single waiter symmantics Darren Hart
2008-12-18 10:44 ` Ingo Molnar [this message]

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=20081218104408.GA14332@elte.hu \
    --to=mingo@elte.hu \
    --cc=dvhltc@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=npiggin@suse.de \
    --cc=rusty@rustcorp.com.au \
    --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