All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [PATCH] mm: correctly charge compressed memory to its memcg
       [not found] ` <20220811081913.102770-1-liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
@ 2022-08-12  0:12   ` Roman Gushchin
  2022-08-12 21:56       ` Shakeel Butt
  0 siblings, 1 reply; 33+ messages in thread
From: Roman Gushchin @ 2022-08-12  0:12 UTC (permalink / raw)
  To: liliguang
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, hannes-druUgvl0LCNAfugRpC6u6w,
	mhocko-DgEjT+Ai2ygdnm+yROfE0A, shakeelb-hpIqsD4AKlfQT0dZR+AlfA,
	songmuchun-EC8Uxl6Npydl57MIdRCFDg

On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> 
> Kswapd will reclaim memory when memory pressure is high, the
> annonymous memory will be compressed and stored in the zpool
> if zswap is enabled. The memcg_kmem_bypass() in
> get_obj_cgroup_from_page() will bypass the kernel thread and
> cause the compressed memory not charged to its memory cgroup.
> 
> Remove the memcg_kmem_bypass() and properly charge compressed
> memory to its corresponding memory cgroup.
> 
> Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index b69979c9ced5..6a95ea7c5ee7 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
>  {
>  	struct obj_cgroup *objcg;
>  
> -	if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> +	if (!memcg_kmem_enabled())
>  		return NULL;
>  
>  	if (PageMemcgKmem(page)) {
> -- 
> 2.32.0 (Apple Git-132)
> 

Hi Li!

The fix looks good to me! As we get objcg pointer from a page and not from
the current task, memcg_kmem_bypass() doesn't makes much sense.

Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>

Probably, we need to add
Fixes: f4840ccfca25 ("zswap: memcg accounting")

Thank you!

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-12 21:56       ` Shakeel Butt
  0 siblings, 0 replies; 33+ messages in thread
From: Shakeel Butt @ 2022-08-12 21:56 UTC (permalink / raw)
  To: liliguang, akpm, linux-mm
  Cc: cgroups, hannes, mhocko, songmuchun, Roman Gushchin

+Andrew & linux-mm

On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
>
> On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > From: Li Liguang <liliguang@baidu.com>
> >
> > Kswapd will reclaim memory when memory pressure is high, the
> > annonymous memory will be compressed and stored in the zpool
> > if zswap is enabled. The memcg_kmem_bypass() in
> > get_obj_cgroup_from_page() will bypass the kernel thread and
> > cause the compressed memory not charged to its memory cgroup.
> >
> > Remove the memcg_kmem_bypass() and properly charge compressed
> > memory to its corresponding memory cgroup.
> >
> > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > ---
> >  mm/memcontrol.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index b69979c9ced5..6a95ea7c5ee7 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> >  {
> >       struct obj_cgroup *objcg;
> >
> > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > +     if (!memcg_kmem_enabled())
> >               return NULL;
> >
> >       if (PageMemcgKmem(page)) {
> > --
> > 2.32.0 (Apple Git-132)
> >
>
> Hi Li!
>
> The fix looks good to me! As we get objcg pointer from a page and not from
> the current task, memcg_kmem_bypass() doesn't makes much sense.
>
> Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
>
> Probably, we need to add
> Fixes: f4840ccfca25 ("zswap: memcg accounting")
>
> Thank you!

You can add:

Acked-by: Shakeel Butt <shakeelb@google.com>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-12 21:56       ` Shakeel Butt
  0 siblings, 0 replies; 33+ messages in thread
From: Shakeel Butt @ 2022-08-12 21:56 UTC (permalink / raw)
  To: liliguang, akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, hannes-druUgvl0LCNAfugRpC6u6w,
	mhocko-DgEjT+Ai2ygdnm+yROfE0A, songmuchun-EC8Uxl6Npydl57MIdRCFDg,
	Roman Gushchin

+Andrew & linux-mm

On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org> wrote:
>
> On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> >
> > Kswapd will reclaim memory when memory pressure is high, the
> > annonymous memory will be compressed and stored in the zpool
> > if zswap is enabled. The memcg_kmem_bypass() in
> > get_obj_cgroup_from_page() will bypass the kernel thread and
> > cause the compressed memory not charged to its memory cgroup.
> >
> > Remove the memcg_kmem_bypass() and properly charge compressed
> > memory to its corresponding memory cgroup.
> >
> > Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > ---
> >  mm/memcontrol.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > index b69979c9ced5..6a95ea7c5ee7 100644
> > --- a/mm/memcontrol.c
> > +++ b/mm/memcontrol.c
> > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> >  {
> >       struct obj_cgroup *objcg;
> >
> > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > +     if (!memcg_kmem_enabled())
> >               return NULL;
> >
> >       if (PageMemcgKmem(page)) {
> > --
> > 2.32.0 (Apple Git-132)
> >
>
> Hi Li!
>
> The fix looks good to me! As we get objcg pointer from a page and not from
> the current task, memcg_kmem_bypass() doesn't makes much sense.
>
> Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>
>
> Probably, we need to add
> Fixes: f4840ccfca25 ("zswap: memcg accounting")
>
> Thank you!

You can add:

Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-13  0:43         ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-13  0:43 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: liliguang, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
>
> +Andrew & linux-mm
>
> On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> >
> > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > From: Li Liguang <liliguang@baidu.com>
> > >
> > > Kswapd will reclaim memory when memory pressure is high, the
> > > annonymous memory will be compressed and stored in the zpool
> > > if zswap is enabled. The memcg_kmem_bypass() in
> > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > cause the compressed memory not charged to its memory cgroup.
> > >
> > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > memory to its corresponding memory cgroup.
> > >
> > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > ---
> > >  mm/memcontrol.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > --- a/mm/memcontrol.c
> > > +++ b/mm/memcontrol.c
> > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > >  {
> > >       struct obj_cgroup *objcg;
> > >
> > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > +     if (!memcg_kmem_enabled())


Won't the memcg_kmem_enabled() check also cause a problem in that same
scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
here?

>
> > >               return NULL;
> > >
> > >       if (PageMemcgKmem(page)) {
> > > --
> > > 2.32.0 (Apple Git-132)
> > >
> >
> > Hi Li!
> >
> > The fix looks good to me! As we get objcg pointer from a page and not from
> > the current task, memcg_kmem_bypass() doesn't makes much sense.
> >
> > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> >
> > Probably, we need to add
> > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> >
> > Thank you!
>
> You can add:
>
> Acked-by: Shakeel Butt <shakeelb@google.com>
>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-13  0:43         ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-13  0:43 UTC (permalink / raw)
  To: Shakeel Butt
  Cc: liliguang, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
>
> +Andrew & linux-mm
>
> On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org> wrote:
> >
> > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > >
> > > Kswapd will reclaim memory when memory pressure is high, the
> > > annonymous memory will be compressed and stored in the zpool
> > > if zswap is enabled. The memcg_kmem_bypass() in
> > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > cause the compressed memory not charged to its memory cgroup.
> > >
> > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > memory to its corresponding memory cgroup.
> > >
> > > Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > > ---
> > >  mm/memcontrol.c | 2 +-
> > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > --- a/mm/memcontrol.c
> > > +++ b/mm/memcontrol.c
> > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > >  {
> > >       struct obj_cgroup *objcg;
> > >
> > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > +     if (!memcg_kmem_enabled())


Won't the memcg_kmem_enabled() check also cause a problem in that same
scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
here?

>
> > >               return NULL;
> > >
> > >       if (PageMemcgKmem(page)) {
> > > --
> > > 2.32.0 (Apple Git-132)
> > >
> >
> > Hi Li!
> >
> > The fix looks good to me! As we get objcg pointer from a page and not from
> > the current task, memcg_kmem_bypass() doesn't makes much sense.
> >
> > Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>
> >
> > Probably, we need to add
> > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> >
> > Thank you!
>
> You can add:
>
> Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15  2:52           ` Li,Liguang
  0 siblings, 0 replies; 33+ messages in thread
From: Li,Liguang @ 2022-08-15  2:52 UTC (permalink / raw)
  To: Yosry Ahmed, Shakeel Butt
  Cc: Andrew Morton, Linux-MM, Cgroups, Johannes Weiner, Michal Hocko,
	Muchun Song, Roman Gushchin

在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:

> On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> >
> > +Andrew & linux-mm
> >
> > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > >
> > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > From: Li Liguang <liliguang@baidu.com>
> > > >
> > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > annonymous memory will be compressed and stored in the zpool
> > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > cause the compressed memory not charged to its memory cgroup.
> > > >
> > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > memory to its corresponding memory cgroup.
> > > >
> > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > ---
> > > >  mm/memcontrol.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > --- a/mm/memcontrol.c
> > > > +++ b/mm/memcontrol.c
> > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > >  {
> > > >       struct obj_cgroup *objcg;
> > > >
> > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > +     if (!memcg_kmem_enabled())
>
>
> Won't the memcg_kmem_enabled() check also cause a problem in that same
> scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> here?
>

Please notes that the return value is a pointer to obj_cgroup, not memcg.
If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need 
to be returned.

> >
> > > >               return NULL;
> > > >
> > > >       if (PageMemcgKmem(page)) {
> > > > --
> > > > 2.32.0 (Apple Git-132)
> > > >
> > >
> > > Hi Li!
> > >
> > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > >
> > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > >
> > > Probably, we need to add
> > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > >
> > > Thank you!
> >
> > You can add:
> >
> > Acked-by: Shakeel Butt <shakeelb@google.com>
> >


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15  2:52           ` Li,Liguang
  0 siblings, 0 replies; 33+ messages in thread
From: Li,Liguang @ 2022-08-15  2:52 UTC (permalink / raw)
  To: Yosry Ahmed, Shakeel Butt
  Cc: Andrew Morton, Linux-MM, Cgroups, Johannes Weiner, Michal Hocko,
	Muchun Song, Roman Gushchin

在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:

> On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> >
> > +Andrew & linux-mm
> >
> > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > >
> > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > From: Li Liguang <liliguang@baidu.com>
> > > >
> > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > annonymous memory will be compressed and stored in the zpool
> > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > cause the compressed memory not charged to its memory cgroup.
> > > >
> > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > memory to its corresponding memory cgroup.
> > > >
> > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > ---
> > > >  mm/memcontrol.c | 2 +-
> > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > >
> > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > --- a/mm/memcontrol.c
> > > > +++ b/mm/memcontrol.c
> > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > >  {
> > > >       struct obj_cgroup *objcg;
> > > >
> > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > +     if (!memcg_kmem_enabled())
>
>
> Won't the memcg_kmem_enabled() check also cause a problem in that same
> scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> here?
>

Please notes that the return value is a pointer to obj_cgroup, not memcg.
If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need 
to be returned.

> >
> > > >               return NULL;
> > > >
> > > >       if (PageMemcgKmem(page)) {
> > > > --
> > > > 2.32.0 (Apple Git-132)
> > > >
> > >
> > > Hi Li!
> > >
> > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > >
> > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > >
> > > Probably, we need to add
> > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > >
> > > Thank you!
> >
> > You can add:
> >
> > Acked-by: Shakeel Butt <shakeelb@google.com>
> >


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
       [not found] ` <20220811081913.102770-1-liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
@ 2022-08-15  6:52   ` Muchun Song
  0 siblings, 0 replies; 33+ messages in thread
From: Muchun Song @ 2022-08-15  6:52 UTC (permalink / raw)
  To: liliguang
  Cc: Cgroups, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Andrew Morton, Linux Memory Management List

On Thu, Aug 11, 2022 at 4:19 PM liliguang <liliguang@baidu.com> wrote:
>
> From: Li Liguang <liliguang@baidu.com>
>
> Kswapd will reclaim memory when memory pressure is high, the
> annonymous memory will be compressed and stored in the zpool
> if zswap is enabled. The memcg_kmem_bypass() in
> get_obj_cgroup_from_page() will bypass the kernel thread and
> cause the compressed memory not charged to its memory cgroup.
>
> Remove the memcg_kmem_bypass() and properly charge compressed
> memory to its corresponding memory cgroup.
>
> Signed-off-by: Li Liguang <liliguang@baidu.com>

Reviewed-by: Muchun Song <songmuchun@bytedance.com>

Thanks.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15  6:52   ` Muchun Song
  0 siblings, 0 replies; 33+ messages in thread
From: Muchun Song @ 2022-08-15  6:52 UTC (permalink / raw)
  To: liliguang
  Cc: Cgroups, Johannes Weiner, Michal Hocko, Roman Gushchin,
	Shakeel Butt, Andrew Morton, Linux Memory Management List

On Thu, Aug 11, 2022 at 4:19 PM liliguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org> wrote:
>
> From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
>
> Kswapd will reclaim memory when memory pressure is high, the
> annonymous memory will be compressed and stored in the zpool
> if zswap is enabled. The memcg_kmem_bypass() in
> get_obj_cgroup_from_page() will bypass the kernel thread and
> cause the compressed memory not charged to its memory cgroup.
>
> Remove the memcg_kmem_bypass() and properly charge compressed
> memory to its corresponding memory cgroup.
>
> Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>

Reviewed-by: Muchun Song <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>

Thanks.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15  8:09             ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15  8:09 UTC (permalink / raw)
  To: Li,Liguang
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang@baidu.com> wrote:
>
> 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:
>
> > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> > >
> > > +Andrew & linux-mm
> > >
> > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > >
> > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > From: Li Liguang <liliguang@baidu.com>
> > > > >
> > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > annonymous memory will be compressed and stored in the zpool
> > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > cause the compressed memory not charged to its memory cgroup.
> > > > >
> > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > memory to its corresponding memory cgroup.
> > > > >
> > > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > > ---
> > > > >  mm/memcontrol.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > --- a/mm/memcontrol.c
> > > > > +++ b/mm/memcontrol.c
> > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > >  {
> > > > >       struct obj_cgroup *objcg;
> > > > >
> > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > +     if (!memcg_kmem_enabled())
> >
> >
> > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > here?
> >
>
> Please notes that the return value is a pointer to obj_cgroup, not memcg.
> If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> to be returned.
>

Right. I am not implying that the check should be removed, or that
this is something this patch should address for that matter.

I just realized while looking at this patch that because we are using
objcg in zswap charging, it is dependent on memcg kmem charging. I am
not sure I understand if such dependency is needed? IIUC swapped out
pages hold references to the memcg they are charged to anyway, so why
do we need to use objcgs in charging zswap? I feel like I am missing
something.

> > >
> > > > >               return NULL;
> > > > >
> > > > >       if (PageMemcgKmem(page)) {
> > > > > --
> > > > > 2.32.0 (Apple Git-132)
> > > > >
> > > >
> > > > Hi Li!
> > > >
> > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > >
> > > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > > >
> > > > Probably, we need to add
> > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > >
> > > > Thank you!
> > >
> > > You can add:
> > >
> > > Acked-by: Shakeel Butt <shakeelb@google.com>
> > >
>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15  8:09             ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15  8:09 UTC (permalink / raw)
  To: Li,Liguang
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org> wrote:
>
> 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> 写入:
>
> > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > >
> > > +Andrew & linux-mm
> > >
> > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > >
> > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > > > >
> > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > annonymous memory will be compressed and stored in the zpool
> > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > cause the compressed memory not charged to its memory cgroup.
> > > > >
> > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > memory to its corresponding memory cgroup.
> > > > >
> > > > > Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > > > > ---
> > > > >  mm/memcontrol.c | 2 +-
> > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > >
> > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > --- a/mm/memcontrol.c
> > > > > +++ b/mm/memcontrol.c
> > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > >  {
> > > > >       struct obj_cgroup *objcg;
> > > > >
> > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > +     if (!memcg_kmem_enabled())
> >
> >
> > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > here?
> >
>
> Please notes that the return value is a pointer to obj_cgroup, not memcg.
> If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> to be returned.
>

Right. I am not implying that the check should be removed, or that
this is something this patch should address for that matter.

I just realized while looking at this patch that because we are using
objcg in zswap charging, it is dependent on memcg kmem charging. I am
not sure I understand if such dependency is needed? IIUC swapped out
pages hold references to the memcg they are charged to anyway, so why
do we need to use objcgs in charging zswap? I feel like I am missing
something.

> > >
> > > > >               return NULL;
> > > > >
> > > > >       if (PageMemcgKmem(page)) {
> > > > > --
> > > > > 2.32.0 (Apple Git-132)
> > > > >
> > > >
> > > > Hi Li!
> > > >
> > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > >
> > > > Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>
> > > >
> > > > Probably, we need to add
> > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > >
> > > > Thank you!
> > >
> > > You can add:
> > >
> > > Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> > >
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 11:48               ` Li,Liguang
  0 siblings, 0 replies; 33+ messages in thread
From: Li,Liguang @ 2022-08-15 11:48 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin


> 在 2022/8/15 下午4:10,“Yosry Ahmed”<yosryahmed@google.com> 写入:
>
> On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang@baidu.com> wrote:
> >
> > 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:
> >
> > > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> > > >
> > > > +Andrew & linux-mm
> > > >
> > > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > > >
> > > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > > From: Li Liguang <liliguang@baidu.com>
> > > > > >
> > > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > > annonymous memory will be compressed and stored in the zpool
> > > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > > cause the compressed memory not charged to its memory cgroup.
> > > > > >
> > > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > > memory to its corresponding memory cgroup.
> > > > > >
> > > > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > > > ---
> > > > > >  mm/memcontrol.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > > --- a/mm/memcontrol.c
> > > > > > +++ b/mm/memcontrol.c
> > > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > > >  {
> > > > > >       struct obj_cgroup *objcg;
> > > > > >
> > > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > > +     if (!memcg_kmem_enabled())
> > >
> > >
> > > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > > here?
> > >
> >
> > Please notes that the return value is a pointer to obj_cgroup, not memcg.
> > If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> > to be returned.
> >
>
> Right. I am not implying that the check should be removed, or that
> this is something this patch should address for that matter.
>
> I just realized while looking at this patch that because we are using
> objcg in zswap charging, it is dependent on memcg kmem charging. I am
> not sure I understand if such dependency is needed? IIUC swapped out
> pages hold references to the memcg they are charged to anyway, so why
> do we need to use objcgs in charging zswap? I feel like I am missing
> something.
> 

The compressed size of swapped out pages is nearly a quarter of its RAM,
and a page in the zswap can store multiple compressed swapped out
pages. So objcg is used here. 

Please check this post for more information.
https://lore.kernel.org/lkml/20220510152847.230957-1-hannes@cmpxchg.org/T/#mbd0254ffd377bf843ac50850bf0a6d41505a925a

> > > >
> > > > > >               return NULL;
> > > > > >
> > > > > >       if (PageMemcgKmem(page)) {
> > > > > > --
> > > > > > 2.32.0 (Apple Git-132)
> > > > > >
> > > > >
> > > > > Hi Li!
> > > > >
> > > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > > >
> > > > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > > > >
> > > > > Probably, we need to add
> > > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > > >
> > > > > Thank you!
> > > >
> > > > You can add:
> > > >
> > > > Acked-by: Shakeel Butt <shakeelb@google.com>
> > > >
> >


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 11:48               ` Li,Liguang
  0 siblings, 0 replies; 33+ messages in thread
From: Li,Liguang @ 2022-08-15 11:48 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin


> 在 2022/8/15 下午4:10,“Yosry Ahmed”<yosryahmed@google.com> 写入:
>
> On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang@baidu.com> wrote:
> >
> > 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:
> >
> > > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> > > >
> > > > +Andrew & linux-mm
> > > >
> > > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > > >
> > > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > > From: Li Liguang <liliguang@baidu.com>
> > > > > >
> > > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > > annonymous memory will be compressed and stored in the zpool
> > > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > > cause the compressed memory not charged to its memory cgroup.
> > > > > >
> > > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > > memory to its corresponding memory cgroup.
> > > > > >
> > > > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > > > ---
> > > > > >  mm/memcontrol.c | 2 +-
> > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > >
> > > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > > --- a/mm/memcontrol.c
> > > > > > +++ b/mm/memcontrol.c
> > > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > > >  {
> > > > > >       struct obj_cgroup *objcg;
> > > > > >
> > > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > > +     if (!memcg_kmem_enabled())
> > >
> > >
> > > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > > here?
> > >
> >
> > Please notes that the return value is a pointer to obj_cgroup, not memcg.
> > If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> > to be returned.
> >
>
> Right. I am not implying that the check should be removed, or that
> this is something this patch should address for that matter.
>
> I just realized while looking at this patch that because we are using
> objcg in zswap charging, it is dependent on memcg kmem charging. I am
> not sure I understand if such dependency is needed? IIUC swapped out
> pages hold references to the memcg they are charged to anyway, so why
> do we need to use objcgs in charging zswap? I feel like I am missing
> something.
> 

The compressed size of swapped out pages is nearly a quarter of its RAM,
and a page in the zswap can store multiple compressed swapped out
pages. So objcg is used here. 

Please check this post for more information.
https://lore.kernel.org/lkml/20220510152847.230957-1-hannes@cmpxchg.org/T/#mbd0254ffd377bf843ac50850bf0a6d41505a925a

> > > >
> > > > > >               return NULL;
> > > > > >
> > > > > >       if (PageMemcgKmem(page)) {
> > > > > > --
> > > > > > 2.32.0 (Apple Git-132)
> > > > > >
> > > > >
> > > > > Hi Li!
> > > > >
> > > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > > >
> > > > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > > > >
> > > > > Probably, we need to add
> > > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > > >
> > > > > Thank you!
> > > >
> > > > You can add:
> > > >
> > > > Acked-by: Shakeel Butt <shakeelb@google.com>
> > > >
> >


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 13:46                 ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 13:46 UTC (permalink / raw)
  To: Li,Liguang
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 4:48 AM Li,Liguang <liliguang@baidu.com> wrote:
>
>
> > 在 2022/8/15 下午4:10,“Yosry Ahmed”<yosryahmed@google.com> 写入:
> >
> > On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang@baidu.com> wrote:
> > >
> > > 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed@google.com> 写入:
> > >
> > > > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb@google.com> wrote:
> > > > >
> > > > > +Andrew & linux-mm
> > > > >
> > > > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > > > >
> > > > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > > > From: Li Liguang <liliguang@baidu.com>
> > > > > > >
> > > > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > > > annonymous memory will be compressed and stored in the zpool
> > > > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > > > cause the compressed memory not charged to its memory cgroup.
> > > > > > >
> > > > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > > > memory to its corresponding memory cgroup.
> > > > > > >
> > > > > > > Signed-off-by: Li Liguang <liliguang@baidu.com>
> > > > > > > ---
> > > > > > >  mm/memcontrol.c | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > > > --- a/mm/memcontrol.c
> > > > > > > +++ b/mm/memcontrol.c
> > > > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > > > >  {
> > > > > > >       struct obj_cgroup *objcg;
> > > > > > >
> > > > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > > > +     if (!memcg_kmem_enabled())
> > > >
> > > >
> > > > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > > > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > > > here?
> > > >
> > >
> > > Please notes that the return value is a pointer to obj_cgroup, not memcg.
> > > If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> > > to be returned.
> > >
> >
> > Right. I am not implying that the check should be removed, or that
> > this is something this patch should address for that matter.
> >
> > I just realized while looking at this patch that because we are using
> > objcg in zswap charging, it is dependent on memcg kmem charging. I am
> > not sure I understand if such dependency is needed? IIUC swapped out
> > pages hold references to the memcg they are charged to anyway, so why
> > do we need to use objcgs in charging zswap? I feel like I am missing
> > something.
> >
>
> The compressed size of swapped out pages is nearly a quarter of its RAM,
> and a page in the zswap can store multiple compressed swapped out
> pages. So objcg is used here.
>
> Please check this post for more information.
> https://lore.kernel.org/lkml/20220510152847.230957-1-hannes@cmpxchg.org/T/#mbd0254ffd377bf843ac50850bf0a6d41505a925a

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.

>
> > > > >
> > > > > > >               return NULL;
> > > > > > >
> > > > > > >       if (PageMemcgKmem(page)) {
> > > > > > > --
> > > > > > > 2.32.0 (Apple Git-132)
> > > > > > >
> > > > > >
> > > > > > Hi Li!
> > > > > >
> > > > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > > > >
> > > > > > Acked-by: Roman Gushchin <roman.gushchin@linux.dev>
> > > > > >
> > > > > > Probably, we need to add
> > > > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > > > >
> > > > > > Thank you!
> > > > >
> > > > > You can add:
> > > > >
> > > > > Acked-by: Shakeel Butt <shakeelb@google.com>
> > > > >
> > >
>


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 13:46                 ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 13:46 UTC (permalink / raw)
  To: Li,Liguang
  Cc: Shakeel Butt, Andrew Morton, Linux-MM, Cgroups, Johannes Weiner,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 4:48 AM Li,Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org> wrote:
>
>
> > 在 2022/8/15 下午4:10,“Yosry Ahmed”<yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> 写入:
> >
> > On Sun, Aug 14, 2022 at 7:52 PM Li,Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org> wrote:
> > >
> > > 在 2022/8/13 上午8:44,“Yosry Ahmed”<yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> 写入:
> > >
> > > > On Fri, Aug 12, 2022 at 2:56 PM Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > > > >
> > > > > +Andrew & linux-mm
> > > > >
> > > > > On Thu, Aug 11, 2022 at 5:12 PM Roman Gushchin <roman.gushchin@linux.dev> wrote:
> > > > > >
> > > > > > On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> > > > > > > From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > > > > > >
> > > > > > > Kswapd will reclaim memory when memory pressure is high, the
> > > > > > > annonymous memory will be compressed and stored in the zpool
> > > > > > > if zswap is enabled. The memcg_kmem_bypass() in
> > > > > > > get_obj_cgroup_from_page() will bypass the kernel thread and
> > > > > > > cause the compressed memory not charged to its memory cgroup.
> > > > > > >
> > > > > > > Remove the memcg_kmem_bypass() and properly charge compressed
> > > > > > > memory to its corresponding memory cgroup.
> > > > > > >
> > > > > > > Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> > > > > > > ---
> > > > > > >  mm/memcontrol.c | 2 +-
> > > > > > >  1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > > >
> > > > > > > diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> > > > > > > index b69979c9ced5..6a95ea7c5ee7 100644
> > > > > > > --- a/mm/memcontrol.c
> > > > > > > +++ b/mm/memcontrol.c
> > > > > > > @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
> > > > > > >  {
> > > > > > >       struct obj_cgroup *objcg;
> > > > > > >
> > > > > > > -     if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> > > > > > > +     if (!memcg_kmem_enabled())
> > > >
> > > >
> > > > Won't the memcg_kmem_enabled() check also cause a problem in that same
> > > > scenario (e.g. if CONFIG_MEMCG_KMEM=n)? or am I missing something
> > > > here?
> > > >
> > >
> > > Please notes that the return value is a pointer to obj_cgroup, not memcg.
> > > If CONFIG_MEMCG_KMEM=n or memcg kmem charge is disabled, the NULL need
> > > to be returned.
> > >
> >
> > Right. I am not implying that the check should be removed, or that
> > this is something this patch should address for that matter.
> >
> > I just realized while looking at this patch that because we are using
> > objcg in zswap charging, it is dependent on memcg kmem charging. I am
> > not sure I understand if such dependency is needed? IIUC swapped out
> > pages hold references to the memcg they are charged to anyway, so why
> > do we need to use objcgs in charging zswap? I feel like I am missing
> > something.
> >
>
> The compressed size of swapped out pages is nearly a quarter of its RAM,
> and a page in the zswap can store multiple compressed swapped out
> pages. So objcg is used here.
>
> Please check this post for more information.
> https://lore.kernel.org/lkml/20220510152847.230957-1-hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org/T/#mbd0254ffd377bf843ac50850bf0a6d41505a925a

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.

>
> > > > >
> > > > > > >               return NULL;
> > > > > > >
> > > > > > >       if (PageMemcgKmem(page)) {
> > > > > > > --
> > > > > > > 2.32.0 (Apple Git-132)
> > > > > > >
> > > > > >
> > > > > > Hi Li!
> > > > > >
> > > > > > The fix looks good to me! As we get objcg pointer from a page and not from
> > > > > > the current task, memcg_kmem_bypass() doesn't makes much sense.
> > > > > >
> > > > > > Acked-by: Roman Gushchin <roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org>
> > > > > >
> > > > > > Probably, we need to add
> > > > > > Fixes: f4840ccfca25 ("zswap: memcg accounting")
> > > > > >
> > > > > > Thank you!
> > > > >
> > > > > You can add:
> > > > >
> > > > > Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
> > > > >
> > >
>

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
       [not found] ` <20220811081913.102770-1-liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
@ 2022-08-15 15:20   ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 15:20 UTC (permalink / raw)
  To: liliguang
  Cc: cgroups, mhocko, roman.gushchin, shakeelb, songmuchun,
	Andrew Morton, linux-mm

On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> From: Li Liguang <liliguang@baidu.com>
> 
> Kswapd will reclaim memory when memory pressure is high, the
> annonymous memory will be compressed and stored in the zpool
> if zswap is enabled. The memcg_kmem_bypass() in
> get_obj_cgroup_from_page() will bypass the kernel thread and
> cause the compressed memory not charged to its memory cgroup.
> 
> Remove the memcg_kmem_bypass() and properly charge compressed
> memory to its corresponding memory cgroup.
> 
> Signed-off-by: Li Liguang <liliguang@baidu.com>

Great catch. I think this qualifies for stable.

Cc: stable@vger.kernel.org # 5.19
Fixes: f4840ccfca25 ("zswap: memcg accounting")
Acked-by: Johannes Weiner <hannes@cmpxchg.org>

Andrew, can you please take this through the MM tree?

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index b69979c9ced5..6a95ea7c5ee7 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
>  {
>  	struct obj_cgroup *objcg;
>  
> -	if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> +	if (!memcg_kmem_enabled())
>  		return NULL;
>  
>  	if (PageMemcgKmem(page)) {
> -- 
> 2.32.0 (Apple Git-132)
> 


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 15:20   ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 15:20 UTC (permalink / raw)
  To: liliguang
  Cc: cgroups-u79uwXL29TY76Z2rM5mHXA, mhocko-DgEjT+Ai2ygdnm+yROfE0A,
	roman.gushchin-fxUVXftIFDnyG1zEObXtfA,
	shakeelb-hpIqsD4AKlfQT0dZR+AlfA,
	songmuchun-EC8Uxl6Npydl57MIdRCFDg, Andrew Morton,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

On Thu, Aug 11, 2022 at 04:19:13PM +0800, liliguang wrote:
> From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
> 
> Kswapd will reclaim memory when memory pressure is high, the
> annonymous memory will be compressed and stored in the zpool
> if zswap is enabled. The memcg_kmem_bypass() in
> get_obj_cgroup_from_page() will bypass the kernel thread and
> cause the compressed memory not charged to its memory cgroup.
> 
> Remove the memcg_kmem_bypass() and properly charge compressed
> memory to its corresponding memory cgroup.
> 
> Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>

Great catch. I think this qualifies for stable.

Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.19
Fixes: f4840ccfca25 ("zswap: memcg accounting")
Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>

Andrew, can you please take this through the MM tree?

> ---
>  mm/memcontrol.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index b69979c9ced5..6a95ea7c5ee7 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -2971,7 +2971,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
>  {
>  	struct obj_cgroup *objcg;
>  
> -	if (!memcg_kmem_enabled() || memcg_kmem_bypass())
> +	if (!memcg_kmem_enabled())
>  		return NULL;
>  
>  	if (PageMemcgKmem(page)) {
> -- 
> 2.32.0 (Apple Git-132)
> 

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 15:31                   ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 15:31 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

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.)


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 15:31                   ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 15:31 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

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.)

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 15:42                     ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 15:42 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

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


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 15:42                     ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 15:42 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 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?

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
  2022-08-15 15:42                     ` Yosry Ahmed
@ 2022-08-15 16:16                       ` Yosry Ahmed
  -1 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 16:16 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed@google.com> wrote:
>
> On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes@cmpxchg.org> 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?

memcg kmem charging can still be disabled even
with CONFIG_MEMCG_KMEM***


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 16:16                       ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 16:16 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
>
> On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 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?

memcg kmem charging can still be disabled even
with CONFIG_MEMCG_KMEM***

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 17:47                         ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 17:47 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed@google.com> wrote:
> >
> > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes@cmpxchg.org> 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?
> 
> memcg kmem charging can still be disabled even
> with CONFIG_MEMCG_KMEM***

Yes, indeed, if the host is booted with the nokmem flag. Doing so will
turn off slab, percpu, and (as of recently) zswap.

The zswap backing storage *is* kernel memory, so that seems like the
correct semantics for the flag.

That said, the distinction between kernel and user memory is becoming
increasingly odd. The more kernel memory we track, the more ridiculous
the size of the hole you punch into resource control by disabling it.

Maybe we should just deprecate that knob altogether.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 17:47                         ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-08-15 17:47 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> >
> > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 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?
> 
> memcg kmem charging can still be disabled even
> with CONFIG_MEMCG_KMEM***

Yes, indeed, if the host is booted with the nokmem flag. Doing so will
turn off slab, percpu, and (as of recently) zswap.

The zswap backing storage *is* kernel memory, so that seems like the
correct semantics for the flag.

That said, the distinction between kernel and user memory is becoming
increasingly odd. The more kernel memory we track, the more ridiculous
the size of the hole you punch into resource control by disabling it.

Maybe we should just deprecate that knob altogether.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 17:55                           ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 17:55 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 10:47 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
>
> On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> > On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed@google.com> wrote:
> > >
> > > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes@cmpxchg.org> 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?
> >
> > memcg kmem charging can still be disabled even
> > with CONFIG_MEMCG_KMEM***
>
> Yes, indeed, if the host is booted with the nokmem flag. Doing so will
> turn off slab, percpu, and (as of recently) zswap.
>
> The zswap backing storage *is* kernel memory, so that seems like the
> correct semantics for the flag.

I honestly didn't consider it first as kernel memory, as the memory is
coming from LRU pages. It can be confusing to think about, given that
it is memory that the kernel allocates and manages, but it has user
data. Anyway, maybe it's not worth overthinking this, since it can be
considered as kernel memory.

>
> That said, the distinction between kernel and user memory is becoming
> increasingly odd. The more kernel memory we track, the more ridiculous
> the size of the hole you punch into resource control by disabling it.
>
> Maybe we should just deprecate that knob altogether.

Yeah a lot of used memory will just go unaccounted even with memcg
enabled if the knob is disabled (which is what memcg is all about).
This is even more significant now with zswap in the picture.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-15 17:55                           ` Yosry Ahmed
  0 siblings, 0 replies; 33+ messages in thread
From: Yosry Ahmed @ 2022-08-15 17:55 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: Li,Liguang, Shakeel Butt, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 10:47 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> wrote:
>
> On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> > On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > >
> > > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 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?
> >
> > memcg kmem charging can still be disabled even
> > with CONFIG_MEMCG_KMEM***
>
> Yes, indeed, if the host is booted with the nokmem flag. Doing so will
> turn off slab, percpu, and (as of recently) zswap.
>
> The zswap backing storage *is* kernel memory, so that seems like the
> correct semantics for the flag.

I honestly didn't consider it first as kernel memory, as the memory is
coming from LRU pages. It can be confusing to think about, given that
it is memory that the kernel allocates and manages, but it has user
data. Anyway, maybe it's not worth overthinking this, since it can be
considered as kernel memory.

>
> That said, the distinction between kernel and user memory is becoming
> increasingly odd. The more kernel memory we track, the more ridiculous
> the size of the hole you punch into resource control by disabling it.
>
> Maybe we should just deprecate that knob altogether.

Yeah a lot of used memory will just go unaccounted even with memcg
enabled if the knob is disabled (which is what memcg is all about).
This is even more significant now with zswap in the picture.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-16 22:19                             ` Shakeel Butt
  0 siblings, 0 replies; 33+ messages in thread
From: Shakeel Butt @ 2022-08-16 22:19 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Johannes Weiner, Li,Liguang, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 10:56 AM Yosry Ahmed <yosryahmed@google.com> wrote:
>
> On Mon, Aug 15, 2022 at 10:47 AM Johannes Weiner <hannes@cmpxchg.org> wrote:
> >
> > On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> > > On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed@google.com> wrote:
> > > >
> > > > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes@cmpxchg.org> 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?
> > >
> > > memcg kmem charging can still be disabled even
> > > with CONFIG_MEMCG_KMEM***
> >
> > Yes, indeed, if the host is booted with the nokmem flag. Doing so will
> > turn off slab, percpu, and (as of recently) zswap.
> >
> > The zswap backing storage *is* kernel memory, so that seems like the
> > correct semantics for the flag.
>
> I honestly didn't consider it first as kernel memory, as the memory is
> coming from LRU pages. It can be confusing to think about, given that
> it is memory that the kernel allocates and manages, but it has user
> data. Anyway, maybe it's not worth overthinking this, since it can be
> considered as kernel memory.

Yup not worth overthinking this.

>
> >
> > That said, the distinction between kernel and user memory is becoming
> > increasingly odd. The more kernel memory we track, the more ridiculous
> > the size of the hole you punch into resource control by disabling it.
> >
> > Maybe we should just deprecate that knob altogether.
>
> Yeah a lot of used memory will just go unaccounted even with memcg
> enabled if the knob is disabled (which is what memcg is all about).
> This is even more significant now with zswap in the picture.

Yes, we should deprecate this knob. Last I remember there were users
facing zombie issues due to kernel memory for kernels before objcg
infrastructure and used this knob to resolve the zombie issue. So, I
think this can be deprecated. Though it would be safe to first warn
and deprecate in later release.


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-16 22:19                             ` Shakeel Butt
  0 siblings, 0 replies; 33+ messages in thread
From: Shakeel Butt @ 2022-08-16 22:19 UTC (permalink / raw)
  To: Yosry Ahmed
  Cc: Johannes Weiner, Li,Liguang, Andrew Morton, Linux-MM, Cgroups,
	Michal Hocko, Muchun Song, Roman Gushchin

On Mon, Aug 15, 2022 at 10:56 AM Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
>
> On Mon, Aug 15, 2022 at 10:47 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> wrote:
> >
> > On Mon, Aug 15, 2022 at 09:16:08AM -0700, Yosry Ahmed wrote:
> > > On Mon, Aug 15, 2022 at 8:42 AM Yosry Ahmed <yosryahmed-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org> wrote:
> > > >
> > > > On Mon, Aug 15, 2022 at 8:31 AM Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> 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?
> > >
> > > memcg kmem charging can still be disabled even
> > > with CONFIG_MEMCG_KMEM***
> >
> > Yes, indeed, if the host is booted with the nokmem flag. Doing so will
> > turn off slab, percpu, and (as of recently) zswap.
> >
> > The zswap backing storage *is* kernel memory, so that seems like the
> > correct semantics for the flag.
>
> I honestly didn't consider it first as kernel memory, as the memory is
> coming from LRU pages. It can be confusing to think about, given that
> it is memory that the kernel allocates and manages, but it has user
> data. Anyway, maybe it's not worth overthinking this, since it can be
> considered as kernel memory.

Yup not worth overthinking this.

>
> >
> > That said, the distinction between kernel and user memory is becoming
> > increasingly odd. The more kernel memory we track, the more ridiculous
> > the size of the hole you punch into resource control by disabling it.
> >
> > Maybe we should just deprecate that knob altogether.
>
> Yeah a lot of used memory will just go unaccounted even with memcg
> enabled if the knob is disabled (which is what memcg is all about).
> This is even more significant now with zswap in the picture.

Yes, we should deprecate this knob. Last I remember there were users
facing zombie issues due to kernel memory for kernels before objcg
infrastructure and used this knob to resolve the zombie issue. So, I
think this can be deprecated. Though it would be safe to first warn
and deprecate in later release.

^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-17 17:17     ` Andrew Morton
  0 siblings, 0 replies; 33+ messages in thread
From: Andrew Morton @ 2022-08-17 17:17 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: liliguang, cgroups, mhocko, roman.gushchin, shakeelb, songmuchun,
	linux-mm

On Mon, 15 Aug 2022 11:20:11 -0400 Johannes Weiner <hannes@cmpxchg.org> wrote:

> Great catch. I think this qualifies for stable.
> 
> Cc: stable@vger.kernel.org # 5.19
> Fixes: f4840ccfca25 ("zswap: memcg accounting")
> Acked-by: Johannes Weiner <hannes@cmpxchg.org>
> 
> Andrew, can you please take this through the MM tree?

Sure, but I'm not subscribed to cgroups@ and it wasn't cc'ed to
linux-kernel so no patch for me.

I could reconstitute it from the quoted patch but that's a bit lame and
we don't get a usable Link: tag.

So please redo, refresh, retest and resend?


^ permalink raw reply	[flat|nested] 33+ messages in thread

* Re: [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-08-17 17:17     ` Andrew Morton
  0 siblings, 0 replies; 33+ messages in thread
From: Andrew Morton @ 2022-08-17 17:17 UTC (permalink / raw)
  To: Johannes Weiner
  Cc: liliguang, cgroups-u79uwXL29TY76Z2rM5mHXA,
	mhocko-DgEjT+Ai2ygdnm+yROfE0A,
	roman.gushchin-fxUVXftIFDnyG1zEObXtfA,
	shakeelb-hpIqsD4AKlfQT0dZR+AlfA,
	songmuchun-EC8Uxl6Npydl57MIdRCFDg,
	linux-mm-Bw31MaZKKs3YtjvyW6yDsg

On Mon, 15 Aug 2022 11:20:11 -0400 Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org> wrote:

> Great catch. I think this qualifies for stable.
> 
> Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.19
> Fixes: f4840ccfca25 ("zswap: memcg accounting")
> Acked-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
> 
> Andrew, can you please take this through the MM tree?

Sure, but I'm not subscribed to cgroups@ and it wasn't cc'ed to
linux-kernel so no patch for me.

I could reconstitute it from the quoted patch but that's a bit lame and
we don't get a usable Link: tag.

So please redo, refresh, retest and resend?

^ permalink raw reply	[flat|nested] 33+ messages in thread

* [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-11-14 19:48 ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-11-14 19:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm, cgroups, linux-kernel, Li Liguang, stable,
	Shakeel Butt, Muchun Song

From: Li Liguang <liliguang@baidu.com>

Kswapd will reclaim memory when memory pressure is high, the
annonymous memory will be compressed and stored in the zpool
if zswap is enabled. The memcg_kmem_bypass() in
get_obj_cgroup_from_page() will bypass the kernel thread and
cause the compressed memory not charged to its memory cgroup.

Remove the memcg_kmem_bypass() and properly charge compressed
memory to its corresponding memory cgroup.

Link: https://lore.kernel.org/linux-mm/CALvZod4nnn8BHYqAM4xtcR0Ddo2-Wr8uKm9h_CHWUaXw7g_DCg@mail.gmail.com/
Fixes: f4840ccfca25 ("zswap: memcg accounting")
Cc: stable@vger.kernel.org # 5.19+
Acked-by: Shakeel Butt <shakeelb@google.com>
Acked-by: Shakeel Butt <shakeelb@google.com>
Reviewed-by: Muchun Song <songmuchun@bytedance.com>
Signed-off-by: Li Liguang <liliguang@baidu.com>
Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This fell through the cracks in summer as it didn't make it to the
right mailing lists. Resending.

I know it's close to 6.1-final, but the fix should be safe to put
in. It's straight-forward and obvious code-wise. We also have large
parts of production running on it without problems.

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2d8549ae1b30..a1a35c12635e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3026,7 +3026,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
 {
 	struct obj_cgroup *objcg;
 
-	if (!memcg_kmem_enabled() || memcg_kmem_bypass())
+	if (!memcg_kmem_enabled())
 		return NULL;
 
 	if (PageMemcgKmem(page)) {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

* [PATCH] mm: correctly charge compressed memory to its memcg
@ 2022-11-14 19:48 ` Johannes Weiner
  0 siblings, 0 replies; 33+ messages in thread
From: Johannes Weiner @ 2022-11-14 19:48 UTC (permalink / raw)
  To: Andrew Morton
  Cc: linux-mm-Bw31MaZKKs3YtjvyW6yDsg, cgroups-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA, Li Liguang,
	stable-u79uwXL29TY76Z2rM5mHXA, Shakeel Butt, Muchun Song

From: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>

Kswapd will reclaim memory when memory pressure is high, the
annonymous memory will be compressed and stored in the zpool
if zswap is enabled. The memcg_kmem_bypass() in
get_obj_cgroup_from_page() will bypass the kernel thread and
cause the compressed memory not charged to its memory cgroup.

Remove the memcg_kmem_bypass() and properly charge compressed
memory to its corresponding memory cgroup.

Link: https://lore.kernel.org/linux-mm/CALvZod4nnn8BHYqAM4xtcR0Ddo2-Wr8uKm9h_CHWUaXw7g_DCg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org/
Fixes: f4840ccfca25 ("zswap: memcg accounting")
Cc: stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org # 5.19+
Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Acked-by: Shakeel Butt <shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>
Reviewed-by: Muchun Song <songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org>
Signed-off-by: Li Liguang <liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
Signed-off-by: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>
---
 mm/memcontrol.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

This fell through the cracks in summer as it didn't make it to the
right mailing lists. Resending.

I know it's close to 6.1-final, but the fix should be safe to put
in. It's straight-forward and obvious code-wise. We also have large
parts of production running on it without problems.

diff --git a/mm/memcontrol.c b/mm/memcontrol.c
index 2d8549ae1b30..a1a35c12635e 100644
--- a/mm/memcontrol.c
+++ b/mm/memcontrol.c
@@ -3026,7 +3026,7 @@ struct obj_cgroup *get_obj_cgroup_from_page(struct page *page)
 {
 	struct obj_cgroup *objcg;
 
-	if (!memcg_kmem_enabled() || memcg_kmem_bypass())
+	if (!memcg_kmem_enabled())
 		return NULL;
 
 	if (PageMemcgKmem(page)) {
-- 
2.38.1


^ permalink raw reply related	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2022-11-14 19:49 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20220811081913.102770-1-liliguang@baidu.com>
     [not found] ` <20220811081913.102770-1-liliguang-h1bp6feCCZcAvxtiuMwx3w@public.gmane.org>
2022-08-12  0:12   ` [PATCH] mm: correctly charge compressed memory to its memcg Roman Gushchin
2022-08-12 21:56     ` Shakeel Butt
2022-08-12 21:56       ` Shakeel Butt
2022-08-13  0:43       ` Yosry Ahmed
2022-08-13  0:43         ` Yosry Ahmed
2022-08-15  2:52         ` Li,Liguang
2022-08-15  2:52           ` Li,Liguang
2022-08-15  8:09           ` Yosry Ahmed
2022-08-15  8:09             ` Yosry Ahmed
2022-08-15 11:48             ` Li,Liguang
2022-08-15 11:48               ` Li,Liguang
2022-08-15 13:46               ` Yosry Ahmed
2022-08-15 13:46                 ` Yosry Ahmed
2022-08-15 15:31                 ` Johannes Weiner
2022-08-15 15:31                   ` Johannes Weiner
2022-08-15 15:42                   ` Yosry Ahmed
2022-08-15 15:42                     ` Yosry Ahmed
2022-08-15 16:16                     ` Yosry Ahmed
2022-08-15 16:16                       ` Yosry Ahmed
2022-08-15 17:47                       ` Johannes Weiner
2022-08-15 17:47                         ` Johannes Weiner
2022-08-15 17:55                         ` Yosry Ahmed
2022-08-15 17:55                           ` Yosry Ahmed
2022-08-16 22:19                           ` Shakeel Butt
2022-08-16 22:19                             ` Shakeel Butt
2022-08-15  6:52 ` Muchun Song
2022-08-15  6:52   ` Muchun Song
2022-08-15 15:20 ` Johannes Weiner
2022-08-15 15:20   ` Johannes Weiner
2022-08-17 17:17   ` Andrew Morton
2022-08-17 17:17     ` Andrew Morton
2022-11-14 19:48 Johannes Weiner
2022-11-14 19:48 ` Johannes Weiner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.