From: Shubhang <sh@gentwo.org>
To: Paolo Abeni <pabeni@redhat.com>
Cc: "Toke Høiland-Jørgensen" <toke@toke.dk>,
"Jamal Hadi Salim" <jhs@mojatatu.com>,
"Jiri Pirko" <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
"Eric Dumazet" <edumazet@kernel.org>,
"Jakub Kicinski" <kuba@kernel.org>,
"Simon Horman" <horms@kernel.org>,
"Jonas Köppeler" <j.koeppeler@tu-berlin.de>,
"Shubhang Kaushik" <shubhang@os.amperecomputing.com>,
"Christoph Lameter (Ampere)" <cl@gentwo.org>,
"Toke Høiland-Jørgensen" <toke@redhat.com>,
cake@lists.bufferbloat.net, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [Cake] Re: [PATCH v2] net/sched: sch_cake: skip redundant cake_mq rate updates
Date: Thu, 29 Oct 2026 14:45:19 -0700 (PDT) [thread overview]
Message-ID: <bc677053-f438-fda5-defc-a53532262779@gentwo.org> (raw)
In-Reply-To: <bb202893-9fd5-4dad-ad69-9f86dfd91cc3@redhat.com>
Hi Paolo,
On Thu, 29 Oct 2026, Paolo Abeni wrote:
> On 10/27/26 05:32, Shubhang Kaushik (Ampere) wrote:
>> cake_mq periodically counts active child qdiscs in cake_dequeue() and
>> derives an effective per-child shaper rate. cake_dequeue() currently
>> reconfigures every tin after each scan, even when that effective rate
>> is unchanged.
>>
>> The dequeue-time call chain is:
>>
>> cake_dequeue()
>> -> cake_configure_rates(..., true)
>> -> cake_config_*()
>> -> cake_set_rate()
>>
>> With rate_adjust=true, cake_set_rate() only refreshes rate-derived
>> state. Tin 0 records the unscaled rate argument in every supported
>> CAKE tin mode, so its installed rate identifies whether this call chain
>> would change any state.
>>
>> Skip the reconfiguration when the effective rate is already installed,
>> while continuing to update the activity-sampling timestamp and
>> active-queue statistic.
>>
>> Fixes: 1bddd758bac2 ("net/sched: sch_cake: share shaper state across
>> sub-instances of cake_mq")
>> Signed-off-by: Shubhang Kaushik (Ampere) <sh@gentwo.org>
> IMHO this is borderline material for 'net'. Was any regression visible on
> top of 1bddd758bac2, e.g. in term of CPU usage?
>
> /P
>
Thanks for the feedback.
I repeated the test with whole-host CPU accounting on this 80-core system
and could not measure a reliable aggregate CPU-use difference; throughput
was unchanged. The benefit is visible in focused cake_configure_rates()
trace, but I agree this is more appropriate for net-next.
Regards,
Shubhang Kaushik
next prev parent reply other threads:[~2026-10-29 21:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-27 4:32 [Cake] [PATCH v2] net/sched: sch_cake: skip redundant cake_mq rate updates Shubhang Kaushik (Ampere)
2026-10-27 9:55 ` [Cake] " Toke Høiland-Jørgensen
2026-10-29 11:52 ` Paolo Abeni
2026-10-29 21:45 ` Shubhang [this message]
2026-10-30 22:31 ` Jakub Kicinski
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=bc677053-f438-fda5-defc-a53532262779@gentwo.org \
--to=sh@gentwo.org \
--cc=cake@lists.bufferbloat.net \
--cc=cl@gentwo.org \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=j.koeppeler@tu-berlin.de \
--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=shubhang@os.amperecomputing.com \
--cc=toke@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