qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful?
@ 2016-02-02 13:29 Stefan Hajnoczi
  2016-02-02 13:39 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-02-02 13:29 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

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?

Thanks,
Stefan

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful?
  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
  2016-02-08 16:41   ` Stefan Hajnoczi
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Kiszka @ 2016-02-02 13:39 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: qemu-devel

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] vl.c:main_loop() non-blocking TCG optimization still useful?
  2016-02-02 13:39 ` Jan Kiszka
@ 2016-02-08 16:41   ` Stefan Hajnoczi
  0 siblings, 0 replies; 3+ messages in thread
From: Stefan Hajnoczi @ 2016-02-08 16:41 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: qemu-devel

[-- Attachment #1: Type: text/plain, Size: 1263 bytes --]

On Tue, Feb 02, 2016 at 02:39:21PM +0100, Jan Kiszka wrote:
> 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.

Okay, thanks.

Stefan

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 473 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-02-08 16:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2016-02-08 16:41   ` Stefan Hajnoczi

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).