On Tuesday, September 30, 2014 01:44:48 PM Al Patel wrote:
> Hi:
> 
> I am running qemu-kvm version 1.0
> 
> ($kvm -version
> QEMU emulator version 1.0 (qemu-kvm-1.0), Copyright (c) 2003-2008 Fabrice
> Bellard)
> 
> When I start a VM with 4 vcpus, I see about 8 threads. (the thread count
> varies ...)
> 
> 1118  1118 ?        00:00:00 kvm-irqfd-clean
>  *8767  8767 pts/4    00:03:16 kvm*
> * 8767  8770 pts/4    1-15:10:10 kvm*
> * 8767  8771 pts/4    1-14:40:42 kvm*
> * 8767  8772 pts/4    2-04:39:57 kvm*
> * 8767  8773 pts/4    08:35:51 kvm*
> * 8767 28585 pts/4    00:00:00 kvm*
> * 8767 28597 pts/4    00:00:00 kvm*
> * 8767 28598 pts/4    00:00:00 kvm*
> * 8767 28599 pts/4    00:00:00 kvm*
> * 8767 28600 pts/4    00:00:00 kvm*
>  8768  8768 ?        00:00:00 kvm-pit/8767


Probably aio emulation via a threadpool. Make sure you use aio=native and it 
won't do that.


> 
> 
> On older version of qemu (prior to the qemu/kvm binary merge), I typically
> saw 5 threads (for  4 vcpu) - which I believe  was 1 x 4 for each vcpu and
> 1 for
> the IO threads.
> 
> In the current system, what are the extra threads?
> 
> Secondly, I am currently not using libvirt and having to start qemu from
> command line. I still want to pin the vcpu to a pcpu and want to use
> taskset on a thread. Unless I know which thread is emulating the vcpu
> how can I pin that thread?
> 
> Do you have any other thoughts on the pinning part?


In qmp, you can query the info about vcpus and host threads. ("info cpus" in 
qemu monitor iirc).


> 
> Any guidance/pointers?
> 
> Thank You.


Reply via email to