Re: Fwd: Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-26 Thread Mathieu Desnoyers
Hi Stephen,

Benjamin forwarded me your email stating:

 I have been playing with userspace-rcu which has a number of neat
 lockless routines for queuing and hashing. But there aren't kernel versions
 and several of them may require cmpxchg to work.

Just FYI, I made sure a few years ago that cmpxchg is implemented on all
architectures within the Linux kernel (using a interrupt disable
fallback on the cases where it is not supported architecturally, on
UP-only architectures), so we should be good to use the lock-free
structures as-is in the kernel on this front. As for the RCU use by
these structures, userspace RCU has very much the same semantic as in
the kernel, so we can implement and test these structures in userspace
and eventually port them to the kernel as needed.

Lai Jiangshan is actively working at making sure the user-level
implementation of the RCU lock-free hash table (currently in a
development branch of the userspace RCU git tree : urcu/ht-shrink, not
yet in master) is suitable for use in the Linux kernel too.

Best regards,

Mathieu

-- 
Mathieu Desnoyers
Operating System Efficiency RD Consultant
EfficiOS Inc.
http://www.efficios.com
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization


Re: [PATCH] vhost-net: Acquire device lock when releasing device

2011-11-26 Thread David Miller
From: Sasha Levin levinsasha...@gmail.com
Date: Fri, 18 Nov 2011 11:19:42 +0200

 Device lock should be held when releasing a device, and specifically
 when calling vhost_dev_cleanup(). Otherwise, RCU complains about it:
 ...
 Cc: Michael S. Tsirkin m...@redhat.com
 Cc: k...@vger.kernel.org
 Cc: virtualization@lists.linux-foundation.org
 Cc: net...@vger.kernel.org
 Signed-off-by: Sasha Levin levinsasha...@gmail.com

Michael et al., are you guys going to gather this fix or should I
apply it directly to thet net tree?

Thanks.
___
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization