[PATCH 1/3] virtio: change to_vp_device to an inlined definition

2012-12-04 Thread Wanlong Gao
to_vp_device is worth changing to inlined definition. Signed-off-by: Wanlong Gao --- drivers/virtio/virtio_pci.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio/virtio_pci.c index e3ecc94..7681fe3 100644 --- a/drivers/virtio

[PATCH 2/3] virtio: use dev_to_virtio wrapper in virtio

2012-12-04 Thread Wanlong Gao
Use dev_to_virtio wrapper in virtio to make code clearly. Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 19 +-- include/linux/virtio.h | 2 +- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index

[PATCH 3/3] virtio: add drv_to_virtio to make code clearly

2012-12-04 Thread Wanlong Gao
Add drv_to_virtio wrapper to get virtio_driver from device_driver. Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 11 --- include/linux/virtio.h | 1 + 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index

[PATCH V2 2/2] virtio: add drv_to_virtio to make code clearly

2012-12-05 Thread Wanlong Gao
Add drv_to_virtio wrapper to get virtio_driver from device_driver. Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index ba24e87..43c1fb2 100644 --- a

Re: [PATCH 2/3] virtio: use dev_to_virtio wrapper in virtio

2012-12-05 Thread Wanlong Gao
On 12/05/2012 07:16 PM, Michael S. Tsirkin wrote: > On Wed, Dec 05, 2012 at 03:03:28PM +0800, Wanlong Gao wrote: >> Use dev_to_virtio wrapper in virtio to make code clearly. >> >> Signed-off-by: Wanlong Gao >> --- >> diff --git a/include/linux/virtio.h b/includ

[PATCH V2 1/2] virtio: use dev_to_virtio wrapper in virtio

2012-12-05 Thread Wanlong Gao
Use dev_to_virtio wrapper in virtio to make code clearly. Move dev_to_virtio from virtio.h to virtio.c. Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 24 ++-- include/linux/virtio.h | 1 - 2 files changed, 14 insertions(+), 11 deletions(-) diff --git a/drivers

Re: [PATCH 1/3] virtio: change to_vp_device to an inlined definition

2012-12-05 Thread Wanlong Gao
On 12/06/2012 07:21 AM, Rusty Russell wrote: > Wanlong Gao writes: > >> to_vp_device is worth changing to inlined definition. > > Why? OK, I saw your comments, and I dropped this patch already. Thanks, Wanlong Gao &g

[PATCH V3 1/2] virtio: use dev_to_virtio wrapper in virtio

2012-12-10 Thread Wanlong Gao
Use dev_to_virtio wrapper in virtio to make code clearly. Cc: Rusty Russell Cc: "Michael S. Tsirkin" Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 19 +-- include/linux/virtio.h | 6 +- 2 files changed, 14 insertions(+), 11 deletions(-) diff --git

[PATCH V3 2/2] virtio: add drv_to_virtio to make code clearly

2012-12-10 Thread Wanlong Gao
Add drv_to_virtio wrapper to get virtio_driver from device_driver. Cc: Rusty Russell Cc: "Michael S. Tsirkin" Signed-off-by: Wanlong Gao --- drivers/virtio/virtio.c | 11 --- include/linux/virtio.h | 5 + 2 files changed, 9 insertions(+), 7 deletions(-) diff --git

Re: [PATCH v2 0/5] Multiqueue virtio-scsi, and API for piecewise buffer submission

2012-12-23 Thread Wanlong Gao
n here. > Without this data it is possible that your host > is undersubscribed and you are drinking up more host CPU. > > Another thing to note is that ATM you might need to > test with idle=poll on host otherwise we have strange interaction > with power management where reducing

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

2012-12-25 Thread Wanlong Gao
if (err) >>>>>> return err; >>>>>> >>>>>> -virtscsi_init_vq(&vscsi->ctrl_vq, vqs[0]); >>>>>> -virtscsi_init_vq(&vscsi->event_vq, vqs[1]); >>>>>>

[RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug

2012-12-25 Thread Wanlong Gao
ualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 39 ++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a6fcf15..9710

Re: [RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug

2012-12-26 Thread Wanlong Gao
On 12/26/2012 06:06 PM, Jason Wang wrote: > On 12/26/2012 03:06 PM, Wanlong Gao wrote: >> Add a cpu notifier to virtio-net, so that we can reset the >> virtqueue affinity if the cpu hotplug happens. It improve >> the performance through enabling or disabling the virtqueue &g

Re: [RFC PATCH] virtio-net: reset virtqueue affinity when doing cpu hotplug

2012-12-26 Thread Wanlong Gao
On 12/27/2012 11:28 AM, Jason Wang wrote: > On 12/26/2012 06:19 PM, Wanlong Gao wrote: >> On 12/26/2012 06:06 PM, Jason Wang wrote: >>> On 12/26/2012 03:06 PM, Wanlong Gao wrote: >>>> Add a cpu notifier to virtio-net, so that we can reset the >>>> virtque

Re: [PATCH 2/2] vhost: handle polling failure

2012-12-27 Thread Wanlong Gao
On 12/27/2012 02:39 PM, Jason Wang wrote: > Currently, polling error were ignored in vhost. This may lead some issues (e.g > kenrel crash when passing a tap fd to vhost before calling TUNSETIFF). Fix > this > by: Can this kernel crash be reproduced by hand? Thanks, Wanlong Gao &

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

2013-01-03 Thread Wanlong Gao
io=34625MB, aggrb=247902KB/s, minb=247902KB/s, maxb=247902KB/s, mint=143025msec, maxt=143025msec Chained: Run status group 0 (all jobs): READ: io=34863MB, aggrb=242320KB/s, minb=242320KB/s, maxb=242320KB/s, mint=147325msec, maxt=147325msec WRITE: io=34437MB, aggrb=

[PATCH V2 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-06 Thread Wanlong Gao
ion.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 24 +--- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a6fcf15..b483fb5 100644 --- a/drivers/net/virtio_net.c +++

[PATCH V2 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-06 Thread Wanlong Gao
Russell Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/d

Re: [PATCH V2 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-06 Thread Wanlong Gao
On 01/07/2013 03:28 PM, Jason Wang wrote: > On 01/07/2013 03:15 PM, Wanlong Gao wrote: >> Add a cpu notifier to virtio-net, so that we can reset the >> virtqueue affinity if the cpu hotplug happens. It improve >> the performance through enabling or disabling the virtqueue &g

Re: [PATCH V2 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-07 Thread Wanlong Gao
On 01/07/2013 03:55 PM, Jason Wang wrote: > On 01/07/2013 03:48 PM, Wanlong Gao wrote: >> On 01/07/2013 03:28 PM, Jason Wang wrote: >>> On 01/07/2013 03:15 PM, Wanlong Gao wrote: >>>> Add a cpu notifier to virtio-net, so that we can reset the >>>> virtque

[PATCH V3 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-08 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 39 +-- 1 file changed, 29 insertions(+), 10 deletions(-) di

[PATCH V3 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-08 Thread Wanlong Gao
umazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index a77f86c..31a25db 10

Re: [PATCH V3 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-08 Thread Wanlong Gao
On 01/09/2013 07:31 AM, Rusty Russell wrote: > Wanlong Gao writes: >> */ >> static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff *skb) >> { >> -int txq = skb_rx_queue_recorded(skb) ? skb_get_rx_queue(skb) : >> - smp_pr

Re: [PATCH V3 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-08 Thread Wanlong Gao
On 01/08/2013 06:26 PM, Jason Wang wrote: > On 01/08/2013 06:07 PM, Wanlong Gao wrote: >> As Michael mentioned, set affinity and select queue will not work very >> well when CPU IDs are not consecutive, this can happen with hot unplug. >> Fix this bug by traversal the online C

Re: [PATCH V3 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-10 Thread Wanlong Gao
On 01/10/2013 08:49 AM, Rusty Russell wrote: > Wanlong Gao writes: >> On 01/09/2013 07:31 AM, Rusty Russell wrote: >>> Wanlong Gao writes: >>>> */ >>>> static u16 virtnet_select_queue(struct net_device *dev, struct sk_buff >>>> *sk

[PATCH V4 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-10 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V3->V4: move vq_index into virtnet_info (Jason) change the mapping value when not setting af

[PATCH V4 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-10 Thread Wanlong Gao
umazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- drivers/net/virtio_net.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index ca17a58..e0b1f25 10

[PATCH 1/2] virtio-scsi: split out request queue set affinity function

2013-01-15 Thread Wanlong Gao
These two patches are based on the multi-queue virtio-scsi patch set. We set cpu affinity when the num_queues equals to the number of VCPUs. Split out the set affinity function, this also fix the bug when CPU IDs are not consecutive. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c

[PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 30 ++ 1 file changed, 30 insertions(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index

Re: [PATCH 2/2] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-01-15 Thread Wanlong Gao
On 01/16/2013 11:31 AM, Rusty Russell wrote: > Wanlong Gao writes: >> Add hot cpu notifier to reset the request virtqueue affinity >> when doing cpu hotplug. > > You need to be careful to get_online_cpus() and put_online_cpus() here, > so CPUs can't go up and dow

[PATCH V5 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-17 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V4->V5: Add get/put_online_cpus to avoid CPUs go up and down during operations (Rusty) V3->V4: mo

[PATCH V5 2/2] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-17 Thread Wanlong Gao
umazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V4->V5: New method to deal with the cpu hotplug actions (Rusty) drivers/net/virtio_net.c | 50 ++-- 1 file changed, 44 insertions(+)

Re: [PATCH V5 1/2] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-17 Thread Wanlong Gao
On 01/18/2013 02:18 PM, Jason Wang wrote: > On 01/18/2013 01:32 PM, Wanlong Gao wrote: >> As Michael mentioned, set affinity and select queue will not work very >> well when CPU IDs are not consecutive, this can happen with hot unplug. >> Fix this bug by traversal the online C

[PATCH V6 2/3] virtio-net: split out clean affinity function

2013-01-21 Thread Wanlong Gao
Split out the clean affinity function to virtnet_clean_affinity(). Cc: Rusty Russell Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V5->V6: NEW drivers/net/virt

[PATCH V6 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-21 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V5->V6: remove {get|put}_online_cpus from virtnet_del_vqs (Jason) V4->V5: Add get/put_online_cpus to

[PATCH V6 3/3] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-21 Thread Wanlong Gao
umazet Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V5->V6: deal with CPU_DOWN_PREPARE separately by just cleaning affinity V4->V5: New method to deal with the cpu hotplug actions (Rusty) drivers/net/v

Re: [PATCH V6 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-23 Thread Wanlong Gao
On 01/22/2013 09:12 AM, Rusty Russell wrote: > Wanlong Gao writes: > >> As Michael mentioned, set affinity and select queue will not work very >> well when CPU IDs are not consecutive, this can happen with hot unplug. >> Fix this bug by traversal the online CPUs, and c

Re: [PATCH V6 2/3] virtio-net: split out clean affinity function

2013-01-24 Thread Wanlong Gao
On 01/25/2013 11:28 AM, Jason Wang wrote: > On 01/21/2013 07:25 PM, Wanlong Gao wrote: >> Split out the clean affinity function to virtnet_clean_affinity(). >> >> Cc: Rusty Russell >> Cc: "Michael S. Tsirkin" >> Cc: Jason Wang >> Cc

Re: [PATCH V6 2/3] virtio-net: split out clean affinity function

2013-01-24 Thread Wanlong Gao
On 01/25/2013 01:13 PM, Jason Wang wrote: > On 01/25/2013 12:20 PM, Wanlong Gao wrote: >> On 01/25/2013 11:28 AM, Jason Wang wrote: >>> On 01/21/2013 07:25 PM, Wanlong Gao wrote: >>>> Split out the clean affinity function to virtnet_clean_affinity(). >>>>

Re: [PATCH V6 2/3] virtio-net: split out clean affinity function

2013-01-24 Thread Wanlong Gao
On 01/25/2013 02:12 PM, Jason Wang wrote: > On 01/25/2013 01:40 PM, Wanlong Gao wrote: >> On 01/25/2013 01:13 PM, Jason Wang wrote: >>> On 01/25/2013 12:20 PM, Wanlong Gao wrote: >>>> On 01/25/2013 11:28 AM, Jason Wang wrote: >>>>> On 01/21/2013 07:2

Re: [PATCH V6 2/3] virtio-net: split out clean affinity function

2013-01-24 Thread Wanlong Gao
On 01/25/2013 03:04 PM, Jason Wang wrote: > On 01/25/2013 02:42 PM, Wanlong Gao wrote: >> On 01/25/2013 02:12 PM, Jason Wang wrote: >>> On 01/25/2013 01:40 PM, Wanlong Gao wrote: >>>> On 01/25/2013 01:13 PM, Jason Wang wrote: >>>>> On 01/25/2013 12:20 P

[PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-25 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao Acked-by: Michael S. Tsirkin --- V6->V7: serialize virtnet_set_queues to avoid

[PATCH V7 3/3] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-25 Thread Wanlong Gao
umazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao Acked-by: Michael S. Tsirkin --- V6->V7: no change V5->V6: deal with CPU_DOWN_PREPARE separately by just cleaning affinity V4->V5: Ne

[PATCH V7 2/3] virtio-net: split out clean affinity function

2013-01-25 Thread Wanlong Gao
Split out the clean affinity function to virtnet_clean_affinity(). Cc: Rusty Russell Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao

Re: [PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-25 Thread Wanlong Gao
On 01/25/2013 05:00 PM, Jason Wang wrote: > On 01/25/2013 04:36 PM, Wanlong Gao wrote: >> As Michael mentioned, set affinity and select queue will not work very >> well when CPU IDs are not consecutive, this can happen with hot unplug. >> Fix this bug by traversal the online C

Re: [PATCH V7 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-25 Thread Wanlong Gao
t_set = false; >>>> + } >>>> } >>> Sorry, looks like the issue of v6 still exists, we need set per-cpu >>> index unconditionally here (and also in 2/3), the cpus != queues check >>> may bypass this setting. >> This fixed in 2/3, when c

[PATCH V8 1/3] virtio-net: fix the set affinity bug when CPU IDs are not consecutive

2013-01-25 Thread Wanlong Gao
Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao Acked-by: Michael S. Tsirkin --- V7->V8: set vq index uncondition

[PATCH V8 2/3] virtio-net: split out clean affinity function

2013-01-25 Thread Wanlong Gao
Split out the clean affinity function to virtnet_clean_affinity(). Cc: Rusty Russell Cc: "Michael S. Tsirkin" Cc: Jason Wang Cc: Eric Dumazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao

[PATCH V8 3/3] virtio-net: reset virtqueue affinity when doing cpu hotplug

2013-01-25 Thread Wanlong Gao
umazet Cc: "David S. Miller" Cc: virtualization@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao Acked-by: Michael S. Tsirkin --- V5->V6: deal with CPU_DOWN_PREPARE separately by just cleaning affinity V4->V5: New method to deal wi

Re: [PATCH][trivial] virtio-mmio: fix wrong comment about register offset

2013-01-27 Thread Wanlong Gao
On 01/26/2013 04:54 PM, Ryota Ozaki wrote: > The register offset of InterruptACK is 0x064, not 0x060. > Fix it. > > Signed-off-by: Ryota Ozaki > CC: Pawel Moll > CC: Rusty Russell > CC: Jiri Kosina Reviewed-by: Wanlong Gao > --- > drivers/virtio/virtio_mmio.c

Re: [PATCH] virtio_console: Don't access uninitialized data.

2013-02-05 Thread Wanlong Gao
stable. >>> >>> Amit >> >> OK stable, please cherry-pick from Linus' tree: >> >> commit b26ada9abe26290b1dcd06075935b977548c50db >> Author: Sjur Brændeland >> Date: Tue Jan 22 09:50:26 2013 +1030 >> >> virt

Re: [PATCH v3 0/5] virtio-scsi multiqueue

2013-02-18 Thread Wanlong Gao
ur Acked-by? I can't apply this series on top of Rusty's virtio-next, I missed something or needed rebase them ? Thanks, Wanlong Gao > > Paolo > > Paolo Bonzini (4): > virtio-scsi: redo allocation of target data > virtio-scsi: pass struct virtio_scsi to

Re: [PATCH 02/16] virtio_ring: virtqueue_add_sgs, to add multiple sgs.

2013-02-19 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > virtio_scsi can really use this, to avoid the current hack of copying > the whole sg array. Some other things get slightly neater, too. > > Signed-off-by: Rusty Russell I like this simple implementation. Reviewed-by:

[PATCH 17/16] virtio-scsi: use virtqueue_add_sgs for command buffers

2013-02-20 Thread Wanlong Gao
Using the new virtqueue_add_sgs function lets us simplify the queueing path. In particular, all data protected by the tgt_lock is just gone (multiqueue will find a new use for the lock). Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 93

Re: [PATCH 17/16] virtio-scsi: use virtqueue_add_sgs for command buffers

2013-02-20 Thread Wanlong Gao
On 02/20/2013 05:38 PM, Asias He wrote: > On 02/20/2013 04:37 PM, Wanlong Gao wrote: >> Using the new virtqueue_add_sgs function lets us simplify the queueing >> path. In particular, all data protected by the tgt_lock is just gone >> (multiqueue will find a new use for the lo

[PATCH 17/16 V2] virtio-scsi: use virtqueue_add_sgs for command buffers

2013-02-20 Thread Wanlong Gao
Using the new virtqueue_add_sgs function lets us simplify the queueing path. In particular, all data protected by the tgt_lock is just gone (multiqueue will find a new use for the lock). Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- V1->V2: add the lost comments (As

Re: [PATCH 07/16] virtio_ring: don't count elements twice for add_buf path.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > Extract the post-counting code into virtqueue_add(), make both callers > use it. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/virtio/virtio_ring.c | 147 > +++

Re: [PATCH 08/16] virtio_ring: virtqueue_add_outbuf / virtqueue_add_inbuf.

2013-02-20 Thread Wanlong Gao
> FIXME: I'm not sure about the unclean sglist bit. I had a more > ambitious one which conditionally ignored end markers in the iterator, > but it was ugly and I suspect this is just as fast. Maybe we should > just fix all the drivers? > > Signed-off-by: Rusty Russell

Re: [PATCH 09/16] virtio_net: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/net/virtio_net.c | 11 +-- > 1 file changed, 5 insertio

Re: [PATCH 10/16] virtio_net: use virtqueue_add_sgs[] for command buffers.

2013-02-20 Thread Wanlong Gao
return status */ > + BUG_ON(!virtio_has_feature(vi->vdev, VIRTIO_NET_F_CTRL_VQ)); > > - ctrl.class = class; > - ctrl.cmd = cmd; The class and cmd assignment of ctrl header is forgotten? Thanks, Wanlong Gao > + /* Add header */ > + sg_init_one(&

Re: [PATCH 11/16] virtio_rng: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/char/hw_random/virtio-rng.c |2 +- > 1 file changed, 1 insert

Re: [PATCH 13/16] caif_virtio: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/net/caif/caif_virtio.c |3 +-- > 1 file changed, 1 insertion(+), 2 dele

Re: [PATCH 15/16] virtio_balloon: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/virtio/virtio_balloon.c |6 +++--- > 1 file changed, 3 insertio

Re: [PATCH 12/16] virtio_console: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/char/virtio_console.c |6 +++--- > 1 file changed, 3 insertio

Re: [PATCH 14/16] virtio_rpmsg_bus: use simplified virtqueue accessors.

2013-02-20 Thread Wanlong Gao
On 02/19/2013 03:56 PM, Rusty Russell wrote: > We never add buffers with input and output parts, so use the new accessors. > > Signed-off-by: Rusty Russell Reviewed-by: Wanlong Gao > --- > drivers/rpmsg/virtio_rpmsg_bus.c |8 > 1 file changed, 4 insertio

Re: [PATCH 10/16] virtio_net: use virtqueue_add_sgs[] for command buffers.

2013-02-21 Thread Wanlong Gao
net eth0: Failed to disable allmulti mode. [7.549744] net eth0: Failed to set MAC fitler table. [7.550705] net eth0: Failed to disable promisc mode. [7.551603] net eth0: Failed to disable allmulti mode. [7.552504] net eth0: Failed to set MAC fitler table. [7.553423] net eth0: Fa

Re: [PATCH 10/16] virtio_net: use virtqueue_add_sgs[] for command buffers.

2013-02-21 Thread Wanlong Gao
On 02/21/2013 05:41 PM, Jason Wang wrote: > On 02/21/2013 04:30 PM, Wanlong Gao wrote: >> On 02/19/2013 03:56 PM, Rusty Russell wrote: >>> It's a bit cleaner to hand multiple sgs, rather than one big one. >>> >>> Signed-off-by: Rusty Russell >

[PATCH] tools/virtio: add sg_unmark_end to scatterlist.h

2013-02-27 Thread Wanlong Gao
Add sg_unmark_end to scatterlist.h to fix compile. Signed-off-by: Wanlong Gao --- tools/virtio/linux/scatterlist.h | 16 1 file changed, 16 insertions(+) diff --git a/tools/virtio/linux/scatterlist.h b/tools/virtio/linux/scatterlist.h index b2cf7d0..68c9e2a 100644 --- a/tools

Re: [PATCH] tools/virtio: add sg_unmark_end to scatterlist.h

2013-02-27 Thread Wanlong Gao
On 02/28/2013 10:57 AM, Rusty Russell wrote: > Wanlong Gao writes: >> Add sg_unmark_end to scatterlist.h to fix compile. >> >> Signed-off-by: Wanlong Gao > > Thanks, I have the same patch in my series, which is in flux, but > can be found in my pend

Re: [PATCH] tools/virtio: add sg_unmark_end to scatterlist.h

2013-02-27 Thread Wanlong Gao
On 02/28/2013 11:55 AM, Rusty Russell wrote: > Wanlong Gao writes: > >> On 02/28/2013 10:57 AM, Rusty Russell wrote: >>> Wanlong Gao writes: >>>> Add sg_unmark_end to scatterlist.h to fix compile. >>>> >>>> Signed-off-by: Wanlong Gao >

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

2013-03-05 Thread Wanlong Gao
On 03/05/2013 05:17 PM, Asias He wrote: > In commit 365a7150094 ([SCSI] virtio-scsi: hotplug support for > virtio-scsi), hotplug support is added to virtio-scsi. > > This patch adds hotplug and hotunplug support to tcm_vhost. > > You can create or delate a LUN in targetcli to hotplug or hotplug a

[PATCH] lguest: fix paths in comments

2013-03-05 Thread Wanlong Gao
After commit 07fe997, lguest tool has already moved from Documentation/virtual/lguest/ to tools/lguest/. Signed-off-by: Wanlong Gao --- drivers/lguest/Kconfig | 5 ++--- tools/lguest/lguest.txt | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/lguest/Kconfig b

[PATCH 1/2] virtio-scsi: use pr_err() instead of printk()

2013-03-06 Thread Wanlong Gao
Convert the virtio-scsi driver to use pr_err() instead of printk(). Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 612e320..f679b8c 100644 --- a

[PATCH 2/2] virtio-scsi: reorder the goto label in init()

2013-03-06 Thread Wanlong Gao
Reorder the goto label in init() to make it more clearly, and remove the useless NULL pointer reassignment. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b

[PATCH V2 2/2] virtio-scsi: reorder the goto label in init()

2013-03-07 Thread Wanlong Gao
Reorder the goto label in init() to make it more clearly, and remove the useless NULL pointer reassignment. Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b

Re: [PATCH 1/2] virtio-scsi: use pr_err() instead of printk()

2013-03-08 Thread Wanlong Gao
On 03/08/2013 05:48 PM, Paolo Bonzini wrote: > Il 07/03/2013 04:29, Wanlong Gao ha scritto: >> Convert the virtio-scsi driver to use pr_err() instead of printk(). >> >> Signed-off-by: Wanlong Gao > > Acked-by: Paolo Bonzini Thank you. > > to this patch only

[PATCH V4 1/5] virtio-scsi: redo allocation of target data

2013-03-10 Thread Wanlong Gao
structs in the flexible array member at the end of struct virtio_scsi, because we will place the virtqueues there in the next patches. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 45

[PATCH V4 0/5] virtio-scsi multiqueue

2013-03-10 Thread Wanlong Gao
d-by? Paolo Bonzini (4): virtio-scsi: redo allocation of target data virtio-scsi: pass struct virtio_scsi to virtqueue completion function virtio-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: introduce multiqueue support Wanlong Gao (1): virtio-scsi: reset virtqueue affinity

[PATCH V4 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-10 Thread Wanlong Gao
From: Paolo Bonzini This will be needed soon in order to retrieve the per-target struct. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a

[PATCH V4 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-10 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 29 + 1 file changed, 29 insertions(+) diff --git a/drivers

[PATCH V4 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-10 Thread Wanlong Gao
From: Paolo Bonzini Avoid duplicated code in all of the callers. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff --git a/drivers/scsi

[PATCH V4 4/5] virtio-scsi: introduce multiqueue support

2013-03-10 Thread Wanlong Gao
-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 269 - 1 file changed, 241 insertions(+), 28 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 3573704..7a54293 100644 --- a/drivers/sc

Re: [PATCH 13/22] virtio_net: use virtqueue_add_sgs[] for command buffers.

2013-03-18 Thread Wanlong Gao
03] net eth0: Failed to set MAC fitler table. [9.921183] net eth0: Failed to disable promisc mode. [9.921921] net eth0: Failed to disable allmulti mode. [9.922680] net eth0: Failed to set MAC fitler table. [ 11.943884] net eth0: Failed to disable promisc mode. [ 11.945460] net

[PATCH V5 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini Avoid duplicated code in all of the callers. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff

[PATCH V5 1/5] virtio-scsi: redo allocation of target data

2013-03-19 Thread Wanlong Gao
-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 40 +++- 1 file changed, 11 insertions(+), 29 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index b53ba9e..3256c51 100644 --- a/drivers/scsi/virtio_scsi.c +++ b/drivers/scsi

[PATCH V5 0/5] virtio-scsi multiqueue

2013-03-19 Thread Wanlong Gao
io-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: introduce multiqueue support Wanlong Gao (1): virtio-scsi: reset virtqueue affinity when doing cpu hotplug drivers/scsi/virtio_scsi.c | 359 - 1 file changed, 290 insertions(+

[PATCH V5 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-19 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 29 + 1 file changed, 29 insertions

[PATCH V5 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-19 Thread Wanlong Gao
From: Paolo Bonzini This will be needed soon in order to retrieve the per-target struct. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH V5 4/5] virtio-scsi: introduce multiqueue support

2013-03-19 Thread Wanlong Gao
-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 269 - 1 file changed, 241 insertions(+), 28 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index 94a64ad..1d9

[PATCH V2 11/22] virtio-scsi: use virtqueue_add_sgs for command buffers

2013-03-19 Thread Wanlong Gao
Using the new virtqueue_add_sgs function lets us simplify the queueing path. In particular, all data protected by the tgt_lock is just gone (multiqueue will find a new use for the lock). Signed-off-by: Wanlong Gao Acked-by: Paolo Bonzini Reviewed-by: Asias He Signed-off-by: Rusty Russell

[PATCH V6 0/5] virtio-scsi multiqueue

2013-03-20 Thread Wanlong Gao
an we get your Acked-by? Paolo Bonzini (3): virtio-scsi: pass struct virtio_scsi to virtqueue completion function virtio-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: introduce multiqueue support Wanlong Gao (2): virtio-scsi: redo allocation of target data virtio-scsi: rese

[PATCH V6 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-20 Thread Wanlong Gao
From: Paolo Bonzini This will be needed soon in order to retrieve the per-target struct. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 17 + 1 file changed, 9 insertions(+), 8

[PATCH V6 1/5] virtio-scsi: redo allocation of target data

2013-03-20 Thread Wanlong Gao
y. Cc: James Bottomley Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao --- drivers/scsi/virtio_scsi.c | 71 -- 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/driver

[PATCH V6 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-20 Thread Wanlong Gao
From: Paolo Bonzini Avoid duplicated code in all of the callers. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 22 +- 1 file changed, 9 insertions(+), 13 deletions(-) diff

[PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
Add hot cpu notifier to reset the request virtqueue affinity when doing cpu hotplug. Cc: linux-s...@vger.kernel.org Signed-off-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 29 + 1 file changed, 29 insertions

[PATCH V6 4/5] virtio-scsi: introduce multiqueue support

2013-03-20 Thread Wanlong Gao
-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He --- drivers/scsi/virtio_scsi.c | 282 - 1 file changed, 254 insertions(+), 28 deletions(-) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c index dc2daec..13d

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

2013-03-20 Thread Wanlong Gao
+ /* Does the affinity hint is set for virtqueues? */ > Could you rephrase that, please? Thank you, fixed in V6, please review. > > Tested on qemu and w/ Google Compute Engine's virtio-scsi device. Cool. > > Reviewed-and-tested-by: Venkatesh Srinivas Do you mind revi

Re: [PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
On 03/20/2013 03:24 PM, Asias He wrote: > On Wed, Mar 20, 2013 at 03:01:24PM +0800, Wanlong Gao wrote: >> Add hot cpu notifier to reset the request virtqueue affinity >> when doing cpu hotplug. >> >> Cc: linux-s...@vger.kernel.org >> Signed-off-by: Paolo Bonzi

Re: [PATCH V6 5/5] virtio-scsi: reset virtqueue affinity when doing cpu hotplug

2013-03-20 Thread Wanlong Gao
On 03/20/2013 03:24 PM, Asias He wrote: > On Wed, Mar 20, 2013 at 03:01:24PM +0800, Wanlong Gao wrote: >> Add hot cpu notifier to reset the request virtqueue affinity >> when doing cpu hotplug. >> >> Cc: linux-s...@vger.kernel.org >> Signed-off-by: Paolo Bonzi

[PATCH V7 0/5] virtio-scsi multiqueue

2013-03-23 Thread Wanlong Gao
ecause of the prerequisites. James, can we get your Acked-by? Paolo Bonzini (3): virtio-scsi: pass struct virtio_scsi to virtqueue completion function virtio-scsi: push vq lock/unlock into virtscsi_vq_done virtio-scsi: introduce multiqueue support Wanlong Gao (2): virtio-scsi: redo all

  1   2   >