From: Ingo Molnar <mingo@kernel.org>
To: Davidlohr Bueso <dave@stgolabs.net>
Cc: peterz@infradead.org, Waiman.Long@hp.com, jason.low2@hpe.com,
wanpeng.li@hotmail.com, linux-kernel@vger.kernel.org,
Davidlohr Bueso <dbueso@suse.de>
Subject: Re: [PATCH 3/3] locking/rwsem: Scan the wait_list for readers only once
Date: Sat, 6 Aug 2016 08:05:41 +0200 [thread overview]
Message-ID: <20160806060541.GA20695@gmail.com> (raw)
In-Reply-To: <1470384285-32163-4-git-send-email-dave@stgolabs.net>
* Davidlohr Bueso <dave@stgolabs.net> wrote:
> When wanting to wakeup readers, __rwsem_mark_wakeup() currently
> iterates the wait_list twice while looking to wakeup the first N
> queued reader-tasks. While this can be quite inefficient, it was
> there such that a awoken reader would be first and foremost
> acknowledged by the lock counter.
>
> Keeping the same logic, we can further benefit from the use of
> wake_qs and avoid entirely the first wait_list iteration that sets
> the counter as wake_up_process() isn't going to occur right away,
> and therefore we maintain the counter->list order of going about
> things.
>
> Other than saving cycles with O(n) "scanning", this change also
> nicely cleans up a good chunk of __rwsem_mark_wakeup(); both
> visually and less tedious to read.
>
> For example, the following improvements where seen on some will
> it scale microbenchmarks, on a 48-core Haswell:
>
> v4.7 v4.7-rwsem-v1
> Hmean signal1-processes-8 5792691.42 ( 0.00%) 5771971.04 ( -0.36%)
> Hmean signal1-processes-12 6081199.96 ( 0.00%) 6072174.38 ( -0.15%)
> Hmean signal1-processes-21 3071137.71 ( 0.00%) 3041336.72 ( -0.97%)
> Hmean signal1-processes-48 3712039.98 ( 0.00%) 3708113.59 ( -0.11%)
> Hmean signal1-processes-79 4464573.45 ( 0.00%) 4682798.66 ( 4.89%)
> Hmean signal1-processes-110 4486842.01 ( 0.00%) 4633781.71 ( 3.27%)
> Hmean signal1-processes-141 4611816.83 ( 0.00%) 4692725.38 ( 1.75%)
> Hmean signal1-processes-172 4638157.05 ( 0.00%) 4714387.86 ( 1.64%)
> Hmean signal1-processes-203 4465077.80 ( 0.00%) 4690348.07 ( 5.05%)
> Hmean signal1-processes-224 4410433.74 ( 0.00%) 4687534.43 ( 6.28%)
Please always make it clear in changelogs what the numbers mean, that higher
numbers are better, etc. - so that people don't have to re-read it 2-3 times to
figure out what it means.
Also, what are 'will it scale microbenchmarks'?
Thanks,
Ingo
next prev parent reply other threads:[~2016-08-06 21:44 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-05 8:04 [PATCH 0/3] locking/rwsem: __rwsem_mark_wake() improvements Davidlohr Bueso
2016-08-05 8:04 ` [PATCH 1/3] locking/rwsem: Return void in __rwsem_mark_wake() Davidlohr Bueso
2016-08-18 11:00 ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-08-18 13:41 ` tip-bot for Davidlohr Bueso
2016-08-05 8:04 ` [PATCH 2/3] locking/rwsem: Remove a few useless comments Davidlohr Bueso
2016-08-18 11:00 ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-08-18 13:42 ` tip-bot for Davidlohr Bueso
2016-08-05 8:04 ` [PATCH 3/3] locking/rwsem: Scan the wait_list for readers only once Davidlohr Bueso
2016-08-06 6:05 ` Ingo Molnar [this message]
2016-08-08 16:37 ` Davidlohr Bueso
2016-08-18 11:01 ` [tip:locking/core] " tip-bot for Davidlohr Bueso
2016-08-18 13:42 ` 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=20160806060541.GA20695@gmail.com \
--to=mingo@kernel.org \
--cc=Waiman.Long@hp.com \
--cc=dave@stgolabs.net \
--cc=dbueso@suse.de \
--cc=jason.low2@hpe.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=wanpeng.li@hotmail.com \
/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;
as well as URLs for NNTP newsgroup(s).