• Paolo Abeni's avatar
    net: sched: when clearing NOLOCK, clear TCQ_F_CPUSTATS, too · 8a53e616
    Paolo Abeni authored
    Since stats updating is always consistent with TCQ_F_CPUSTATS flag,
    we can disable it at qdisc creation time flipping such bit.
    
    In my experiments, if the NOLOCK flag is cleared, per CPU stats
    accounting does not give any measurable performance gain, but it
    waste some memory.
    
    Let's clear TCQ_F_CPUSTATS together with NOLOCK, when enslaving
    a NOLOCK qdisc to 'lock' one.
    
    Use stats update helper inside pfifo_fast, to cope correctly with
    TCQ_F_CPUSTATS flag change.
    
    As a side effect, q.qlen value for any child qdiscs is always
    consistent for all lock classfull qdiscs.
    Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    8a53e616
sch_api.c 53.8 KB