Skip to contentSkip to conversation

net/sched: sch_cake: fix autorate reconfiguration throttling

PATCH Superseded ooonea 3 participants 3 messages Aug 16 – Aug 20

Subsystems (4)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

ooonea

author
#0 lore raw

PATCH 1/1 net/sched: sch_cake: fix autorate reconfiguration throttling

CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but last_reconfig_time is only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can call cake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.

Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.

Fixes 7298de9cd725 ("sch_cake: Add ingress mode")
Assisted-by Codex:gpt-5.5
---
 net/sched/sch_cake.c | 1 +
 1 file changed, 1 insertion(+)
net/sched/sch_cake.c +1 -0
index f25f60978..dc9326702 100644
@@ -1907,6 +1907,7 @@ static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
 					ktime_add_ms(q->last_reconfig_time,
 						     250))) {
 				q->config->rate_bps = (q->avg_peak_bandwidth * 15) >> 4;
+				q->last_reconfig_time = now;
 				cake_reconfigure(sch);
 			}
 		}

base-commit: 24ef02f934eeb48830cff6b739abc3c62b1d107b

Signature · 1 line
2.54.0
maintainer Acked-by on v1 1/1
#1 lore raw
Quoted 6 lines · ooonea

CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but last_reconfig_time is only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can call cake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.

Quoted 6 lines

Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.

Fixes 7298de9cd725 ("sch_cake: Add ingress mode")
Assisted-by Codex:gpt-5.5
maintainer
#2 lore raw
In reply to ooonea
Quoted 6 lines · ooonea

CAKE's autorate-ingress path intends to limit shaper reconfiguration to once per 250 ms, but last_reconfig_time is only checked and never updated. Since the field stays zero, every qualifying capacity-estimate window can call cake_reconfigure(), causing avoidable rate churn and scheduler work under bursty traffic.

Quoted 6 lines

Store the current timestamp when autorate actually reconfigures the qdisc so the guard enforces the intended interval.

Fixes 7298de9cd725 ("sch_cake: Add ingress mode")
Assisted-by Codex:gpt-5.5

The SoB must contain your real full name, and not a nick.

/P