From: Juergen Gross <jgross@suse.com>
To: David Vrabel <david.vrabel@citrix.com>,
linux-kernel@vger.kernel.org, xen-devel@lists.xensource.com,
konrad.wilk@oracle.com, boris.ostrovsky@oracle.com,
linux-usb@vger.kernel.org, gregkh@linuxfoundation.org,
cyliu@suse.com
Subject: Re: [Xen-devel] [PATCH 3/4] usb: Introduce Xen pvUSB backend
Date: Wed, 04 Mar 2015 15:09:37 +0100 [thread overview]
Message-ID: <54F71221.6050800@suse.com> (raw)
In-Reply-To: <54F70E3D.20201@citrix.com>
On 03/04/2015 02:53 PM, David Vrabel wrote:
> On 04/03/15 13:31, Juergen Gross wrote:
>> On 03/02/2015 12:39 PM, David Vrabel wrote:
>>> On 26/02/15 13:35, Juergen Gross wrote:
>>>> Introduces the Xen pvUSB backend. With pvUSB it is possible for a Xen
>>>> domU to communicate with a USB device assigned to that domU. The
>>>> communication is all done via the pvUSB backend in a driver domain
>>>> (usually Dom0) which is owner of the physical device.
>>>
>>> Why do we need a kernel usb backend instead of a user-space one using
>>> libusb?
>>
>> Good question. At a first glance libusb seems to offer most/all needed
>> interfaces. The main question is whether performance with libusb will
>> be okay. There will be one additional copy of the I/O data needed if
>> I've read the code in drivers/usb/core/devio.c correctly.
>>
>> I haven't worked with user space backends yet. Do you recommend a
>> special example I should start with?
>
> Perhaps the block backend in qemu?
Okay, so this would be driven by qemu then?
The main question whether it is worth to consider this alternative is
the performance aspect. Does anyone have an idea which USB devices would
typically be used via pvusb? I'd suspect memory sticks and USB disks
and perhaps webcams being the most performance relevant ones. Is an
additional copy operation of user data acceptable here?
>
>>>> Changes from the original version are:
>>>> - port to upstream kernel
>>>> - put all code in just one source file
>>>
>>> ?? I'm not sure that was an improvement. The resulting single file is
>>> too large IMO.
>>
>> OTOH this reduces overall code size:
>>
>> New file has 1845 lines, while old version had in sum 2243 lines with
>> the largest file having 1217 lines. So the largest file is 50% larger,
>> while overall size is 20% smaller.
>
> I think I would have preferred the original large file split up (if
> there's a sensible functional grouping of the resulting bits).
>
> If, after considering a userspace backend, you think that this kernel
> one is the way to go I'll give it another look and see if I can suggest
> a suitable split.
I can split it up, if you really want.
>
>>>> - move module to appropriate location in kernel tree
>>>
>>> drivers/xen/ is the correct location for this driver.
>>
>> Hmm, so you regard placement of xen-netback under drivers/net and
>> xen-blkback under drivers/block as wrong? I've just followed these
>> examples.
>
> usbback is just a regular USB device driver and most of these don't live
> under drivers/usb/ but in the subsystem for the type of device they're
> providing (which in this case is a Xen backend, hence drivers/xen/).
Okay, I'll move it to drivers/xen.
Juergen
WARNING: multiple messages have this Message-ID (diff)
From: Juergen Gross <jgross-IBi9RG/b67k@public.gmane.org>
To: David Vrabel
<david.vrabel-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
xen-devel-GuqFBffKawuULHF6PoxzQEEOCMrvLtNR@public.gmane.org,
konrad.wilk-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
boris.ostrovsky-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org,
linux-usb-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org,
cyliu-IBi9RG/b67k@public.gmane.org
Subject: Re: [Xen-devel] [PATCH 3/4] usb: Introduce Xen pvUSB backend
Date: Wed, 04 Mar 2015 15:09:37 +0100 [thread overview]
Message-ID: <54F71221.6050800@suse.com> (raw)
In-Reply-To: <54F70E3D.20201-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>
On 03/04/2015 02:53 PM, David Vrabel wrote:
> On 04/03/15 13:31, Juergen Gross wrote:
>> On 03/02/2015 12:39 PM, David Vrabel wrote:
>>> On 26/02/15 13:35, Juergen Gross wrote:
>>>> Introduces the Xen pvUSB backend. With pvUSB it is possible for a Xen
>>>> domU to communicate with a USB device assigned to that domU. The
>>>> communication is all done via the pvUSB backend in a driver domain
>>>> (usually Dom0) which is owner of the physical device.
>>>
>>> Why do we need a kernel usb backend instead of a user-space one using
>>> libusb?
>>
>> Good question. At a first glance libusb seems to offer most/all needed
>> interfaces. The main question is whether performance with libusb will
>> be okay. There will be one additional copy of the I/O data needed if
>> I've read the code in drivers/usb/core/devio.c correctly.
>>
>> I haven't worked with user space backends yet. Do you recommend a
>> special example I should start with?
>
> Perhaps the block backend in qemu?
Okay, so this would be driven by qemu then?
The main question whether it is worth to consider this alternative is
the performance aspect. Does anyone have an idea which USB devices would
typically be used via pvusb? I'd suspect memory sticks and USB disks
and perhaps webcams being the most performance relevant ones. Is an
additional copy operation of user data acceptable here?
>
>>>> Changes from the original version are:
>>>> - port to upstream kernel
>>>> - put all code in just one source file
>>>
>>> ?? I'm not sure that was an improvement. The resulting single file is
>>> too large IMO.
>>
>> OTOH this reduces overall code size:
>>
>> New file has 1845 lines, while old version had in sum 2243 lines with
>> the largest file having 1217 lines. So the largest file is 50% larger,
>> while overall size is 20% smaller.
>
> I think I would have preferred the original large file split up (if
> there's a sensible functional grouping of the resulting bits).
>
> If, after considering a userspace backend, you think that this kernel
> one is the way to go I'll give it another look and see if I can suggest
> a suitable split.
I can split it up, if you really want.
>
>>>> - move module to appropriate location in kernel tree
>>>
>>> drivers/xen/ is the correct location for this driver.
>>
>> Hmm, so you regard placement of xen-netback under drivers/net and
>> xen-blkback under drivers/block as wrong? I've just followed these
>> examples.
>
> usbback is just a regular USB device driver and most of these don't live
> under drivers/usb/ but in the subsystem for the type of device they're
> providing (which in this case is a Xen backend, hence drivers/xen/).
Okay, I'll move it to drivers/xen.
Juergen
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2015-03-04 14:09 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-26 13:35 [PATCH 0/4] xen, usb: support pvUSB drivers Juergen Gross
2015-02-26 13:35 ` [PATCH 1/4] usb: Add Xen pvUSB protocol description Juergen Gross
2015-02-26 13:35 ` [PATCH 2/4] usb: Introduce Xen pvUSB frontend Juergen Gross
2015-02-26 14:09 ` Oliver Neukum
2015-02-26 13:35 ` [PATCH 3/4] usb: Introduce Xen pvUSB backend Juergen Gross
2015-03-02 11:39 ` [Xen-devel] " David Vrabel
2015-03-02 11:39 ` David Vrabel
2015-03-04 13:31 ` Juergen Gross
2015-03-04 13:41 ` Ian Campbell
2015-03-04 13:41 ` Ian Campbell
2015-03-04 13:45 ` Juergen Gross
2015-03-04 13:53 ` David Vrabel
2015-03-04 13:53 ` David Vrabel
2015-03-04 14:09 ` Juergen Gross [this message]
2015-03-04 14:09 ` Juergen Gross
2015-03-04 14:19 ` David Vrabel
2015-03-04 14:19 ` David Vrabel
2015-03-04 14:29 ` Ian Campbell
2015-03-04 14:29 ` Ian Campbell
2015-03-04 14:41 ` Juergen Gross
2015-03-04 14:43 ` Peter Stuge
2015-03-04 14:43 ` Peter Stuge
2015-03-04 14:46 ` Ian Campbell
2015-03-04 14:46 ` Ian Campbell
2015-03-06 10:59 ` Pasi Kärkkäinen
2015-03-06 10:59 ` Pasi Kärkkäinen
2015-03-06 12:52 ` [Xen-devel] " Austin S Hemmelgarn
2015-03-04 15:27 ` Greg KH
2015-03-04 15:31 ` Juergen Gross
2015-02-26 13:35 ` [PATCH 4/4] xen: add Xen pvUSB maintainer Juergen Gross
2015-02-26 17:25 ` Konrad Rzeszutek Wilk
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=54F71221.6050800@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=cyliu@suse.com \
--cc=david.vrabel@citrix.com \
--cc=gregkh@linuxfoundation.org \
--cc=konrad.wilk@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.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.