Race condition in vfio will cause deadwait

2017-07-25 Thread Wanlong Gao
From: Wen Congyang Hi, Alex Williamson When using vfio, we encounter a problem: too many lspci processes are blocked in D state. I analyzed all processes, and found one process is blocked in pci_dev_lock(), another process is blocked in vfio_del_group_put(). I checked the backtrace, and found

[PATCH v2] modpost: abort if module name is too long

2017-06-30 Thread Wanlong Gao
perly. Signed-off-by: Wanlong Gao --- scripts/mod/modpost.c | 29 - 1 file changed, 24 insertions(+), 5 deletions(-) diff --git a/scripts/mod/modpost.c b/scripts/mod/modpost.c index 30d752a..cb16985 100644 --- a/scripts/mod/modpost.c +++ b/scripts/mod/modpost.c @@ -47,6 +

Re: [PATCH] modpost: abort if a module name is too long

2017-06-22 Thread Wanlong Gao
On 2017/6/22 22:25, Jessica Yu wrote: > +++ Wanlong Gao [22/06/17 09:11 +0800]: >> >> >> On 2017/6/22 0:09, Jessica Yu wrote: >>> +++ Jessica Yu [06/06/17 20:41 -0700]: >>>> +++ Wanlong Gao [06/06/17 09:07 +0800]: >>>>> >>>>&g

Re: [PATCH] modpost: abort if a module name is too long

2017-06-21 Thread Wanlong Gao
On 2017/6/22 0:09, Jessica Yu wrote: > +++ Jessica Yu [06/06/17 20:41 -0700]: >> +++ Wanlong Gao [06/06/17 09:07 +0800]: >>> >>> >>> On 2017/6/5 10:09, Jessica Yu wrote: >>>> +++ Wanlong Gao [02/06/17 11:04 +0800]: >>>>> >>>

Re: [PATCH] modpost: abort if a module name is too long

2017-06-05 Thread Wanlong Gao
On 2017/6/5 10:09, Jessica Yu wrote: > +++ Wanlong Gao [02/06/17 11:04 +0800]: >> >> >> On 2017/6/2 7:23, Jessica Yu wrote: >>> +++ Wanlong Gao [31/05/17 11:48 +0800]: >>>> >>>> >>>> On 2017/5/31 11:30, Jessica Yu wrot

Re: [PATCH] modpost: abort if a module name is too long

2017-06-01 Thread Wanlong Gao
On 2017/6/2 11:04, Wanlong Gao wrote: > > > On 2017/6/2 7:23, Jessica Yu wrote: >> +++ Wanlong Gao [31/05/17 11:48 +0800]: >>> >>> >>> On 2017/5/31 11:30, Jessica Yu wrote: >>>> +++ Wanlong Gao [31/05/17 10:23 +0800]: >>>

Re: [PATCH] modpost: abort if a module name is too long

2017-06-01 Thread Wanlong Gao
On 2017/6/2 7:23, Jessica Yu wrote: > +++ Wanlong Gao [31/05/17 11:48 +0800]: >> >> >> On 2017/5/31 11:30, Jessica Yu wrote: >>> +++ Wanlong Gao [31/05/17 10:23 +0800]: >>>> Hi Jessica, >>>> >>>> On 2017/5/29 17:10, Jessica

Re: [PATCH] modpost: abort if a module name is too long

2017-06-01 Thread Wanlong Gao
Jessica, On 2017/5/31 11:48, Wanlong Gao wrote: > > > On 2017/5/31 11:30, Jessica Yu wrote: >> +++ Wanlong Gao [31/05/17 10:23 +0800]: >>> Hi Jessica, >>> >>> On 2017/5/29 17:10, Jessica Yu wrote: >>>> +++ Xie XiuQi [20/05/17 15:46 +0800]:

Re: [PATCH] modpost: abort if a module name is too long

2017-05-30 Thread Wanlong Gao
On 2017/5/31 11:30, Jessica Yu wrote: > +++ Wanlong Gao [31/05/17 10:23 +0800]: >> Hi Jessica, >> >> On 2017/5/29 17:10, Jessica Yu wrote: >>> +++ Xie XiuQi [20/05/17 15:46 +0800]: >>>> From: Wanlong Gao >>>> >>>> Module name ha

Re: [PATCH] modpost: abort if a module name is too long

2017-05-30 Thread Wanlong Gao
Hi Jessica, On 2017/5/31 11:30, Jessica Yu wrote: > +++ Wanlong Gao [31/05/17 10:23 +0800]: >> Hi Jessica, >> >> On 2017/5/29 17:10, Jessica Yu wrote: >>> +++ Xie XiuQi [20/05/17 15:46 +0800]: >>>> From: Wanlong Gao >>>> >>>>

Re: [PATCH] modpost: abort if a module name is too long

2017-05-30 Thread Wanlong Gao
Hi Jessica, On 2017/5/29 17:10, Jessica Yu wrote: > +++ Xie XiuQi [20/05/17 15:46 +0800]: >> From: Wanlong Gao >> >> Module name has a limited length, but currently the build system >> allows the build finishing even if the module name is too long. >> >

Re: [PATCH] modpost: abort if a module name is too long

2017-05-24 Thread Wanlong Gao
Folks, Any comments? On 2017/5/20 15:46, Xie XiuQi wrote: > From: Wanlong Gao > > Module name has a limited length, but currently the build system > allows the build finishing even if the module name is too long. > > CC >

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

[BUG] LTP test case readahead01 fails after commit 63d0f0a3c7

2013-12-19 Thread Wanlong Gao
force_page_cache_readahead(): if (unlikely(!mapping->a_ops->readpage && !mapping->a_ops->readpages)) return -EINVAL; ========= I think you must know which is right? Thanks, Wanlong Gao [1]: commit 63d0f0a3c7e1281fd79268a8d988167e

Re: [net-next/master PATCH] lib: fix compile warning in hashlib_init

2013-12-18 Thread Wanlong Gao
On 12/19/2013 09:32 AM, Daniel Borkmann wrote: > On 12/19/2013 02:15 AM, Fengguang Wu wrote: >> CC the list. >> >> On Thu, Dec 19, 2013 at 09:08:34AM +0800, Wanlong Gao wrote: >>> /git/linux/lib/hash.c: In function 'hashlib_init': >>> /git/linu

mqueue perf data

2013-12-09 Thread Wanlong Gao
Hi Fengguang, Do we need to stat out the perf data of mqueue test in kernel_selftests? It's like following. Thanks, Wanlong Gao # make run_tests -C mqueue make: Entering directory `/git/linux/tools/testing/selftests/mqueue' Initial system state: Using

Re: [PATCH] sh: fix kernel build error

2013-11-13 Thread Wanlong Gao
On 11/14/2013 02:14 AM, Sergei Shtylyov wrote: > Hello. > > On 11/13/2013 05:38 PM, Wanlong Gao wrote: > >> arch/sh/kernel/kgdb.c: In function 'sleeping_thread_to_gdb_regs': >>>> arch/sh/kernel/kgdb.c:225:32: error: implicit declaration of function

[PATCH] sh: fix kernel build error

2013-11-13 Thread Wanlong Gao
nction) arch/sh/kernel/kgdb.c:310:27: note: each undeclared identifier is reported only once for each function it appears in cc1: all warnings being treated as errors This is introduced by commit 16559ae. CC: kbuild-...@01.org Reported-by: Fengguang Wu Signed-off-by: Wanlong Gao --- arch/

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 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: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7

2013-04-18 Thread Wanlong Gao
ay without the new TP. Thank you for investigating this. And sorry for my incompleted panic picture before that let you detour. :-( Regards, Wanlong Gao > > Thanks. > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7

2013-04-18 Thread Wanlong Gao
On 04/18/2013 10:30 PM, Jens Axboe wrote: > On Thu, Apr 18 2013, Wanlong Gao wrote: >> On 04/18/2013 09:35 PM, Jens Axboe wrote: >>> On Thu, Apr 18 2013, Wanlong Gao wrote: >>>>> A bio is always fully initialized, regardless of which internal >>>>

Re: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7

2013-04-18 Thread Wanlong Gao
On 04/18/2013 10:30 PM, Jens Axboe wrote: > On Thu, Apr 18 2013, Wanlong Gao wrote: >> On 04/18/2013 09:35 PM, Jens Axboe wrote: >>> On Thu, Apr 18 2013, Wanlong Gao wrote: >>>>> A bio is always fully initialized, regardless of which internal >>>>

Re: [BUG REPORT] Kernel panic on 3.9.0-rc7-4-gbb33db7

2013-04-18 Thread Wanlong Gao
On 04/18/2013 09:35 PM, Jens Axboe wrote: > On Thu, Apr 18 2013, Wanlong Gao wrote: >>> A bio is always fully initialized, regardless of which internal >>> allocator it came from. If people are doing private kmallocs, then they >>> better be using bio_init() as well

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 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-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 >

[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 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 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 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

[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 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 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

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

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

[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 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

[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 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 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 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 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(+), 69 d

[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 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 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 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 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 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 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

[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 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

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 >

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-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 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 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 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 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 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 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 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 > +++

[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 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] 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 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:

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 V7 0/3] handle polling errors in vhost/vhost_net

2013-01-28 Thread Wanlong Gao
aitqueue after the polling > failure. Fix this by: > > - examing the POLLERR when setting backend and report erros to userspace > - let tun always add to waitqueue in .poll() after the queue is created even > if > it was detached. Fixed my kernel oops here, thank you. Tested-

[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: virtualizat...@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

[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: virtualizat...@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: virtualizat...@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
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 cpus !=

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

[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: virtualizat...@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao

[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: virtualizat...@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 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: virtualizat...@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

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

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 1/1] Drivers: scsi: storvsc: Initialize the sglist

2013-01-24 Thread Wanlong Gao
On 01/25/2013 09:04 AM, K. Y. Srinivasan wrote: > Properly initialize scatterlist before using it. > > Signed-off-by: K. Y. Srinivasan > Cc: Stable Reviewed-by: Wanlong Gao > --- > drivers/scsi/storvsc_drv.c |1 + > 1 files changed, 1 insertions(+), 0 deletions

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 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 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

[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: virtualizat...@lists.linux-foundation.org Cc: net...@vger.kernel.org Signed-off-by: Wanlong Gao --- V5->V6: NEW drivers/net/virt

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

2013-01-21 Thread Wanlong Gao
umazet Cc: virtualizat...@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

[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: virtualizat...@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

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 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: virtualizat...@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: virtualizat...@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: [PATCHSET] workqueue: remove gcwq and make worker_pool the only backend abstraction

2013-01-16 Thread Wanlong Gao
emove gcwq usages. > > 0015-0017 remove gcwq and cleanup afterwards. > > This patchset is on top of wq/for-3.9 023f27d3d6f ("workqueue: fix > find_worker_executing_work() brekage from hashtable conversion") and > available in the following git branch. > &g

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 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

[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 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: virtualizat...@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: virtualizat...@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

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

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

  1   2   >