[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z9xIEgxoGfZIfSkz@slm.duckdns.org>
Date: Thu, 20 Mar 2025 06:53:38 -1000
From: Tejun Heo <tj@...nel.org>
To: Yosry Ahmed <yosry.ahmed@...ux.dev>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Koutný <mkoutny@...e.com>,
Greg Thelen <gthelen@...gle.com>, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH cgroup/for-6.15] cgroup: rstat: Cleanup flushing
functions and locking
On Wed, Mar 19, 2025 at 09:00:13PM +0000, Yosry Ahmed wrote:
> Now that the rstat lock is being re-acquired on every CPU iteration in
> cgroup_rstat_flush_locked(), having the initially acquire the lock is
> unnecessary and unclear.
>
> Inline cgroup_rstat_flush_locked() into cgroup_rstat_flush() and move
> the lock/unlock calls to the beginning and ending of the loop body to
> make the critical section obvious.
>
> cgroup_rstat_flush_hold/release() do not make much sense with the lock
> being dropped and reacquired internally. Since it has no external
> callers, remove it and explicitly acquire the lock in
> cgroup_base_stat_cputime_show() instead.
>
> This leaves the code with a single flushing function,
> cgroup_rstat_flush().
>
> Signed-off-by: Yosry Ahmed <yosry.ahmed@...ux.dev>
Applied to cgroup/for-6.15.
Thanks.
--
tejun
Powered by blists - more mailing lists