From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Linux SIGIO handling changes
Date: Mon, 21 Apr 2008 10:43:25 -0500 [thread overview]
Message-ID: <480CB61D.8050507@codemonkey.ws> (raw)
In-Reply-To: <480C98B3.7050905@qumranet.com>
Avi Kivity wrote:
> Anthony Liguori wrote:
>> Anders Melchiorsen wrote:
>>> I am resending this patch, split into two parts now.
>>>
>>> This cleans up SIGIO handling to improve latency:
>>> - SIGALRM for alarm timers
>>> - enable SIGIO on qemu_set_fd_handler2()
>>>
>>> The issue was found in KVM, where it is much more visible,
>>> because there is no periodic timer. However, it has been
>>> confirmed (by Aurelien Jarno) that even for qemu, this
>>> approach "improves network transfers in a huge way".
>>>
>>> Please apply, or give a firm rejection so I can stop resending.
>>>
>>
>> Probably the right thing to do is the direction KVM is moving toward,
>> i.e. have a separate IO thread.
>>
>> Setting SIGIO on every file descriptor is really just a hack to break
>> out of the cpu exec loop. It's unclear to me whether it's really
>> always the right thing to do for every file descriptor.
>>
>
> Even with a separate iothread one needs the signals, as there is no
> other race-free way to poll for both aio completions and fd readiness.
Unless you emulate signalfd() using a thread. FWIW, I've been thinking
of implementing something similar to posix-aio (using a thread-pool for
AIO) for QEMU to get a bit more control for this sort of thing.
posix-aio is a pretty unfortunate interface as it doesn't provide a
mechanism to do asynchronous fdatasync() nor individual vector requests.
Regards,
Anthony Liguori
Regards,
Anthony Liguori
> [well, pselect works, but I dislike it and it isn't present on all
> kernels]
>
next prev parent reply other threads:[~2008-04-21 15:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-20 9:20 [Qemu-devel] Linux SIGIO handling changes Anders Melchiorsen
2008-04-20 9:20 ` [Qemu-devel] [PATCH] Use SIGALRM even for timers delivered over a fd Anders Melchiorsen
2008-04-20 9:20 ` [Qemu-devel] [PATCH] Use SIGIO in Linux host Anders Melchiorsen
2008-04-20 22:04 ` [Qemu-devel] Linux SIGIO handling changes Anthony Liguori
2008-04-21 13:37 ` Avi Kivity
2008-04-21 15:43 ` Anthony Liguori [this message]
2008-04-21 16:13 ` Paul Brook
2008-04-21 18:48 ` Anthony Liguori
2008-04-22 8:02 ` Avi Kivity
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=480CB61D.8050507@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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.