Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/zcrx: rename dma lock

In preparation for reusing the lock for other purposes, rename it to
"pp_lock". As before, it can be taken deeper inside the networking stack
by page pool, and so the syscall io_uring must avoid holding it while
doing queue reconfiguration or anything that can result in immediate pp
init/destruction.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
4f602f31 d8d135df

+10 -5
+4 -4
io_uring/zcrx.c
··· 253 253 { 254 254 int i; 255 255 256 - guard(mutex)(&ifq->dma_lock); 256 + guard(mutex)(&ifq->pp_lock); 257 257 if (!area->is_mapped) 258 258 return; 259 259 area->is_mapped = false; ··· 273 273 { 274 274 int ret; 275 275 276 - guard(mutex)(&ifq->dma_lock); 276 + guard(mutex)(&ifq->pp_lock); 277 277 if (area->is_mapped) 278 278 return 0; 279 279 ··· 478 478 ifq->ctx = ctx; 479 479 spin_lock_init(&ifq->lock); 480 480 spin_lock_init(&ifq->rq_lock); 481 - mutex_init(&ifq->dma_lock); 481 + mutex_init(&ifq->pp_lock); 482 482 return ifq; 483 483 } 484 484 ··· 527 527 put_device(ifq->dev); 528 528 529 529 io_free_rbuf_ring(ifq); 530 - mutex_destroy(&ifq->dma_lock); 530 + mutex_destroy(&ifq->pp_lock); 531 531 kfree(ifq); 532 532 } 533 533
+6 -1
io_uring/zcrx.h
··· 54 54 struct net_device *netdev; 55 55 netdevice_tracker netdev_tracker; 56 56 spinlock_t lock; 57 - struct mutex dma_lock; 57 + 58 + /* 59 + * Page pool and net configuration lock, can be taken deeper in the 60 + * net stack. 61 + */ 62 + struct mutex pp_lock; 58 63 struct io_mapped_region region; 59 64 }; 60 65