Thread (4 messages) 4 messages, 2 authors, 8d ago

Re: [PATCH net-next] net/sched: sch_cake: skip clearing unused tins during rate adjustment

From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: 2026-07-17 08:37:52
Also in: lkml

Jonas Köppeler [off-list ref] writes:
When cake_configure_rates() is called from the dequeue path with
rate_adjust=true, it only needs to update the rate parameters. The
loop that clears the unused tins is both unnecessary and harmful in
this path:

 - cake_clear_tin() overwrites q->cur_tin and q->cur_flow, which are
   actively used by cake_dequeue(), corrupting the dequeue state.
 - iterating over the unused tins and their internal queues to purge
   packets adds needless overhead to the hot path.

Skip the entire loop when rate_adjust is set, as neither
cake_clear_tin() nor the mtu_time update are needed when only the
rate changes.

Fixes: 15c2715a5264 ("net/sched: sch_cake: fixup cake_mq rate adjustment for diffserv config")
Signed-off-by: Jonas Köppeler <redacted>
Tested-by: Mike Pham <redacted>
Do you have any performance numbers to show the impact of this?

-Toke
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help