qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: malc <av1474@comtv.ru>
Cc: Glauber Costa <glommer@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Main loop
Date: Sun, 27 Sep 2009 09:05:43 -0500	[thread overview]
Message-ID: <4ABF7137.1040502@codemonkey.ws> (raw)
In-Reply-To: <Pine.LNX.4.64.0909271448440.3924@linmac.oyster.ru>

malc wrote:
> On Sat, 26 Sep 2009, Anthony Liguori wrote:
>
>   
>> malc wrote:
>>     
>>> At http://repo.or.cz/w/qemu/malc.git?a=shortlog;h=refs/heads/mtloop you
>>> can find the branch which refactors main execution loop somewhat, effects
>>> include:
>>>
>>> a. Host alarm timers are gone
>>> b. IO thread is replaced (now Windows is supported too)
>>>   
>>>       
>> What was the motivation?
>>     
>
> To have working audio on my 250 Hz system, where audio polling mode
> ensures that wakeups happen at ~1Khz (with sufficiently small fragment
> size) thus allowing Fast Tracker 2 to run properly. IOW this approach
> allows to react to FD activity indpendantly of any timers.
>   

Ah, yes.  This is also addressed by the IO thread FWIW.  The IO thread 
can run select without holding a mutex and can send a signal to the TCG 
thread in order to break it's execution out before attempting to acquire 
the global mutex.

> Things i forgot to mention, slirp crawls (i.e. when sending some file
> with nc to the guest the (hidden[1]) cpu utilization is only at ~50%
> and subsequently it takes (relative to alarm mode) forever for transfer
> to finnish, FWIW same problem plagues IO Thread)
>   

The slirp issue is that it has a hook in the polling loop.  The IO 
thread doesn't suffer from this problem because slirp is driven in the 
IO thread itself which still receives regular signals.

FWIW, I consider the fact that slirp (or anything else) requires 
periodic polling to be a bug.

> This is the 5 or 6th internal iteration of the thing, at one point i had
> a system working where tcg only held the locks during the IO/helpers, but
> in the end complexity wasn't worth it.
>   

Glauber spent some time with the IO thread recently.  Any reason you 
didn't start with the existing IO thread (besides the fact that it 
doesn't work with TCG)?

Regards,

Anthony Liguori

  reply	other threads:[~2009-09-27 14:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-26 23:55 [Qemu-devel] Main loop malc
2009-09-27  0:49 ` Anthony Liguori
2009-09-27 10:55   ` malc
2009-09-27 14:05     ` Anthony Liguori [this message]
2009-09-27 14:39       ` malc
2009-09-28 13:57         ` Glauber Costa
2009-09-28 18:50           ` malc
2009-09-28 19:35             ` Anthony Liguori
2009-09-28 21:21               ` Glauber Costa
2009-09-28 23:57           ` malc
2009-09-27 14:31     ` malc
2009-09-27 14:23 ` Blue Swirl
2009-09-27 14:35   ` malc
2009-09-27 17:43 ` malc
     [not found] ` <m3fxa7jug0.fsf@neno.mitica>
2009-09-28  9:42   ` [Qemu-devel] " malc
     [not found]     ` <m3pr9bidy9.fsf@neno.mitica>
2009-09-28 10:19       ` malc

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4ABF7137.1040502@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=av1474@comtv.ru \
    --cc=glommer@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).