All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Dmitry Fomichev <Dmitry.Fomichev@wdc.com>
Cc: "axboe@kernel.dk" <axboe@kernel.dk>,
	"fio@vger.kernel.org" <fio@vger.kernel.org>,
	Damien Le Moal <Damien.LeMoal@wdc.com>
Subject: Re: [PATCH] zbd: support 'z' suffix for zone granularity
Date: Mon, 8 Feb 2021 18:53:37 +0300	[thread overview]
Message-ID: <20210208155337.GA26078@localhost.localdomain> (raw)
In-Reply-To: <20210208144320.GA10115@localhost.localdomain>

On Mon, Feb 08, 2021 at 05:43:20PM +0300, Alexey Dobriyan wrote:
> On Fri, Feb 05, 2021 at 12:53:32AM +0000, Dmitry Fomichev wrote:
> > I like the general idea of this patch. Adding zone units looks useful,
> > especially for ZNS workloads.
> 
> OK -- tests, wording.
> 
> > > --- a/filesetup.c
> > > +++ b/filesetup.c
> > > @@ -1029,6 +1029,35 @@ int setup_files(struct thread_data *td)
> > >  	if (o->read_iolog_file)
> > >  		goto done;
> > > 
> > > +	if (td->o.zone_mode == ZONE_MODE_ZBD) {
> > 
> > What about ZONE_MODE_STRIDED? Shouldn't 'z' suffix be enabled for it too?
> 
> I converted zoneskip= as well, but the code asserts somewhere else.
> I didn't figure why exactly. zoneskip= and strided mode can be enabled
> separatedly.
> 
> > > +		struct fio_file *f;
> > > +		int i;
> > > +
> > > +		err = zbd_init_files(td);
> > > +		if (err)
> > > +			goto err_out;
> > > +
> > 
> > zbd_init_files() is only called once. Why not fold the loop below into zbd_init_files()
> > since the code is ZBD-specific?
> 
> OK.

I take that back!

The reason for a split is that size= and offset= and io_size= must be
available before those checks:

	/*
	 * now file sizes are known, so we can set ->io_size. if size= is
	 * not given, ->io_size is just equal to ->real_file_size. if size
	 * is given, ->io_size is size / nr_files.
	 */

so the init is done in 3 parts:

	optionally create/alloc f->zbd_info

	recalculate if size=/io_size=/offset=/... is supplied in zones

	...

	calculate ->min_zone/->max_zone, etc

but size recalculation is necessary for zonemode=strided as well.


  reply	other threads:[~2021-02-08 15:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-04  8:32 [PATCH] zbd: support 'z' suffix for zone granularity Alexey Dobriyan
2021-02-05  0:53 ` Dmitry Fomichev
2021-02-08 14:43   ` Alexey Dobriyan
2021-02-08 15:53     ` Alexey Dobriyan [this message]
2021-02-08 16:37   ` Alexey Dobriyan
2021-02-08 17:54   ` [PATCH v2] " Alexey Dobriyan
2021-02-15  3:40     ` Dmitry Fomichev

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=20210208155337.GA26078@localhost.localdomain \
    --to=adobriyan@gmail.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=Dmitry.Fomichev@wdc.com \
    --cc=axboe@kernel.dk \
    --cc=fio@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.