qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] scheduling of qemu threads
@ 2008-07-31 15:50 David S. Ahern
  2008-07-31 16:02 ` [Qemu-devel] " Anthony Liguori
  0 siblings, 1 reply; 3+ messages in thread
From: David S. Ahern @ 2008-07-31 15:50 UTC (permalink / raw)
  To: Anthony Liguori, qemu-devel

Last week or so Anthony made a comment about qemu basically being single
threaded given its global mutex. What are the impacts to simultaneous
scheduling of qemu threads? As I understand it, qemu has a main thread,
a monitor thread, an IO thread and a thread for each vcpu. Can 2 or more
vcpu threads run concurrently? Can a vcpu thread and an IO thread run
concurrently? Does kvm alter the concurrency?

david

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: scheduling of qemu threads
  2008-07-31 15:50 [Qemu-devel] scheduling of qemu threads David S. Ahern
@ 2008-07-31 16:02 ` Anthony Liguori
  2008-08-01 11:50   ` David S. Ahern
  0 siblings, 1 reply; 3+ messages in thread
From: Anthony Liguori @ 2008-07-31 16:02 UTC (permalink / raw)
  To: David S. Ahern; +Cc: qemu-devel

David S. Ahern wrote:
> Last week or so Anthony made a comment about qemu basically being single
> threaded given its global mutex. What are the impacts to simultaneous
> scheduling of qemu threads? As I understand it, qemu has a main thread,
> a monitor thread, an IO thread and a thread for each vcpu. Can 2 or more
> vcpu threads run concurrently? Can a vcpu thread and an IO thread run
> concurrently? Does kvm alter the concurrency?
>   

All threads run in lock-step except when a VCPU is running (via 
kvm_run).  So a VCPU can run while the IO thread is active.  Only one 
VCPU can execute IO at a given time though.

Regards,

Anthony Liguori

> david
>   

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Qemu-devel] Re: scheduling of qemu threads
  2008-07-31 16:02 ` [Qemu-devel] " Anthony Liguori
@ 2008-08-01 11:50   ` David S. Ahern
  0 siblings, 0 replies; 3+ messages in thread
From: David S. Ahern @ 2008-08-01 11:50 UTC (permalink / raw)
  To: Anthony Liguori; +Cc: qemu-devel

Anthony Liguori wrote:
> David S. Ahern wrote:
>> Last week or so Anthony made a comment about qemu basically being single
>> threaded given its global mutex. What are the impacts to simultaneous
>> scheduling of qemu threads? As I understand it, qemu has a main thread,
>> a monitor thread, an IO thread and a thread for each vcpu. Can 2 or more
>> vcpu threads run concurrently? Can a vcpu thread and an IO thread run
>> concurrently? Does kvm alter the concurrency?
>>   
> 
> All threads run in lock-step except when a VCPU is running (via
> kvm_run).  So a VCPU can run while the IO thread is active.  Only one
> VCPU can execute IO at a given time though.

Not to be dense, but do you mean yes 2 or more vcpu threads can be run
at the same time? I ask because it does not make sense for them not to
be performance wise, but at the same time following the code from
kvm_main_loop_cpu() to kvm_run() I do not see the qemu_mutex unlocked
before the ioctl(). I only see it unlocked in kvm_main_loop_wait().

thanks,
david

> 
> Regards,
> 
> Anthony Liguori
> 
>> david
>>   
> 
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-08-01 11:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-31 15:50 [Qemu-devel] scheduling of qemu threads David S. Ahern
2008-07-31 16:02 ` [Qemu-devel] " Anthony Liguori
2008-08-01 11:50   ` David S. Ahern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).