Re: [PATCH v2] net/sched: sch_cake: skip redundant cake_mq rate updates
From: Shubhang
Date: Thu Oct 29 2026 - 17:45:30 EST
Hi Paolo,
On Thu, 29 Oct 2026, Paolo Abeni wrote:
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
Thanks for the feedback.
I repeated the test with whole-host CPU accounting on this 80-core system and could not measure a reliable aggregate CPU-use difference; throughput was unchanged. The benefit is visible in focused cake_configure_rates() trace, but I agree this is more appropriate for net-next.
Regards,
Shubhang Kaushik