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.