On Fri, May 30, 2025 at 04:01:40PM +0200, Peter Zijlstra wrote:
I'm not really concerned with performance here, but more with the size of the code emitted by WARN_ONCE(). There are a *ton* of WARN sites, while only one report_bug() and printk().
We need a new and stronger unlikely(), resulting in the compiler being forced to split a .cold sub-function/part which lives in .text.unlikely
At that point it becomes less of a concern I suppose.
AFAIK the only means of achieving that with the current compilers is doing a manual function split and marking the part __cold -- which is unfortunate.
At some point GCC explored label attributes, and we were able to mark labels with cold, but that never really worked / went anywhere.