On Sun, 12 Feb 2023 22:05:42 +0800 Yafang Shao <laoar.shao@xxxxxxxxx> wrote: > On Sat, Feb 11, 2023 at 6:05 AM Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote: > > > > On Fri, 10 Feb 2023 15:49:47 +0000 Yafang Shao <laoar.shao@xxxxxxxxx> wrote: > > > > > The extra space which is used to store the obj_cgroup membership is only > > > valid when kmemcg is enabled. The kmemcg can be disabled via the kernel > > > parameter "cgroup.memory=nokmem" at runtime. > > ... > > > > > What happens if we do a bunch of allocations with kmemcg enabled, then > > disable kmemcg then free those allocations, or some such thing. Does > > the accounting end up wrong? > > > > That won't happen, because we can only enable and disable kmemcg at boot time. Ah, I misread the changelog. I suggest that "disabled via the kernel parameter ... at runtime" be "... at boot time".