From: Christoph Hellwig <hch@lst.de>
To: Kevin Wolf <kwolf@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use bdrv_aio_multiwrite
Date: Fri, 11 Sep 2009 20:39:25 +0200 [thread overview]
Message-ID: <20090911183925.GC13621@lst.de> (raw)
In-Reply-To: <4AA9F7DC.1050608@redhat.com>
On Fri, Sep 11, 2009 at 09:10:20AM +0200, Kevin Wolf wrote:
> >> + blkreq[*num_writes].sector = req->out->sector;
> >> + blkreq[*num_writes].nb_sectors = req->qiov.size / 512;
> >> + blkreq[*num_writes].qiov = &req->qiov;
> >> + blkreq[*num_writes].cb = virtio_blk_rw_complete;
> >> + blkreq[*num_writes].opaque = req;
> >> + blkreq[*num_writes].error = 0;
> >> +
> >> + (*num_writes)++;
> >
> > If you pass the completion routine to the function and map the error case
> > to calling completion routine (which is the usual way to handle errors
> > anyway) this function could become copletely generic.
>
> Except that VirtIOBlockReq doesn't seem to be a type commonly used in
> generic code.
Yeah, we'd need to pass it only as opaque cookie and the qiov/setor
separately, making the whole thing look more similar to how the block
API works elsewhere.
> > Any chance to just use this batches subsmission unconditionally and
> > also for reads? I'd hate to grow even more confusing I/O methods
> > in the block later.
>
> If we want to completely obsolete bdrv_aio_readv/writev by batch
> submission functions (not only in block.c but also in each block
> driver), we certainly can do that. I think this would make a lot of
> sense, but it's quite some work and definitely out of scope for this
> patch which is basically meant to be a qcow2 performance fix.
I'm generally not a big fan of incomplete transitions, history tells
they will remaing incomplete for a long time or even forever and grow
more and more of the old calls. The persistant existance of the non-AIO
block APIs in qemu is one of those cases..
prev parent reply other threads:[~2009-09-11 18:39 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-09 15:53 [Qemu-devel] [PATCH v3 0/2] block: Handle multiple write requests at once Kevin Wolf
2009-09-09 15:53 ` [Qemu-devel] [PATCH v3 1/2] Add bdrv_aio_multiwrite Kevin Wolf
[not found] ` <m3ocpj67ip.fsf@neno.mitica>
2009-09-10 7:07 ` [Qemu-devel] " Kevin Wolf
2009-09-10 22:44 ` [Qemu-devel] " Christoph Hellwig
2009-09-11 6:29 ` Kevin Wolf
2009-09-11 18:36 ` Christoph Hellwig
2009-09-09 15:53 ` [Qemu-devel] [PATCH v3 2/2] virtio-blk: Use bdrv_aio_multiwrite Kevin Wolf
2009-09-10 22:41 ` Christoph Hellwig
2009-09-11 7:10 ` Kevin Wolf
2009-09-11 18:39 ` Christoph Hellwig [this message]
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=20090911183925.GC13621@lst.de \
--to=hch@lst.de \
--cc=kwolf@redhat.com \
--cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).