Re: [PATCH] virtio-blk: Generate uevent after attribute available

2016-06-28 Thread Fam Zheng
On Tue, 06/28 04:45, Christoph Hellwig wrote: > On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote: > > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that > > point we haven't created the serial attribute file, therefore depending > > on how fast udev reacts, the /dev/di

Re: [PATCH] virtio-blk: Generate uevent after attribute available

2016-06-28 Thread Christoph Hellwig
On Tue, Jun 28, 2016 at 10:39:15AM +0800, Fam Zheng wrote: > Userspace listens to the KOBJ_ADD uevent generated in add_disk. At that > point we haven't created the serial attribute file, therefore depending > on how fast udev reacts, the /dev/disk/by-id/ entry doesn't always get > created. > > Thi

[PATCH v2 4/4] kernel/locking: Drop the overload of {mutex, rwsem}_spin_on_owner

2016-06-28 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in the two spin_on_owner. This blames on the lock holder preemption issue. Kernel has an interface bool vcpu_is_preempted(int cpu) to see if a vCPU is currently running or not. So break the spin loops on true condition. test-

[PATCH v2 3/4] locking/osq: Drop the overload of osq_lock()

2016-06-28 Thread Pan Xinhui
An over-committed guest with more vCPUs than pCPUs has a heavy overload in osq_lock(). This is because vCPU A hold the osq lock and yield out, vCPU B wait per_cpu node->locked to be set. IOW, vCPU B wait vCPU A to run and unlock the osq lock. Kernel has an interface bool vcpu_is_preempted(int cpu

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

2016-06-28 Thread Pan Xinhui
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 as parameter and return true if the cpu is preempted. Then kernel can break the s

[PATCH v2 0/4] implement vcpu preempted check

2016-06-28 Thread Pan Xinhui
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 of rwsem_spin_on_owner and mutex_spin_on_owner. add more comments thanks boqun and Pete

[PATCH v2 1/4] kernel/sched: introduce vcpu preempted check interface

2016-06-28 Thread Pan Xinhui
This patch support to fix lock holder preemption issue. For kernel users, we could use bool vcpu_is_preempted(int cpu) to detech if one vcpu is preempted or not. The default implementation is a macro defined by false. So compiler can wrap it out if arch dose not support such vcpu pteempted check.

Re: [PATCH net-next V2] tun: introduce tx skb ring

2016-06-28 Thread Michael S. Tsirkin
On Thu, Jun 23, 2016 at 01:14:07PM +0800, Jason Wang wrote: > > > On 2016年06月23日 02:18, Michael S. Tsirkin wrote: > > On Fri, Jun 17, 2016 at 03:41:20AM +0300, Michael S. Tsirkin wrote: > > > >Would it help to have ptr_ring_resize that gets an array of > > > >rings and resizes them both to same l