[RFC] virtio: Support releasing lock during kick

2010-06-23 Thread Stefan Hajnoczi
not be correct for virtio block to release the lock before calling virtqueue_kick()). Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- I am not yet 100% happy with this patch which aims to reduce guest CPU consumption related to vblk-lock contention. Although this patch reduces wait

Re: [RFC] virtio: Support releasing lock during kick

2010-06-23 Thread Stefan Hajnoczi
On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws wrote: Shouldn't it be possible to just drop the lock before invoking virtqueue_kick() and reacquire it afterwards?  There's nothing in that virtqueue_kick() path that the lock is protecting AFAICT. No, that would lead to

Re: [RFC] virtio: Support releasing lock during kick

2010-06-25 Thread Stefan Hajnoczi
On Fri, Jun 25, 2010 at 4:09 AM, Rusty Russell ru...@rustcorp.com.au wrote: On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote: On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws wrote: Shouldn't it be possible to just drop the lock before invoking virtqueue_kick

Re: [RFC] virtio: Support releasing lock during kick

2010-06-25 Thread Stefan Hajnoczi
On Fri, Jun 25, 2010 at 01:43:17PM +0300, Michael S. Tsirkin wrote: On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote: On Thu, 24 Jun 2010 03:00:30 pm Stefan Hajnoczi wrote: On Wed, Jun 23, 2010 at 11:12 PM, Anthony Liguori anth...@codemonkey.ws wrote: Shouldn't

Re: [RFC] virtio: Support releasing lock during kick

2010-06-25 Thread Stefan Hajnoczi
On Fri, Jun 25, 2010 at 06:32:20PM +0300, Michael S. Tsirkin wrote: On Fri, Jun 25, 2010 at 04:31:44PM +0100, Stefan Hajnoczi wrote: On Fri, Jun 25, 2010 at 01:43:17PM +0300, Michael S. Tsirkin wrote: On Fri, Jun 25, 2010 at 12:39:21PM +0930, Rusty Russell wrote: On Thu, 24 Jun 2010 03

Re: [RFC] virtio: Support releasing lock during kick

2010-06-29 Thread Stefan Hajnoczi
On Mon, Jun 28, 2010 at 4:55 PM, Marcelo Tosatti mtosa...@redhat.com wrote: On Wed, Jun 23, 2010 at 10:24:02PM +0100, Stefan Hajnoczi wrote: The virtio block device holds a lock during I/O request processing. Kicking the virtqueue while the lock is held results in long lock hold times

Re: VHOST_NET_SET_BACKEND

2010-10-06 Thread Stefan Hajnoczi
On Wed, Oct 6, 2010 at 7:43 AM, devi thapa devi.th...@gmail.com wrote:       I dont know how to put this question, but bear with me.   My query is how to invoke the ioctl request VHOST_NET_SET_BACKEND  or how to set the backend, and when ? Look at the QEMU side vhost-net code:

Re: vhost_net_ioctl

2010-10-06 Thread Stefan Hajnoczi
On Wed, Oct 6, 2010 at 11:16 AM, devi thapa devi.th...@gmail.com wrote:           What's the role or value of the third argument in the vhost_net_ioctl function in /drivers/vhost/net.c . Read the code. There is the kernel vhost code and the QEMU vhost userspace code to look at. By studying

Re: vhost_net_ioctl

2010-10-06 Thread Stefan Hajnoczi
On Wed, Oct 6, 2010 at 12:34 PM, devi thapa devi.th...@gmail.com wrote: I am actually going only through net.c  and in this module they haven't specified anywhere, where this value is coming from. In order to understand net.c it will be necessary to read other code too. Make sure you have an

Re: transport between guest and host

2010-11-25 Thread Stefan Hajnoczi
On Thu, Nov 25, 2010 at 11:37 AM, devi thapa devi.th...@gmail.com wrote:          I have 2 queries. 1.  Is virtio-serial or virtio-console data transfer kernel level and efficient than vhostnet networking. 2.  Is 9p efficient for communicating between guests and a host using a virtio based

Re: transport between guest and host

2010-11-25 Thread Stefan Hajnoczi
On Thu, Nov 25, 2010 at 4:43 PM, devi thapa devi.th...@gmail.com wrote:      I want to transport modules from host and insert in guest and transport the result back to host. Linux kernel modules? If you describe the problem you're trying to solve in more detail you'll get more helpful

Re: [Qemu-devel] SCSI Command support over VirtIO Block device

2010-12-12 Thread Stefan Hajnoczi
On Dec 13, 2010 5:14 AM, अनुज anu...@gmail.com wrote: Hi I am trying to implement VirtIO support for a proprietary OS. And It would be great if I am able to process SCSI commands over VirtIO Block device. I tried to execute INQUIRY command but the status returned is UNSUPPORTED. If anyone

Re: virtio-blk.c handling of i/o which is not a 512 multiple

2011-03-30 Thread Stefan Hajnoczi
On Wed, Mar 30, 2011 at 9:15 AM, Conor Murphy conor_murphy_v...@hotmail.com wrote: I'm trying to write a virtio-blk driver for Solaris. I've gotten it to the point where Solaris can see the device and create a ZFS file system on it. However when I try and create a UFS filesystem on the

Re: [PATCH] virtio: decrement dev_index when device is unregistered

2011-04-05 Thread Stefan Hajnoczi
On Tue, Apr 5, 2011 at 5:49 AM, Takuma Umeya tum...@redhat.com wrote: When virtio device is removed, dev_index does not get decremented. The next device hotplug event results in consuming the next pci to the one that is suppose to be available. Signed-off-by: Takuma Umeya tum...@redhat.com

Re: [PATCH] virtio: decrement dev_index when device is unregistered

2011-04-12 Thread Stefan Hajnoczi
On Mon, Apr 11, 2011 at 10:11 AM, Takuma Umeya tum...@redhat.com wrote: - Original Message - On Tue, Apr 5, 2011 at 5:49 AM, Takuma Umeya tum...@redhat.com wrote: When virtio device is removed, dev_index does not get decremented. The next device hotplug event results in consuming

Re: virtio scsi host draft specification, v3

2011-06-10 Thread Stefan Hajnoczi
On Fri, Jun 10, 2011 at 12:33 PM, Rusty Russell ru...@rustcorp.com.au wrote: On Thu, 09 Jun 2011 08:59:27 +0200, Paolo Bonzini pbonz...@redhat.com wrote: On 06/09/2011 01:28 AM, Rusty Russell wrote:  after some preliminary discussion on the QEMU mailing list, I present a  draft

Re: virtio scsi host draft specification, v3

2011-06-14 Thread Stefan Hajnoczi
On Tue, Jun 14, 2011 at 9:39 AM, Hannes Reinecke h...@suse.de wrote: On 06/10/2011 04:35 PM, Paolo Bonzini wrote: If requests are placed on arbitrary queues you'll inevitably run on locking issues to ensure strict request ordering. I would add here: If a device uses more than one queue it

Re: [RFC] virtio: Support releasing lock during kick

2011-06-20 Thread Stefan Hajnoczi
On Sun, Jun 19, 2011 at 8:14 AM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 23, 2010 at 10:24:02PM +0100, Stefan Hajnoczi wrote: The virtio block device holds a lock during I/O request processing. Kicking the virtqueue while the lock is held results in long lock hold times

Re: [RFC] virtio: Support releasing lock during kick

2011-06-24 Thread Stefan Hajnoczi
On Mon, Jun 20, 2011 at 4:27 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Sun, Jun 19, 2011 at 8:14 AM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jun 23, 2010 at 10:24:02PM +0100, Stefan Hajnoczi wrote: The virtio block device holds a lock during I/O request processing. Kicking

Re: virtio scsi host draft specification, v3

2011-06-29 Thread Stefan Hajnoczi
On Wed, Jun 29, 2011 at 9:33 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 06/14/2011 10:39 AM, Hannes Reinecke wrote: If, however, we decide to expose some details about the backend, we could be using the values from the backend directly. EG we could be forwarding the SCSI target port

Re: virtio scsi host draft specification, v3

2011-07-04 Thread Stefan Hajnoczi
On Mon, Jul 4, 2011 at 2:38 PM, Hai Dong,Li haido...@linux.vnet.ibm.com wrote: So if I understand correctly, virtio-scsi looks like an SCSI tranport protocol, such as iSCSI, FCP and SRP which use tcp/ip, FC and Infiniband RDMA respectively as the transfer media while virtio-scsi uses virtio,

Re: [RFC] virtio: Support releasing lock during kick

2011-08-10 Thread Stefan Hajnoczi
On Wed, Aug 10, 2011 at 09:18:01AM -0400, Christoph Hellwig wrote: Any progress on these patches? Khoa ran ffsb benchmarks on his rig and we didn't see any benefit. I have not started investigating yet, been working on other things. It will be necessary to compare against the old patches which

[RFC v2 0/2] virtio: Support releasing lock during kick

2011-09-07 Thread Stefan Hajnoczi
because further performance benchmarking is required. Although we have seen good results in the past, gathering number on a wider range of machines and verifying that there is no regression would be helpful. Stefan Hajnoczi (2): virtio_ring: split virtqueue_kick prepare/notify virtio_blk: unlock

[PATCH v2 1/2] virtio_ring: split virtqueue_kick prepare/notify

2011-09-07 Thread Stefan Hajnoczi
to be notified. This function must be executed with a lock held to protect the vring. virtqueue_kick_notify() notifies the host that the vring has new buffers. This function may be executed without holding a lock protecting the vring. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com

Re: [net-next RFC PATCH 2/5] tuntap: simple flow director support

2011-12-05 Thread Stefan Hajnoczi
On Mon, Dec 5, 2011 at 8:58 AM, Jason Wang jasow...@redhat.com wrote: This patch adds a simple flow director to tun/tap device. It is just a page that contains the hash to queue mapping which could be changed by user-space. The backend (tap/macvtap) would query this table to get the desired

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-05 Thread Stefan Hajnoczi
On Mon, Dec 5, 2011 at 8:59 AM, Jason Wang jasow...@redhat.com wrote: +static int virtnet_set_fd(struct net_device *dev, u32 pfn) +{ +       struct virtnet_info *vi = netdev_priv(dev); +       struct virtio_device *vdev = vi-vdev; + +       if (virtio_has_feature(vdev, VIRTIO_NET_F_HOST_FD))

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-06 Thread Stefan Hajnoczi
On Tue, Dec 6, 2011 at 6:33 AM, Jason Wang jasow...@redhat.com wrote: On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote: On Mon, Dec 5, 2011 at 8:59 AM, Jason Wangjasow...@redhat.com  wrote: +static int virtnet_set_fd(struct net_device *dev, u32 pfn) +{ +       struct virtnet_info *vi

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-06 Thread Stefan Hajnoczi
On Tue, Dec 6, 2011 at 10:21 AM, Jason Wang jasow...@redhat.com wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow...@redhat.com  wrote: On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote: On Mon, Dec 5, 2011 at 8:59 AM, Jason Wangjasow

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Stefan Hajnoczi
On Wed, Dec 7, 2011 at 3:03 AM, Jason Wang jasow...@redhat.com wrote: On 12/06/2011 09:15 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com  wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Stefan Hajnoczi
On Wed, Dec 7, 2011 at 12:10 PM, Jason Wang jasow...@redhat.com wrote: On 12/07/2011 05:08 PM, Stefan Hajnoczi wrote: [...]  Consider the complexity of the host nic each with their own steering  features,  this series make the first step with minimal effort to try to let  guest driver

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2012-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2012 at 12:25 AM, Rusty Russell ru...@rustcorp.com.au wrote: On Tue, 10 Jan 2012 19:03:36 +0200, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Dec 21, 2011 at 11:03:25AM +1030, Rusty Russell wrote: Yes.  The idea that we can alter fields in the device-specific config

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2012-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2012 at 9:10 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Wed, 2012-01-11 at 08:47 +, Stefan Hajnoczi wrote: This is also an opportunity to stop using CPU physical addresses in the ring and instead perform DMA like a normal PCI device (use bus addresses

Re: [RFC 7/11] virtio_pci: new, capability-aware driver.

2012-01-11 Thread Stefan Hajnoczi
On Wed, Jan 11, 2012 at 3:39 PM, Michael S. Tsirkin m...@redhat.com wrote: On Wed, Jan 11, 2012 at 02:28:48PM +, Stefan Hajnoczi wrote: On Wed, Jan 11, 2012 at 9:10 AM, Benjamin Herrenschmidt b...@kernel.crashing.org wrote: On Wed, 2012-01-11 at 08:47 +, Stefan Hajnoczi wrote

Re: vhost question

2012-03-22 Thread Stefan Hajnoczi
On Thu, Mar 22, 2012 at 1:48 AM, Steve Glass stevie.gl...@gmail.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Just some further information concerning my earlier question concerning vhost and virtio. I'm using virtio to implement an emulated mac80211 device in the guest. A

Re: vhost question

2012-03-26 Thread Stefan Hajnoczi
On Sun, Mar 25, 2012 at 1:29 PM, Steve Glass stevie.gl...@gmail.com wrote: On 22 March 2012 19:52, Stefan Hajnoczi stefa...@gmail.com wrote: Can you queue a tx-rx kick on the vhost work queue with vhost_work_queue()? Stefan I've been looking at this and trying to work out how to achieve

Re: [PATCH] virtio_blk: Drop unused request tracking list

2012-03-30 Thread Stefan Hajnoczi
. It's a bit scary that this unused list has an impact...I'm sure we have worse things elsewhere in the KVM storage code path. Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [PATCH] virtio_blk: Drop unused request tracking list

2012-04-02 Thread Stefan Hajnoczi
On Sat, Mar 31, 2012 at 11:22 AM, Asias He asias.he...@gmail.com wrote: Hi, Stefan On Fri, Mar 30, 2012 at 6:14 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Fri, Mar 30, 2012 at 4:24 AM, Asias He as...@redhat.com wrote: Benchmark shows small performance improvement on fusion io device

Re: [PATCH 0/2] adding tracepoints to vhost

2012-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2012 at 3:58 AM, Jason Wang jasow...@redhat.com wrote: To help in vhost analyzing, the following series adding basic tracepoints to vhost. Operations of both virtqueues and vhost works were traced in current implementation, net code were untouched. A top-like satistics

Re: [PATCH 0/2] adding tracepoints to vhost

2012-04-10 Thread Stefan Hajnoczi
On Tue, Apr 10, 2012 at 1:42 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 10, 2012 at 12:40:50PM +0100, Stefan Hajnoczi wrote: On Tue, Apr 10, 2012 at 3:58 AM, Jason Wang jasow...@redhat.com wrote: To help in vhost analyzing, the following series adding basic tracepoints

[PATCH v2] virtio_blk: unlock vblk-lock during kick

2012-05-30 Thread Stefan Hajnoczi
- [global] exec_prerun=echo 3 /proc/sys/vm/drop_caches group_reporting norandommap ioscheduler=noop thread bs=512 size=4MB direct=1 filename=/dev/vdb numjobs=256 ioengine=aio iodepth=64 loops=3 Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- drivers

[PATCH v3] virtio_blk: unlock vblk-lock during kick

2012-06-01 Thread Stefan Hajnoczi
group_reporting norandommap ioscheduler=noop thread bs=512 size=4MB direct=1 filename=/dev/vdb numjobs=256 ioengine=aio iodepth=64 loops=3 Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com --- Other block drivers (cciss, rbd, nbd) use spin_unlock_irq() so I followed that. To me this seems

Re: [PATCH v2] virtio_blk: unlock vblk-lock during kick

2012-06-04 Thread Stefan Hajnoczi
On Mon, Jun 04, 2012 at 11:27:39AM +0930, Rusty Russell wrote: On Wed, 30 May 2012 15:39:05 +0200, Christian Borntraeger borntrae...@de.ibm.com wrote: On 30/05/12 15:19, Stefan Hajnoczi wrote: Holding the vblk-lock across kick causes poor scalability in SMP guests. If one CPU is doing

Re: [PATCH v3] virtio_blk: unlock vblk-lock during kick

2012-06-06 Thread Stefan Hajnoczi
On Mon, Jun 4, 2012 at 12:15 PM, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jun 01, 2012 at 10:13:06AM +0100, Stefan Hajnoczi wrote: Other block drivers (cciss, rbd, nbd) use spin_unlock_irq() so I followed that. To me this seems wrong: blk_run_queue() uses spin_lock_irqsave() but we

Re: [PATCH v3] virtio_blk: unlock vblk-lock during kick

2012-06-06 Thread Stefan Hajnoczi
On Mon, Jun 4, 2012 at 12:11 PM, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jun 01, 2012 at 10:13:06AM +0100, Stefan Hajnoczi wrote: diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 774c31d..d674977 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block

Race condition during hotplug when dropping block queue lock

2012-06-11 Thread Stefan Hajnoczi
Block drivers like nbd and rbd unlock struct request_queue-queue_lock in their request_fn. I'd like to do the same in virtio_blk. After happily posting the patch, Michael Tsirkin pointed out an issue that I can't explain. This may affect existing block drivers that unlock the queue_lock too.

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement for sequential read/write, random read/write respectively. Sounds great. What storage configuration did you use (single spinning

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: +static void virtblk_add_buf_wait(struct virtio_blk *vblk, +                                struct virtblk_req *vbr, +                                unsigned long out, +                                unsigned long in) +{ +  

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 11:21 AM, Michael S. Tsirkin m...@redhat.com wrote: On Mon, Jun 18, 2012 at 02:53:10PM +0800, Asias He wrote: +static void virtblk_make_request(struct request_queue *q, struct bio *bio) +{ +     struct virtio_blk *vblk = q-queuedata; +     unsigned int num, out = 0, in

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-18 Thread Stefan Hajnoczi
On Mon, Jun 18, 2012 at 10:39 AM, Asias He as...@redhat.com wrote: On 06/18/2012 05:14 PM, Stefan Hajnoczi wrote: On Mon, Jun 18, 2012 at 7:53 AM, Asias He as...@redhat.com wrote: Fio test shows it gives, 28%, 24%, 21%, 16% IOPS boost and 32%, 17%, 21%, 16% latency improvement

Re: [PATCH v2 0/3] Improve virtio-blk performance

2012-06-19 Thread Stefan Hajnoczi
On Tue, Jun 19, 2012 at 5:24 AM, Asias He as...@redhat.com wrote: On 06/18/2012 06:58 PM, Stefan Hajnoczi wrote: As long as the latency is decreasing that's good.  But It's worth keeping in mind that these percentages are probably wildly different on real storage devices and/or qemu-kvm

Re: [Qemu-devel] [PATCH 1/2 v2] scsi bus: introduce hotplug() and hot_unplug() interfaces for SCSI bus

2012-06-21 Thread Stefan Hajnoczi
On Thu, Jun 21, 2012 at 8:54 AM, Cong Meng m...@linux.vnet.ibm.com wrote: +static int scsi_qdev_unplug(DeviceState *qdev) +{ +    SCSIDevice *dev = SCSI_DEVICE(qdev); +    SCSIBus *bus = scsi_bus_from_device(dev); + +    if (bus-info-hot_unplug) +        bus-info-hot_unplug(bus, dev);

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi

2012-06-21 Thread Stefan Hajnoczi
On Wed, Jun 20, 2012 at 7:47 AM, Cong Meng m...@linux.vnet.ibm.com wrote: Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signal the virtio_scsi.ko in guest kernel via event virtual queue. The counterpart patch of virtio_scsi.ko will be sent soon in another thread.

Re: [Qemu-devel] [PATCH 2/2] virtio-scsi: Implement hotplug support for virtio-scsi

2012-06-25 Thread Stefan Hajnoczi
On Mon, Jun 25, 2012 at 03:51:13AM -0400, m...@linux.vnet.ibm.com wrote: Quoting Stefan Hajnoczi stefa...@gmail.com: On Wed, Jun 20, 2012 at 7:47 AM, Cong Meng m...@linux.vnet.ibm.com wrote: Implement the hotplug() and hot_unplug() interfaces in virtio-scsi, by signal the virtio_scsi.ko

Re: [PATCH 0/5] Add vhost-blk support

2012-07-16 Thread Stefan Hajnoczi
On Thu, Jul 12, 2012 at 4:35 PM, Asias He as...@redhat.com wrote: This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device accelerator. Compared to userspace virtio-blk implementation, vhost-blk gives about 5% to 15% performance improvement. Why is it 5-15% faster?

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 10:21 AM, Asias He as...@redhat.com wrote: On 07/17/2012 04:52 PM, Paolo Bonzini wrote: Il 17/07/2012 10:29, Asias He ha scritto: So, vhost-blk at least saves ~6 syscalls for us in each request. Are they really 6? If I/O is coalesced by a factor of 3, for example

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 9:29 AM, Asias He as...@redhat.com wrote: On 07/16/2012 07:58 PM, Stefan Hajnoczi wrote: Does the vhost-blk implementation do anything fundamentally different from userspace? Where is the overhead that userspace virtio-blk has? Currently, no. But we could play

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 12:26 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Jul 17, 2012 at 12:11:15PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 17, 2012 at 10:21 AM, Asias He as...@redhat.com wrote: On 07/17/2012 04:52 PM, Paolo Bonzini wrote: Il 17/07/2012 10:29, Asias He ha

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 12:42 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Tue, Jul 17, 2012 at 12:26 PM, Michael S. Tsirkin m...@redhat.com wrote: On Tue, Jul 17, 2012 at 12:11:15PM +0100, Stefan Hajnoczi wrote: On Tue, Jul 17, 2012 at 10:21 AM, Asias He as...@redhat.com wrote: On 07/17

Re: [PATCH 0/5] Add vhost-blk support

2012-07-17 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 12:54 PM, Michael S. Tsirkin m...@redhat.com wrote: Knowing the answer to that is important before anyone can say whether this approach is good or not. Stefan Why is it? Because there might be a fix to kvmtool which closes the gap. It would be embarassing if

Re: [PATCH RESEND 0/5] Add vhost-blk support

2012-07-18 Thread Stefan Hajnoczi
On Tue, Jul 17, 2012 at 4:09 PM, Michael S. Tsirkin m...@redhat.com wrote: On Fri, Jul 13, 2012 at 04:55:06PM +0800, Asias He wrote: Hi folks, [I am resending to fix the broken thread in the previous one.] This patchset adds vhost-blk support. vhost-blk is a in kernel virito-blk device

Re: [PATCH RESEND 5/5] vhost-blk: Add vhost-blk support

2012-07-20 Thread Stefan Hajnoczi
On Thu, Jul 19, 2012 at 2:09 PM, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Jul 19, 2012 at 08:05:42AM -0500, Anthony Liguori wrote: Of course, the million dollar question is why would using AIO in the kernel be faster than using AIO in userspace? Actually for me a more important

Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 3:36 AM, Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com wrote: The performance of each method is compared as follows: [1] Native - only recording trace data to ring-buffer on a guest [2] Virtio-trace - running a trace agent on a guest - a reader

Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 12:19 PM, Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com wrote: Are you using text formatted ftrace? No, currently using raw format, but we'd like to reformat it in text. Capturing the info necessary to translate numbers into symbols is one of the problems of

Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-24 Thread Stefan Hajnoczi
On Tue, Jul 24, 2012 at 12:03 PM, Masami Hiramatsu masami.hiramatsu...@hitachi.com wrote: (2012/07/24 19:02), Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 3:36 AM, Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com wrote: The performance of each method is compared as follows: [1] Native

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
if you have any concerns here. Thanks! Reported-by: Anthony Liguori aligu...@us.ibm.com Cc: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Cc: Michael S. Tsirkin m...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off

Re: [PATCH] tcm_vhost: Expose ABI version via VHOST_SCSI_GET_ABI_VERSION

2012-07-25 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 02:14:50PM -0700, Nicholas A. Bellinger wrote: On Wed, 2012-07-25 at 12:55 +0100, Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 01:45:24PM -0700, Nicholas A. Bellinger wrote: On Mon, 2012-07-23 at 18:56 -0700, Greg Kroah-Hartman wrote: On Tue, Jul 24, 2012 at 01

Re: Re: Re: [RFC PATCH 0/6] virtio-trace: Support virtio-trace

2012-07-26 Thread Stefan Hajnoczi
On Wed, Jul 25, 2012 at 10:13 AM, Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com wrote: Hi Stefan, (2012/07/24 22:41), Stefan Hajnoczi wrote: On Tue, Jul 24, 2012 at 12:19 PM, Yoshihiro YUNOMAE yoshihiro.yunomae...@hitachi.com wrote: Are you using text formatted ftrace

Re: virtio-scsi - vhost multi lun/adapter performance results with 3.6-rc0

2012-08-11 Thread Stefan Hajnoczi
On Sat, Aug 11, 2012 at 12:23 AM, Nicholas A. Bellinger n...@linux-iscsi.org wrote: Using a KVM guest with 32x vCPUs and 4G memory, the results for 4x random I/O now look like: workload | jobs | 25% write / 75% read | 75% write / 25% read

Re: [RFC-v2 4/6] virtio-scsi: Add start/stop functionality for vhost-scsi

2012-08-20 Thread Stefan Hajnoczi
On Mon, Aug 20, 2012 at 10:04 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 13/08/2012 10:35, Nicholas A. Bellinger ha scritto: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only

Re: [PATCH v1] virtio-scsi: get and set the queue limits for sg device

2012-08-21 Thread Stefan Hajnoczi
On Tue, Aug 21, 2012 at 9:26 AM, Cong Meng m...@linux.vnet.ibm.com wrote: Each virtio scsi HBA has global request queue limits. But the passthrough LUNs (scsi-generic) come from different host HBAs may have different request queue limits. If the guest sends commands that exceed the host limits,

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-21 Thread Stefan Hajnoczi
On Tue, Aug 21, 2012 at 9:23 AM, Cong Meng m...@linux.vnet.ibm.com wrote: This patch adds some queue limit parameters into block drive. And inits them for sg block drive. Some interfaces are also added for accessing them. Signed-off-by: Cong Meng m...@linux.vnet.ibm.com ---

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-21 Thread Stefan Hajnoczi
On Tue, Aug 21, 2012 at 10:41 AM, Cong Meng m...@linux.vnet.ibm.com wrote: On Tue 21 Aug 2012 04:48:17 PM CST, Paolo Bonzini wrote: Il 21/08/2012 10:23, Cong Meng ha scritto: +static void sg_get_queue_limits(BlockDriverState *bs, const char *filename) +{ +DIR *ffs; +struct

Re: [PATCH 2/2 v1] virtio-scsi: set per-LUN queue limits for sg devices

2012-08-21 Thread Stefan Hajnoczi
On Tue, Aug 21, 2012 at 9:23 AM, Cong Meng m...@linux.vnet.ibm.com wrote: @@ -557,6 +621,7 @@ static uint32_t virtio_scsi_get_features(VirtIODevice *vdev, { requested_features |= (1UL VIRTIO_SCSI_F_HOTPLUG); requested_features |= (1UL VIRTIO_SCSI_F_CHANGE); +

Re: [Qemu-devel] [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-22 Thread Stefan Hajnoczi
On Tue, Aug 21, 2012 at 7:31 PM, Blue Swirl blauwir...@gmail.com wrote: On Tue, Aug 21, 2012 at 8:23 AM, Cong Meng m...@linux.vnet.ibm.com wrote: diff --git a/block_int.h b/block_int.h index d72317f..a9d07a2 100644 --- a/block_int.h +++ b/block_int.h @@ -333,6 +333,10 @@ struct

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-22 Thread Stefan Hajnoczi
On Wed, Aug 22, 2012 at 02:09:28PM +0200, Paolo Bonzini wrote: Il 22/08/2012 13:04, Cong Meng ha scritto: Cong, what is the limit that the host HBA enforces (and what is the HBA)? What commands see a problem? Is it fixed by using scsi-block instead of scsi-generic (if you can use

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-23 Thread Stefan Hajnoczi
On Thu, Aug 23, 2012 at 11:03 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/08/2012 11:31, Cong Meng ha scritto: For disks, this should be fixed simply by using scsi-block instead of scsi-generic. CD-ROMs are indeed more complicated because burning CDs cannot be done with syscalls. :/

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-23 Thread Stefan Hajnoczi
On Thu, Aug 23, 2012 at 11:52 AM, Paolo Bonzini pbonz...@redhat.com wrote: Il 23/08/2012 12:08, Stefan Hajnoczi ha scritto: I'm still trying to understand the extent of the problem. The problem occurs for _USB_ CD-ROMs according to Ben. Passthrough of USB storage devices should be done via

Re: [PATCH 1/2 v1] blkdrv: Add queue limits parameters for sg block drive

2012-08-24 Thread Stefan Hajnoczi
On Fri, Aug 24, 2012 at 12:43:34PM +0200, Hannes Reinecke wrote: On 08/24/2012 09:56 AM, Paolo Bonzini wrote: Il 24/08/2012 02:45, Nicholas A. Bellinger ha scritto: So up until very recently, TCM would accept an I/O request for an DATA I/O type CDB with a max_sectors larger than the reported

Re: [PATCH] vhost: remove duplicated include from tcm_vhost.c

2012-08-26 Thread Stefan Hajnoczi
- 1 file changed, 1 deletion(-) Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 0/5] Multiqueue virtio-scsi

2012-08-30 Thread Stefan Hajnoczi
(so that commands are not reordered); queue switching occurs when the request being queued is the only one for the target. Also based on Jason's patches, the virtqueue affinity is set so that each CPU is associated to one virtqueue. Reviewed-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com

Re: [PATCH] virtio-blk: Disable callback in virtblk_done()

2012-10-02 Thread Stefan Hajnoczi
On Thu, Sep 27, 2012 at 12:01 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 27/09/2012 02:10, Rusty Russell ha scritto: +do { +virtqueue_disable_cb(vq); +while ((vbr = virtqueue_get_buf(vblk-vq, len)) != NULL) { +if

Re: [PATCH] virtio-spec: Document VIRTIO_BLK_T_GET_ID.

2012-12-14 Thread Stefan Hajnoczi
insertions(+), 17 deletions(-) Otherwise looks good. Reviewed-by: Stefan Hajnoczi stefa...@redhat.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH 1/2] Auto-fix lines after 67023431

2012-12-17 Thread Stefan Hajnoczi
+++ 1 file changed, 15 insertions(+), 16 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Stefan Hajnoczi
On Wed, Dec 19, 2012 at 1:04 PM, Paolo Bonzini pbonz...@redhat.com wrote: Il 19/12/2012 11:47, Stefan Hajnoczi ha scritto: On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: What is the purpose of count_sg? It is needed to decide whether to use an indirect or a direct buffer

Re: [PATCH v2 1/5] virtio: add functions for piecewise addition of buffers

2012-12-19 Thread Stefan Hajnoczi
On Tue, Dec 18, 2012 at 01:32:48PM +0100, Paolo Bonzini wrote: +/** + * virtqueue_start_buf - start building buffer for the other end + * @vq: the struct virtqueue we're talking about. + * @buf: a struct keeping the state of the buffer + * @data: the token identifying the buffer. + * @count:

Re: [PATCH v2 5/5] virtio-scsi: introduce multiqueue support

2012-12-19 Thread Stefan Hajnoczi
On Tue, Dec 18, 2012 at 01:32:52PM +0100, Paolo Bonzini wrote: struct virtio_scsi_target_state { - /* Never held at the same time as vq_lock. */ + /* This spinlock ever held at the same time as vq_lock. */ s/ever/is never/ ___

Re: [PATCH] virtio-spec: fix two typos

2013-01-09 Thread Stefan Hajnoczi
insertions(+), 2 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [RFC PATCH] virtio-net: introduce a new macaddr control

2013-01-11 Thread Stefan Hajnoczi
On Thu, Jan 10, 2013 at 10:51:57PM +0800, ak...@redhat.com wrote: @@ -349,6 +351,13 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET elem-out_num == 2) { +/* Set MAC address

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 02:37:34PM +0800, Jason Wang wrote: On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com In virtio-net guest driver, currently we write MAC address to pci config space byte by byte, this means that we have an

Re: [PATCH] virtio-spec: set mac address by a new vq command

2013-01-16 Thread Stefan Hajnoczi
On Wed, Jan 16, 2013 at 03:33:24PM +0800, ak...@redhat.com wrote: +\change_inserted -1930653948 1358320004 +The command VIRTIO_NET_CTRL_MAC_ADDR_SET is used to set +\begin_inset Quotes eld +\end_inset + +physical +\begin_inset Quotes erd +\end_inset + + address of the network card. The

Re: [Qemu-devel] [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-17 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 01:45:11PM +0800, Amos Kong wrote: On Thu, Jan 17, 2013 at 11:49:20AM +1030, Rusty Russell wrote: ak...@redhat.com writes: @@ -349,6 +351,14 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, { struct virtio_net_ctrl_mac mac_data; +

Re: [QEMU PATCH v3] virtio-net: introduce a new macaddr control

2013-01-17 Thread Stefan Hajnoczi
compatibility make mac field in config space read-only when new feature is acked --- hw/pc_piix.c| 4 hw/virtio-net.c | 10 +- hw/virtio-net.h | 12 ++-- 3 files changed, 23 insertions(+), 3 deletions(-) Reviewed-by: Stefan Hajnoczi stefa...@redhat.com

Re: [PATCH v2] virtio-spec: set mac address by a new vq command

2013-01-18 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 06:25:47PM +0800, ak...@redhat.com wrote: From: Amos Kong ak...@redhat.com Virtio-net driver currently programs MAC address byte by byte, this means that we have an intermediate step where mac is wrong. This patch introduced a new control command to set MAC address

Re: [PATCH v3 2/2] virtio-net: introduce a new control to set macaddr

2013-01-18 Thread Stefan Hajnoczi
On Thu, Jan 17, 2013 at 06:40:12PM +0800, ak...@redhat.com wrote: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 395ab4f..837c978 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -802,14 +802,32 @@ static int virtnet_set_mac_address(struct

Re: [QEMU PATCH v4 1/3] virtio-net: remove layout assumptions for ctrl vq

2013-01-21 Thread Stefan Hajnoczi
On Sat, Jan 19, 2013 at 09:54:26AM +0800, ak...@redhat.com wrote: From: Michael S. Tsirkin m...@redhat.com Virtio-net code makes assumption about virtqueue descriptor layout (e.g. sg[0] is the header, sg[1] is the data buffer). This patch makes code not rely on the layout of descriptors.

Re: [QEMU PATCH v4 2/3] virtio-net: introduce a new macaddr control

2013-01-21 Thread Stefan Hajnoczi
On Sat, Jan 19, 2013 at 09:54:27AM +0800, ak...@redhat.com wrote: @@ -350,6 +351,18 @@ static int virtio_net_handle_mac(VirtIONet *n, uint8_t cmd, struct virtio_net_ctrl_mac mac_data; size_t s; +if (cmd == VIRTIO_NET_CTRL_MAC_ADDR_SET) { +if (iov_size(iov, iov_cnt)

Re: [PATCH v4 2/3] net: split eth_mac_addr for better error handling

2013-01-21 Thread Stefan Hajnoczi
On Sun, Jan 20, 2013 at 10:43:08AM +0800, ak...@redhat.com wrote: From: Stefan Hajnoczi stefa...@gmail.com When we set mac address, software mac address in system and hardware mac address all need to be updated. Current eth_mac_addr() doesn't allow callers to implement error handling nicely

Re: [QEMU PATCH v4 1/3] virtio-net: remove layout assumptions for ctrl vq

2013-01-22 Thread Stefan Hajnoczi
On Tue, Jan 22, 2013 at 10:38:14PM +0800, Amos Kong wrote: On Mon, Jan 21, 2013 at 05:03:30PM +0100, Stefan Hajnoczi wrote: On Sat, Jan 19, 2013 at 09:54:26AM +0800, ak...@redhat.com wrote: From: Michael S. Tsirkin m...@redhat.com Virtio-net code makes assumption about virtqueue

Re: [PATCH 2/5] tcm_vhost: Introduce tcm_vhost_check_feature()

2013-03-06 Thread Stefan Hajnoczi
On Wed, Mar 06, 2013 at 02:16:27PM +0800, Asias He wrote: This helper is useful to check if a feature is supported. Signed-off-by: Asias He as...@redhat.com --- drivers/vhost/tcm_vhost.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/drivers/vhost/tcm_vhost.c

Re: [PATCH 5/5] tcm_vhost: Add hotplug/hotunplug support

2013-03-06 Thread Stefan Hajnoczi
On Wed, Mar 06, 2013 at 02:16:30PM +0800, Asias He wrote: +static struct tcm_vhost_evt *tcm_vhost_allocate_evt(struct vhost_scsi *vs, + u32 event, u32 reason) +{ + struct tcm_vhost_evt *evt; + + if (atomic_read(vs-vs_events_nr) VHOST_SCSI_MAX_EVENT) + return NULL;

  1   2   3   4   5   >