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: <afc464cb-1d47-48f8-b56c-59f4c7b92eef@bytedance.com>
Date: Tue, 23 Jul 2024 10:34:33 +0800
From: Chuyi Zhou <zhouchuyi@...edance.com>
To: Benjamin Segall <bsegall@...gle.com>
Cc: mingo@...hat.com, peterz@...radead.org, juri.lelli@...hat.com,
 vincent.guittot@...aro.org, dietmar.eggemann@....com, rostedt@...dmis.org,
 mgorman@...e.de, vschneid@...hat.com, chengming.zhou@...ux.dev,
 linux-kernel@...r.kernel.org, joshdon@...gle.com
Subject: Re: [PATCH 2/2] sched/core: Avoid unnecessary update in
 tg_set_cfs_bandwidth



在 2024/7/23 06:24, Benjamin Segall 写道:
> Chuyi Zhou <zhouchuyi@...edance.com> writes:
> 
>> In the kubernetes production environment, we have observed a high
>> frequency of writes to cpu.max, approximately every 2~4 seconds for each
>> cgroup, with the same value being written each time. This can result in
>> unnecessary overhead, especially on machines with a large number of CPUs
>> and cgroups.
>>
>> This is because kubelet and runc attempt to persist resource
>> configurations through frequent updates with same value in this manner.
>> While optimizations can be made to kubelet and runc to avoid such
>> overhead(e.g. check the current value of cpu request/limit before writing
>> to cpu.max), it is still worth to bail out from tg_set_cfs_bandwidth() if
>> we attempt to update with the same value.
> 
> Yeah, this is silly of userspace, but we also do the same sort of check
> for shares, so sure.
> 
> We do need it to be inside of a lock though, multiple threads could
> in theory write to the file at once. Just move it down inside of
> cfs_constraints_mutex and that's fine.
> 

Thanks, I will send v2 later.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ