Hi, On Mon, 2019-04-08 at 14:17 -0700, Eric Dumazet wrote: > On 04/08/2019 09:35 AM, Paolo Abeni wrote: > > This revert commit 46b1c18f9deb ("net: sched: put back q.qlen > > into a single location"). > > After the previous patch nobody accesses directly qlen for a child > > qdisc when such qdisc does per CPU stats accounting. > > In the control path nobody uses directly qlen since commit > > 677f1bc207c ("net: sched: introduce and use qdisc tree flush/purge > > helpers"), so we can remove the contented atomic ops from the > > datapath. > > > > Have you tested HTB with a pfifo_fast on a throttled class ? > > I do not see any changes in HTB in your patch series, so it is not > clear why your patch series is not adding back the issue.
Thank you for the feedback. I tested this series enslaving pfifo_fast to each classful qdiscs - including HTB - sending traffic through the pfifo_fast qdisc, and checking correct accounting. When pfifo_fast is enslaved to HTB, the NOLOCK flag is cleared - by qdisc_graft(), as HTB is a lock qdisc. As per patch 4/5, TCQ_F_CPUSTATS is cleared, too, so pfifo_fast switches to global accounting, under root lock protection. In HTB context, <child pfifo_fast>->q.qlen should be always valid, no changes required there, nor to any other classful qdisc - until we will have lockless classful qdiscs: they should not access <child>->q.qlen directly. Please let me know if the above is somewhat clear. Have I missed something? Thanks, Paolo