From: Brian King <brking@linux.vnet.ibm.com>
To: Jens Axboe <axboe@kernel.dk>, linux-block@vger.kernel.org
Cc: dm-devel@redhat.com, snitzer@redhat.com, agk@redhat.com
Subject: Re: [PATCH 1/1] block: Convert hd_struct in_flight from atomic to percpu
Date: Wed, 28 Jun 2017 17:04:24 -0500 [thread overview]
Message-ID: <93d463ba-58aa-c830-9319-a0774d364b1e@linux.vnet.ibm.com> (raw)
In-Reply-To: <c91629be-26db-96bb-9a55-18a6861888b2@kernel.dk>
On 06/28/2017 04:49 PM, Jens Axboe wrote:
> On 06/28/2017 03:12 PM, Brian King wrote:
>> This patch converts the in_flight counter in struct hd_struct from a
>> pair of atomics to a pair of percpu counters. This eliminates a couple
>> of atomics from the hot path. When running this on a Power system, to
>> a single null_blk device with 80 submission queues, irq mode 0, with
>> 80 fio jobs, I saw IOPs go from 1.5M IO/s to 11.4 IO/s.
>
> This has been done before, but I've never really liked it. The reason is
> that it means that reading the part stat inflight count now has to
> iterate over every possible CPU. Did you use partitions in your testing?
> How many CPUs were configured? When I last tested this a few years ago
I did not use partitions. I was running this on a 4 socket Power 8 machine with
5 cores per socket, running with 4 threads per core, so a total of 80
logical CPUs were usable in Linux.
I was missing the fact that part_round_stats_single calls part_in_flight
and had only noticed the sysfs and procfs users of part_in_flight previously.
-Brian
--
Brian King
Power Linux I/O
IBM Linux Technology Center
next prev parent reply other threads:[~2017-06-28 22:04 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-28 21:12 [PATCH 1/1] block: Convert hd_struct in_flight from atomic to percpu Brian King
2017-06-28 21:49 ` Jens Axboe
2017-06-28 22:04 ` Brian King [this message]
2017-06-29 8:40 ` Ming Lei
2017-06-29 15:58 ` Jens Axboe
2017-06-29 16:00 ` Jens Axboe
2017-06-29 18:42 ` Jens Axboe
2017-06-30 1:20 ` Ming Lei
2017-06-30 2:17 ` Jens Axboe
2017-06-30 13:05 ` [dm-devel] " Brian King
2017-06-30 14:08 ` Jens Axboe
2017-06-30 18:33 ` Brian King
2017-06-30 23:23 ` Ming Lei
2017-06-30 23:26 ` Jens Axboe
2017-07-01 2:18 ` Brian King
2017-07-04 1:20 ` Ming Lei
2017-07-04 20:58 ` Brian King
2017-07-01 4:17 ` Jens Axboe
2017-07-01 4:59 ` Jens Axboe
2017-07-01 16:43 ` Jens Axboe
2017-07-04 20:55 ` Brian King
2017-07-04 21:57 ` Jens Axboe
2017-06-29 16:25 ` Ming Lei
2017-06-29 17:31 ` Brian King
2017-06-30 1:08 ` Ming Lei
2017-06-28 21:54 ` Jens Axboe
2017-06-28 21:59 ` Jens Axboe
2017-06-28 22:07 ` [dm-devel] " Brian King
2017-06-28 22:19 ` Jens Axboe
2017-06-29 12:59 ` Brian King
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=93d463ba-58aa-c830-9319-a0774d364b1e@linux.vnet.ibm.com \
--to=brking@linux.vnet.ibm.com \
--cc=agk@redhat.com \
--cc=axboe@kernel.dk \
--cc=dm-devel@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=snitzer@redhat.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