qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] spawning and killing threads in qemu


From: 陳韋任
Subject: Re: [Qemu-devel] spawning and killing threads in qemu
Date: Tue, 7 Feb 2012 10:44:08 +0800
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Stefan,

  Thanks for the explanation. :)

> >   Qemu 1.0 enable IO thread by default, I think that's why you can see 
> > there are
> > two threads. You can check block/raw-posix-aio.h, posix-aio-compat.c and 
> > linux-aio.c.
> 
> --enable-io-thread is different from posix-aio-compat.c's thread pool.

  The option "--enable-io-thread" should have been gone sine QEMU 1.0, right?
Or you just use the term to mean IO thread?
 
> --enable-io-thread means there is a dedicated thread (created at
> startup) which runs the event loop.

  I want to know where IO thread is lauched but I am lost in vl.c. Would you
mind to shed some light on that?
 
> The temporary threads you are seeing are indeed posix-aio-compat.c
> worker threads.  They execute blocking I/O system calls so that the QEMU
> event loop can continue to process events while I/O operations are
> running.

  So, IO thread runs the event loop (I think it's main_loop_wait in main-loop.c,
right?), and it leave blocking I/O system calls to posix-aio-compat.c worker
threads? Is that correct?

  Thanks!

Regards,
chenwj

-- 
Wei-Ren Chen (陳韋任)
Computer Systems Lab, Institute of Information Science,
Academia Sinica, Taiwan (R.O.C.)
Tel:886-2-2788-3799 #1667
Homepage: http://people.cs.nctu.edu.tw/~chenwj



reply via email to

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