From: Roman Gushchin <roman.gushchin@linux.dev>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
Naresh Kamboju <naresh.kamboju@linaro.org>,
Vasily Averin <vvs@openvz.org>,
Qian Cai <quic_qiancai@quicinc.com>,
Kefeng Wang <wangkefeng.wang@huawei.com>,
Linux Kernel Functional Testing <lkft@linaro.org>,
Shakeel Butt <shakeelb@google.com>
Subject: Re: [PATCH] mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe
Date: Fri, 10 Jun 2022 11:10:15 -0700 [thread overview]
Message-ID: <YqOJBy2kHRJj/uLB@carbon> (raw)
In-Reply-To: <20220610180310.1725111-1-roman.gushchin@linux.dev>
On Fri, Jun 10, 2022 at 11:03:10AM -0700, Roman Gushchin 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@huawei.com>
> Signed-off-by: Roman Gushchin <roman.gushchin@linux.dev>
> Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
> Acked-by: Shakeel Butt <shakeelb@google.com>
Andrew,
this patch is supposed to fix boot issues on arm introduced by
the commit "net: set proper memcg for net_init hooks allocations".
But as no I don't see this commit in linux-next or any mm branches,
so I'm not sure if it's in stable or not. So I didn't add the Fixes
tag. If it isn't in stable yet, I'd just put the fix before the problematic
commit.
Thank you!
next prev parent reply other threads:[~2022-06-10 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-10 18:03 [PATCH] mm: kmem: make mem_cgroup_from_obj() vmalloc()-safe Roman Gushchin
2022-06-10 18:10 ` Roman Gushchin [this message]
2022-06-11 4:10 ` Vasily Averin
2022-06-11 21:18 ` Andrew Morton
2022-06-11 18:32 ` Vasily Averin
2022-06-12 14:44 ` Muchun Song
2022-06-13 9:02 ` Michal Hocko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YqOJBy2kHRJj/uLB@carbon \
--to=roman.gushchin@linux.dev \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft@linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=quic_qiancai@quicinc.com \
--cc=shakeelb@google.com \
--cc=vvs@openvz.org \
--cc=wangkefeng.wang@huawei.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.