All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@siemens.com>
To: Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful?
Date: Tue, 2 Feb 2016 14:39:21 +0100	[thread overview]
Message-ID: <56B0B189.1000306@siemens.com> (raw)
In-Reply-To: <CAJSP0QXhTwqZDEDervaDx9S1oaDJ+rHFx1GiRHoDXThhLb-Krg@mail.gmail.com>

On 2016-02-02 14:29, Stefan Hajnoczi wrote:
> Hi Jan,
> In 2011 the following patch was merged to optimize I/O vs vcpu scheduling:
> 
> commit c9f711a5d31e22dac932c1c01e9c0f97caff0988
> Author: Jan Kiszka <jan.kiszka@siemens.com>
> Date:   Mon Aug 22 17:46:02 2011 +0200
> 
>     Poll main loop after I/O events were received
> 
> This was back in the days of CONFIG_IOTHREAD.  Things have changed
> quite a bit since then.
> 
> Do you think the last_io/non-blocking trick is still needed today in TCG?

The problem back then was the lock-step between io-thread and vcpus
thread: if the iothread polled with the option to block, the vcpus
thread got kicked again because the common lock was released to it. But
if the iothread did not block because of further pending io, it would
have to kick the vcpus thread immediately out of its emulation loop
again. This meant no progress for the vcpus, only sync ping-pong.

If this changed now (I lost a bit track), the need for this trick might
be gone. Maybe try the setup I described and measure the boot time of an
SMP guest with and without this trick.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA ITP SES-DE
Corporate Competence Center Embedded Linux

  reply	other threads:[~2016-02-02 13:39 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-02 13:29 [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful? Stefan Hajnoczi
2016-02-02 13:39 ` Jan Kiszka [this message]
2016-02-08 16:41   ` Stefan Hajnoczi

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=56B0B189.1000306@siemens.com \
    --to=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.