From: Fam Zheng <famz@redhat.com>
To: Peter Lieven <pl@kamp.de>
Cc: kwolf@redhat.com, benoit@irqsave.net, ming.lei@canonical.com,
armbru@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com,
pbonzini@redhat.com, mreitz@redhat.com
Subject: Re: [Qemu-devel] [PATCH 4/4] virtio-blk: introduce multiread
Date: Wed, 10 Dec 2014 15:48:06 +0800 [thread overview]
Message-ID: <20141210074806.GB32726@ad.nay.redhat.com> (raw)
In-Reply-To: <1418142410-19057-5-git-send-email-pl@kamp.de>
On Tue, 12/09 17:26, Peter Lieven wrote:
> diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h
> index 3f2652f..0ee9582 100644
> --- a/include/hw/virtio/virtio-blk.h
> +++ b/include/hw/virtio/virtio-blk.h
> @@ -134,13 +134,6 @@ typedef struct VirtIOBlock {
> struct VirtIOBlockDataPlane *dataplane;
> } VirtIOBlock;
>
> -#define VIRTIO_BLK_MAX_MERGE_REQS 32
> -
> -typedef struct MultiReqBuffer {
> - BlockRequest blkreq[VIRTIO_BLK_MAX_MERGE_REQS];
> - unsigned int num_writes;
> -} MultiReqBuffer;
> -
> typedef struct VirtIOBlockReq {
> VirtIOBlock *dev;
> VirtQueueElement elem;
> @@ -149,8 +142,21 @@ typedef struct VirtIOBlockReq {
> QEMUIOVector qiov;
> struct VirtIOBlockReq *next;
> BlockAcctCookie acct;
> + QEMUIOVector mr_qiov;
> + struct VirtIOBlockReq *mr_next;
> } VirtIOBlockReq;
>
> +#define MAX_MERGE_REQS 32
Why do you need to rename this macro after introducing it in previous patch?
> +
> +typedef struct MultiReqBuffer {
> + VirtIOBlockReq *reqs[MAX_MERGE_REQS];
> + unsigned int num_reqs;
> + bool is_write;
> + int niov;
> + int64_t sector_num;
> + int nb_sectors;
> +} MultiReqBuffer;
> +
> VirtIOBlockReq *virtio_blk_alloc_request(VirtIOBlock *s);
>
> void virtio_blk_free_request(VirtIOBlockReq *req);
> @@ -160,6 +166,6 @@ int virtio_blk_handle_scsi_req(VirtIOBlock *blk,
>
> void virtio_blk_handle_request(VirtIOBlockReq *req, MultiReqBuffer *mrb);
>
> -void virtio_submit_multiwrite(BlockBackend *blk, MultiReqBuffer *mrb);
> +void virtio_submit_multireq(BlockBackend *blk, MultiReqBuffer *mrb);
>
> #endif
next prev parent reply other threads:[~2014-12-10 8:46 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-09 16:26 [Qemu-devel] [PATCH 0/4] virtio-blk: add multiread support Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 1/4] block: add accounting for merged requests Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 2/4] hw/virtio-blk: add a constant for max number of " Peter Lieven
2014-12-10 4:54 ` Fam Zheng
2014-12-09 16:26 ` [Qemu-devel] [PATCH 3/4] block-backend: expose bs->bl.max_transfer_length Peter Lieven
2014-12-09 16:26 ` [Qemu-devel] [PATCH 4/4] virtio-blk: introduce multiread Peter Lieven
2014-12-10 7:48 ` Fam Zheng [this message]
2014-12-11 13:07 ` Peter Lieven
2014-12-15 15:01 ` Kevin Wolf
2014-12-15 15:43 ` Peter Lieven
2014-12-15 15:52 ` Peter Lieven
2014-12-15 16:00 ` Kevin Wolf
2014-12-15 16:02 ` Peter Lieven
2014-12-15 15:57 ` Kevin Wolf
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=20141210074806.GB32726@ad.nay.redhat.com \
--to=famz@redhat.com \
--cc=armbru@redhat.com \
--cc=benoit@irqsave.net \
--cc=kwolf@redhat.com \
--cc=ming.lei@canonical.com \
--cc=mreitz@redhat.com \
--cc=pbonzini@redhat.com \
--cc=pl@kamp.de \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@redhat.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).