Re: [PATCH v2] net/sched: sch_cake: skip redundant cake_mq rate updates
From: Paolo Abeni
Date: Thu Oct 29 2026 - 07:52:36 EST
On 10/27/26 05:32, Shubhang Kaushik (Ampere) wrote:
cake_mq periodically counts active child qdiscs in cake_dequeue() andIMHO this is borderline material for 'net'. Was any regression visible on
derives an effective per-child shaper rate. cake_dequeue() currently
reconfigures every tin after each scan, even when that effective rate
is unchanged.
The dequeue-time call chain is:
cake_dequeue()
-> cake_configure_rates(..., true)
-> cake_config_*()
-> cake_set_rate()
With rate_adjust=true, cake_set_rate() only refreshes rate-derived
state. Tin 0 records the unscaled rate argument in every supported
CAKE tin mode, so its installed rate identifies whether this call chain
would change any state.
Skip the reconfiguration when the effective rate is already installed,
while continuing to update the activity-sampling timestamp and
active-queue statistic.
Fixes: 1bddd758bac2 ("net/sched: sch_cake: share shaper state across sub-instances of cake_mq")
Signed-off-by: Shubhang Kaushik (Ampere) <sh@xxxxxxxxxx>
top of 1bddd758bac2, e.g. in term of CPU usage?
/P