[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMZfGtV3eHB_Nh_crKgR4-oAvT=Lx-2F6F7xLhTN65Fmefdd0g@mail.gmail.com>
Date: Sun, 12 Jun 2022 22:44:34 +0800
From: Muchun Song <songmuchun@...edance.com>
To: Roman Gushchin <roman.gushchin@...ux.dev>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linux Memory Management List <linux-mm@...ck.org>,
LKML <linux-kernel@...r.kernel.org>,
Naresh Kamboju <naresh.kamboju@...aro.org>,
Vasily Averin <vvs@...nvz.org>,
Qian Cai <quic_qiancai@...cinc.com>,
Kefeng Wang <wangkefeng.wang@...wei.com>,
Linux Kernel Functional Testing <lkft@...aro.org>,
Shakeel Butt <shakeelb@...gle.com>
Subject: Re: [PATCH] mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe
On Sat, Jun 11, 2022 at 2:04 AM Roman Gushchin <roman.gushchin@...ux.dev> wrote:
>
> Currently mem_cgroup_from_obj() is not working properly with objects
> allocated using vmalloc(). It creates problems in some cases, when
> it's called for static objects belonging to modules or generally
> allocated using vmalloc().
>
> This patch makes mem_cgroup_from_obj() safe to be called on objects
> allocated using vmalloc().
>
> It also introduces mem_cgroup_from_slab_obj(), which is a faster
> version to use in places when we know the object is either a slab
> object or a generic slab page (e.g. when adding an object to a lru
> list).
>
> Suggested-by: Kefeng Wang <wangkefeng.wang@...wei.com>
> Signed-off-by: Roman Gushchin <roman.gushchin@...ux.dev>
> Tested-by: Linux Kernel Functional Testing <lkft@...aro.org>
> Acked-by: Shakeel Butt <shakeelb@...gle.com>
Acked-by: Muchun Song <songmuchun@...edance.com>
Thanks.
Powered by blists - more mailing lists