Re: [GIT PULL] Scope-based Resource Management for 6.5

From: Greg Kroah-Hartman
Date: Wed Jul 05 2023 - 03:51:57 EST


On Tue, Jul 04, 2023 at 02:11:05PM -0700, Linus Torvalds wrote:
> On Mon, 26 Jun 2023 at 05:57, Peter Zijlstra <peterz@xxxxxxxxxxxxx> wrote:
> >
> > Please consider pulling the SBRM infrastructure so that people can start
> > building upon it. Specifically Greg also wants to start using this soon.
> >
> > Once this lands, I'll start to trickle in the conversions I've done for
> > the next release.
>
> So things are quiet (partly presumably due to July 4th in the US) and
> I've mostly emptied my merge window queue, so I've pulled this since I
> obviously was happy with the final syntax.
>
> However, let's agree to not really use it for 6.5 yet, and consider it
> all purely infrastructure for the next release, and for testing it all
> out in linux-next etc.

Sounds good to me.

> We should probably also strive to avoid it for bug-fixes that end up
> going to stable. I'm sure this will all be backported to stable
> eventually, but I'd at least personally be happier if that started
> happening only after we actually have some more interaction with this.

Yeah, it will probably need to be backported to maybe 6.1.y if some real
bugfix needs it, but for all of the trivial "clean up the error path"
patches that we constantly get, we'll resist that for the stable tree if
they use the cleanup logic. That might actually be a good thing overall
anyway.

> I hope - and expect - that the core compiler infrastructure should be
> stable due to C++ uses of destructors, but I also note that at least
> in the system headers I have, the only use of the __cleanup__
> attribute seems to be a very special pthread_cleanup_push() helper,
> and some (fairly minimal) glib use in the g_auto*() types.
>
> So this attribute has been around forever, and the low-level
> functionality has presumably gotten a lot of testing, but at the same
> time it really looks like the C interface is somewhat limited in its
> use.
>
> I did do a Debian core search on g_autoptr() use, and in the first ten
> pages, most uses seemed to be either comments or tests. But there are
> certainly *some* real users too.

systemd has been using it for a long time so the infrastructure has been
there and should be stable, but I'm sure we will find out if not.

thanks,

greg k-h