Re: [PATCH] bpf: ringbuf: add wakeup coalescing
From: Alexei Starovoitov
Date: Tue Dec 01 2026 - 19:54:25 EST
On Tue, Dec 01, 2026 at 04:29 PM Michael S. Tsirkin <mst@xxxxxxxxxx> wrote:
>> Sounds like your tracing tool is simply inefficient.
>
> Oh yes. Yet I don't have control over it.
Then pls report it to the people who do. It's two lines in their prog.
The kernel shouldn't work around an inefficient tool.
>> avail = bpf_ringbuf_query(&rb, BPF_RB_AVAIL_DATA);
>> bpf_ringbuf_submit(rec, avail >= wakeup_data_size ?
>> BPF_RB_FORCE_WAKEUP : BPF_RB_NO_WAKEUP);
>
>
> This assumes that every bpf program is tuned for every hardware box it
> runs on. It's not gonnu happen.
The sysctl assumes the same. Its default is 1, which is what we have today.
Somebody has to find that 8 for every box and every workload.
Then that one number applies to every ringbuf on the box.