LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Shakeel Butt <shakeelb@google.com>
To: Roman Gushchin <guro@fb.com>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Johannes Weiner <hannes@cmpxchg.org>,
Michal Hocko <mhocko@kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux MM <linux-mm@kvack.org>, Kernel Team <kernel-team@fb.com>
Subject: Re: [PATCH v2 3/4] mm: introduce page memcg flags
Date: Thu, 24 Sep 2020 12:44:57 -0700 [thread overview]
Message-ID: <CALvZod4DGrLnXNB7pyDSu1Dnx0Jqf0_PoV5VXcVgeB_uSYBxPw@mail.gmail.com> (raw)
In-Reply-To: <20200924192706.3075680-4-guro@fb.com>
On Thu, Sep 24, 2020 at 12:29 PM Roman Gushchin <guro@fb.com> wrote:
>
> The lowest bit in page->memcg_data is used to distinguish between
> struct memory_cgroup pointer and a pointer to a objcgs array.
> All checks and modifications of this bit are open-coded.
>
> Let's formalize it using page memcg flags, defined in page_memcg_flags
> enum, and replace all open-coded accesses with test_bit()/__set_bit().
>
> Additional flags might be added later.
>
> Signed-off-by: Roman Gushchin <guro@fb.com>
Thanks.
Reviewed-by: Shakeel Butt <shakeelb@google.com>
next prev parent reply other threads:[~2020-09-24 19:45 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-09-24 19:27 [PATCH v2 0/4] mm: allow mapping accounted kernel pages to userspace Roman Gushchin
2020-09-24 19:27 ` [PATCH v2 1/4] mm: memcontrol: use helpers to access page's memcg data Roman Gushchin
2020-09-24 19:27 ` [PATCH v2 2/4] mm: memcontrol/slab: use helpers to access slab page's memcg_data Roman Gushchin
2020-09-24 19:27 ` [PATCH v2 3/4] mm: introduce page memcg flags Roman Gushchin
2020-09-24 19:44 ` Shakeel Butt [this message]
2020-09-24 19:27 ` [PATCH v2 4/4] mm: convert page kmemcg type to a page memcg flag 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=CALvZod4DGrLnXNB7pyDSu1Dnx0Jqf0_PoV5VXcVgeB_uSYBxPw@mail.gmail.com \
--to=shakeelb@google.com \
--cc=akpm@linux-foundation.org \
--cc=guro@fb.com \
--cc=hannes@cmpxchg.org \
--cc=kernel-team@fb.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@kernel.org \
--subject='Re: [PATCH v2 3/4] mm: introduce page memcg flags' \
/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
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).