linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@kernel.org>
To: Vlastimil Babka <vbabka@suse.cz>
Cc: Roman Gushchin <guro@fb.com>,
	Naresh Kamboju <naresh.kamboju@linaro.org>,
	Shakeel Butt <shakeelb@google.com>,
	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>,
	Peter Zijlstra <peterz@infradead.org>
Subject: Re: BUG: Bad page state in process - page dumped because: page still charged to cgroup
Date: Thu, 2 Jul 2020 19:10:11 +0200	[thread overview]
Message-ID: <20200702171011.GJ18446@dhcp22.suse.cz> (raw)
In-Reply-To: <57270a15-a792-5175-757b-c4bde6da3694@suse.cz>

On Thu 02-07-20 18:35:31, Vlastimil Babka wrote:
> On 7/2/20 6:22 PM, Michal Hocko wrote:
> > On Wed 01-07-20 11:45:52, Roman Gushchin 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>
> 
> Fixes: ? or let Andrew squash it to some patch of your series (it's in mmotm I
> think)?

I would rather make it its own patch because this is really subtle.
-- 
Michal Hocko
SUSE Labs


  parent reply	other threads:[~2020-07-02 17:10 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-01  8:18 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
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 [this message]
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=20200702171011.GJ18446@dhcp22.suse.cz \
    --to=mhocko@kernel.org \
    --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=naresh.kamboju@linaro.org \
    --cc=peterz@infradead.org \
    --cc=shakeelb@google.com \
    --cc=vbabka@suse.cz \
    /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