Re: [dpdk-dev] [snabb-devel] Re: memory barriers in virtq.lua?

2015-04-08 Thread Luke Gorrie
Howdy, On 8 April 2015 at 17:15, Xie, Huawei huawei@intel.com wrote: luke: 1. host read the flag. 2 guest toggles the flag 3.guest checks the used. 4. host update used. Is this your case? Yep, that is exactly the case I mean. Cheers, -Luke

Re: [Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen

2015-04-08 Thread David Vrabel
On 07/04/15 03:55, Waiman Long wrote: This patch adds the necessary Xen specific code to allow Xen to support the CPU halting and kicking operations needed by the queue spinlock PV code. This basically looks the same as the version I wrote, except I think you broke it. +static void

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 17:52:28 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:19:31PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 17:01:31 +0200 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Tue, 07 Apr 2015 14:19:31 +0200 Greg Kurz gk...@linux.vnet.ibm.com wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare

Re: [PATCH v3 7/7] vhost: feature to set the vring endianness

2015-04-08 Thread Greg Kurz
On Tue, 7 Apr 2015 18:11:29 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Apr 07, 2015 at 02:19:31PM +0200, Greg Kurz wrote: This patch brings cross-endian support to vhost when used to implement legacy virtio devices. Since it is a relatively rare situation, the feature

Re: [PATCH] virtio_ring: Update weak barriers to use dma_wmb/rmb

2015-04-08 Thread Michael S. Tsirkin
On Tue, Apr 07, 2015 at 05:47:42PM -0700, Alexander Duyck wrote: This change makes it so that instead of using smp_wmb/rmb which varies depending on the kernel configuration we can can use dma_wmb/rmb which for most architectures should be equal to or slightly more strict than smp_wmb/rmb.

Re: [dpdk-dev] [snabb-devel] Re: memory barriers in virtq.lua?

2015-04-08 Thread Xie, Huawei
On 4/7/2015 10:23 PM, Luke Gorrie wrote: Hi Michael, I'm writing to follow up the previous discussion about memory barriers in virtio-net device implementations, and Cc'ing the DPDK list because I believe this is relevant to them too. First, thanks again for getting in touch and reviewing

Re: [PATCH] virtio_config: reorder functions

2015-04-08 Thread Michael S. Tsirkin
On Tue, Mar 31, 2015 at 05:17:25PM +0200, Michael S. Tsirkin wrote: This simply reorders functions in virtio_config so width access wrapper helpers are all together. Drops an extra empty line while we are at it. Signed-off-by: Michael S. Tsirkin m...@redhat.com Ping ---

Re: [PATCH] virtio_ring: Update weak barriers to use dma_wmb/rmb

2015-04-08 Thread Alexander Duyck
On 04/08/2015 01:42 AM, Michael S. Tsirkin wrote: On Tue, Apr 07, 2015 at 05:47:42PM -0700, Alexander Duyck wrote: This change makes it so that instead of using smp_wmb/rmb which varies depending on the kernel configuration we can can use dma_wmb/rmb which for most architectures should be

[PATCH v15 16/16] unfair qspinlock: a queue based unfair lock

2015-04-08 Thread Waiman Long
For a virtual guest with the qspinlock patch, a simple unfair byte lock will be used if PV spinlock is not configured in or the hypervisor isn't either KVM or Xen. The byte lock works fine with small guest of just a few vCPUs. On a much larger guest, however, byte lock can have serious performance

Re: [PATCH] virtio_ring: Update weak barriers to use dma_wmb/rmb

2015-04-08 Thread Michael S. Tsirkin
On Wed, Apr 08, 2015 at 07:41:49AM -0700, Alexander Duyck wrote: On 04/08/2015 01:42 AM, Michael S. Tsirkin wrote: On Tue, Apr 07, 2015 at 05:47:42PM -0700, Alexander Duyck wrote: This change makes it so that instead of using smp_wmb/rmb which varies depending on the kernel configuration we

Re: [Xen-devel] [PATCH v15 12/15] pvqspinlock, x86: Enable PV qspinlock for Xen

2015-04-08 Thread Waiman Long
On 04/08/2015 08:01 AM, David Vrabel wrote: On 07/04/15 03:55, Waiman Long wrote: This patch adds the necessary Xen specific code to allow Xen to support the CPU halting and kicking operations needed by the queue spinlock PV code. This basically looks the same as the version I wrote, except I

Re: [PATCH] virtio_ring: Update weak barriers to use dma_wmb/rmb

2015-04-08 Thread Alexander Duyck
On 04/08/2015 11:37 AM, Michael S. Tsirkin wrote: On Wed, Apr 08, 2015 at 07:41:49AM -0700, Alexander Duyck wrote: On 04/08/2015 01:42 AM, Michael S. Tsirkin wrote: On Tue, Apr 07, 2015 at 05:47:42PM -0700, Alexander Duyck wrote: This change makes it so that instead of using smp_wmb/rmb which