From: Mike Kravetz <mike.kravetz@oracle.com>
To: Frank van der Linden <fvdl@google.com>
Cc: linux-mm@kvack.org, muchun.song@linux.dev, akpm@linux-foundation.org
Subject: Re: [PATCH] mm, hugetlb: remove HUGETLB_CGROUP_MIN_ORDER
Date: Thu, 5 Oct 2023 17:38:26 -0700 [thread overview]
Message-ID: <20231006003826.GA251100@monkey> (raw)
In-Reply-To: <20231004153248.3842997-1-fvdl@google.com>
On 10/04/23 15:32, Frank van der Linden wrote:
> Originally, hugetlb_cgroup was the only hugetlb user of tail page
> structure fields. So, the code defined and checked against
> HUGETLB_CGROUP_MIN_ORDER to make sure pages weren't too small
> to use.
>
> However, by now, tail page #2 is used to store hugetlb
> hwpoison and subpool information as well. In other words,
> without that tail page hugetlb doesn't work.
When I first read this, I thought we might be exposed today. But, I see
that currently order must be > 0 so we are covered.
> Acknowledge this fact by getting rid of HUGETLB_CGROUP_MIN_ORDER
> and checks against it. Instead, just check for the minimum viable
> page order at hstate creation time.
IIUC, we do lose the ability to run with an order 1 hstate. Correct?
The minimum must now be 2.
I do not think is worth worrying about. And, the code checking for the
VERY unlikely case where order could be big enough to to be valid, but
too small for cgroups was strange.
I think this is a nice simplification.
> Signed-off-by: Frank van der Linden <fvdl@google.com>
> ---
> include/linux/hugetlb_cgroup.h | 11 -----------
> mm/hugetlb.c | 2 +-
> mm/hugetlb_cgroup.c | 20 ++------------------
> 3 files changed, 3 insertions(+), 30 deletions(-)
Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
--
Mike Kravetz
next prev parent reply other threads:[~2023-10-06 0:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-04 15:32 Frank van der Linden
2023-10-06 0:38 ` Mike Kravetz [this message]
2023-10-06 4:00 ` Frank van der Linden
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=20231006003826.GA251100@monkey \
--to=mike.kravetz@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=fvdl@google.com \
--cc=linux-mm@kvack.org \
--cc=muchun.song@linux.dev \
/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