From: Roman Gushchin <guro@fb.com>
To: Daniel Jordan <daniel.m.jordan@oracle.com>
Cc: "linux-mm@kvack.org" <linux-mm@kvack.org>,
Michal Hocko <mhocko@kernel.org>,
Johannes Weiner <hannes@cmpxchg.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Kernel Team <Kernel-team@fb.com>,
Vladimir Davydov <vdavydov.dev@gmail.com>,
Shakeel Butt <shakeelb@google.com>
Subject: Re: [PATCH] mm: slab: make page_cgroup_ino() to recognize non-compound slab pages properly
Date: Wed, 30 Oct 2019 21:35:19 +0000 [thread overview]
Message-ID: <20191030213513.GA15706@castle.DHCP.thefacebook.com> (raw)
In-Reply-To: <20191030210314.2el7wysojucqypoq@ca-dmjordan1.us.oracle.com>
On Wed, Oct 30, 2019 at 05:03:14PM -0400, Daniel Jordan wrote:
> Hi Roman,
>
> On Fri, Oct 25, 2019 at 04:27:10PM -0700, Roman Gushchin wrote:
> > page_cgroup_ino() doesn't return a valid memcg pointer for non-compund
> > slab pages, because it depends on PgHead AND PgSlab flags to be set
> > to determine the memory cgroup from the kmem_cache.
> > It's correct for compound pages, but not for generic small pages. Those
> > don't have PgHead set, so it ends up returning zero.
> >
> > Fix this by replacing the condition to PageSlab() && !PageTail().
>
> You may also want to update the comment above memcg_from_slab_page():
>
> * So this function assumes that the page can pass PageHead() and PageSlab()
> * checks.
Good catch, thank you! Will send v2 in no time.
prev parent reply other threads:[~2019-10-30 21:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-25 23:27 Roman Gushchin
2019-10-30 19:40 ` Roman Gushchin
2019-10-30 20:40 ` Shakeel Butt
2019-10-30 21:03 ` Daniel Jordan
2019-10-30 21:35 ` Roman Gushchin [this message]
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=20191030213513.GA15706@castle.DHCP.thefacebook.com \
--to=guro@fb.com \
--cc=Kernel-team@fb.com \
--cc=daniel.m.jordan@oracle.com \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--cc=shakeelb@google.com \
--cc=vdavydov.dev@gmail.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