lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <87o6qypsmk.fsf@toke.dk>
Date: Thu, 25 Sep 2025 15:29:55 +0200
From: Toke Høiland-Jørgensen <toke@...e.dk>
To: Donald Hunter <donald.hunter@...il.com>
Cc: 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

Donald Hunter <donald.hunter@...il.com> writes:

> 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?

Ah yes, will do, thanks! :)

-Toke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ