From: Ingo Molnar <mingo@kernel.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: Peter Zijlstra <peterz@infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
Linus Torvalds <torvalds@linux-foundation.org>,
Chris Mason <clm@fb.com>, Steven Rostedt <rostedt@goodmis.org>,
fredrik.markstrom@windriver.com, linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH 2/2] futex: lockless wakeups
Date: Mon, 20 Apr 2015 08:18:36 +0200 [thread overview]
Message-ID: <20150420061836.GA11191@gmail.com> (raw)
In-Reply-To: <1429471060-21271-3-git-send-email-dave@stgolabs.net>
* Davidlohr Bueso <dave@stgolabs.net> wrote:
> Given the overall futex architecture, any chance of reducing
> hb->lock contention is welcome. In this particular case, using
> wake-queues to enable lockless wakeups addresses very much real
> world performance concerns, even cases of soft-lockups in cases
> of large amounts of blocked tasks (which is not hard to find in
> large boxes, using but just a handful of futex).
>
> At the lowest level, this patch can reduce latency of a single thread
> attempting to acquire hb->lock in highly contended scenarios by a
> up to 2x. At lower counts of nr_wake there are no regressions,
> confirming, of course, that the wake_q handling overhead is practically
> non existent. For instance, while a fair amount of variation,
> the extended pef-bench wakeup benchmark shows for a 20 core machine
> the following avg per-thread time to wakeup its share of tasks:
>
> nr_thr ms-before ms-after
> 16 0.0590 0.0215
> 32 0.0396 0.0220
> 48 0.0417 0.0182
> 64 0.0536 0.0236
> 80 0.0414 0.0097
> 96 0.0672 0.0152
>
> Naturally, this can cause spurious wakeups. [...]
Please write a small description we can cite to driver authors once
the (inevitable) breakages appear, outlining this new behavior and its
implications, so that we can fix any remaining bugs ASAP.
I'll also let this pending a bit longer than other changes, to make
sure we shake out any bugs/regressions triggered by this change.
Third, it might make sense to add a new 'spurious wakeup injection
debug mechanism' that, if enabled in the .config, automatically and
continuously inserts spurious wakeups at a given, slightly randomized
rate - which would ensure that all kernel facilities can robustly
handle spurious wakeups.
My guess would be that most remaining fragilities against spurious
wakeups ought to be in the boot/init phase, so I'd keep an eye out for
suspend/resume regressions.
> [...] However there is core code that cannot handle them afaict, and
> furthermore tglx does have the point that other events can already
> trigger them anyway.
s/there is core code/there is no core code
Thanks,
Ingo
next prev parent reply other threads:[~2015-04-20 6:18 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-19 19:17 [PATCH 0/2] lockless wake-queues Davidlohr Bueso
2015-04-19 19:17 ` [PATCH 1/2] sched: " Davidlohr Bueso
2015-04-20 14:42 ` Peter Zijlstra
2015-04-19 19:17 ` [PATCH 2/2] futex: lockless wakeups Davidlohr Bueso
2015-04-20 6:18 ` Ingo Molnar [this message]
2015-04-20 13:55 ` Davidlohr Bueso
2015-04-20 14:57 ` Peter Zijlstra
2015-04-20 17:31 ` Davidlohr Bueso
2015-04-20 16:04 ` Linus Torvalds
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=20150420061836.GA11191@gmail.com \
--to=mingo@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=bigeasy@linutronix.de \
--cc=clm@fb.com \
--cc=dave@stgolabs.net \
--cc=fredrik.markstrom@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--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 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.