[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200401182306.724698b74692b5d31f66ad10@linux-foundation.org>
Date: Wed, 1 Apr 2020 18:23:06 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Chris Down <chris@...isdown.name>
Cc: Johannes Weiner <hannes@...xchg.org>, Tejun Heo <tj@...nel.org>,
linux-mm@...ck.org, cgroups@...r.kernel.org,
linux-kernel@...r.kernel.org, kernel-team@...com,
Michal Hocko <mhocko@...nel.org>
Subject: Re: [PATCH] mm, memcg: Bypass high reclaim iteration for cgroup
hierarchy root
On Thu, 12 Mar 2020 16:41:37 +0000 Chris Down <chris@...isdown.name> wrote:
> The root of the hierarchy cannot have high set, so we will never reclaim
> based on it. This makes that clearer and avoids another entry.
>
> ...
>
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2232,7 +2232,8 @@ static void reclaim_high(struct mem_cgroup *memcg,
> continue;
> memcg_memory_event(memcg, MEMCG_HIGH);
> try_to_free_mem_cgroup_pages(memcg, nr_pages, gfp_mask, true);
> - } while ((memcg = parent_mem_cgroup(memcg)));
> + } while ((memcg = parent_mem_cgroup(memcg)) &&
> + !mem_cgroup_is_root(memcg));
> }
>
> static void high_work_func(struct work_struct *work)
Does someone have time to review this one?
Thanks.
Powered by blists - more mailing lists