Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Peter Xu
On Thu, Aug 29, 2024 at 11:05:15AM -0400, Michael S. Tsirkin wrote: > > Personally I still prefer we look into why a separate mutex won't work and > > why that timed out; that could be part of whoever is going to investigate > > the whole issue (including the hang later on). Otherwise I'm ok from >

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 10:29:24AM -0400, Peter Xu wrote: > On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > > Hello Michael, > > > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > > Weird. Seems to indicate some kind of deadlock? > > > > * Such a deadlock should oc

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Peter Xu
On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > Hello Michael, > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > Weird. Seems to indicate some kind of deadlock? > > * Such a deadlock should occur across all environments I guess, not > sure why it happens selective

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 02:45:45PM +0530, Prasad Pandit wrote: > Hello Michael, > > On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > > Weird. Seems to indicate some kind of deadlock? > > * Such a deadlock should occur across all environments I guess, not > sure why it happens selective

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Prasad Pandit
Hello Michael, On Thu, 29 Aug 2024 at 13:12, Michael S. Tsirkin wrote: > Weird. Seems to indicate some kind of deadlock? * Such a deadlock should occur across all environments I guess, not sure why it happens selectively. It is strange. > So maybe vhost_user_postcopy_end should take the BQL? =

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-29 Thread Michael S. Tsirkin
On Wed, Aug 28, 2024 at 03:39:14PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > QEMU threads use vhost_user_write/read calls to send > and receive request/reply messages from a vhost-user > device. When multiple threads communicate with the > same vhost-user device, they can receive each

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-28 Thread Michael S. Tsirkin
On Thu, Aug 29, 2024 at 11:09:44AM +0530, Prasad Pandit wrote: > On Wed, 28 Aug 2024 at 16:45, Michael S. Tsirkin wrote: > > > - Place QEMU_LOCK_GUARD near the vhost_user_write() calls, holding > > >the lock for longer fails some tests during rpmbuild(8). > > > > what do you mean fails rpmbui

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-28 Thread Prasad Pandit
On Wed, 28 Aug 2024 at 16:45, Michael S. Tsirkin wrote: > > - Place QEMU_LOCK_GUARD near the vhost_user_write() calls, holding > >the lock for longer fails some tests during rpmbuild(8). > > what do you mean fails rpmbuild? that qemu with this patch can not be > compiled? * In V1 of this pa

Re: [PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-28 Thread Michael S. Tsirkin
On Wed, Aug 28, 2024 at 03:39:14PM +0530, Prasad Pandit wrote: > From: Prasad Pandit > > QEMU threads use vhost_user_write/read calls to send > and receive request/reply messages from a vhost-user > device. When multiple threads communicate with the > same vhost-user device, they can receive each

[PATCH v2 2/2] vhost-user: add a request-reply lock

2024-08-28 Thread Prasad Pandit
From: Prasad Pandit QEMU threads use vhost_user_write/read calls to send and receive request/reply messages from a vhost-user device. When multiple threads communicate with the same vhost-user device, they can receive each other's messages, resulting in an erroneous state. When fault_thread exit