From: Dmitry Osipenko <dmitry.osipenko@collabora.com>
To: "Akihiko Odaki" <odaki@rsg.ci.i.u-tokyo.ac.jp>,
qemu-devel@nongnu.org, "Alex Bennée" <alex.bennee@linaro.org>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"David Hildenbrand" <david@redhat.com>,
"Eric Blake" <eblake@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Markus Armbruster" <armbru@redhat.com>,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Peter Xu" <peterx@redhat.com>,
"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [PATCH] rcu: Unify force quiescent state
Date: Thu, 16 Oct 2025 22:33:05 +0300 [thread overview]
Message-ID: <cc38a1ac-6f05-4c27-90a5-6ed71d9b566c@collabora.com> (raw)
In-Reply-To: <20251016-force-v1-1-919a82112498@rsg.ci.i.u-tokyo.ac.jp>
On 10/16/25 09:34, Akihiko Odaki wrote:
> - /* Wait for one thread to report a quiescent state and try again.
> + /*
> + * Sleep for a while and try again.
> * Release rcu_registry_lock, so rcu_(un)register_thread() doesn't
> * wait too much time.
> *
> @@ -133,7 +150,20 @@ static void wait_for_readers(void)
> * rcu_registry_lock is released.
> */
> qemu_mutex_unlock(&rcu_registry_lock);
> - qemu_event_wait(&rcu_gp_event);
> +
> + if (forced) {
> + qemu_event_wait(&rcu_gp_event);
> +
> + /*
> + * We want to be notified of changes made to rcu_gp_ongoing
> + * while we walk the list.
> + */
> + qemu_event_reset(&rcu_gp_event);
> + } else {
> + g_usleep(10000);
> + sleeps++;
Thanks a lot for this RCU improvement. It indeed removes the hard stalls
with unmapping of virtio-gpu blobs.
Am I understanding correctly that potentially we will be hitting this
g_usleep(10000) and stall virtio-gpu for the first ~10ms? I.e. the
MemoryRegion patches from Alex [1] are still needed to avoid stalls
entirely.
[1]
https://lore.kernel.org/qemu-devel/20251014111234.3190346-6-alex.bennee@linaro.org/
--
Best regards,
Dmitry
next prev parent reply other threads:[~2025-10-16 19:34 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-16 6:34 [PATCH] rcu: Unify force quiescent state Akihiko Odaki
2025-10-16 12:59 ` Paolo Bonzini
2025-10-16 19:33 ` Dmitry Osipenko [this message]
2025-10-16 23:43 ` Akihiko Odaki
2025-10-17 0:40 ` Akihiko Odaki
2025-10-19 20:23 ` Dmitry Osipenko
2025-10-20 1:14 ` Akihiko Odaki
2025-10-20 20:41 ` Dmitry Osipenko
2025-10-22 3:30 ` Dmitry Osipenko
2025-10-23 5:50 ` Akihiko Odaki
2025-10-23 9:50 ` Dmitry Osipenko
2025-10-20 6:38 ` Paolo Bonzini
2025-10-21 4:14 ` Akihiko Odaki
2025-10-19 20:25 ` Dmitry Osipenko
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=cc38a1ac-6f05-4c27-90a5-6ed71d9b566c@collabora.com \
--to=dmitry.osipenko@collabora.com \
--cc=alex.bennee@linaro.org \
--cc=armbru@redhat.com \
--cc=david@redhat.com \
--cc=eblake@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=mst@redhat.com \
--cc=odaki@rsg.ci.i.u-tokyo.ac.jp \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--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 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).