]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: Allow statistics reads from softirq.
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Tue, 19 Oct 2021 10:12:04 +0000 (12:12 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 Oct 2021 12:07:35 +0000 (13:07 +0100)
commitb5291ee6807d94edcc09b8d9e56a387e10e10bf5
tree71470e97aab9eb973799c15ee5b9516983ac3ffc
parentbf63200ca0538b1f44b9e052eec7ba48fb25cfbe
net: sched: Allow statistics reads from softirq.

Eric reported that the rate estimator reads statics from the softirq
which in turn triggers a warning introduced in the statistics rework.

The warning is too cautious. The updates happen in the softirq context
so reads from softirq are fine since the writes can not be preempted.
The updates/writes happen during qdisc_run() which ensures one writer
and the softirq context.
The remaining bad context for reading statistics remains in hard-IRQ
because it may preempt a writer.

Fixes: d9d5c6b53175b ("net: sched: Remove Qdisc::running sequence counter")
Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/gen_stats.c