All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Oleg Nesterov <oleg@tv-sign.ru>
Cc: linux-kernel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>,
	Andrew Morton <akpm@osdl.org>,
	Arjan van de Ven <arjanv@infradead.org>,
	Steven Rostedt <rostedt@goodmis.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Christoph Hellwig <hch@infradead.org>, Andi Kleen <ak@suse.de>,
	David Howells <dhowells@redhat.com>,
	Alexander Viro <viro@ftp.linux.org.uk>, Paul Jackson <pj@sgi.com>
Subject: Re: [patch 05/15] Generic Mutex Subsystem, mutex-core.patch
Date: Wed, 21 Dec 2005 19:26:22 +0100	[thread overview]
Message-ID: <20051221182622.GA8714@elte.hu> (raw)
In-Reply-To: <43A99618.6D6655C6@tv-sign.ru>


* Oleg Nesterov <oleg@tv-sign.ru> wrote:

> But why we can't add the waiter to ->wait_list _after_ xchg() ? What 
> makes the difference? Fastpath atomic op can happen before or after 
> xchg(), this is ok. Unlock path will look at ->wait_list only after 
> taking spinlock, at this time we already added this waiter to the 
> ->wait_list.
> 
> In other words: we are holding ->wait_lock, nobody can even look at 
> ->wait_list. We can add the waiter to ->wait_list before or after 
> atomic_xchg() - it does not matter.

hm, you are right - i've added this optimization.

	Ingo

  reply	other threads:[~2005-12-21 18:27 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-19  1:37 [patch 05/15] Generic Mutex Subsystem, mutex-core.patch Ingo Molnar
2005-12-19  3:56 ` Steven Rostedt
2005-12-19  4:15 ` Steven Rostedt
2005-12-19  4:21 ` Steven Rostedt
2005-12-19  4:43 ` Steven Rostedt
2005-12-19  5:00 ` Steven Rostedt
2005-12-19  5:09   ` Steven Rostedt
2005-12-19 16:51   ` Ingo Molnar
2005-12-19  5:12 ` Steven Rostedt
2005-12-19 16:43   ` Ingo Molnar
2005-12-19  5:16 ` Steven Rostedt
2005-12-21 16:21 ` Oleg Nesterov
2005-12-21 15:57   ` Ingo Molnar
2005-12-21 17:51     ` Oleg Nesterov
2005-12-21 18:26       ` Ingo Molnar [this message]
2005-12-21 15:59   ` Ingo Molnar
2005-12-21 16:02   ` Ingo Molnar

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=20051221182622.GA8714@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=arjanv@infradead.org \
    --cc=dhowells@redhat.com \
    --cc=hch@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=oleg@tv-sign.ru \
    --cc=pj@sgi.com \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@osdl.org \
    --cc=viro@ftp.linux.org.uk \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.