qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH -V3 09/32] virtio-9p: Implement P9_TWRITE/ Threa


From: Avi Kivity
Subject: Re: [Qemu-devel] [PATCH -V3 09/32] virtio-9p: Implement P9_TWRITE/ Thread model in QEMU
Date: Tue, 30 Mar 2010 13:28:41 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.8) Gecko/20100301 Fedora/3.0.3-1.fc12 Thunderbird/3.0.3

On 03/30/2010 12:17 AM, jvrao wrote:

Excuse me for some basic questions..still trying to understand QEMU concepts..

How does IO thread is accounted for?

It's just another thread, usually a lightly loaded one.

If I start a 2 CPU QEMU, we will be occupying two physical CPUs with two VCPU 
threads
and IO thread runs on other CPUs owned by the host right? If the answer is yes, 
then
we are good as the fileserver load has to be on the host CPUs.

It's completely up to the scheduler and determined by how the iothread, vcpu threads, and other processes on the host are loaded.

You can dispatch just the system call to a thread pool.  The advantage
of doing that is that you don't need to worry about locking since the
system calls are not (usually) handling shared state.
How is locking avoided in the IO thread model? do we just have 1 IO thread
irrespective of #VCPU threads? Is is that how the locking is avoided?

When you are running qemu code you hold the qemu mutex, except when you are in the thread pool. So the iothread and vcpu threads are all mutually excluded, and defer any blocking work to other threads.

I think IO thread is used to do disk/network IO right?

It's used for completions (disk, network, timers, anything that completes asynchronously to a vcpu).

Putting 9P also on that will have any performance/scalability issues?

Yes.

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]