Re: [PATCH] mm/memcg: support control THP behaviour in cgroup

From: Michal Hocko
Date: Fri May 06 2022 - 09:42:08 EST


On Thu 05-05-22 03:38:15, cgel.zte@xxxxxxxxx wrote:
> From: Yang Yang <yang.yang29@xxxxxxxxxx>
>
> Using THP may promote the performance of memory, but increase memory
> footprint. Applications may use madvise to decrease footprint, but
> not all applications support using madvise, and it takes much costs
> to re-code all the applications. And we notice container becomes more
> and more popular to manage a set of tasks.

Could you be more specific about the actual usecase? When do you group
processes based on their general THP reqirements? You are mentioning
containers but those are usually bags of different processes that just
share a common objective.

> So add support for cgroup to control THP behaviour will provide much
> convenience, administrator may only enable THP for important containers,
> and disable it for other containers.

Why would that be a matter of importance?

Also what is actual semantic when processes living inside those cgroups
explicitly state their THP requirements?

--
Michal Hocko
SUSE Labs