Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
* [Cake] [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling
@ 2026-08-20 15:45 Giuseppe Piscitelli
  2026-08-20 15:49 ` [Cake] " Toke Høiland-Jørgensen
  2026-08-22 21:00 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Giuseppe Piscitelli @ 2026-08-20 15:45 UTC (permalink / raw)
  To: Toke Høiland-Jørgensen
  Cc: Jamal Hadi Salim, Jiri Pirko, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, cake, netdev,
	linux-kernel

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
Signed-off-by: Giuseppe Piscitelli <ooonea@gmail.com>
---
v3: resend via git send-email; v2 went out through a mail client that
    mangled whitespace and does not apply
v2: spell out my full name in From/Signed-off-by (Paolo Abeni)

 net/sched/sch_cake.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/net/sched/sch_cake.c b/net/sched/sch_cake.c
index f25f60978..dc9326702 100644
--- a/net/sched/sch_cake.c
+++ b/net/sched/sch_cake.c
@@ -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
-- 
2.54.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Cake] Re: [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling
  2026-08-20 15:45 [Cake] [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling Giuseppe Piscitelli
@ 2026-08-20 15:49 ` Toke Høiland-Jørgensen
  2026-08-22 21:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Toke Høiland-Jørgensen @ 2026-08-20 15:49 UTC (permalink / raw)
  To: Giuseppe Piscitelli
  Cc: Jamal Hadi Salim, Jiri Pirko, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Simon Horman, cake, netdev,
	linux-kernel

Giuseppe Piscitelli <ooonea@gmail.com> writes:

> 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
> Signed-off-by: Giuseppe Piscitelli <ooonea@gmail.com>

Please retain ACKs when reposting.

Acked-by: Toke Høiland-Jørgensen <toke@toke.dk>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Cake] Re: [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling
  2026-08-20 15:45 [Cake] [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling Giuseppe Piscitelli
  2026-08-20 15:49 ` [Cake] " Toke Høiland-Jørgensen
@ 2026-08-22 21:00 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-08-22 21:00 UTC (permalink / raw)
  To: Giuseppe Piscitelli
  Cc: toke, jhs, jiri, davem, edumazet, kuba, pabeni, horms, cake,
	netdev, linux-kernel

Hello:

This patch was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 20 Aug 2026 17:45:03 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - [net,v3] net/sched: sch_cake: fix autorate reconfiguration throttling
    https://git.kernel.org/netdev/net/c/7cbfb180945c

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-08-22 21:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-20 15:45 [Cake] [PATCH net v3] net/sched: sch_cake: fix autorate reconfiguration throttling Giuseppe Piscitelli
2026-08-20 15:49 ` [Cake] " Toke Høiland-Jørgensen
2026-08-22 21:00 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox