Re: [PATCH v5 3/3] mm: hugetlb: Move mpol interpretation out of dequeue_hugetlb_folio_vma()
Gregory Price <[email protected]> Mon, 3 Aug 2026 10:59:42 -0400
| Newsgroups | org.kvack.linux-mm,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <anCsOd6cCRtxr3jI@gourry-fedora-PF4VCD3F> |
On Mon, Aug 03, 2026 at 06:38:00AM -0700, Ackerley Tng wrote:
... snip ...
> @@ -2925,35 +2935,23 @@ struct folio *alloc_hugetlb_folio(struct vm_area_struct *vma,
> */
> folio = NULL;
> if (!gbl_chg || available_huge_pages(h))
> - folio = dequeue_hugetlb_folio_vma(h, vma, addr);
> + folio = dequeue_hugetlb_folio(h, gfp, &mpoli);
>
> if (!folio) {
> - struct mempolicy_interpreted mpoli;
> - struct mempolicy *mpol;
> - nodemask_t *nodemask;
> - int nid;
> -
> spin_unlock_irq(&hugetlb_lock);
> - nid = huge_node(vma, addr, gfp, &mpol, &nodemask);
> - mpoli = (struct mempolicy_interpreted){
> - .nid = nid,
> -#ifdef CONFIG_NUMA
> - .mode = mpol ? mpol->mode : MPOL_DEFAULT,
> -#else
> - .mode = MPOL_DEFAULT,
> -#endif
> - .nodemask = nodemask,
> - };
Bah, mea culpa on prior comment, i did not notice this was a prexisting
patterns. This is frustrating to say the least.
It does seem like there should be a better way to do this, but i think
we should be ok with this for now.
Reviewed-by: Gregory Price (Meta) <[email protected]>