Re: [PATCH net-next 17/20] tcp: defer skb freeing after socket lock is released
From: Eric Dumazet <edumazet@google.com>
Date: 2021-11-16 16:46:54
On Tue, Nov 16, 2021 at 7:27 AM Jakub Kicinski [off-list ref] wrote:
On Tue, 16 Nov 2021 07:22:02 -0800 Eric Dumazet wrote:quoted
Here is the perf top profile on cpu used by user thread doing the recvmsg(), at 96 Gbit/s We no longer see skb freeing related costs, but we still see costs of having to process the backlog. 81.06% [kernel] [k] copy_user_enhanced_fast_string 2.50% [kernel] [k] __skb_datagram_iter 2.25% [kernel] [k] _copy_to_iter 1.45% [kernel] [k] tcp_recvmsg_locked 1.39% [kernel] [k] tcp_rcv_establishedHuh, somehow I assumed your 4k MTU numbers were with zero-copy :o Out of curiosity - what's the softirq load with 4k? Do you have an idea what the load is on the CPU consuming the data vs the softirq processing with 1500B ?
On my testing host, 4K MTU : processing ~2,600.000 packets per second in GRO and other parts use about 60% of the core in BH. (Some of this cost comes from a clang issue, and the csum_partial() one I was working on last week) NIC RX interrupts are firing about 25,000 times per second in this setup. 1500 MTU : processing ~ 5,800,000 packets per second uses one core in BH (and also one core in recvmsg()), We stay in NAPI mode (no IRQ rearming) (That was with a TCP_STREAM run sustaining 70Gbit) BH numbers also depend on IRQ coalescing parameters.