public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@kernel.dk>
To: Ming Lei <tom.leiming@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Mike Snitzer <snitzer@redhat.com>, Tejun Heo <tj@kernel.org>
Subject: Re: [PATCH 0/4] block: account io: kill atomic operations
Date: Thu, 16 Jul 2015 09:09:04 -0600	[thread overview]
Message-ID: <55A7C910.9040708@kernel.dk> (raw)
In-Reply-To: <CACVXFVM1FPs=H-tqGfch4nTJ9quSqr3Q4Z4YEnWo=DEpo9kzzg@mail.gmail.com>

On 07/16/2015 09:01 AM, Ming Lei wrote:
> On Thu, Jul 16, 2015 at 10:48 PM, Jens Axboe <axboe@kernel.dk> wrote:
>> On 07/15/2015 09:16 PM, Ming Lei wrote:
>>>
>>> Hi,
>>>
>>> This patches kills two kinds of atomic operations in block
>>> accounting I/O.
>>>
>>> The 1st two patches convert atomic refcount of partition
>>> into percpu refcount.
>>>
>>> The 2nd two patches converts partition->in_flight[] into percpu
>>> variable.
>>>
>>> With this change, ~15% throughput improvement can be observed
>>> when running fio(randread) over null blk in a dual-socket
>>> environment.
>>
>>
>> I've played with this before, but always ran into the hurdle of making
>> part_in_flight() too expensive ended up hurting results in the end. Making
>
> Yes, it is a bit expensive, but it is only run at most one time per tick for
> one partition.

Yup, but that can still be 1000 per second. And up until last year, it 
was even worse: 7276d02e241dc. So it's not too surprising if there's 
more low hanging fruit :-)

If we can make the rounding more lazy, then we should go ahead and do that.

>> the inc/dec parts of accounting percpu is a no-brainer, unfortunately the
>> summing then becomes pretty expensive. I'll run this through some testing
>> and see what kind of results I get.
>
> The first two patches should be fine, and it still can get ~8% improvement
> in my test.

Agree, those can go right in.

-- 
Jens Axboe


      reply	other threads:[~2015-07-16 15:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-16  3:16 [PATCH 0/4] block: account io: kill atomic operations Ming Lei
2015-07-16  3:16 ` [PATCH 1/4] block: partition: introduce hd_free_part() Ming Lei
2015-07-16  3:16 ` [PATCH 2/4] block: partition: convert percpu ref Ming Lei
2015-07-16 14:36   ` Tejun Heo
2015-07-16  3:16 ` [PATCH 3/4] block: partition: introduce 'cpu' para to part_inc|dec_in_flight Ming Lei
2015-07-16  3:16 ` [PATCH 4/4] block: account io: convert part->in_fligh[] into percpu variable Ming Lei
2015-07-16 14:40   ` Tejun Heo
2015-07-16 14:48 ` [PATCH 0/4] block: account io: kill atomic operations Jens Axboe
2015-07-16 14:59   ` Tejun Heo
2015-07-16 15:02     ` Jens Axboe
2015-07-16 15:01   ` Ming Lei
2015-07-16 15:09     ` Jens Axboe [this message]

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=55A7C910.9040708@kernel.dk \
    --to=axboe@kernel.dk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snitzer@redhat.com \
    --cc=tj@kernel.org \
    --cc=tom.leiming@gmail.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