mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: xiujianfeng <xiujianfeng@huawei.com>
To: Tejun Heo <tj@kernel.org>
Cc: <lizefan.x@bytedance.com>, <hannes@cmpxchg.org>, <corbet@lwn.net>,
	<kamalesh.babulal@oracle.com>, <haitao.huang@linux.intel.com>,
	<cgroups@vger.kernel.org>, <linux-doc@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH -next] cgroup/misc: Introduce misc.peak
Date: Tue, 2 Jul 2024 08:20:02 +0800	[thread overview]
Message-ID: <e5799cce-6038-c4bf-3414-4856d57f60a1@huawei.com> (raw)
In-Reply-To: <ZoLlCl1-PMr5DKIG@slm.duckdns.org>



On 2024/7/2 1:19, Tejun Heo wrote:
> 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 for your review, will do in v2.

> 
> Thanks.
> 

      reply	other threads:[~2024-07-02  0:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-01 12:52 Xiu Jianfeng
2024-07-01 15:01 ` Randy Dunlap
2024-07-02  0:19   ` xiujianfeng
2024-07-01 17:19 ` Tejun Heo
2024-07-02  0:20   ` xiujianfeng [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e5799cce-6038-c4bf-3414-4856d57f60a1@huawei.com \
    --to=xiujianfeng@huawei.com \
    --cc=cgroups@vger.kernel.org \
    --cc=corbet@lwn.net \
    --cc=haitao.huang@linux.intel.com \
    --cc=hannes@cmpxchg.org \
    --cc=kamalesh.babulal@oracle.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan.x@bytedance.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®