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] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 4 Dec 2023 16:15:50 -0800
From:   Mike Kravetz <mike.kravetz@...cle.com>
To:     Muchun Song <songmuchun@...edance.com>
Cc:     muchun.song@...ux.dev, akpm@...ux-foundation.org,
        linux-mm@...ck.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4] mm: hugetlb_vmemmap: convert page to folio

On 11/27/23 16:46, Muchun Song wrote:
> There is still some places where it does not be converted to folio,
> this patch convert all of them to folio. And this patch also does
> some trival cleanup to fix the code style problems.
> 
> Signed-off-by: Muchun Song <songmuchun@...edance.com>
> ---
>  mm/hugetlb_vmemmap.c | 51 ++++++++++++++++++++++----------------------
>  1 file changed, 25 insertions(+), 26 deletions(-)
...
> @@ -535,9 +535,9 @@ long hugetlb_vmemmap_restore_folios(const struct hstate *h,
>  }
>  
>  /* Return true iff a HugeTLB whose vmemmap should and can be optimized. */
> -static bool vmemmap_should_optimize(const struct hstate *h, const struct page *head)
> +static bool vmemmap_should_optimize_folio(const struct hstate *h, struct folio *folio)
>  {
> -	if (HPageVmemmapOptimized((struct page *)head))
> +	if (folio_test_hugetlb_vmemmap_optimized(folio))

Nice!  After this, there is only one remaining use of 'page based'
hugetlb specific flag macros.

	mm/memory_hotplug.c:            if (HPageMigratable(head))

When that is converted, all those macros can be removed from linux/hugetlb.h

Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
-- 
Mike Kravetz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ