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