mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org, tglx@linutronix.de,
	torvalds@osdl.org, arjan@infradead.org, simlo@phys.au.dk
Subject: Re: [patch] PI-futex: -V2
Date: Mon, 27 Mar 2006 01:30:00 +0200	[thread overview]
Message-ID: <20060326233000.GA21711@elte.hu> (raw)
In-Reply-To: <20060326111645.3cf2c206.akpm@osdl.org>


* Andrew Morton <akpm@osdl.org> wrote:

> Ingo Molnar <mingo@elte.hu> wrote:
> >
> > > > +	for (;;) {
> >  > > +		if (top_waiter)
> >  > > +			plist_del(&top_waiter->pi_list_entry,
> >  > > +				  &owner->pi_waiters);
> >  > > +
> >  > > +		if (waiter && waiter == rt_mutex_top_waiter(lock)) {
> >  > 
> >  > rt_mutex_top_waiter() can never return NULL, so the test for NULL 
> >  > could be removed.
> > 
> >  it might be NULL if adjust_pi_chain() is called from remove_waiter(), 
> >  and next_waiter there is NULL (because !rt_mutex_has_waiters() after the 
> >  removal of the current waiter).
> 
> Yes, `waiter' might be NULL.  But rt_mutex_top_waiter() will never 
> return NULL.  So it might be possible to just do
> 
> 	if (waiter == rt_mutex_top_waiter(lock))

ah, indeed, you are right.

> Which might actually be less efficient, and more obscure.  Just 
> pointing it out.

ok, i left it as-is for now.

	Ingo

  reply	other threads:[~2006-03-26 23:32 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-25 18:46 [patch 05/10] PI-futex: rt-mutex core Ingo Molnar
2006-03-26  5:35 ` Andrew Morton
2006-03-26 23:33   ` Ingo Molnar
2006-03-26  6:07 ` Andrew Morton
2006-03-26 16:03   ` [patch] PI-futex: -V2 Ingo Molnar
2006-03-26 19:16     ` Andrew Morton
2006-03-26 23:30       ` Ingo Molnar [this message]
2006-03-26 23:16     ` [patch] PI-futex: -V3 Ingo Molnar
2006-03-28 10:17       ` [patch-mm2] PI-futex: fix timeout race Thomas Gleixner
2006-03-31 19:14       ` [patch] PI-futex patchset: -V4 Ingo Molnar
2006-03-31 19:23         ` Ingo Molnar
2006-04-01  0:19         ` Peter Williams

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=20060326233000.GA21711@elte.hu \
    --to=mingo@elte.hu \
    --cc=akpm@osdl.org \
    --cc=arjan@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=simlo@phys.au.dk \
    --cc=tglx@linutronix.de \
    --cc=torvalds@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

Powered by JetHome