OSDN Git Service

Revert: "net: sched: put back q.qlen into a single location"
authorPaolo Abeni <pabeni@redhat.com>
Wed, 10 Apr 2019 12:32:41 +0000 (14:32 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 10 Apr 2019 19:20:46 +0000 (12:20 -0700)
commit73eb628ddfd3884d1e58a8022de2e78de7807fc6
treef9963afb03df6761396729cfad94621e7d3d5ab0
parent8a53e616de294873fec1a75ddb77ecb3d225cee0
Revert: "net: sched: put back q.qlen into a single location"

This revert commit 46b1c18f9deb ("net: sched: put back q.qlen into
a single location").
After the previous patch, when a NOLOCK qdisc is enslaved to a
locking qdisc it switches to global stats accounting. As a consequence,
when a classful qdisc accesses directly a child qdisc's qlen, such
qdisc is not doing per CPU accounting and qlen value is consistent.

In the control path nobody uses directly qlen since commit
e5f0e8f8e45 ("net: sched: introduce and use qdisc tree flush/purge
helpers"), so we can remove the contented atomic ops from the
datapath.

v1 -> v2:
 - complete the qdisc_qstats_atomic_qlen_dec() ->
   qdisc_qstats_cpu_qlen_dec() replacement, fix build issue
 - more descriptive commit message

Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/sch_generic.h
net/core/gen_stats.c
net/sched/sch_generic.c