mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@stgolabs.net>
To: Peter Zijlstra <peterz@infradead.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Ingo Molnar <mingo@redhat.com>
Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Chris Mason <clm@fb.com>, Steven Rostedt <rostedt@goodmis.org>,
	Manfred Spraul <manfred@colorfullife.com>,
	George Spelvin <linux@horizon.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>
Subject: [PATCH v2 0/3] kernel: lockless wake-queues
Date: Fri,  1 May 2015 08:27:49 -0700	[thread overview]
Message-ID: <1430494072-30283-1-git-send-email-dave@stgolabs.net> (raw)

Hello,

This series is aimed at addressing some of the futex hash bucket
lock hold times by introducing lockless wake-queues for futex_wake.

patch-1: introduces the lockless wake-queue machinery.
patch-2: makes use of patch 1 for futexes.
patch-3: makes use of patch 1 for posix mqueues.

Details in the individual patches.

This was suggested sometime ago by peterz, but due to it potentially
causing spurious wakeups, was never given much consideration. However,
nowadays, so far, I am reliably booting a 45-core box with peterz's
patch to trigger spurious wakeups. While there are drivers out there
that do not play nice with schedule(), they can be fixed over time --
while this is a production problem for some customers). Furthermore,
after some auditing, there really aren't that many, it a lot of cases,
those functions that end up calling schedule are merely wrapped in a
loop, so just not clear at first sight.

Changes from v1:
	- Simplify wake_q and more comments, suggested by George Spelvin.
	- Made it very clear in the comments that this can cause spurious
	  wakeups, and how naughty users should handle them. (Linus)
	- Added mqueue user as this was also wanted for rt purposes.

Applies on top of Linus' tree 4.0-rc1 (4a152c3913f). Thanks!

  sched: lockless wake-queues
  futex: lockless wakeups
  ipc/mqueue: lockless pipelined wakeups

 include/linux/sched.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 ipc/mqueue.c          | 50 +++++++++++++++++++++++++++++++-------------------
 kernel/futex.c        | 33 +++++++++++++++++----------------
 kernel/sched/core.c   | 46 ++++++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 140 insertions(+), 35 deletions(-)

--
2.1.4


             reply	other threads:[~2015-05-01 15:28 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-01 15:27 Davidlohr Bueso [this message]
2015-05-01 15:27 ` [PATCH 1/3] sched: " Davidlohr Bueso
2015-05-08 13:23   ` [tip:sched/core] sched: Implement " tip-bot for Peter Zijlstra
2015-05-01 15:27 ` [PATCH 2/3] futex: lockless wakeups Davidlohr Bueso
2015-05-08 13:23   ` [tip:sched/core] futex: Implement " tip-bot for Davidlohr Bueso
2015-05-01 15:27 ` [PATCH 3/3] ipc/mqueue: lockless pipelined wakeups Davidlohr Bueso
2015-05-01 21:52   ` George Spelvin
2015-05-02  0:35     ` Davidlohr Bueso
2015-05-05  0:37       ` George Spelvin
2015-05-04 14:02   ` [PATCH v2 " Davidlohr Bueso
2015-05-08 13:24     ` [tip:sched/core] ipc/mqueue: Implement " tip-bot for 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=1430494072-30283-1-git-send-email-dave@stgolabs.net \
    --to=dave@stgolabs.net \
    --cc=bigeasy@linutronix.de \
    --cc=clm@fb.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@horizon.com \
    --cc=manfred@colorfullife.com \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    --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®