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

Unified · Split

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