[PATCH v6] x86: use lock+addl for smp_mb()

2017-10-27 Thread Michael S. Tsirkin
mfence appears to be way slower than a locked instruction - let's use lock+add unconditionally, as we always did on old 32-bit. Results: perf stat -r 10 -- ./virtio_ring_0_9 --sleep --host-affinity 0 --guest-affinity 0 Before: 0.922565990 seconds time elapsed

Re: [PATCH] virtio/ringtest: fix up need_event math

2017-10-27 Thread Michael S. Tsirkin
On Thu, Oct 26, 2017 at 10:36:47AM +0200, Cornelia Huck wrote: > On Thu, 26 Oct 2017 04:48:01 +0300 > "Michael S. Tsirkin" wrote: > > > last kicked event index must be updated unconditionally: > > even if we don't need to kick, we do not want to re-check > > the same entry for events. > > > > Si

[PATCH] virtio/ringtest: virtio_ring: fix up need_event math

2017-10-27 Thread Michael S. Tsirkin
last kicked event index must be updated unconditionally: even if we don't need to kick, we do not want to re-check the same entry for events. Reported-by: Cornelia Huck Signed-off-by: Michael S. Tsirkin --- tools/virtio/ringtest/virtio_ring_0_9.c | 24 ++-- 1 file changed, 1

Re: [PATCH] x86: Remove unnecessary return from void function

2017-10-27 Thread Ingo Molnar
* Juergen Gross wrote: > On 23/06/17 18:23, Anton Vasilyev wrote: > > The patch removes unnecessary return from void function. > > > > Found by Linux Driver Verification project (linuxtesting.org). > > > > Signed-off-by: Anton Vasilyev > > Reviewed-by: Juergen Gross Cleanup is already upst