Re: [PATCH] mm: add memory.compact_unevictable_allowed cgroup attribute

Michal Hocko
2026-03-18T10:01:39Z

On Wed 18-03-26 12:25:17, Daniil Tatianin wrote:
>
> On 3/18/26 12:20 PM, Michal Hocko wrote:
[...]
> > Shouldn't those use mlock?
>
> Absolutely, mlock is required to mark a folio as unevictable. Note that
> unevictable folios are still
> perfectly eligible for compaction. This new property makes it so a cgroup
> can say whether its
> unevictable pages should be compacted (same as the global
> compact_unevictable_allowed sysctl).

If the mlock is already used then why do we need a per memcg control as
well? Do we have different classes of mlocked pages some with acceptable
compaction while others without?

--
Michal Hocko
SUSE Labs