From: Przemek Kitszel <przemyslaw.kitszel@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: <linux-kernel@vger.kernel.org>, Kevin Tian <kevin.tian@intel.com>,
"Dmitry Ilvokhin" <d@ilvokhin.com>,
Christian Brauner <brauner@kernel.org>
Subject: Re: [PATCH] cleanup: clarify scope-based resource management and goto guidance
Date: Thu, 26 Nov 2026 15:28:35 +0100 [thread overview]
Message-ID: <28d24697-e4a7-4889-aea0-fdf58ab65586@intel.com> (raw)
In-Reply-To: <20261126095007.GB49833@noisy.programming.kicks-ass.net>
On 11/26/26 10:50 AM, Peter Zijlstra wrote:
> On Thu, Nov 26, 2026 at 05:29:33AM +0100, Przemek Kitszel wrote:
>
>>> Then undo_pre_bar() is inside guard(); and that is very much not the
>>> intention. The same will be true with ACQUIRE();
>>
>> ah, I see :(
>>
>> would it be fine to relax the doc and stop discouraging against
>> scoped_guard() and goto in the same function (but keep the "don't jump
>> into/out of its scope")?
>
> So I don't really understand the problem we're trying to solve here. Is
> this really about AI being stupid? Just wait a few months, I'll catch up
> or something.
AI is smart enough to follow our (human) written instructions, and right
now, those discourage scoped_guard() mixed with goto.
I would like to reword to fix that :)
Of course it will also be good for those of us who read docs, and also
have the additional benefit of not popping up scoped_guard() usage
(I don't believe, but there are still maintainers that prefer old style
locks ;P)
prev parent reply other threads:[~2026-11-26 14:21 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-25 16:12 Przemek Kitszel
2026-11-25 16:44 ` Peter Zijlstra
2026-11-26 4:29 ` Przemek Kitszel
2026-11-26 9:50 ` Peter Zijlstra
2026-11-26 14:28 ` Przemek Kitszel [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=28d24697-e4a7-4889-aea0-fdf58ab65586@intel.com \
--to=przemyslaw.kitszel@intel.com \
--cc=brauner@kernel.org \
--cc=d@ilvokhin.com \
--cc=kevin.tian@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.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
all inboxes | Powered by JetHome®