[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211015130035.aacc18a4d1ee141b306c2272@linux-foundation.org>
Date: Fri, 15 Oct 2021 13:00:35 -0700
From: Andrew Morton <akpm@...ux-foundation.org>
To: Huangzhaoyang <huangzhaoyang@...il.com>
Cc: Johannes Weiner <hannes@...xchg.org>,
Michal Hocko <mhocko@...nel.org>,
Vladimir Davydov <vdavydov.dev@...il.com>,
Zhaoyang Huang <zhaoyang.huang@...soc.com>, linux-mm@...ck.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: skip current when memcg reclaim
On Fri, 15 Oct 2021 14:15:29 +0800 Huangzhaoyang <huangzhaoyang@...il.com> wrote:
> From: Zhaoyang Huang <zhaoyang.huang@...soc.com>
>
> Sibling thread of the same process could refault the reclaimed pages
> in the same time, which would be typical in None global reclaim and
> introduce thrashing.
"None" -> "node", I assume?
> --- a/mm/vmscan.c
> +++ b/mm/vmscan.c
> @@ -2841,6 +2841,11 @@ static void shrink_node_memcgs(pg_data_t *pgdat, struct scan_control *sc)
> sc->memcg_low_skipped = 1;
> continue;
> }
> + /*
> + * Don't bother current when its memcg is below low
> + */
The comment explains what the code is doing, but the code itself
already does this. Please can we have a comment that explains *why*
the code is doing this?
> + if (get_mem_cgroup_from_mm(current->mm) == memcg)
> + continue;
> memcg_memory_event(memcg, MEMCG_LOW);
> }
Powered by blists - more mailing lists