History

cpumap: Use non-locked version __ptr_ring_consume_batched

Commit 77361825bb01 ("bpf: cpumap use ptr_ring_consume_batched") changed away from using single frame ptr_ring dequeue (__ptr_ring_consume) to consume a batched, but it uses a locked version, which as the comment explain isn't needed. Change to use the non-locked version __ptr_ring_consume_batched.

Jesper Dangaard Brouer committed 6 years ago

Commit 9b74ebb1 parent 59632b21 file · +1 −1Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/bpf/cpumap.c+1−1
@@ -259,7 +259,7 @@ static int cpu_map_kthread_run(void *data) · 258 unmodified lines
259259 * kthread CPU pinned. Lockless access to ptr_ring
260260 * consume side valid as no-resize allowed of queue.
261261 */
262− n = ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
262+ n = __ptr_ring_consume_batched(rcpu->queue, frames, CPUMAP_BATCH);
263263
264264 for (i = 0; i < n; i++) {
265265 void *f = frames[i];