Hello Paolo,
On 6/16/2025 5:11 PM, Paolo Bonzini wrote:
Il lun 16 giu 2025, 21:00 Annie Li <annie.li@oracle.com> ha scritto:> My understanding of the qemu document is that it's OK to run one
> helper per QEMU or even per host, but multiple disks shouldn't share
> the same socket since it is possible that multiple commands may be
> sent concurrently.
>> Maybe QEMU has some internal lock that does the right thing and
>> serializes requests?
Multiple disks can share the socket, the serialization of requests is handled with a mutex in scsi/pr-manager-helper.c.Thanks a lot for the clarification.
I was only focusing on the qemu-pr-helper source code, haven't checked pr-manager-helper yet, will definitely take a look.
Looks the following document is misleading,
https://www.qemu.org/docs/master/interop/pr-helper.html
Since there is a mutex handling the requests from multiple disk over one socket, I suppose the statement "It is invalid to send multiple commands concurrently on the same socket." can be removed