mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2025-02-21 19:02:30 +00:00
The DiskFile will need to be shared across multiple threads when running multiple queues across these threads. That's why it needs to be put inside an Arc. The reason for the Mutex is because execute() expects a mutable object implementing Read + Write + Seek. Unfortunately, this create a contention point as the object needs to be locked from each thread, reducing the performance gain we will get with multiple threads. The need for an immutable object would solve this problem, and it will be addressed later through follow up patches. Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>