From: Paolo Bonzini <pbonzini@redhat.com>
To: Sergio Lopez <slp@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] QEMU event loop optimizations
Date: Mon, 8 Apr 2019 12:42:00 +0200 [thread overview]
Message-ID: <14b7dab8-5c4b-a8e4-c3c3-8e931171747a@redhat.com> (raw)
In-Reply-To: <877ec8mmy9.fsf@redhat.com>
On 05/04/19 18:33, Sergio Lopez wrote:
>> - qemu_bh_schedule_nested should not be necessary since we have
>> ctx->notify_me to also avoid the event_notifier_set call. However, it
>> is possible to avoid the smp_mb at the beginning of aio_notify, since
>> atomic_xchg already implies it. Maybe add a "static void
>> aio_notify__after_smp_mb"?
> try_poll_mode() is called with ctx->notify_me != 0, so we get at least
> one event_notifier_set() call while working in polling mode.
Right, though then there is the idea of making ctx->notify_me and
ctx->notified bitmasks, where bit 0 is "BH ready" and bit 1 is "poll()
parameters changed". try_poll_mode() cares about the latter, but does
not need event_notifier_set() for BH ready.
Paolo
WARNING: multiple messages have this Message-ID (diff)
From: Paolo Bonzini <pbonzini@redhat.com>
To: Sergio Lopez <slp@redhat.com>
Cc: qemu-devel@nongnu.org, Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] QEMU event loop optimizations
Date: Mon, 8 Apr 2019 12:42:00 +0200 [thread overview]
Message-ID: <14b7dab8-5c4b-a8e4-c3c3-8e931171747a@redhat.com> (raw)
Message-ID: <20190408104200.FgyStCkoV24cyXGxC3ZFOeTRDcfpcMfGX5W7mv2ohOI@z> (raw)
In-Reply-To: <877ec8mmy9.fsf@redhat.com>
On 05/04/19 18:33, Sergio Lopez wrote:
>> - qemu_bh_schedule_nested should not be necessary since we have
>> ctx->notify_me to also avoid the event_notifier_set call. However, it
>> is possible to avoid the smp_mb at the beginning of aio_notify, since
>> atomic_xchg already implies it. Maybe add a "static void
>> aio_notify__after_smp_mb"?
> try_poll_mode() is called with ctx->notify_me != 0, so we get at least
> one event_notifier_set() call while working in polling mode.
Right, though then there is the idea of making ctx->notify_me and
ctx->notified bitmasks, where bit 0 is "BH ready" and bit 1 is "poll()
parameters changed". try_poll_mode() cares about the latter, but does
not need event_notifier_set() for BH ready.
Paolo
next prev parent reply other threads:[~2019-04-08 10:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20190326131822.GD15011@stefanha-x1.localdomain>
2019-04-05 16:29 ` [Qemu-devel] QEMU event loop optimizations Sergio Lopez
2019-04-05 16:29 ` Sergio Lopez
2019-04-08 8:29 ` Stefan Hajnoczi
2019-04-08 8:29 ` Stefan Hajnoczi
[not found] ` <55751c00-0854-ea4d-75b5-ab82b4eeb70d@redhat.com>
2019-04-02 16:18 ` Kevin Wolf
2019-04-02 16:25 ` Paolo Bonzini
2019-04-05 16:33 ` Sergio Lopez
2019-04-05 16:33 ` Sergio Lopez
2019-04-08 10:42 ` Paolo Bonzini [this message]
2019-04-08 10:42 ` Paolo Bonzini
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=14b7dab8-5c4b-a8e4-c3c3-8e931171747a@redhat.com \
--to=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=slp@redhat.com \
--cc=stefanha@redhat.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 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).