[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH RFC v3 0/8] kernel-hacking: introduce CONFIG_NO_AUTO_INLINE
- To: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
- From: Brendan Jackman <jackmanb@xxxxxxxxxx>
- Date: Thu, 01 May 2025 15:22:55 +0000
- Cc: Christoph Hellwig <hch@xxxxxx>, <chenlinxuan@xxxxxxxxxxxxx>, Keith Busch <kbusch@xxxxxxxxxx>, Jens Axboe <axboe@xxxxxxxxx>, Sagi Grimberg <sagi@xxxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, Yishai Hadas <yishaih@xxxxxxxxxx>, Jason Gunthorpe <jgg@xxxxxxxx>, Shameer Kolothum <shameerali.kolothum.thodi@xxxxxxxxxx>, Kevin Tian <kevin.tian@xxxxxxxxx>, Alex Williamson <alex.williamson@xxxxxxxxxx>, Peter Huewe <peterhuewe@xxxxxx>, Jarkko Sakkinen <jarkko@xxxxxxxxxx>, Masahiro Yamada <masahiroy@xxxxxxxxxx>, Nathan Chancellor <nathan@xxxxxxxxxx>, Nicolas Schier <nicolas.schier@xxxxxxxxx>, Nick Desaulniers <nick.desaulniers+lkml@xxxxxxxxx>, Bill Wendling <morbo@xxxxxxxxxx>, Justin Stitt <justinstitt@xxxxxxxxxx>, Vlastimil Babka <vbabka@xxxxxxx>, Suren Baghdasaryan <surenb@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxx>, Johannes Weiner <hannes@xxxxxxxxxxx>, Zi Yan <ziy@xxxxxxxxxx>, Mathieu Desnoyers <mathieu.desnoyers@xxxxxxxxxxxx>, "Paul E. McKenney" <paulmck@xxxxxxxxxx>, Boqun Feng <boqun.feng@xxxxxxxxx>, Dmitry Vyukov <dvyukov@xxxxxxxxxx>, Andrey Konovalov <andreyknvl@xxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Boris Ostrovsky <boris.ostrovsky@xxxxxxxxxx>, Thomas Gleixner <tglx@xxxxxxxxxxxxx>, Ingo Molnar <mingo@xxxxxxxxxx>, Borislav Petkov <bp@xxxxxxxxx>, Dave Hansen <dave.hansen@xxxxxxxxxxxxxxx>, <x86@xxxxxxxxxx>, "H. Peter Anvin" <hpa@xxxxxxxxx>, <linux-nvme@xxxxxxxxxxxxxxxxxxx>, <linux-kernel@xxxxxxxxxxxxxxx>, <linux-mm@xxxxxxxxx>, <kvm@xxxxxxxxxxxxxxx>, <virtualization@xxxxxxxxxxxxxxx>, <linux-integrity@xxxxxxxxxxxxxxx>, <linux-kbuild@xxxxxxxxxxxxxxx>, <llvm@xxxxxxxxxxxxxxx>, Winston Wen <wentao@xxxxxxxxxxxxx>, <kasan-dev@xxxxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Changbin Du <changbin.du@xxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx>
- Delivery-date: Thu, 01 May 2025 15:23:05 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
On Thu May 1, 2025 at 3:02 PM UTC, Peter Zijlstra wrote:
> On Thu, May 01, 2025 at 02:19:47PM +0000, Brendan Jackman wrote:
>> On Tue Apr 29, 2025 at 12:35 PM UTC, Christoph Hellwig wrote:
>> > On Tue, Apr 29, 2025 at 12:06:04PM +0800, Chen Linxuan via B4 Relay wrote:
>> >> This series introduces a new kernel configuration option NO_AUTO_INLINE,
>> >> which can be used to disable the automatic inlining of functions.
>> >>
>> >> This will allow the function tracer to trace more functions
>> >> because it only traces functions that the compiler has not inlined.
>> >
>> > This still feels like a bad idea because it is extremely fragile.
>>
>> Can you elaborate on that - does it introduce new fragility?
>
> given it needs to sprinkle __always_inline around where it wasn't needed
> before, yeah.
Right, I guess I just wouldn't have associated that with the word
"fragility", but that's a reasonable complaint!
> Also, why would you want this? function tracer is already too much
> output. Why would you want even more?
Yes, tracing every function is already too noisy, this would make it
even more too-noisy, not sure "too noisy" -> "way too noisy" is a
particularly meaningful degradation.
Whereas enlarging the pool of functions that you can _optionally target_
for tracing, or nice reliable breakpoints in GDB, and disasm that's
easier to mentally map back to C, seems like a helpful improvement for
test builds. Personally I sometimes spam a bunch of `noinline` into code
I'm debugging so this seems like a way to just slap that same thing on
the whole tree without dirtying the code, right?
Not that I have a strong opinion on the cost/benefit here, but the
benefit seems nonzero to me.
|