Cake - FQ_codel the next generation
 help / color / mirror / Atom feed
From: Giuseppe Piscitelli <ooonea@gmail.com>
To: toke@toke.dk
Cc: jhs@mojatatu.com, jiri@resnulli.us, davem@davemloft.net,
	edumazet@google.com, kuba@kernel.org, pabeni@redhat.com,
	horms@kernel.org, cake@lists.bufferbloat.net,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [Cake] [PATCH net] net/sched: sch_cake: fix autorate reconfiguration throttling
Date: Sat, 15 Aug 2026 21:13:09 -0400	[thread overview]
Message-ID: <CACmoRBbAYgMBSXM7xqfZgSkM0Y=ztYcwe9wEhVdA+piCGbc9Qw@mail.gmail.com> (raw)

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")
Cc: stable@vger.kernel.org
Assisted-by: Codex:gpt-5.5
Signed-off-by: ooonea <ooonea@gmail.com>
---
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

             reply	other threads:[~2026-08-16  1:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-16  1:13 Giuseppe Piscitelli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2026-08-16  1:21 [Cake] [PATCH net] net/sched: sch_cake: fix autorate reconfiguration throttling ooonea

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.bufferbloat.net/postorius/lists/cake.lists.bufferbloat.net/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CACmoRBbAYgMBSXM7xqfZgSkM0Y=ztYcwe9wEhVdA+piCGbc9Qw@mail.gmail.com' \
    --to=ooonea@gmail.com \
    --cc=cake@lists.bufferbloat.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=toke@toke.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox