[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <m2ecrusy11.fsf@gmail.com>
Date: Thu, 25 Sep 2025 10:04:58 +0100
From: Donald Hunter <donald.hunter@...il.com>
To: Toke Høiland-Jørgensen <toke@...hat.com>
Cc: Toke Høiland-Jørgensen <toke@...e.dk>, Jamal Hadi
Salim
<jhs@...atatu.com>, Cong Wang <xiyou.wangcong@...il.com>, Jiri Pirko
<jiri@...nulli.us>, "David S. Miller" <davem@...emloft.net>, Eric
Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>, Paolo
Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>, Jonas
Köppeler <j.koeppeler@...berlin.de>,
cake@...ts.bufferbloat.net,
netdev@...r.kernel.org
Subject: Re: [PATCH RFC net-next 4/4] net/sched: sch_cake: share shaper
state across sub-instances of cake_mq
Toke Høiland-Jørgensen <toke@...hat.com> writes:
> From: Jonas Köppeler <j.koeppeler@...berlin.de>
>
> This commit adds shared shaper state across the cake instances beneath a
> cake_mq qdisc. It works by periodically tracking the number of active
> instances, and scaling the configured rate by the number of active
> queues.
>
> The scan is lockless and simply reads the qlen and the last_active state
> variable of each of the instances configured beneath the parent cake_mq
> instance. Locking is not required since the values are only updated by
> the owning instance, and eventual consistency is sufficient for the
> purpose of estimating the number of active queues.
>
> The interval for scanning the number of active queues is configurable
> and defaults to 200 us. We found this to be a good tradeoff between
> overhead and response time. For a detailed analysis of this aspect see
> the Netdevconf talk:
>
> https://netdevconf.info/0x19/docs/netdev-0x19-paper16-talk-paper.pdf
>
> Signed-off-by: Jonas Köppeler <j.koeppeler@...berlin.de>
> Signed-off-by: Toke Høiland-Jørgensen <toke@...hat.com>
> ---
> include/uapi/linux/pkt_sched.h | 2 ++
> net/sched/sch_cake.c | 67 ++++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 69 insertions(+)
>
> diff --git a/include/uapi/linux/pkt_sched.h b/include/uapi/linux/pkt_sched.h
> index c2da76e78badebbdf7d5482cef1a3132aec99fe1..a4aa812bfbe86424c502de5bb2e5b1429b440088 100644
> --- a/include/uapi/linux/pkt_sched.h
> +++ b/include/uapi/linux/pkt_sched.h
> @@ -1014,6 +1014,7 @@ enum {
> TCA_CAKE_ACK_FILTER,
> TCA_CAKE_SPLIT_GSO,
> TCA_CAKE_FWMARK,
> + TCA_CAKE_SYNC_TIME,
> __TCA_CAKE_MAX
> };
> #define TCA_CAKE_MAX (__TCA_CAKE_MAX - 1)
> @@ -1036,6 +1037,7 @@ enum {
> TCA_CAKE_STATS_DROP_NEXT_US,
> TCA_CAKE_STATS_P_DROP,
> TCA_CAKE_STATS_BLUE_TIMER_US,
> + TCA_CAKE_STATS_ACTIVE_QUEUES,
> __TCA_CAKE_STATS_MAX
> };
> #define TCA_CAKE_STATS_MAX (__TCA_CAKE_STATS_MAX - 1)
Hi Toke,
Could you include this diff in the patch to keep the ynl spec up to date?
diff --git a/Documentation/netlink/specs/tc.yaml b/Documentation/netlink/specs/tc.yaml
index b398f7a46dae..f0edc84f9613 100644
--- a/Documentation/netlink/specs/tc.yaml
+++ b/Documentation/netlink/specs/tc.yaml
@@ -2153,6 +2153,9 @@ attribute-sets:
-
name: fwmark
type: u32
+ -
+ name: sync-time
+ type: u32
-
name: cake-stats-attrs
name-prefix: tca-cake-stats-
@@ -2207,6 +2210,9 @@ attribute-sets:
-
name: blue-timer-us
type: s32
+ -
+ name: active-queues
+ type: u32
-
name: cake-tin-stats-attrs
name-prefix: tca-cake-tin-stats-
Powered by blists - more mailing lists