[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <21971d7f-aec7-bc38-7f9b-08c1bf96be9e@huawei.com>
Date: Wed, 8 May 2019 19:31:43 +0800
From: Zhiqiang Liu <liuzhiqiang26@...wei.com>
To: Mike Kravetz <mike.kravetz@...cle.com>, <mhocko@...e.com>,
<shenkai8@...wei.com>, <linfeilong@...wei.com>,
Andrew Morton <akpm@...ux-foundation.org>
CC: <linux-mm@...ck.org>, <linux-kernel@...r.kernel.org>,
<wangwang2@...wei.com>, "Zhoukang (A)" <zhoukang7@...wei.com>,
Mingfangsen <mingfangsen@...wei.com>, <agl@...ibm.com>,
<nacc@...ibm.co>
Subject: Re: [PATCH v2] mm/hugetlb: Don't put_page in lock of hugetlb_lock
> On 5/6/19 7:06 AM, Zhiqiang Liu wrote:
>> From: Kai Shen <shenkai8@...wei.com>
>>
>> spinlock recursion happened when do LTP test:
>> #!/bin/bash
>> ./runltp -p -f hugetlb &
>> ./runltp -p -f hugetlb &
>> ./runltp -p -f hugetlb &
>> ./runltp -p -f hugetlb &
>> ./runltp -p -f hugetlb &
>>
>> The dtor returned by get_compound_page_dtor in __put_compound_page
>> may be the function of free_huge_page which will lock the hugetlb_lock,
>> so don't put_page in lock of hugetlb_lock.
>>
>> BUG: spinlock recursion on CPU#0, hugemmap05/1079
>> lock: hugetlb_lock+0x0/0x18, .magic: dead4ead, .owner: hugemmap05/1079, .owner_cpu: 0
>> Call trace:
>> dump_backtrace+0x0/0x198
>> show_stack+0x24/0x30
>> dump_stack+0xa4/0xcc
>> spin_dump+0x84/0xa8
>> do_raw_spin_lock+0xd0/0x108
>> _raw_spin_lock+0x20/0x30
>> free_huge_page+0x9c/0x260
>> __put_compound_page+0x44/0x50
>> __put_page+0x2c/0x60
>> alloc_surplus_huge_page.constprop.19+0xf0/0x140
>> hugetlb_acct_memory+0x104/0x378
>> hugetlb_reserve_pages+0xe0/0x250
>> hugetlbfs_file_mmap+0xc0/0x140
>> mmap_region+0x3e8/0x5b0
>> do_mmap+0x280/0x460
>> vm_mmap_pgoff+0xf4/0x128
>> ksys_mmap_pgoff+0xb4/0x258
>> __arm64_sys_mmap+0x34/0x48
>> el0_svc_common+0x78/0x130
>> el0_svc_handler+0x38/0x78
>> el0_svc+0x8/0xc
>>
>> Fixes: 9980d744a0 ("mm, hugetlb: get rid of surplus page accounting tricks")
>> Signed-off-by: Kai Shen <shenkai8@...wei.com>
>> Signed-off-by: Feilong Lin <linfeilong@...wei.com>
>> Reported-by: Wang Wang <wangwang2@...wei.com>
>> Acked-by: Michal Hocko <mhocko@...e.com>
>
> Good catch. Sorry, for the late reply.
>
> Reviewed-by: Mike Kravetz <mike.kravetz@...cle.com>
>
Thank your for the reply.
Friendly ping ...
Powered by blists - more mailing lists