Re: [PATCH 4/4] mm/mempolicy: skip zone device folios when queueing folios

From: Lorenzo Stoakes (ARM)

Date: Thu Aug 06 2026 - 09:38:18 EST


On Thu, Aug 06, 2026 at 03:25:50PM +0200, David Hildenbrand (Arm) wrote:
> On 7/28/26 21:47, Gregory Price wrote:
> > mm/mempolicy.c | 4 ++++
> > @@ -797,6 +799,8 @@ static int queue_folios_hugetlb(pte_t *pte, unsigned long hmask,
> > folio = pfn_folio(pte_pfn(ptep));
> > if (!queue_folio_required(folio, qp))
> > goto unlock;
> > + if (folio_is_zone_device(folio))
> > + goto unlock;
>
> Leave the hugetlb part alone. hugetlb folios will never be ZONE_DEVICE.

<Insert leave Britney alone meme here> :P

But dear God we have got to find ways to stop hugetlb being this big stupid
nightmare that every single path of mm has to put an asterix next to itself
about!

>
> --
> Cheers,
>
> David

--
Cheers, Lorenzo