Re: [PATCH] mm, hugetlb: remove HUGETLB_CGROUP_MIN_ORDER

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
> ---
>  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@xxxxxxxxxx>
-- 
Mike Kravetz




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux