Re: [PATCH] mm: correctly charge compressed memory to its memcg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes@xxxxxxxxxxx> wrote:
>
> 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.)

Thanks for the clarification, it makes sense to use the byte interface
here for this, and thanks for pointing out that CONFIC_MEMCG_KMEM is
not part of CONFIG_MEMCG.

One more question :) memcg kmem charging can still be disabled even
with !CONFIG_MEMCG_KMEM, right? In this case zswap charging will also
be off, which seems like an unintended side effect, right?




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux