lkml.org 
[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2] hugetlbfs: Disable softIRQ when taking hugetlb_lock
On Thu, 12 Dec 2019, Andi Kleen wrote:

>Davidlohr Bueso <dave@stgolabs.net> writes:
>> +void free_huge_page(struct page *page)
>> +{
>> + struct hugetlb_free_page_work work;
>> +
>> + work.page = page;
>> + INIT_WORK_ONSTACK(&work.work, free_huge_page_workfn);
>> + queue_work(hugetlb_free_page_wq, &work.work);
>> +
>> + /*
>> + * Wait until free_huge_page is done.
>> + */
>> + flush_work(&work.work);
>> + destroy_work_on_stack(&work.work);
>
>Does flushing really work in softirq context?
>
>Anyways, waiting seems inefficient over fire'n'forget

Yep. I was only thinking about the workerfn not blocking
and therefore we could wait safely, but flush_work has no
such guarantees.

Thanks,
Davidlohr

\
 
 \ /
  Last update: 2019-12-12 23:50    [W:0.080 / U:1.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site