Re: [PATCH] ring-buffer: Use a housekeeping CPU to wake up waiters

From: Steven Rostedt

Date: Wed Jan 07 2026 - 11:19:16 EST


On Wed, 7 Jan 2026 11:17:09 -0500
Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:

> Or we simply change it to:
>
> static inline void

Actually, the above should be noinline, as it's in a slower path, and
should not be adding logic into the cache of the fast path.

-- Steve


> rb_irq_work_queue(struct rb_irq_work *irq_work)
> {
> int cpu;
>
> /* irq_work_queue_on() is not allowed in NMI context */
> if (in_nmi()) {
> irq_work_queue(&irq_work->work, cpu);
> return;
> }
>
> cpu = housekeeping_any_cpu(HK_TYPE_KERNEL_NOISE);
> /*
> * If CPU isolation is not active, cpu is always the current
> * CPU, and the following is equivallent to irq_work_queue().
> */
> irq_work_queue_on(&irq_work->work, cpu);
> }