All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] Revert "posix-aio-compat: avoid signal race when spawning a thread"
Date: Thu, 08 Oct 2009 16:51:02 -0500	[thread overview]
Message-ID: <4ACE5EC6.3000805@codemonkey.ws> (raw)
In-Reply-To: <20091008212421.GA7229@redhat.com>

Michael S. Tsirkin wrote:
> BTW, tried looking at the code.
> I saw some (unrelated) issues:
>
> static void aio_signal_handler(int signum)
> {
>     if (posix_aio_state) {
>         char byte = 0;
>
>         write(posix_aio_state->wfd, &byte, sizeof(byte));
>     }
>
>     qemu_service_io();
> }
>
> And qemu_service_io does a *ton* of things.
>   

It just does a cpu_exit().

> Questions:
> -  Do we need the call to qemu_service_io? Seems to
>    behave the same with and without it.
>   

Where you run into trouble is when you have a guest that has no periodic 
timer  and needs a mechanism to break out of the tcg loop whenever an IO 
operation completes.  See


Author: aliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Date:   Wed Oct 8 19:50:24 2008 +0000

    Fix IO performance regression in sparc

> -  Are all of the data structures touched by qemu_service_io
>    protected by blocking signals before access?
>   

cpu_exit is pretty careful to not do anything that could be racey.

> Also:
> 	- let's use signalfd on linux, if available?
>   

signalfd doesn't help.  In fact, we originally used signalfd and it 
caused a regression.

> 	- for SIGALARM, maybe timerfd?
>   

Or just get rid of SIGALARM...

Regards,

Anthony Liguori

  parent reply	other threads:[~2009-10-08 21:51 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-07 13:20 [Qemu-devel] [PATCH] Revert "posix-aio-compat: avoid signal race when spawning a thread" Michael S. Tsirkin
2009-10-07 16:04 ` [Qemu-devel] " malc
2009-10-07 16:28   ` Anthony Liguori
2009-10-07 16:33     ` Michael S. Tsirkin
2009-10-07 20:44     ` Michael S. Tsirkin
2009-10-07 20:54       ` malc
2009-10-07 20:55         ` Michael S. Tsirkin
2009-10-07 21:01           ` malc
2009-10-08  1:47             ` Jamie Lokier
2009-10-08  2:48               ` malc
2009-10-08 15:15                 ` Jamie Lokier
2009-10-08 16:39                   ` malc
2009-10-09 11:12                     ` Jamie Lokier
2009-10-09 13:13                       ` malc
2009-10-08 21:24                   ` Michael S. Tsirkin
2009-10-08 21:50                     ` Anthony Liguori
2009-10-08 21:51                     ` Anthony Liguori [this message]
2009-10-09 11:13                     ` Jamie Lokier

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=4ACE5EC6.3000805@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=mst@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 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.