From: Chaitanya Kulkarni <chaitanyak@nvidia.com>
To: Jens Axboe <axboe@kernel.dk>,
"linux-block@vger.kernel.org" <linux-block@vger.kernel.org>,
Christoph Hellwig <hch@lst.de>, Keith Busch <kbusch@kernel.org>
Subject: Re: [PATCH] nvme: don't memset() the normal read/write command
Date: Wed, 13 Oct 2021 04:14:21 +0000 [thread overview]
Message-ID: <e97056a2-2304-3b5e-a297-9bf96147292f@nvidia.com> (raw)
In-Reply-To: <b38d0d5c-191a-68cd-f6fb-5662706dc366@kernel.dk>
On 10/12/2021 11:13 AM, Jens Axboe wrote:
> External email: Use caution opening links or attachments
>
>
> This memset in the fast path costs a lot of cycles on my setup. Here's a
> top-of-profile of doing ~6.7M IOPS:
>
> + 5.90% io_uring [nvme] [k] nvme_queue_rq
> + 5.32% io_uring [nvme_core] [k] nvme_setup_cmd
> + 5.17% io_uring [kernel.vmlinux] [k] io_submit_sqes
> + 4.97% io_uring [kernel.vmlinux] [k] blkdev_direct_IO
>
> and a perf diff with this patch:
>
> 0.92% +4.40% [nvme_core] [k] nvme_setup_cmd
>
> reducing it from 5.3% to only 0.9%. This takes it from the 2nd most
> cycle consumer to something that's mostly irrelevant.
>
> Retain the full clear for the other commands to avoid doing any audits
> there, and just clear the fields in the rw command manually that we
> don't already fill.
>
> Signed-off-by: Jens Axboe <axboe@kernel.dk>
>
> ---
>
Looks good to me.
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
next prev parent reply other threads:[~2021-10-13 4:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-12 18:13 [PATCH] nvme: don't memset() the normal read/write command Jens Axboe
2021-10-12 18:31 ` Keith Busch
2021-10-12 18:56 ` Jens Axboe
2021-10-13 4:14 ` Chaitanya Kulkarni [this message]
2021-10-13 4:58 ` Christoph Hellwig
2021-10-18 10:22 ` Christoph Hellwig
2021-10-18 12:33 ` Jens Axboe
2021-10-18 12:37 ` Christoph Hellwig
2021-10-18 12:38 ` Jens Axboe
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=e97056a2-2304-3b5e-a297-9bf96147292f@nvidia.com \
--to=chaitanyak@nvidia.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=kbusch@kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox