On Mon, Aug 15, 2022 at 06:46:46AM -0700, Yosry Ahmed wrote: > Yeah I understand this much, what I don't understand is why we charge > the zswap memory through objcg (thus tying it to memcg kmem charging) > rather than directly through memcg. The charged quantities are smaller than a page, so we have to use the byte interface. The byte interface (objcg) was written for slab originally, hence the link to the kmem option. But note that CONFIG_MEMCG_KMEM is no longer a user-visible option, and for all intents and purposes a fixed part of CONFIG_MEMCG. (There is the SLOB quirk. But I'm not sure anybody uses slob, let alone slob + memcg.)