From: ooonea <ooonea@gmail.com>
To: "Toke Høiland-Jørgensen" <toke@toke.dk>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
cake@lists.bufferbloat.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH net] net/sched: sch_cake: fix autorate reconfiguration throttling
Date: Sun, 16 Aug 2026 03:21:09 +0200 [thread overview]
Message-ID: <20260816012109.2865223-1-ooonea@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")
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:21 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260816012109.2865223-1-ooonea@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.