On Sun, May 22, 2022 at 12:39 AM Vasily Averin <vvs@xxxxxxxxxx> wrote: > > Creating of each new cpu cgroup allocates two 512-bytes kernel objects > per CPU. This is especially important for cgroups shared parent memory > cgroup. In this scenario, on nodes with multiple processors, these > allocations become one of the main memory consumers. > > Memory allocated during new cpu cgroup creation: > common part: ~11Kb + 318 bytes percpu > cpu cgroup: ~2.5Kb + 1036 bytes percpu > > Accounting for this memory helps to avoid misuse inside memcg-limited > contianers. > > Signed-off-by: Vasily Averin <vvs@xxxxxxxxxx> Reviewed-by: Muchun Song <songmuchun@xxxxxxxxxxxxx>