From: "Vlastimil Babka (SUSE)" <vbabka@kernel.org>
To: Johannes Weiner <hannes@cmpxchg.org>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Gregory Price <gourry@gourry.net>,
Michal Hocko <mhocko@kernel.org>,
Roman Gushchin <roman.gushchin@linux.dev>,
Shakeel Butt <shakeel.butt@linux.dev>,
Muchun Song <muchun.song@linux.dev>,
David Hildenbrand <david@kernel.org>,
Lorenzo Stoakes <ljs@kernel.org>,
"Liam R. Howlett" <Liam.Howlett@oracle.com>,
Vlastimil Babka <vbabka@suse.cz>, Mike Rapoport <rppt@kernel.org>,
Suren Baghdasaryan <surenb@google.com>,
cgroups@vger.kernel.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm: gfp_types: fix __GFP_ACCOUNT, GFP_KERNEL_ACCOUNT documentation
Date: Wed, 1 Jul 2026 20:27:28 +0200 [thread overview]
Message-ID: <40f47be9-76dc-40b5-81ff-c0f3ac32dffe@kernel.org> (raw)
In-Reply-To: <20260701182102.1586784-1-hannes@cmpxchg.org>
On 7/1/26 20:21, Johannes Weiner wrote:
> Gregory points out that these descriptions are cursed and confusing,
> considering what these flags actually do. This is mostly due to
> historic implementation choices and cgroup1 baggage. Improve the
> description of their actual effects.
>
> Reported-by: Gregory Price <gourry@gourry.net>
> Signed-off-by: Johannes Weiner <hannes@cmpxchg.org>
Reviewed-by: Vlastimil Babka (SUSE) <vbabka@kernel.org>
> ---
> include/linux/gfp_types.h | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/include/linux/gfp_types.h b/include/linux/gfp_types.h
> index 54ca0c88bab6..463b551d12d9 100644
> --- a/include/linux/gfp_types.h
> +++ b/include/linux/gfp_types.h
> @@ -136,7 +136,8 @@ enum {
> * %__GFP_THISNODE forces the allocation to be satisfied from the requested
> * node with no fallbacks or placement policy enforcements.
> *
> - * %__GFP_ACCOUNT causes the allocation to be accounted to kmemcg.
> + * %__GFP_ACCOUNT causes the allocation to be accounted to the active
> + * cgroup context.
> *
> * %__GFP_NO_OBJ_EXT causes slab allocation to have no object extension.
> * mark_obj_codetag_empty() should be called upon freeing for objects allocated
> @@ -320,7 +321,7 @@ enum {
> * %ZONE_NORMAL or a lower zone for direct access but can direct reclaim.
> *
> * %GFP_KERNEL_ACCOUNT is the same as GFP_KERNEL, except the allocation is
> - * accounted to kmemcg.
> + * accounted to the active cgroup context.
> *
> * %GFP_NOWAIT is for kernel allocations that should not stall for direct
> * reclaim, start physical IO or use any filesystem callback. It is very
next prev parent reply other threads:[~2026-07-01 18:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-01 18:21 [PATCH] mm: gfp_types: fix __GFP_ACCOUNT, GFP_KERNEL_ACCOUNT documentation Johannes Weiner
2026-07-01 18:27 ` Vlastimil Babka (SUSE) [this message]
2026-07-01 18:37 ` Shakeel Butt
2026-07-01 20:10 ` Mike Rapoport
2026-07-01 22:23 ` Gregory Price
2026-07-01 23:40 ` SJ Park
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=40f47be9-76dc-40b5-81ff-c0f3ac32dffe@kernel.org \
--to=vbabka@kernel.org \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=cgroups@vger.kernel.org \
--cc=david@kernel.org \
--cc=gourry@gourry.net \
--cc=hannes@cmpxchg.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=ljs@kernel.org \
--cc=mhocko@kernel.org \
--cc=muchun.song@linux.dev \
--cc=roman.gushchin@linux.dev \
--cc=rppt@kernel.org \
--cc=shakeel.butt@linux.dev \
--cc=surenb@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 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.