[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
On Tue, 29 Apr 2025 14:35:04 +0200 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. I'm not entirely sure if we're on the same page regarding this issue. However, I'd like to address the concerns about the fragility of NO_AUTO_INLINE. Maintaining NO_AUTO_INLINE to function correctly is indeed challenging, and I share some reservations about whether it should exist as a Kbuild option, which is precisely why this patch series is submitted as an RFC. I cannot even guarantee that I've addressed all existing issues in the current kernel repository with this patch series, as testing all possible compilation configurations is beyond my capabilities. Looking at the functions where I've added __always_inline in this patch series, nearly all of them require inlining specifically because their calls need to be resolved at compile time. The fundamental source of this fragility stems from the fact that compiler auto-inlining decisions aren't well-defined. If these functions were to change in the future for unrelated reasons - for example, if they became longer - and the compiler consequently decided not to automatically inline them, these same issues would surface regardless.
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |