From: Darren Hart <dvhart@linux.intel.com>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Davidlohr Bueso <davidlohr@hp.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
Ingo Molnar <mingo@redhat.com>,
Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Paul McKenney <paulmck@linux.vnet.ibm.com>,
Mike Galbraith <efault@gmx.de>, Jeff Mahoney <jeffm@suse.com>,
Jason Low <jason.low2@hp.com>, Waiman Long <Waiman.Long@hp.com>,
Tom Vaden <tom.vaden@hp.com>,
"Norton, Scott J" <scott.norton@hp.com>,
"Chandramouleeswaran, Aswin" <aswin@hp.com>,
Ingo Molnar <mingo@kernel.org>
Subject: Re: [PATCH v3 4/4] futex: Avoid taking hb lock if nothing to wakeup
Date: Thu, 19 Dec 2013 16:26:22 -0800 [thread overview]
Message-ID: <1387499182.3510.43.camel@dvhart-mobl4.amr.corp.intel.com> (raw)
In-Reply-To: <CA+55aFyUd4Mhy8Rsbv=etahBCrQyWeZSLxW9sL0uCF0hCXkHfQ@mail.gmail.com>
On Thu, 2013-12-19 at 16:04 -0800, Linus Torvalds wrote:
> On Thu, Dec 19, 2013 at 3:53 PM, Linus Torvalds
> <torvalds@linux-foundation.org> wrote:
> >
> > - in queue_lock(), immediately before getting the spinlock (which
> > will do the SAME ATOMIC INCREMENT, except it's just doing it on a
> > different member of the structure, namely the spinlock head)
>
> Ok, so there's the "q->lock_ptr = &hb->lock" assignment in between,
> but if the ordering of that is critical, it should be documented in
> the memory ordering rules, because it sure is subtle and not obviously
> visible anywhere..
I'm trying to look into this to confirm, but it will require some time
for me to page that all in. There are some issues with respect to the
lock_ptr that are documented in the other functions (like unqueue_me),
but I *think* they are mostly on the other end of the operation and may
not be an issue here...
q->lock_ptr == 0 also indicates "woken" state.
I will spend some time on this to try and get a definitive answer.
--
Darren Hart
Intel Open Source Technology Center
Yocto Project - Linux Kernel
next prev parent reply other threads:[~2013-12-20 0:26 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-19 18:45 [PATCH v3 0/4] futex: Wakeup optimizations Davidlohr Bueso
2013-12-19 18:45 ` [PATCH v3 1/4] futex: Misc cleanups Davidlohr Bueso
2013-12-19 18:45 ` [PATCH v3 2/4] futex: Larger hash table Davidlohr Bueso
2013-12-19 18:45 ` [PATCH v3 3/4] futex: Document ordering guarantees Davidlohr Bueso
2013-12-19 18:45 ` [PATCH v3 4/4] futex: Avoid taking hb lock if nothing to wakeup Davidlohr Bueso
2013-12-19 19:25 ` Ingo Molnar
2013-12-19 19:29 ` Davidlohr Bueso
2013-12-19 19:42 ` Ingo Molnar
2013-12-19 22:35 ` Joe Perches
2013-12-20 9:11 ` Peter Zijlstra
2013-12-20 10:27 ` Ingo Molnar
2013-12-19 23:14 ` Linus Torvalds
2013-12-19 23:42 ` Davidlohr Bueso
2013-12-19 23:53 ` Linus Torvalds
2013-12-20 0:04 ` Linus Torvalds
2013-12-20 0:26 ` Darren Hart [this message]
2013-12-20 0:12 ` Linus Torvalds
2013-12-20 2:22 ` Davidlohr Bueso
2013-12-20 3:13 ` Linus Torvalds
2013-12-20 6:13 ` Davidlohr Bueso
2013-12-20 8:54 ` Peter Zijlstra
2013-12-20 19:30 ` Davidlohr Bueso
2013-12-20 19:54 ` Linus Torvalds
2013-12-21 5:57 ` Davidlohr Bueso
2013-12-21 1:36 ` Davidlohr Bueso
2013-12-21 2:34 ` Darren Hart
2013-12-21 3:08 ` Davidlohr Bueso
2013-12-25 3:13 ` Waiman Long
2014-01-02 11:37 ` Davidlohr Bueso
-- strict thread matches above, loose matches on Subject: below --
2013-12-03 9:45 [PATCH v2 0/4] futex: Wakeup optimizations Davidlohr Bueso
2013-12-03 9:45 ` [PATCH v2 4/4] futex: Avoid taking hb lock if nothing to wakeup Davidlohr Bueso
2013-12-10 18:10 ` [PATCH v3 " Davidlohr Bueso
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=1387499182.3510.43.camel@dvhart-mobl4.amr.corp.intel.com \
--to=dvhart@linux.intel.com \
--cc=Waiman.Long@hp.com \
--cc=aswin@hp.com \
--cc=davidlohr@hp.com \
--cc=efault@gmx.de \
--cc=jason.low2@hp.com \
--cc=jeffm@suse.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=mingo@redhat.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=peterz@infradead.org \
--cc=scott.norton@hp.com \
--cc=tglx@linutronix.de \
--cc=tom.vaden@hp.com \
--cc=torvalds@linux-foundation.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
all inboxes | Powered by JetHome®