Re: [RFC PATCH 7/8] hugetlb: add update_and_free_page_no_sleep for irq context

From: Mike Kravetz
Date: Wed Mar 24 2021 - 20:29:30 EST


On 3/19/21 6:18 PM, Hillf Danton wrote:
> On Fri, 19 Mar 2021 15:42:08 -0700 Mike Kravetz wrote:
>> +
>> + if (!can_sleep && free_page_may_sleep(h, page)) {
>> + /*
>> + * Send page freeing to workqueue
>> + *
>> + * Only call schedule_work() if hpage_freelist is previously
>> + * empty. Otherwise, schedule_work() had been called but the
>> + * workfn hasn't retrieved the list yet.
>> + */
>> + if (llist_add((struct llist_node *)&page->mapping,
>> + &hpage_freelist))
>> + schedule_work(&free_hpage_work);
>> + return;
>> + }
>
> Queue work on system_unbound_wq instead of system_wq because of blocking work.
>

Thanks Hillf,

I am dropping this patch and going with Roman's patches to create an
version of cma_release that will not sleep. A workqueue handoff like
this may be needed in the vmemmap reduction series, so will keep this in
mind.
--
Mike Kravetz