All of lore.kernel.org
 help / color / mirror / Atom feed
From: Souptick Joarder <jrdr.linux@gmail.com>
To: Xiang Yang <xiangyang3@huawei.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>,
	Michal Hocko <mhocko@kernel.org>,
	roman.gushchin@linux.dev, shakeelb@google.com,
	songmuchun@bytedance.com,
	Andrew Morton <akpm@linux-foundation.org>,
	cgroups@vger.kernel.org, Linux-MM <linux-mm@kvack.org>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -next] mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled()
Date: Mon, 27 Jun 2022 06:35:28 +0530	[thread overview]
Message-ID: <CAFqt6zYd2GVv4kb4tWVVen-pq4ynN=q8jbE+AWmsjfeD8SJmqg@mail.gmail.com> (raw)
In-Reply-To: <20220625061844.226764-1-xiangyang3@huawei.com>

On Sat, Jun 25, 2022 at 11:51 AM Xiang Yang <xiangyang3@huawei.com> wrote:
>
> mem_cgroup_kmem_disabled() checks whether the kmem accounting is off.
> Therefore, replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled(),
> which is the same work in percpu.c and slab_common.c.
>
> Signed-off-by: Xiang Yang <xiangyang3@huawei.com>
Acked-by: Souptick Joarder (HPE) <jrdr.linux@gmail.com>
> ---
>  mm/memcontrol.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 85adc43c5a25..4672c9ddd188 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3815,7 +3815,7 @@ static u64 mem_cgroup_read_u64(struct cgroup_subsys_state *css,
>  #ifdef CONFIG_MEMCG_KMEM
>  static int memcg_online_kmem(struct mem_cgroup *memcg)
>  {
> -       if (cgroup_memory_nokmem)
> +       if (mem_cgroup_kmem_disabled())
>                 return 0;
>
>         if (unlikely(mem_cgroup_is_root(memcg)))
> @@ -3830,7 +3830,7 @@ static int memcg_online_kmem(struct mem_cgroup *memcg)
>
>  static void memcg_offline_kmem(struct mem_cgroup *memcg)
>  {
> -       if (cgroup_memory_nokmem)
> +       if (mem_cgroup_kmem_disabled())
>                 return;
>
>         if (unlikely(mem_cgroup_is_root(memcg)))
> --
> 2.22.0
>
>

WARNING: multiple messages have this Message-ID (diff)
From: Souptick Joarder <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Xiang Yang <xiangyang3-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Cc: Johannes Weiner <hannes-druUgvl0LCNAfugRpC6u6w@public.gmane.org>,
	Michal Hocko <mhocko-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	roman.gushchin-fxUVXftIFDnyG1zEObXtfA@public.gmane.org,
	shakeelb-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org,
	songmuchun-EC8Uxl6Npydl57MIdRCFDg@public.gmane.org,
	Andrew Morton
	<akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b@public.gmane.org>,
	cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Linux-MM <linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org>,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH -next] mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled()
Date: Mon, 27 Jun 2022 06:35:28 +0530	[thread overview]
Message-ID: <CAFqt6zYd2GVv4kb4tWVVen-pq4ynN=q8jbE+AWmsjfeD8SJmqg@mail.gmail.com> (raw)
In-Reply-To: <20220625061844.226764-1-xiangyang3-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>

On Sat, Jun 25, 2022 at 11:51 AM Xiang Yang <xiangyang3-hv44wF8Li93QT0dZR+AlfA@public.gmane.org> wrote:
>
> mem_cgroup_kmem_disabled() checks whether the kmem accounting is off.
> Therefore, replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled(),
> which is the same work in percpu.c and slab_common.c.
>
> Signed-off-by: Xiang Yang <xiangyang3-hv44wF8Li93QT0dZR+AlfA@public.gmane.org>
Acked-by: Souptick Joarder (HPE) <jrdr.linux-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  mm/memcontrol.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/mm/memcontrol.c b/mm/memcontrol.c
> index 85adc43c5a25..4672c9ddd188 100644
> --- a/mm/memcontrol.c
> +++ b/mm/memcontrol.c
> @@ -3815,7 +3815,7 @@ static u64 mem_cgroup_read_u64(struct cgroup_subsys_state *css,
>  #ifdef CONFIG_MEMCG_KMEM
>  static int memcg_online_kmem(struct mem_cgroup *memcg)
>  {
> -       if (cgroup_memory_nokmem)
> +       if (mem_cgroup_kmem_disabled())
>                 return 0;
>
>         if (unlikely(mem_cgroup_is_root(memcg)))
> @@ -3830,7 +3830,7 @@ static int memcg_online_kmem(struct mem_cgroup *memcg)
>
>  static void memcg_offline_kmem(struct mem_cgroup *memcg)
>  {
> -       if (cgroup_memory_nokmem)
> +       if (mem_cgroup_kmem_disabled())
>                 return;
>
>         if (unlikely(mem_cgroup_is_root(memcg)))
> --
> 2.22.0
>
>

  parent reply	other threads:[~2022-06-27  1:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-25  6:18 [PATCH -next] mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled() Xiang Yang
2022-06-25  6:18 ` Xiang Yang
2022-06-25  8:58 ` Muchun Song
2022-06-25  8:58   ` Muchun Song
2022-06-26  1:41 ` Roman Gushchin
2022-06-26  1:41   ` Roman Gushchin
2022-06-27  1:05 ` Souptick Joarder [this message]
2022-06-27  1:05   ` Souptick Joarder

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='CAFqt6zYd2GVv4kb4tWVVen-pq4ynN=q8jbE+AWmsjfeD8SJmqg@mail.gmail.com' \
    --to=jrdr.linux@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=cgroups@vger.kernel.org \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mhocko@kernel.org \
    --cc=roman.gushchin@linux.dev \
    --cc=shakeelb@google.com \
    --cc=songmuchun@bytedance.com \
    --cc=xiangyang3@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.