From: Jiri Kosina <jkosina@suse.cz>
To: Peter Zijlstra <peterz@infradead.org>
Cc: Thomas Gleixner <tglx@linutronix.de>, Ingo Molnar <mingo@elte.hu>,
Paul E McKenney <paulmck@linux.vnet.ibm.com>,
Oleg Nesterov <oleg@tv-sign.ru>, Nick Piggin <npiggin@suse.de>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: futex code and barriers
Date: Tue, 29 Apr 2008 14:43:12 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0804291442050.22014@twin.jikos.cz> (raw)
In-Reply-To: <1209470236.13978.55.camel@twins>
On Tue, 29 Apr 2008, Peter Zijlstra wrote:
> While looking through the futex code I stumbled upon the following bit:
> kernel/futex.c:
> /* add_wait_queue is the barrier after __set_current_state. */
> __set_current_state(TASK_INTERRUPTIBLE);
> add_wait_queue(&q.waiters, &wait);
> However,
> void add_wait_queue(wait_queue_head_t *q, wait_queue_t *wait)
> {
> unsigned long flags;
>
> wait->flags &= ~WQ_FLAG_EXCLUSIVE;
> spin_lock_irqsave(&q->lock, flags);
> __add_wait_queue(q, wait);
> spin_unlock_irqrestore(&q->lock, flags);
> }
[ ... ]
> Non of which implies a full barrier.
Well I am probably missing the point, but what about the lock and unlock
of the spinlock?
--
Jiri Kosina
SUSE Labs
next prev parent reply other threads:[~2008-04-29 13:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-29 11:57 Peter Zijlstra
2008-04-29 12:43 ` Jiri Kosina [this message]
2008-04-29 12:49 ` Peter Zijlstra
2008-04-29 13:13 ` Oleg Nesterov
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=Pine.LNX.4.64.0804291442050.22014@twin.jikos.cz \
--to=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=npiggin@suse.de \
--cc=oleg@tv-sign.ru \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--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
all inboxes | Powered by JetHome®