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