From: Niklas Cassel <Niklas.Cassel@wdc.com>
To: Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Cc: "fio@vger.kernel.org" <fio@vger.kernel.org>,
Jens Axboe <axboe@kernel.dk>, Vincent Fu <vincentfu@gmail.com>,
Damien Le Moal <damien.lemoal@opensource.wdc.com>,
Dmitry Fomichev <Dmitry.Fomichev@wdc.com>
Subject: Re: [PATCH v2 7/8] zbd: initialize valid data bytes accounting at file set up
Date: Wed, 8 Feb 2023 08:30:56 +0000 [thread overview]
Message-ID: <Y+Ndvgyi4homNk8u@x1-carbon> (raw)
In-Reply-To: <20230208050329.zwk5xeero6vzezje@shindev>
On Wed, Feb 08, 2023 at 05:03:30AM +0000, Shinichiro Kawasaki wrote:
> On Feb 07, 2023 / 14:06, Niklas Cassel wrote:
> > On Tue, Feb 07, 2023 at 03:37:38PM +0900, Shin'ichiro Kawasaki wrote:
> > > The valid data bytes accounting field is initialized at file reset,
> > > after each job started. Each job locks zones to check write pointer
> > > positions of its write target zones. This can cause zone lock contention
> > > with write by other jobs.
> > >
> > > To avoid the zone lock contention, move the initialization from file
> > > reset to file set up before job start. It allows to access the write
> > > pointers and the accounting field without locks. Remove the lock and
> > > unlock codes which are no longer required. Ensure the locks are not
> > > required by checking run-state in the struct thread_data.
> > >
> > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> > > ---
(snip)
> > > @@ -1252,10 +1251,6 @@ void zbd_file_reset(struct thread_data *td, struct fio_file *f)
> > >
> > > zb = zbd_get_zone(f, f->min_zone);
> > > ze = zbd_get_zone(f, f->max_zone);
> > > - vdb = zbd_set_vdb(td, f);
>
> The zbd_set_vbd() call in zbd_file_reset() is removed here. Then the check is
> done only at zbd_setup_files() as you expect.
Sorry, I missed that you also removed the only other place that called this
function.
zbd_setup_files() calls functions that are named e.g.:
if (!zbd_verify_sizes())
return 1;
if (!zbd_verify_bs())
return 1;
Perhaps consider renaming this function to something like
zbd_verify_and_set_vbd(), since this function is now only
called from zbd_setup_files().
Regardless if you rename or not:
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
next prev parent reply other threads:[~2023-02-08 8:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 6:37 [PATCH v2 0/8] zbd: fix 'sectors with data' and zone_reset_threshold accounting issues Shin'ichiro Kawasaki
2023-02-07 6:37 ` [PATCH v2 1/8] zbd: refer file->last_start[] instead of sectors with data accounting Shin'ichiro Kawasaki
2023-02-07 14:05 ` Niklas Cassel
2023-02-07 6:37 ` [PATCH v2 2/8] zbd: remove CHECK_SWD feature Shin'ichiro Kawasaki
2023-02-07 14:05 ` Niklas Cassel
2023-02-07 6:37 ` [PATCH v2 3/8] zbd: rename the accounting 'sectors with data' to 'valid data bytes' Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
2023-02-07 6:37 ` [PATCH v2 4/8] doc: fix unit of zone_reset_threshold and relation to other option Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
2023-02-07 6:37 ` [PATCH v2 5/8] zbd: account valid data bytes only for zone_reset_threshold option Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
2023-02-07 6:37 ` [PATCH v2 6/8] zbd: check write ranges " Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
2023-02-08 4:59 ` Shinichiro Kawasaki
2023-02-07 6:37 ` [PATCH v2 7/8] zbd: initialize valid data bytes accounting at file set up Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
2023-02-08 5:03 ` Shinichiro Kawasaki
2023-02-08 8:30 ` Niklas Cassel [this message]
2023-02-07 6:37 ` [PATCH v2 8/8] t/zbd: add test cases for zone_reset_threshold option Shin'ichiro Kawasaki
2023-02-07 14:06 ` Niklas Cassel
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=Y+Ndvgyi4homNk8u@x1-carbon \
--to=niklas.cassel@wdc.com \
--cc=Dmitry.Fomichev@wdc.com \
--cc=axboe@kernel.dk \
--cc=damien.lemoal@opensource.wdc.com \
--cc=fio@vger.kernel.org \
--cc=shinichiro.kawasaki@wdc.com \
--cc=vincentfu@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;
as well as URLs for NNTP newsgroup(s).