• E
    qdisc: validate skb without holding lock · 55a93b3e
    Eric Dumazet 提交于
    Validation of skb can be pretty expensive :
    
    GSO segmentation and/or checksum computations.
    
    We can do this without holding qdisc lock, so that other cpus
    can queue additional packets.
    
    Trick is that requeued packets were already validated, so we carry
    a boolean so that sch_direct_xmit() can validate a fresh skb list,
    or directly use an old one.
    
    Tested on 40Gb NIC (8 TX queues) and 200 concurrent flows, 48 threads
    host.
    
    Turning TSO on or off had no effect on throughput, only few more cpu
    cycles. Lock contention on qdisc lock disappeared.
    
    Same if disabling TX checksum offload.
    Signed-off-by: NEric Dumazet <edumazet@google.com>
    Signed-off-by: NDavid S. Miller <davem@davemloft.net>
    55a93b3e
dev.c 182.3 KB