[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200428211953.GB400178@cmpxchg.org>
Date: Tue, 28 Apr 2020 17:19:53 -0400
From: Johannes Weiner <hannes@...xchg.org>
To: Chris Down <chris@...isdown.name>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Michal Hocko <mhocko@...nel.org>, Roman Gushchin <guro@...com>,
Yafang Shao <laoar.shao@...il.com>, linux-mm@...ck.org,
cgroups@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] mm, memcg: Decouple e{low,min} state mutations from
protection checks
On Tue, Apr 28, 2020 at 07:27:00PM +0100, Chris Down wrote:
> mem_cgroup_protected currently is both used to set effective low and min
> and return a mem_cgroup_protection based on the result. As a user, this
> can be a little unexpected: it appears to be a simple predicate
> function, if not for the big warning in the comment above about the
> order in which it must be executed.
>
> This change makes it so that we separate the state mutations from the
> actual protection checks, which makes it more obvious where we need to
> be careful mutating internal state, and where we are simply checking and
> don't need to worry about that.
>
> Signed-off-by: Chris Down <chris@...isdown.name>
> Suggested-by: Johannes Weiner <hannes@...xchg.org>
> Cc: Michal Hocko <mhocko@...nel.org>
> Cc: Roman Gushchin <guro@...com>
> Cc: Yafang Shao <laoar.shao@...il.com>
Acked-by: Johannes Weiner <hannes@...xchg.org>
Powered by blists - more mailing lists