Re: [PATCH mm v5 0/9] memcg: accounting for objects allocated by mkdir, cgroup

From: Michal Koutný
Date: Fri Jun 24 2022 - 08:26:17 EST


On Fri, Jun 24, 2022 at 01:40:14PM +0300, Vasily Averin <vvs@xxxxxxxxxx> wrote:
> Btw could you please explain why memory cgroups have MEM_CGROUP_ID_MAX limit
> Why it is required at all and why it was set to USHRT_MAX? I believe that
> in the future it may be really reachable:

IIRC, one reason is 2B * nr_swap_pages of memory overhead (in
swap_cgroup_swapon()) that's ~0.05% of swap space occupied additionally
in RAM (fortunately swap needn't cover whole RAM).

HTH,
Michal

Attachment: signature.asc
Description: Digital signature