From: Peter Xu <peterx@redhat.com>
To: Akihiko Odaki <akihiko.odaki@daynix.com>
Cc: "Paolo Bonzini" <pbonzini@redhat.com>,
"Stefan Weil" <sw@weilnetz.de>, "Fabiano Rosas" <farosas@suse.de>,
"Hailiang Zhang" <zhanghailiang@xfusion.com>,
"Phil Dennis-Jordan" <phil@philjordan.eu>,
qemu-devel@nongnu.org, devel@daynix.com,
"Marc-André Lureau" <marcandre.lureau@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>
Subject: Re: [PATCH v4 00/11] Improve futex usage
Date: Tue, 27 May 2025 09:46:11 -0400 [thread overview]
Message-ID: <aDXCI2Xo3sNM27DG@x1.local> (raw)
In-Reply-To: <ceac6afc-a300-4ca8-a14e-7f60b31b75a0@daynix.com>
On Tue, May 27, 2025 at 11:09:08AM +0900, Akihiko Odaki wrote:
> On 2025/05/26 23:48, Peter Xu wrote:
> > On Mon, May 26, 2025 at 02:29:10PM +0900, Akihiko Odaki wrote:
> > > Akihiko Odaki (11):
> > > futex: Check value after qemu_futex_wait()
> > > futex: Support Windows
> > > qemu-thread: Remove qatomic_read() in qemu_event_set()
> > > qemu-thread: Replace __linux__ with CONFIG_LINUX
> > > qemu-thread: Avoid futex abstraction for non-Linux
> > > qemu-thread: Use futex for QemuEvent on Windows
> > > qemu-thread: Use futex if available for QemuLockCnt
> > > migration: Replace QemuSemaphore with QemuEvent
> > > migration/colo: Replace QemuSemaphore with QemuEvent
> > > migration/postcopy: Replace QemuSemaphore with QemuEvent
> >
> > In case it makes things easier.. I queued the three migration patches;
> > AFAIU they look like standalone to go even without prior patches, meanwhile
> > it shouldn't be an issue if they're queued in two pulls.
> >
> > I am still not sure whether patch 1 is needed at all, but I'll leave that
> > to others to decide.
>
> The migration patches shouldn't be applied before patches "futex: Check
> value after qemu_futex_wait()" and "qemu-thread: Avoid futex abstraction for
> non-Linux" as they fix QemuEvent. Merging migration patches earlier can
> trigger bugs just like one we faced with hw/display/apple-gfx*
I didn't see anything like it mentioned in either cover letter or the
apple-gfx patch. Could you provide a pointer?
>
> Regarding patch 1 ("futex: Check value after qemu_futex_wait()"), I can
> argue that we should have it to comply the generic "upstream-first"
> principle; the upstream (man page) says to make a loop, so the downstream
> (QEMU) should follow that until the upstream says otherwise. But I think
> it's a good idea to spend efforts to understand the reasoning behind the man
> page since it's so important that it affects not only QEMU but also any
> userspace program that uses libpthread (i.e., practically everything).
IMHO it's not how we define upstream/downstream, but maybe it's me who
missed something.
It's fine - as long as someone agrees with you (Paolo? :), it could likely
be that I was wrong and I just didn't realize that.
Thanks for the update anyway, I will drop the migration patches regardless.
--
Peter Xu
next prev parent reply other threads:[~2025-05-27 13:47 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-26 5:29 [PATCH v4 00/11] Improve futex usage Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 01/11] futex: Check value after qemu_futex_wait() Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 02/11] futex: Support Windows Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 03/11] qemu-thread: Remove qatomic_read() in qemu_event_set() Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 04/11] qemu-thread: Replace __linux__ with CONFIG_LINUX Akihiko Odaki
2025-05-26 9:09 ` Philippe Mathieu-Daudé
2025-05-26 5:29 ` [PATCH v4 05/11] qemu-thread: Avoid futex abstraction for non-Linux Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 06/11] qemu-thread: Use futex for QemuEvent on Windows Akihiko Odaki
2025-05-26 9:23 ` Philippe Mathieu-Daudé
2025-05-26 5:29 ` [PATCH v4 07/11] qemu-thread: Use futex if available for QemuLockCnt Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 08/11] migration: Replace QemuSemaphore with QemuEvent Akihiko Odaki
2025-05-26 9:24 ` Philippe Mathieu-Daudé
2025-05-26 5:29 ` [PATCH v4 09/11] migration/colo: " Akihiko Odaki
2025-05-26 9:24 ` Philippe Mathieu-Daudé
2025-05-26 5:29 ` [PATCH v4 10/11] migration/postcopy: " Akihiko Odaki
2025-05-26 5:29 ` [PATCH v4 11/11] hw/display/apple-gfx: " Akihiko Odaki
2025-05-26 9:27 ` Philippe Mathieu-Daudé
2025-05-26 9:29 ` Philippe Mathieu-Daudé
2025-05-29 4:49 ` Akihiko Odaki
2025-05-26 14:48 ` [PATCH v4 00/11] Improve futex usage Peter Xu
2025-05-27 2:09 ` Akihiko Odaki
2025-05-27 13:46 ` Peter Xu [this message]
2025-05-28 3:30 ` Akihiko Odaki
2025-05-26 16:51 ` Paolo Bonzini
2025-05-27 3:00 ` Akihiko Odaki
2025-05-27 15:01 ` Paolo Bonzini
2025-05-28 3:26 ` Akihiko Odaki
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=aDXCI2Xo3sNM27DG@x1.local \
--to=peterx@redhat.com \
--cc=akihiko.odaki@daynix.com \
--cc=berrange@redhat.com \
--cc=devel@daynix.com \
--cc=farosas@suse.de \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=phil@philjordan.eu \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=sw@weilnetz.de \
--cc=zhanghailiang@xfusion.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).