Multi-queue aware sch_cake
From: | Toke Høiland-Jørgensen <toke-AT-redhat.com> | |
To: | Toke Høiland-Jørgensen <toke-AT-toke.dk>, Jamal Hadi Salim <jhs-AT-mojatatu.com>, Cong Wang <xiyou.wangcong-AT-gmail.com>, Jiri Pirko <jiri-AT-resnulli.us>, "David S. Miller" <davem-AT-davemloft.net>, Eric Dumazet <edumazet-AT-google.com>, Jakub Kicinski <kuba-AT-kernel.org>, Paolo Abeni <pabeni-AT-redhat.com>, Simon Horman <horms-AT-kernel.org> | |
Subject: | [PATCH RFC net-next 0/4] Multi-queue aware sch_cake | |
Date: | Wed, 24 Sep 2025 14:16:02 +0200 | |
Message-ID: | <20250924-mq-cake-sub-qdisc-v1-0-43a060d1112a@redhat.com> | |
Cc: | Jonas Köppeler <j.koeppeler-AT-tu-berlin.de>, cake-AT-lists.bufferbloat.net, netdev-AT-vger.kernel.org, Toke Høiland-Jørgensen <toke-AT-redhat.com> | |
Archive-link: | Article |
This series adds a multi-queue aware variant of the sch_cake scheduler, called 'cake_mq'. Using this makes it possible to scale the rate shaper of sch_cake across multiple CPUs, while still enforcing a single global rate on the interface. The approach taken in this patch series is to implement a separate qdisc called 'cake_mq', which is based on the existing 'mq' qdisc, but differs in a couple of aspects: - It will always install a cake instance on each hardware queue (instead of using the default qdisc for each queue like 'mq' does). - The cake instances on the queues will share their configuration, which can only be modified through the parent cake_mq instance. Doing things this way does incur a bit of code duplication (reusing the 'mq' qdisc code), but it simplifies user configuration by centralising all configuration through the cake_mq qdisc (which also serves as an obvious way of opting into the multi-queue aware behaviour). The cake_mq qdisc takes all the same configuration parameters as the cake qdisc, plus on additional parameter to control the sync time between the individual cake instances. We are posting this series to solicit feedback on the API, as well as wider testing of the multi-core shaper. An earlier version of this work was presented at this year's Netdevconf: https://netdevconf.info/0x19/sessions/talk/mq-cake-scalin... The patch series is structured as follows: - Patch 1 factors out the sch_cake configuration variables into a separate struct that can be shared between instances. - Patch 2 adds the basic cake_mq qdisc, based on the mq code - Patch 3 adds configuration sharing across the cake instances installed under cake_mq - Patch 4 adds the shared shaper state that enables the multi-core rate shaping A patch to iproute2 to make it aware of the cake_mq qdisc is included as a separate patch as part of this series. --- Jonas Köppeler (1): net/sched: sch_cake: share shaper state across sub-instances of cake_mq Toke Høiland-Jørgensen (3): net/sched: sch_cake: Factor out config variables into separate struct net/sched: sch_cake: Add cake_mq qdisc for using cake on mq devices net/sched: sch_cake: Share config across cake_mq sub-qdiscs include/uapi/linux/pkt_sched.h | 2 + net/sched/sch_cake.c | 635 +++++++++++++++++++++++++++++++++-------- 2 files changed, 514 insertions(+), 123 deletions(-) --- base-commit: dc1dea796b197aba2c3cae25bfef45f4b3ad46fe change-id: 20250902-mq-cake-sub-qdisc-cdf0b59d2fe5