Re: [PATCH bpf 5/6] libbpf: ringbuf: Prevent missed wakeups
From: Tamir Duberstein
Date: Fri Nov 20 2026 - 15:42:25 EST
> let's use regular kernel style
Fixed in v3.
> [...]
> The extra new variable feels overly complicated.
The final iterator uses one loop without got_new_data. It retains one
fenced BUSY retry to avoid missing a commit without spinning indefinitely.
> [...]
> We just add an smp_mb() here.
The tools generic mb() fallback can be only a compiler barrier.
__atomic_thread_fence() supplies the required StoreLoad ordering.
> [...]
> Why __ATOMIC_RELAXED here?
The stop flag publishes no other state. Relaxed atomics suffice;
volatile would leave a C data race.
> [...]
> Label is unnecessary
Removed in v3.