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]
Message-ID: <aPeu29qbxdn7dmjD@gourry-fedora-PF4VCD3F>
Date: Tue, 21 Oct 2025 12:03:39 -0400
From: Gregory Price <gourry@...rry.net>
To: Wei Yang <richard.weiyang@...il.com>
Cc: Zi Yan <ziy@...dia.com>, linux-mm@...ck.org,
	linux-kernel@...r.kernel.org, kernel-team@...a.com,
	akpm@...ux-foundation.org, vbabka@...e.cz, surenb@...gle.com,
	mhocko@...e.com, jackmanb@...gle.com, hannes@...xchg.org,
	David Hildenbrand <david@...hat.com>
Subject: Re: [RFC PATCH v2] page_alloc: allow migration of smaller hugepages
 during contig_alloc

On Tue, Oct 21, 2025 at 09:14:43AM +0000, Wei Yang wrote:
> 
> The above code is expanded to:
> 
>   page = _compound_head(page);
>   order = compound_order(page);
>       folio = page;
>       test_bit(PG_head, &folio->flags.f);
>       return folio_large_order(folio);
> 
> If we use
> 
>   order = folio_order(page_folio(page))
> 
> It is expanded to:
> 
>   folio = _compound_head(page);
>   folio_test_large(folio)
>       folio_test_head(folio)
>           test_bit(PG_head, &folio->flags.f)
>   return folio_large_order(folio);
> 
> These two seems expanded to the same code.
> 

folio_test_large drops into const_folio_flags which does
a VM_BUG_ON_PGFLAGS, so not the same logic here.

> Maybe we can use folio_order() here?
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ