lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e5920cb1-73c7-48fa-b7d1-dce1510a24cf@redhat.com>
Date: Mon, 8 Apr 2024 20:56:34 +0200
From: David Hildenbrand <david@...hat.com>
To: Baolin Wang <baolin.wang@...ux.alibaba.com>, akpm@...ux-foundation.org
Cc: mgorman@...hsingularity.net, vbabka@...e.cz, linux-mm@...ck.org,
 linux-kernel@...r.kernel.org
Subject: Re: [PATCH] mm: set pageblock_order to HPAGE_PMD_ORDER in case with
 !CONFIG_HUGETLB_PAGE but THP enabled

On 05.04.24 14:24, Baolin Wang wrote:
> As Vlastimil suggested in previous discussion[1], it doesn't make sense to set
> pageblock_order as MAX_PAGE_ORDER when hugetlbfs is not enabled and THP is enabled.
> Instead, it should be set to HPAGE_PMD_ORDER.
> 
> [1] https://lore.kernel.org/all/76457ec5-d789-449b-b8ca-dcb6ceb12445@suse.cz/
> Suggested-by: Vlastimil Babka <vbabka@...e.cz>
> Signed-off-by: Baolin Wang <baolin.wang@...ux.alibaba.com>
> ---
>   include/linux/pageblock-flags.h | 8 ++++++--
>   1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/pageblock-flags.h b/include/linux/pageblock-flags.h
> index 3f2409b968ec..547e82cdc89a 100644
> --- a/include/linux/pageblock-flags.h
> +++ b/include/linux/pageblock-flags.h
> @@ -28,7 +28,7 @@ enum pageblock_bits {
>   	NR_PAGEBLOCK_BITS
>   };
>   
> -#ifdef CONFIG_HUGETLB_PAGE
> +#if defined(CONFIG_HUGETLB_PAGE)
>   
>   #ifdef CONFIG_HUGETLB_PAGE_SIZE_VARIABLE
>   
> @@ -45,7 +45,11 @@ extern unsigned int pageblock_order;
>   
>   #endif /* CONFIG_HUGETLB_PAGE_SIZE_VARIABLE */
>   
> -#else /* CONFIG_HUGETLB_PAGE */
> +#elif defined(CONFIG_TRANSPARENT_HUGEPAGE)
> +
> +#define pageblock_order		min_t(unsigned int, HPAGE_PMD_ORDER, MAX_PAGE_ORDER)
> +
> +#else /* CONFIG_TRANSPARENT_HUGEPAGE */
>   
>   /* If huge pages are not used, group by MAX_ORDER_NR_PAGES */
>   #define pageblock_order		MAX_PAGE_ORDER


Acked-by: David Hildenbrand <david@...hat.com>

-- 
Cheers,

David / dhildenb


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ