[lkml]   [2019]   [Dec]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v2] mm/hugetlb: defer free_huge_page() to a workqueue
On 12/12/19 3:52 PM, Waiman Long wrote:
> On 12/12/19 2:22 PM, Mike Kravetz wrote:
>> On 12/12/19 11:04 AM, Davidlohr Bueso wrote:
>>> There have been deadlock reports[1, 2] where put_page is called
>>> from softirq context and this causes trouble with the hugetlb_lock,
>>> as well as potentially the subpool lock.
>>> For such an unlikely scenario, lets not add irq dancing overhead
>>> to the lock+unlock operations, which could incur in expensive
>>> instruction dependencies, particularly when considering hard-irq
>>> safety. For example PUSHF+POPF on x86.
>>> Instead, just use a workqueue and do the free_huge_page() in regular
>>> task context.
>>> [1]
>>> [2]
>>> Reported-by: Waiman Long <>
>>> Reported-by: Aneesh Kumar K.V <>
>>> Signed-off-by: Davidlohr Bueso <>
>> Thank you Davidlohr.
>> The patch does seem fairly simple and straight forward. I need to brush up
>> on my workqueue knowledge to provide a full review.
>> Longman,
>> Do you have a test to reproduce the issue? If so, can you try running with
>> this patch.
> Yes, I do have a test that can reproduce the issue. I will run it with
> the patch and report the status tomorrow.

I don't think Davidlohr's patch is ready for prime time yet. So I will
wait until a better version is available.


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