Re: [PATCH] include/qemu/bswap.h: using atomic memory load/store for word access

2021-05-17 Thread maobibo
PMM, Thanks for kindly response. I reply inline. 在 2021年05月17日 17:23, Peter Maydell 写道: > On Mon, 17 May 2021 at 03:54, Bibo Mao wrote: >> >> virtio ring buffer has lockless ring buffer scheme. When guest vcpu >> reads the memory, qemu io thread may is writing the same address. >> It requiires

Re: [PATCH] include/qemu/bswap.h: using atomic memory load/store for word access

2021-05-17 Thread Peter Maydell
On Mon, 17 May 2021 at 03:54, Bibo Mao wrote: > > virtio ring buffer has lockless ring buffer scheme. When guest vcpu > reads the memory, qemu io thread may is writing the same address. > It requiires atomic operation in qemu side, __builtin_memcpy may > read byte-by-byte. > > This patch uses fix

[PATCH] include/qemu/bswap.h: using atomic memory load/store for word access

2021-05-16 Thread Bibo Mao
virtio ring buffer has lockless ring buffer scheme. When guest vcpu reads the memory, qemu io thread may is writing the same address. It requiires atomic operation in qemu side, __builtin_memcpy may read byte-by-byte. This patch uses fix this, however it may bring negative performance effect on