From: Stefan Hajnoczi <stefanha@redhat.com>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
"QEMU Developers" <qemu-devel@nongnu.org>,
"Peter Maydell" <peter.maydell@linaro.org>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Daniel P. Berrange" <berrange@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>
Subject: Re: Various changes "backportability"
Date: Thu, 14 Sep 2023 08:09:35 -0400 [thread overview]
Message-ID: <20230914120935.GB1047741@fedora> (raw)
In-Reply-To: <8d2bac35-0b73-bc28-0f22-558e69619462@tls.msk.ru>
[-- Attachment #1: Type: text/plain, Size: 2921 bytes --]
On Wed, Sep 13, 2023 at 05:44:38PM +0300, Michael Tokarev wrote:
> 13.09.2023 17:27, Stefan Hajnoczi wrote:
> ...
> > > For example, recent tpm bugfix, which is trivial by its own,
> > > uses RETRY_ON_EINTR helper which were introduced recently and
> > > which is now used everywhere. coroutine_fn et al markers is
> > > another example, translator_io_start is yet another, and so
> > > on and so on.
>
> > The general concept makes sense to me but I'm not sure what the
> > specific issue with adding (?) coroutine_fn was. Can you link to the
> > patch that caused difficulties so I can review it?
>
> There's nothing really exciting here, and coroutine_fn example isn't
> a best one really. I'm talking about this:
>
> https://gitlab.com/mjt0k/qemu/-/commit/c5034f827726f5876234bf4c6a0fab648fd8b020
>
> which is a current back-port of 92e2e6a867334a990f8d29f07ca34e3162fdd6ec
> "virtio: Drop out of coroutine context in virtio_load()":
>
> https://gitlab.com/mjt0k/qemu/-/commit/92e2e6a867334a990f8d29f07ca34e3162fdd6ec
>
> This is a bugfix which I tried to cherry-pick (btw, I dunno yet if it should
> go to 8.0 or 7.2 to begin with, asked this in another email, but it still
> serves as an example). Original patch adds coroutine_mixed_fn to some existing
> functions and to a newly added function.
>
> The patch introducing coroutine_mixed_fn marker is v7.2.0-909-g0f3de970 .
> This is actually a very good example of a way how things are done best,
> an excellent example of what I'm talking here, - this 0f3de970 only introduces
> the new concept (to be widely used), not converting everything to it
> right away. So it's a good example of how things can be done right.
>
> But this 0f3de970 change is based on earlier change which split things up
> and moved stuff from one place to another, and which is too large to
> backport. So even if 0f3de970 did an excellent job, it is still of no
> use in this context.
>
> I decided to drop coroutine_mixed_fn markings in the fix for 7.2 in this
> context, - again, if this particular fix is needed there to begin with,
> which is a question unrelated to this topic.
>
>
> A better example is a trivial thing with RETRY_ON_EINTR introduction.
> A trivial macro which replaced TFR in
>
> commit 37b0b24e933c18269dddbf6b83f91823cacf8105
> Author: Nikita Ivanov <nivanov@cloudlinux.com>
> Date: Sun Oct 23 12:04:22 2022 +0300
>
> error handling: Use RETRY_ON_EINTR() macro where applicable
>
> if this change were split into two, first introducing the new macro
> and second converting existing code & removing old macro, it'd be
> possible to just cherry-pick the first part and thered' be no need
> to modify further cherry-picks which uses RETRY_ON_EINTR.
>
> But once again, this all is definitely not as important as getting
> good code into main :)
I see, thank you!
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2023-09-14 12:10 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-13 8:12 Various changes "backportability" Michael Tokarev
2023-09-13 14:27 ` Stefan Hajnoczi
2023-09-13 14:44 ` Michael Tokarev
2023-09-14 12:09 ` Stefan Hajnoczi [this message]
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=20230914120935.GB1047741@fedora \
--to=stefanha@redhat.com \
--cc=berrange@redhat.com \
--cc=mjt@tls.msk.ru \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=stefanha@gmail.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).