udp: keep the sk_receive_queue held when splicing
Subsystems (2)
Paolo Abeni
maintainerQuoted 18 lines · Eric Dumazet
Quoted 17 lines · Paolo Abeni
On packet reception, when we are forced to splice the
sk_receive_queue, we can keep the related lock held, so that we can avoid re-acquiring it, if fwd memory scheduling is required.Signed-off-by Paolo Abeni <[email protected]>--- net/ipv4/udp.c | 36 ++++++++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 10 deletions(-)net/ipv4/udp.c +0
-0@@ -1164,7 +1164,8 @@ int udp_sendpage(struct sock *sk, struct page *page, int offset, }
Quoted 6 lines
net/ipv4/udp.c int udp_sendpage(struct sock *sk, struct page *page, int offset, · line 1168
Quoted 4 lines
net/ipv4/udp.c +2
-1/* fully reclaim rmem/fwd memory allocated for skb */ -static void udp_rmem_release (struct sock *sk,int size,int partial) +static void udp_rmem_release (struct sock *sk,int size,int partial, +int rx_queue_lock_held)Looks good, but please use a bool
rx_queue_lock_held?
oops, I wrongly omitted some most recipients in my initial reply, re- sending. Eric, I'm sorry for the duplicates.
ok, it sounds cleaner, I will submit a v2.
Thank you for reviewing this!
Cheers,
Paolo