Re: [PATCH v2] virtio-scsi: hotplug support for virtio-scsi

2012-07-03 Thread Paolo Bonzini
Il 03/07/2012 07:41, Cong Meng ha scritto: This patch implements the hotplug support for virtio-scsi. When there is a device attached/detached, the virtio-scsi driver will be signaled via event virtual queue and it will add/remove the scsi device in question automatically. v2: handle

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

2012-07-03 Thread Paolo Bonzini
Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges disabled in guest (echo 2

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

2012-07-03 Thread Asias He
On 07/03/2012 09:31 PM, Paolo Bonzini wrote: Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges

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

2012-07-03 Thread Ronen Hod
On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias Heas...@redhat.com wrote: This patch introduces

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

2012-07-03 Thread Dor Laor
On 07/03/2012 05:22 PM, Ronen Hod wrote: On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias Heas...@redhat.com wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-03 Thread Rafael Aquini
On Tue, Jul 03, 2012 at 10:17:46AM +0930, Rusty Russell wrote: On Mon, 2 Jul 2012 13:08:19 -0300, Rafael Aquini aqu...@redhat.com wrote: As 'locking in balloon', may I assume the approach I took for the compaction case is OK and aligned to address these concerns of yours? If not, do not

Re: [PATCH v2 1/4] mm: introduce compaction and migration for virtio ballooned pages

2012-07-03 Thread Rafael Aquini
On Mon, Jul 02, 2012 at 08:36:02AM +0900, Minchan Kim wrote: On 06/30/2012 10:34 AM, Rafael Aquini wrote: void isolate_page_from_balloonlist(struct page* page) { page-mapping-a_ops-invalidatepage(page, 0); } if (is_balloon_page(page) (page_count(page) == 2)) {

[PATCH v3 0/4] make balloon pages movable by compaction

2012-07-03 Thread Rafael Aquini
Memory fragmentation introduced by ballooning might reduce significantly the number of 2MB contiguous memory blocks that can be used within a guest, thus imposing performance penalties associated with the reduced number of transparent huge pages that could be used by the guest workload. This

[PATCH v3 1/4] mm: introduce compaction and migration for virtio ballooned pages

2012-07-03 Thread Rafael Aquini
This patch introduces the helper functions as well as the necessary changes to teach compaction and migration bits how to cope with pages which are part of a guest memory balloon, in order to make them movable by memory compaction procedures. Signed-off-by: Rafael Aquini aqu...@redhat.com ---

[PATCH v3 2/4] virtio_balloon: handle concurrent accesses to virtio_balloon struct elements

2012-07-03 Thread Rafael Aquini
This patch introduces access sychronization to critical elements of struct virtio_balloon, in order to allow the thread concurrency compaction/migration bits might ended up imposing to the balloon driver on several situations. Signed-off-by: Rafael Aquini aqu...@redhat.com ---

[PATCH v3 3/4] virtio_balloon: introduce migration primitives to balloon pages

2012-07-03 Thread Rafael Aquini
This patch makes balloon pages movable at allocation time and introduces the infrastructure needed to perform the balloon page migration operation. Signed-off-by: Rafael Aquini aqu...@redhat.com --- drivers/virtio/virtio_balloon.c | 96 ++-

[PATCH v3 4/4] mm: add vm event counters for balloon pages compaction

2012-07-03 Thread Rafael Aquini
This patch is only for testing report purposes and shall be dropped in case of the rest of this patchset getting accepted for merging. Signed-off-by: Rafael Aquini aqu...@redhat.com --- drivers/virtio/virtio_balloon.c |1 + include/linux/vm_event_item.h |2 ++ mm/compaction.c

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

2012-07-03 Thread Rusty Russell
On Tue, 03 Jul 2012 08:39:39 +0800, Asias He as...@redhat.com wrote: On 07/02/2012 02:41 PM, Rusty Russell wrote: Sure, our guest merging might save us 100x as many exits as no merging. But since we're not doing many requests, does it matter? We can still have many requests with slow

Re: [PATCH RFC] virtio-balloon: fix add/get API use

2012-07-03 Thread Rusty Russell
On Mon, 2 Jul 2012 10:33:08 +0300, Michael S. Tsirkin m...@redhat.com wrote: In virtio balloon virtqueue_get_buf might now run concurrently with virtqueue_kick. I audited both and this seems safe in practice but this is not guaranteed by the API. Additionally, a spurious interrupt might in

[PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, This series contains patches required to update tcm_vhost - virtio-scsi connected hosts - guests to run on v3.5-rc2 mainline code. This series is available on top of target-pending/auto-next here:

[PATCH 1/6] vhost: Separate vhost-net features from vhost features

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Cc: Zhi Yong Wu wu...@cn.ibm.com Cc:

[PATCH 2/6] vhost: make vhost work queue visible

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi stefa...@gmail.com The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued

[PATCH 3/6] vhost: Add vhost_scsi specific defines

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@risingtidesystems.com This patch adds the initial vhost_scsi_ioctl() callers for VHOST_SCSI_SET_ENDPOINT and VHOST_SCSI_CLEAR_ENDPOINT respectively, and also adds struct vhost_vring_target that is used by tcm_vhost code when locating target ports during qemu setup.

[PATCH 4/6] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch adds the initial code for tcm_vhost, a Vhost level TCM fabric driver for virtio SCSI initiators into KVM guest. This code is currently up and running on v3.5-rc2 host+guest along with the virtio-scsi vdev-scan() patch to allow a proper

[PATCH 5/6] virtio-scsi: Add vdrv-scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This patch changes virtio-scsi to use a new virtio_driver-scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of

[PATCH 6/6] virtio-scsi: Set shost-max_id=1 for tcm_vhost WWPNs

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org This is currently required for connecting to tcm_vhost in order to prevent the client LUN scan from detecting the same tcm_vhost WWPN on multiple target IDs. Cc: Paolo Bonzini pbonz...@redhat.com Cc: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Cc:

Re: [PATCH 1/6] vhost: Separate vhost-net features from vhost features

2012-07-03 Thread Asias He
On 07/04/2012 12:24 PM, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. Signed-off-by: Stefan Hajnoczi