All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexey Dobriyan <adobriyan@gmail.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: fio@vger.kernel.org
Subject: Re: [PATCH] fio: add NVMe engine
Date: Fri, 27 Mar 2020 09:19:21 +0300	[thread overview]
Message-ID: <20200327061921.GA3260@avx2> (raw)
In-Reply-To: <9d18acbf-f878-c685-6272-a77eb5f98bcc@kernel.dk>

On Thu, Mar 26, 2020 at 04:05:08PM -0600, Jens Axboe wrote:
> On 3/26/20 2:44 PM, Alexey Dobriyan wrote:
> > Add simple iodepth=1 NVMe engine:
> > 
> > 	ioengine=nvme
> > 
> > It works via standard Linux NVMe ioctls.
> > 
> > It will be used for testing upcoming ZNS stuff.
> > 
> > Currently Linux doesn't recognize NVMe ZNS devices as zoned block
> > devices so zone ioctls (BLKRESETZONE et al) can't be used.
> > 
> > Passthrough ioctls should allow Zone Append and whatever commands
> > new specs bring.
> > 
> > Support read, write, fsync, fdatasync.
> > Don't support sync_file_range obviously.
> > Don't support trim for now, until I figure all qemu options and
> > the story behind broken qemu trim support.
> 
> Needs a bit of cleanup, but otherwise simple enough. A few comments:
> 
> > +static inline uint32_t get_nsid(const struct fio_file *f)
> > +{
> > +	return (uintptr_t)f->engine_data;
> > +}
> 
> You could pack both nsid and lba_shift in there, and maybe use
> engine_pos instead to avoid the cast.

lba_shift should be generic (live in struct fio_file). Maybe something
else will use it. If my zone fix goes in then 2 64-bit divisions can be
simplified!

> > +static int fio_nvme_read(struct fio_file *f, struct io_u *io_u)
> > +{
> > +	fio_unused uint32_t nsid = get_nsid(f);
> > +	struct nvme_user_io cmd = {};
> > +
> > +	//printf("R %u %llu/%llu\n", nsid, io_u->offset, io_u->xfer_buflen);
> 
> Leftover debug

dprint(FD_IO is pretty chatty, but OK.

> 
> > +static int fio_nvme_write(struct fio_file *f, struct io_u *io_u)
> > +{
> > +	fio_unused uint32_t nsid = get_nsid(f);
> > +	struct nvme_user_io cmd = {};
> > +
> > +	//printf("W %u %llu/%llu\n", nsid, io_u->offset, io_u->xfer_buflen);
> 
> Ditto
> 
> > +static int fio_nvme_flush(struct fio_file *f)
> > +{
> > +	uint32_t nsid = get_nsid(f);
> > +	struct nvme_passthru_cmd cmd = {};
> > +
> > +	//printf("F %u\n", nsid);
> 
> Ditto


  reply	other threads:[~2020-03-27  6:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-26 20:44 [PATCH] fio: add NVMe engine Alexey Dobriyan
2020-03-26 22:05 ` Jens Axboe
2020-03-27  6:19   ` Alexey Dobriyan [this message]
2020-03-27 14:45     ` Jens Axboe
2020-03-27  0:56 ` Damien Le Moal
2020-03-27  6:14   ` Alexey Dobriyan
2020-03-27 14:25     ` Keith Busch
2020-03-27 14:26       ` Keith Busch
2020-03-27 19:06         ` Alexey Dobriyan
2020-03-27 21:05           ` Keith Busch
2020-03-27 14:47       ` Jens Axboe
2020-03-27 19:01         ` Alexey Dobriyan
2020-03-27 21:25           ` Jens Axboe
2020-03-27 21:58             ` Keith Busch
2020-03-28 13:41               ` 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=20200327061921.GA3260@avx2 \
    --to=adobriyan@gmail.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.