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] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZoLlCl1-PMr5DKIG@slm.duckdns.org>
Date: Mon, 1 Jul 2024 07:19:06 -1000
From: Tejun Heo <tj@...nel.org>
To: Xiu Jianfeng <xiujianfeng@...wei.com>
Cc: lizefan.x@...edance.com, hannes@...xchg.org, corbet@....net,
	kamalesh.babulal@...cle.com, haitao.huang@...ux.intel.com,
	cgroups@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH -next] cgroup/misc: Introduce misc.peak

On Mon, Jul 01, 2024 at 12:52:59PM +0000, Xiu Jianfeng wrote:
> +		if (new_usage > READ_ONCE(res->watermark))
> +			WRITE_ONCE(res->watermark, new_usage);

It'd be better to do cmpxchg loop on update. That doesn't make it noticeably
more expensive and the peak tracking would actually be accurate.

Thanks.

-- 
tejun

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ