• Eric Dumazet's avatar
    net_sched: add the ability to defer skb freeing · 1b5c5493
    Eric Dumazet authored
    qdisc are changed under RTNL protection and often
    while blocking BH and root qdisc spinlock.
    
    When lots of skbs need to be dropped, we free
    them under these locks causing TX/RX freezes,
    and more generally latency spikes.
    
    This commit adds rtnl_kfree_skbs(), used to queue
    skbs for deferred freeing.
    
    Actual freeing happens right after RTNL is released,
    with appropriate scheduling points.
    
    rtnl_qdisc_drop() can also be used in place
    of disc_drop() when RTNL is held.
    
    qdisc_reset_queue() and __qdisc_reset_queue() get
    the new behavior, so standard qdiscs like pfifo, pfifo_fast...
    have their ->reset() method automatically handled.
    Signed-off-by: 's avatarEric Dumazet <edumazet@google.com>
    Signed-off-by: 's avatarDavid S. Miller <davem@davemloft.net>
    1b5c5493
rtnetlink.h 4.04 KB