Next in thread → Next in month →

Re: [PATCH v4 2/6] virtio-vsock: avoid sleeping where not allowed

From
Stefan Hajnoczi <>
Date
2016-04-11T15:10:18+00:00
ID
Thread
Re: [PATCH v4 2/6] virtio-vsock: avoid sleeping where not allowed
On Thu, Mar 31, 2016 at 01:41:34PM +0200, Claudio Imbrenda wrote:
> Some functions are called in af_vsock while the thread is prepared to wait.
> Those functions are not allowed to sleep, but the virtio vsock backend
> implementation does. Some issues can be solved by shrinking the area
> influenced by the prepare_to_wait (addressed in subsequent patches).
> 
> This patch instead addresses the functions that are called to evaluate the
> conditions that decide whether to actually perform the wait or not; they
> therefore need to be called while the thread is prepared.  The issue here
> was the mutex, which introduces sleeps; since all the critical sections are
> small and simple, I changed the mutexes with spinlocks.
> 
> Signed-off-by: Claudio Imbrenda <>
> ---
>  include/linux/virtio_vsock.h            |  4 ++--
>  net/vmw_vsock/virtio_transport_common.c | 39 +++++++++++++++++----------------
>  2 files changed, 22 insertions(+), 21 deletions(-)

I'll pick patches one-by-one.

Thanks, applied to my vsock-nfs tree:
https://github.com/stefanha/qemu/commits/vsock-nfs

Stefan
Next in thread → Next in month →