On Sat, Apr 01, 2017 at 11:54:35AM +0800, PERSIST wrote: > I want to create a specific thread for each process in VM so that virtio > block requests from each process can be sumbitted in the thread related to > the process. > I tried to implement it by referring to dataplane,but I can not understand > the source about dataplane. > What should I do?
It sounds like QEMU can already do what you want: 1. Define -object iothread for each guest process that needs a dedicated dataplane thread. 2. Define -device virtio-blk-pci,iothread=iothread for each block device. It wasn't clear from your email but I'm assuming here that every guest process operates on its own disk image file. QEMU does not support true multiqueue disk I/O to a single image file yet. You should also bind the iothreads to host logical CPUs, bind vcpu threads to host logical CPUs, and bind the guest processes to vcpus. That way each guest process has a dedicated host CPU and iothread. Stefan
signature.asc
Description: PGP signature