linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Muchun Song <songmuchun@bytedance.com>
To: Roman Gushchin <roman.gushchin@linux.dev>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	 Linux Memory Management List <linux-mm@kvack.org>,
	LKML <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: Sun, 12 Jun 2022 22:44:34 +0800	[thread overview]
Message-ID: <CAMZfGtV3eHB_Nh_crKgR4-oAvT=Lx-2F6F7xLhTN65Fmefdd0g@mail.gmail.com> (raw)
In-Reply-To: <20220610180310.1725111-1-roman.gushchin@linux.dev>

On Sat, Jun 11, 2022 at 2:04 AM Roman Gushchin <roman.gushchin@linux.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@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>

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

Thanks.


  parent reply	other threads:[~2022-06-12 14:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 18:03 Roman Gushchin
2022-06-11 18:32 ` Vasily Averin
2022-06-12 14:44 ` Muchun Song [this message]
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='CAMZfGtV3eHB_Nh_crKgR4-oAvT=Lx-2F6F7xLhTN65Fmefdd0g@mail.gmail.com' \
    --to=songmuchun@bytedance.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft@linaro.org \
    --cc=naresh.kamboju@linaro.org \
    --cc=quic_qiancai@quicinc.com \
    --cc=roman.gushchin@linux.dev \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox