From: Jens Axboe <axboe@kernel.dk>
To: Bart Van Assche <bvanassche@acm.org>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>
Subject: Re: [PATCH] block: Optimize bio_init()
Date: Sun, 12 Sep 2021 07:03:40 -0600 [thread overview]
Message-ID: <200438e7-1a04-ae88-e79c-a4276b9dbb0f@kernel.dk> (raw)
In-Reply-To: <c728eac8-3246-2a6d-84bd-a04fa62fbc04@acm.org>
On 9/11/21 9:19 PM, Bart Van Assche wrote:
> On 9/11/21 15:16, Jens Axboe wrote:
>> Looking at profile:
>>
>> 43.34 │ rep stos %rax,%es:(%rdi)
>> I do wonder if rep stos is just not very well suited for small regions,
>> either in general or particularly on AMD.
>>
>> What do your profiles look like for before and after?
>
> Since I do not know which tool was used to obtain the above
> information, I ran perf record -ags sleep 10 while the test
> was running. I could not find bio_init in the output. I think
> that means that that function got inlined. But
> bio_alloc_bioset() showed up in the output. The time spent in
> that function is lower if IOPS are higher.
The above is from perf report, diving into the functions. Yours show up
in bio_alloc_bioset(), and mine in bio_alloc_kiocb() as I'm doing polled
IO.
> The performance numbers in the patch description come from a
> Intel Xeon Gold 6154 CPU. I reran the test today on an old Intel
> Core i7-4790 CPU and obtained the opposite result: higher IOPS
> without this patch than with this patch although the assembler
> code looks to be the same. It seems like how fast "rep stos"
> runs depends on the CPU type?
It does appear so. Which is a bit frustrating...
--
Jens Axboe
next prev parent reply other threads:[~2021-09-12 13:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-11 21:47 [PATCH] block: Optimize bio_init() Bart Van Assche
2021-09-11 22:01 ` Jens Axboe
2021-09-11 22:09 ` Jens Axboe
2021-09-11 22:16 ` Jens Axboe
2021-09-12 3:19 ` Bart Van Assche
2021-09-12 13:03 ` Jens Axboe [this message]
2021-09-12 22:01 ` Bart Van Assche
2021-09-12 22:13 ` Jens Axboe
2021-09-13 3:52 ` Bart Van Assche
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=200438e7-1a04-ae88-e79c-a4276b9dbb0f@kernel.dk \
--to=axboe@kernel.dk \
--cc=bvanassche@acm.org \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.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.