From: Jens Axboe <axboe@kernel.dk>
To: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>, fio@vger.kernel.org
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCH v2] zbd: Fix I/O direction adjustment step for random read/write
Date: Fri, 17 Apr 2020 08:32:05 -0600 [thread overview]
Message-ID: <8acaca2e-d5dc-e091-6579-ebb5e6a55c3b@kernel.dk> (raw)
In-Reply-To: <20200416113036.28296-1-shinichiro.kawasaki@wdc.com>
On 4/16/20 5:30 AM, Shin'ichiro Kawasaki wrote:
> Commit fb0259fb ("zbd: Ensure first I/O is write for random read/write to
> sequential zones") introduced a step to change direction of io_u from
> read to write when that is the first I/O of the random read/write
> workload to zoned block devices. However, such direction adjustment
> results in inconsistent I/O length when read block size and write block
> size are different.
>
> To avoid the inconsistency between I/O direction and I/O length,
> adjust the I/O direction before the I/O length is set. Move the step
> from zbd_adjust_block() to set_rw_ddir(). To minimize changes in
> set_rw_ddir(), introduce zbd_adjust_ddir() helper function.
I'm not a huge fan of this zbd sprinkling everywhere, but that's not the
fault of your fix. But I would really prefer if zbd got disentangled
from the core/hot paths completely, maybe by adding a io engine fn for
whatever it needs to do. At least that reduces the hot path overhead to
check a pointer and calling that function instead of having various
checks here and there.
Really not great to have a somewhat esoteric feature like zbd support
add _any_ overhead to the hot path at all.
--
Jens Axboe
next prev parent reply other threads:[~2020-04-17 14:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 11:30 [PATCH v2] zbd: Fix I/O direction adjustment step for random read/write Shin'ichiro Kawasaki
2020-04-17 4:58 ` Damien Le Moal
2020-04-17 14:32 ` Jens Axboe [this message]
2020-04-17 17:30 ` Alexey Dobriyan
2020-04-20 2:41 ` Damien Le Moal
2020-04-20 18:10 ` Alexey Dobriyan
2020-04-20 2:33 ` Damien Le Moal
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=8acaca2e-d5dc-e091-6579-ebb5e6a55c3b@kernel.dk \
--to=axboe@kernel.dk \
--cc=Damien.LeMoal@wdc.com \
--cc=adobriyan@gmail.com \
--cc=fio@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.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