On Thu, Mar 5, 2026 at 11:00 AM Steven Rostedt <[email protected]> wrote: > > On Thu, 5 Mar 2026 10:33:00 +0800 > Yafang Shao <[email protected]> wrote: > > > Other tools may also read available_filter_functions, requiring each > > one to be patched individually to avoid this flaw—a clearly > > impractical solution. > > What exactly is the issue?
It makes no sense to spin unnecessarily when it can be avoided. We continuously improve the kernel to do the right thing—and unnecessary spinning is certainly not the right thing. > If a task does a while 1 in user space, it > wouldn't be much different. The while loop in user space performs actual work, whereas useless spinning does nothing but burn CPU cycles. My point is simple: if this unnecessary spinning isn't already considered an issue, it should be—it's something that clearly needs improvement. > With PREEMPT_LAZY the most a task will spin > in the kernel is one extra tick over a user space task spinning in user > space. > > available_filter_functions is definitely not a hot path, so I > personally don't care if it were to use "nospin". My worry is about > adding this "special" mutex for a single corner case, and I want to know > that its a real bug before we add something special into the kernel. > > -- Steve -- Regards Yafang
