linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Roman Gushchin <guro@fb.com>
Cc: Michal Hocko <mhocko@kernel.org>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	 Johannes Weiner <hannes@cmpxchg.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	 linux-mm <linux-mm@kvack.org>,
	open list <linux-kernel@vger.kernel.org>,
	 lkft-triage@lists.linaro.org, Chris Down <chris@chrisdown.name>
Subject: Re: BUG: Bad page state in process - page dumped because: page still charged to cgroup
Date: Thu, 2 Jul 2020 09:02:31 -0700	[thread overview]
Message-ID: <CALvZod6hZ4R=pZsURg4zKYNO2GTOsCumiQc32cvWUQe01ZB0vw@mail.gmail.com> (raw)
In-Reply-To: <20200701184552.GA61684@carbon.DHCP.thefacebook.com>

On Wed, Jul 1, 2020 at 11:46 AM Roman Gushchin <guro@fb.com> wrote:
...
> --
>
> From c97afecd32c0db5e024be9ba72f43d22974f5bcd Mon Sep 17 00:00:00 2001
> From: Roman Gushchin <guro@fb.com>
> Date: Wed, 1 Jul 2020 11:05:32 -0700
> Subject: [PATCH] mm: kmem: make memcg_kmem_enabled() irreversible
>
> Historically the kernel memory accounting was an opt-in feature, which
> could be enabled for individual cgroups. But now it's not true, and
> it's on by default both on cgroup v1 and cgroup v2.  And as long as a
> user has at least one non-root memory cgroup, the kernel memory
> accounting is on. So in most setups it's either always on (if memory
> cgroups are in use and kmem accounting is not disabled), either always
> off (otherwise).
>
> memcg_kmem_enabled() is used in many places to guard the kernel memory
> accounting code. If memcg_kmem_enabled() can reverse from returning
> true to returning false (as now), we can't rely on it on release paths
> and have to check if it was on before.
>
> If we'll make memcg_kmem_enabled() irreversible (always returning true
> after returning it for the first time), it'll make the general logic
> more simple and robust. It also will allow to guard some checks which
> otherwise would stay unguarded.
>
> Signed-off-by: Roman Gushchin <guro@fb.com>

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


  parent reply	other threads:[~2020-07-02 16:03 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  8:18 BUG: Bad page state in process - page dumped because: page still charged to cgroup Naresh Kamboju
2020-07-01  8:29 ` Michal Hocko
2020-07-01 12:31   ` Naresh Kamboju
2020-07-01 18:45   ` Roman Gushchin
2020-07-02  6:19     ` Michal Hocko
2020-07-02  6:52     ` Naresh Kamboju
2020-07-02 15:49       ` Roman Gushchin
2020-07-02 15:55         ` Naresh Kamboju
2020-07-02 15:59           ` Roman Gushchin
2020-07-02 16:02     ` Shakeel Butt [this message]
2020-07-02 16:22     ` Michal Hocko
2020-07-02 16:35       ` Vlastimil Babka
2020-07-02 17:07         ` Roman Gushchin
2020-07-02 17:10         ` Michal Hocko
2020-07-02 16:37       ` Roman Gushchin
2020-07-02 17:13         ` Michal Hocko
2020-07-02 17:19           ` Roman Gushchin

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='CALvZod6hZ4R=pZsURg4zKYNO2GTOsCumiQc32cvWUQe01ZB0vw@mail.gmail.com' \
    --to=shakeelb@google.com \
    --cc=akpm@linux-foundation.org \
    --cc=chris@chrisdown.name \
    --cc=guro@fb.com \
    --cc=hannes@cmpxchg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=lkft-triage@lists.linaro.org \
    --cc=mhocko@kernel.org \
    --cc=naresh.kamboju@linaro.org \
    /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;
as well as URLs for NNTP newsgroup(s).