Re: [PATCH 1/8] mm/hugetlb: add pre-zeroed framework

From: Li Zhe
Date: Fri Dec 26 2025 - 04:48:45 EST


On Fri, 26 Dec 2025 14:54:17 +0530, raghavendra.kt@xxxxxxx wrote:

> > +/*
> > + * Once a page has been taken off the freelist, the new page owner
> > + * must wait for the pre-zero thread to finish if it happens
> > + * to be working on this page (which should be rare).
> > + */
> > +static void hpage_wait_zeroing(struct hstate *h, struct folio *folio)
> > +{
> > + if (!folio_test_hugetlb_zeroing(folio))
> > + return;
> > +
> > + spin_lock_irq(&hugetlb_lock);
> > +
> > + wait_event_cmd(h->dqzero_wait[folio_nid(folio)],
> > + !folio_test_hugetlb_zeroing(folio),
> > + spin_unlock_irq(&hugetlb_lock),
> > + spin_lock_irq(&hugetlb_lock));
> > +
> > + spin_unlock_irq(&hugetlb_lock);
> > +}
> > +
>
> nit:
> May be simple enough chunk to introduce guard() above

Thank you for the reminder. I will address this issue in v2.

Thanks,
Zhe