From: Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: Luca <kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel <kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.org>
Subject: Re: Userspace hypercalls?
Date: Mon, 27 Aug 2007 23:01:44 +0300 [thread overview]
Message-ID: <46D32DA8.1080900@qumranet.com> (raw)
In-Reply-To: <68676e00708271258o278de93ek8a051619dd03fb6a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
Luca wrote:
> On 8/27/07, Avi Kivity <avi-atKUWr5tajBWk0Htik3J/w@public.gmane.org> wrote:
>
>> Anthony Liguori wrote:
>>
>>> On Mon, 2007-08-27 at 20:36 +0300, Avi Kivity wrote:
>>>
>>>> userspace can
>>>> attach a signal to the eventfd if it wants a synchronous exit (does
>>>> eventfd allow fcntl(F_SETOWN)?)
>>>>
>>> Which would address the latency issue nicely. Looking at the fs code,
>>> it looks like eventfd shouldn't have to do anything special for it.
>>>
>> I'm not sure now. Which thread will be selected for accepting the
>> signal?
>>
>
> It's not specified.
>
>
So that option's down.
>> if it isn't guaranteed to be the current thread, we're back
>> with scheduler involvement, and possibly cacheline bouncing.
>>
>
> It's possible to use pthread_sigmask() to block the signal on all
> threads but one. But this would require changing the rest of the
> emulator; why not just select() the fd in a dedicated thread?
>
When the guest issues that hypercall, it really wants the I/O to start.
If it's a separate thread, the scheduler could choose to let the guest
execute and keep the I/O thread waiting (CFS isn't likely to do that,
but it's possible).
The scheduler could also choose to run the I/O thread on a different
processor, and now all the data structures carefully loaded into cache
by the guest need to be bounced to the processor running the I/O thread.
I think the best policy here is to cover our asses and allow userspace
to choose which method it wants to use; and we should start with the
guest exiting to userspace to avoid the costs I mentioned.
--
Any sufficiently difficult bug is indistinguishable from a feature.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
next prev parent reply other threads:[~2007-08-27 20:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-27 15:27 Userspace hypercalls? Anthony Liguori
2007-08-27 16:16 ` Avi Kivity
[not found] ` <46D2F8FA.6050104-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 16:19 ` Avi Kivity
2007-08-27 16:33 ` Avi Kivity
[not found] ` <46D2FCE1.7020605-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 16:47 ` Avi Kivity
[not found] ` <46D3001A.9070706-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 17:32 ` Anthony Liguori
2007-08-27 17:36 ` Avi Kivity
[not found] ` <46D30BAE.4080705-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 17:47 ` Anthony Liguori
[not found] ` <46D30F15.6050601@qumranet.com>
[not found] ` <46D30F15.6050601-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 19:58 ` Luca
[not found] ` <68676e00708271258o278de93ek8a051619dd03fb6a-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2007-08-27 20:01 ` Avi Kivity [this message]
[not found] ` <46D32DA8.1080900-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-08-27 21:06 ` Anthony Liguori
2007-08-29 6:59 ` Dor Laor
[not found] ` <64F9B87B6B770947A9F8391472E032160D6558D8-yEcIvxbTEBqsx+V+t5oei8rau4O3wl8o3fe8/T/H7NteoWH0uzbU5w@public.gmane.org>
2007-08-29 21:24 ` Avi Kivity
[not found] <46D326020200005A00029BFF@mcclure.wal.novell.com>
[not found] ` <46D326080200005A00029C02-Igcdv/6uVdMHoYOw/+koYqIwWpluYiW7@public.gmane.org>
2007-08-27 23:29 ` Gregory Haskins
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=46D32DA8.1080900@qumranet.com \
--to=avi-atkuwr5tajbwk0htik3j/w@public.gmane.org \
--cc=kronos.it-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=kvm-devel-TtF/mJH4Jtrk1uMJSBkQmQ@public.gmane.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.