Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Juergen Gross
On 06/07/16 08:52, Peter Zijlstra wrote: > On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >> change fomr v1: >> a simplier definition of default vcpu_is_preempted >> skip mahcine type check on ppc, and add config. remove dedicated macro. >> add one patch to drop overload

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Peter Zijlstra
On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: > > SO it's easy for ppc to implement such interface. Note that yield_count is > > set by powerVM/KVM. > > and only pSeries can run a guest for now. :) > > > > I also review x86 related code, looks like we need add one hyer-call to get > >

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Peter Zijlstra
On Wed, Jul 06, 2016 at 09:47:18AM +0200, Juergen Gross wrote: > On 06/07/16 08:52, Peter Zijlstra wrote: > > Paolo, could you help out with an (x86) KVM interface for this? > > Xen support of this interface should be rather easy. Could you please > Cc: xen-devel-requ...@lists.xenproject.org in t

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Wanpeng Li
2016-07-06 15:58 GMT+08:00 Peter Zijlstra : > On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: >> > SO it's easy for ppc to implement such interface. Note that yield_count is >> > set by powerVM/KVM. >> > and only pSeries can run a guest for now. :) >> > >> > I also review x86 related co

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Juergen Gross
On 06/07/16 10:19, Peter Zijlstra wrote: > On Wed, Jul 06, 2016 at 09:47:18AM +0200, Juergen Gross wrote: >> On 06/07/16 08:52, Peter Zijlstra wrote: > >>> Paolo, could you help out with an (x86) KVM interface for this? >> >> Xen support of this interface should be rather easy. Could you please >>

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread xinhui
On 2016年07月06日 14:52, Peter Zijlstra wrote: On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: change fomr v1: a simplier definition of default vcpu_is_preempted skip mahcine type check on ppc, and add config. remove dedicated macro. add one patch to drop overl

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread xinhui
On 2016年07月06日 16:32, Wanpeng Li wrote: 2016-07-06 15:58 GMT+08:00 Peter Zijlstra : On Wed, Jul 06, 2016 at 02:46:34PM +0800, Wanpeng Li wrote: SO it's easy for ppc to implement such interface. Note that yield_count is set by powerVM/KVM. and only pSeries can run a guest for now. :) I also re

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 08:52, Peter Zijlstra wrote: > On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >> change fomr v1: >> a simplier definition of default vcpu_is_preempted >> skip mahcine type check on ppc, and add config. remove dedicated macro. >> add one patch to drop over

Re: [PATCH v2 2/4] powerpc/spinlock: support vcpu preempted check

2016-07-06 Thread Balbir Singh
On Tue, 2016-06-28 at 10:43 -0400, Pan Xinhui wrote: > This is to fix some lock holder preemption issues. Some other locks > implementation do a spin loop before acquiring the lock itself. Currently > kernel has an interface of bool vcpu_is_preempted(int cpu). It take the cpu

Re: [PATCH] virtio: Return correct errno for function init_vq's failure

2016-07-06 Thread Cornelia Huck
On Mon, 27 Jun 2016 10:09:18 +0800 Minfei Huang wrote: > The error number -ENOENT or 0 will be returned, if we can not allocate > more memory in function init_vq. If host can support multiple virtual > queues, and we fails to allocate necessary memory structures for vq, > kernel may crash due to

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Peter Zijlstra
On Wed, Jul 06, 2016 at 12:44:58PM +0200, Paolo Bonzini wrote: > > Paolo, could you help out with an (x86) KVM interface for this? > > If it's just for spin loops, you can check if the version field in the > steal time structure has changed. That would require remembering the old value, no? That

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Wanpeng Li
2016-07-06 18:44 GMT+08:00 Paolo Bonzini : > > > On 06/07/2016 08:52, Peter Zijlstra wrote: >> On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: >>> change fomr v1: >>> a simplier definition of default vcpu_is_preempted >>> skip mahcine type check on ppc, and add config. remove

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 14:08, Wanpeng Li wrote: > 2016-07-06 18:44 GMT+08:00 Paolo Bonzini : >> >> >> On 06/07/2016 08:52, Peter Zijlstra wrote: >>> On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: change fomr v1: a simplier definition of default vcpu_is_preempted skip

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Paolo Bonzini
On 06/07/2016 10:19, Peter Zijlstra wrote: >>> Paolo, could you help out with an (x86) KVM interface for this? >> > >> > Xen support of this interface should be rather easy. Could you please >> > Cc: xen-devel-requ...@lists.xenproject.org in the next version? > So meta question; aren't all you v

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Wanpeng Li
2016-07-06 20:28 GMT+08:00 Paolo Bonzini : > > > On 06/07/2016 14:08, Wanpeng Li wrote: >> 2016-07-06 18:44 GMT+08:00 Paolo Bonzini : >>> >>> >>> On 06/07/2016 08:52, Peter Zijlstra wrote: On Tue, Jun 28, 2016 at 10:43:07AM -0400, Pan Xinhui wrote: > change fomr v1: > a simplier d

Re: [PATCH v2 0/4] implement vcpu preempted check

2016-07-06 Thread Christian Borntraeger
On 07/06/2016 10:19 AM, Peter Zijlstra wrote: > On Wed, Jul 06, 2016 at 09:47:18AM +0200, Juergen Gross wrote: >> On 06/07/16 08:52, Peter Zijlstra wrote: > >>> Paolo, could you help out with an (x86) KVM interface for this? >> >> Xen support of this interface should be rather easy. Could you plea

Re: [PATCH net-next V4 0/6] switch to use tx skb array in tun

2016-07-06 Thread Craig Gallek
On Thu, Jun 30, 2016 at 2:45 AM, Jason Wang wrote: > Hi all: > > This series tries to switch to use skb array in tun. This is used to > eliminate the spinlock contention between producer and consumer. The > conversion was straightforward: just introdce a tx skb array and use > it instead of sk_rec