From: Juergen Gross <jgross@suse.com>
To: qemu-devel@nongnu.org, xen-devel@lists.xensource.com
Cc: anthony.perard@citrix.com, sstabellini@kernel.org, kraxel@redhat.com
Subject: Re: [Qemu-devel] [Xen-devel] [PATCH] xen: use native disk xenbus protocol if possible
Date: Mon, 27 Jun 2016 12:54:39 +0200 [thread overview]
Message-ID: <577105EF.5060800@suse.com> (raw)
In-Reply-To: <1466162096-4934-1-git-send-email-jgross@suse.com>
On 17/06/16 13:14, Juergen Gross wrote:
> The qdisk implementation is using the native xenbus protocol only in
> case of no protocol specified at all. As using the explicit 32- or
> 64-bit protocol is slower than the native one due to copying requests
> not by memcpy but element for element, this is not optimal.
>
> Correct this by using the native protocol in case word sizes of
> frontend and backend match.
Ping?
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> hw/block/xen_disk.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index 2862b59..0961fcb 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -976,14 +976,14 @@ static int blk_connect(struct XenDevice *xendev)
> blkdev->feature_persistent = !!pers;
> }
>
> - blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> - if (blkdev->xendev.protocol) {
> - if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 0) {
> - blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> - }
> - if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 0) {
> - blkdev->protocol = BLKIF_PROTOCOL_X86_64;
> - }
> + if (!blkdev->xendev.protocol) {
> + blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_NATIVE) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_X86_64;
> }
>
> blkdev->sring = xengnttab_map_grant_ref(blkdev->xendev.gnttabdev,
>
WARNING: multiple messages have this Message-ID (diff)
From: Juergen Gross <jgross@suse.com>
To: qemu-devel@nongnu.org, xen-devel@lists.xensource.com
Cc: anthony.perard@citrix.com, sstabellini@kernel.org, kraxel@redhat.com
Subject: Re: [Xen-devel] [PATCH] xen: use native disk xenbus protocol if possible
Date: Mon, 27 Jun 2016 12:54:39 +0200 [thread overview]
Message-ID: <577105EF.5060800@suse.com> (raw)
In-Reply-To: <1466162096-4934-1-git-send-email-jgross@suse.com>
On 17/06/16 13:14, Juergen Gross wrote:
> The qdisk implementation is using the native xenbus protocol only in
> case of no protocol specified at all. As using the explicit 32- or
> 64-bit protocol is slower than the native one due to copying requests
> not by memcpy but element for element, this is not optimal.
>
> Correct this by using the native protocol in case word sizes of
> frontend and backend match.
Ping?
>
> Signed-off-by: Juergen Gross <jgross@suse.com>
> ---
> hw/block/xen_disk.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
>
> diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
> index 2862b59..0961fcb 100644
> --- a/hw/block/xen_disk.c
> +++ b/hw/block/xen_disk.c
> @@ -976,14 +976,14 @@ static int blk_connect(struct XenDevice *xendev)
> blkdev->feature_persistent = !!pers;
> }
>
> - blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> - if (blkdev->xendev.protocol) {
> - if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 0) {
> - blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> - }
> - if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 0) {
> - blkdev->protocol = BLKIF_PROTOCOL_X86_64;
> - }
> + if (!blkdev->xendev.protocol) {
> + blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_NATIVE) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_NATIVE;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_32) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_X86_32;
> + } else if (strcmp(blkdev->xendev.protocol, XEN_IO_PROTO_ABI_X86_64) == 0) {
> + blkdev->protocol = BLKIF_PROTOCOL_X86_64;
> }
>
> blkdev->sring = xengnttab_map_grant_ref(blkdev->xendev.gnttabdev,
>
next prev parent reply other threads:[~2016-06-27 10:54 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-17 11:14 [Qemu-devel] [PATCH] xen: use native disk xenbus protocol if possible Juergen Gross
2016-06-17 11:14 ` Juergen Gross
2016-06-27 10:54 ` Juergen Gross [this message]
2016-06-27 10:54 ` [Xen-devel] " Juergen Gross
2016-06-29 15:20 ` [Qemu-devel] " Anthony PERARD
2016-06-29 15:20 ` Anthony PERARD
2016-06-29 15:38 ` [Qemu-devel] " Juergen Gross
2016-06-29 15:38 ` Juergen Gross
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=577105EF.5060800@suse.com \
--to=jgross@suse.com \
--cc=anthony.perard@citrix.com \
--cc=kraxel@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xensource.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 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.