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

2013-03-23 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 V7 3/5] virtio-scsi: push vq lock/unlock into virtscsi_vq_done

2013-03-23 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 V7 2/5] virtio-scsi: pass struct virtio_scsi to virtqueue completion function

2013-03-23 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 V7 4/5] virtio-scsi: introduce multiqueue support

2013-03-23 Thread Wanlong Gao
-by: Paolo Bonzini Signed-off-by: Wanlong Gao Reviewed-by: Asias He Tested-by: Venkatesh Srinivas --- 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

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

2013-03-23 Thread Wanlong Gao
On 03/23/2013 02:36 PM, Paolo Bonzini wrote: > Il 20/03/2013 08:56, Wanlong Gao ha scritto: >>> This one does not apply on top of virtio-next + patch 1-4 in this series. >> >> I'm very sorry. >> >> This fault is because I modified the 4/5 from >>

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

2013-03-23 Thread Wanlong Gao
y. Cc: James Bottomley 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 | 71 -- 1 file changed, 25 insertions(+), 46 deletions(-) diff --git a/driver

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

2013-03-27 Thread Wanlong Gao
On 03/23/2013 07:28 PM, Wanlong Gao wrote: > This series implements virtio-scsi queue steering, which gives > performance improvements of up to 50% (measured both with QEMU and > tcm_vhost backends). > > This version rebased on Rusty's virtio ring rework patches, which >

Re: [PATCH 1/2] virtio: console: rename cvq_lock to c_ivq_lock

2013-03-28 Thread Wanlong Gao
On 03/28/2013 07:28 PM, Amit Shah wrote: > The cvq_lock was taken for the c_ivq. Rename the lock to make that > obvious. > > We'll also add a lock around the c_ovq in the next commit, so there's no > ambiguity. > > Signed-off-by: Amit Shah Reviewed-by: Wanl

Re: [PATCH 2/2] virtio: console: add locking around c_ovq operations

2013-03-28 Thread Wanlong Gao
+ > + spin_lock_irq(&portdev->c_ovq_lock); > if (virtqueue_add_buf(vq, sg, 1, 0, &cpkt, GFP_ATOMIC) == 0) { > virtqueue_kick(vq); > while (!virtqueue_get_buf(vq, &len)) > cpu_relax(); > } > + spin_unlock_irq

Re: [PATCH v2 1/2] virtio: console: rename cvq_lock to c_ivq_lock

2013-03-29 Thread Wanlong Gao
On 03/29/2013 07:00 PM, Amit Shah wrote: > The cvq_lock was taken for the c_ivq. Rename the lock to make that > obvious. > > We'll also add a lock around the c_ovq in the next commit, so there's no > ambiguity. > > Signed-off-by: Amit Shah Reviewed-by: Wanl

Re: [PATCH v2 2/2] virtio: console: add locking around c_ovq operations

2013-03-29 Thread Wanlong Gao
erial-bus.0 > > Reported-by: FuXiangChun > Signed-off-by: Amit Shah Reviewed-by: Wanlong Gao > --- > drivers/char/virtio_console.c | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_console.c > index 7e9

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

2013-04-05 Thread Wanlong Gao
On 03/28/2013 10:22 AM, Wanlong Gao wrote: > On 03/23/2013 07:28 PM, Wanlong Gao wrote: >> This series implements virtio-scsi queue steering, which gives >> performance improvements of up to 50% (measured both with QEMU and >> tcm_vhost backends). >> >> This versi

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

2013-04-06 Thread Wanlong Gao
On 04/06/2013 04:40 PM, James Bottomley wrote: > On Fri, 2013-04-05 at 16:55 +0800, Wanlong Gao wrote: >> On 03/28/2013 10:22 AM, Wanlong Gao wrote: >>> On 03/23/2013 07:28 PM, Wanlong Gao wrote: >>>> This series implements virtio-scsi queue steering, which gives &g

Re: [PATCH] virtio-scsi: Fix virtqueue affinity setup

2013-07-31 Thread Wanlong Gao
00 00 49 63 c4 48 c1 e0 04 48 8b bc 0 > 3 10 02 00 00 <48> 8b 47 20 48 8b 80 d0 01 00 00 48 8b 40 50 48 85 c0 74 07 be > RIP [] __virtscsi_set_affinity+0x6f/0x120 > RSP > CR2: 0020 > ---[ end trace 99679331a3775f48 ]--- > > CC: sta...@vger.kernel.

Re: [PATCH net 1/2] virtio-net: don't respond to cpu hotplug notifier if we're not ready

2013-10-14 Thread Wanlong Gao
ug). > > Cc: Rusty Russell > Cc: Michael S. Tsirkin > Cc: Wanlong Gao > Signed-off-by: Jason Wang Thank you. Reviewed-by: Wanlong Gao > --- > The patch is need for 3.8 and above. > --- > drivers/net/virtio_net.c | 8 > 1 file changed, 8 insertions(+) &g

Re: [PATCH] virtio-scsi: Fix hotcpu_notifier use-after-free with virtscsi_freeze

2013-10-28 Thread Wanlong Gao
On 10/28/2013 04:01 PM, Asias He wrote: > vqs are freed in virtscsi_freeze but the hotcpu_notifier is not > unregistered. We will have a use-after-free usage when the notifier > callback is called after virtscsi_freeze. > > Signed-off-by: Asias He Reviewed-by: Wanlong Gao &

Re: [PATCH net] virtio-net: correctly handle cpu hotplug notifier during resuming

2013-10-29 Thread Wanlong Gao
ng up alternatives > [ 623.194559] smpboot: Booting Node 0 Processor 1 APIC 0x1 > ... > > A correct fix is to unregister the hotcpu notifier during restore and > register a > new one in resume. > > Reported-by: Fengguang Wu > Tested-by: Fengguang Wu > Cc: Wa

Re: [PATCH 2/2] virtio-net: fix buggy features advertised by host

2014-11-12 Thread Wanlong Gao
s not advertise " > +"VIRTIO_NET_F_CTRL_VQ"); > + virtio_disable_feature(dev, VIRTIO_NET_F_CTRL_MAC_ADDR); > + } Can we use a feature array and check with one loop? The current check looks so dup? Than

Re: [PATCH] virtio: fix size computation according to the definition of struct vring_used in vring_size

2011-08-26 Thread Wanlong Gao
of(struct vring_used_elem) * num; > + + sizeof(__u16) * 2 + sizeof(struct vring_used_elem) * num; > } > > /* The following is used with USED_EVENT_IDX and AVAIL_EVENT_IDX */ Hi: I'm not deep into it, but I think you can see this

<    1   2