Re: [PATCH v3 1/2] THP: avoid lock when check whether THP is in deferred list

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 5/29/2023 10:58 AM, Yin Fengwei wrote:
> Hi Andrew,
> 
> On 5/4/23 19:48, kirill@xxxxxxxxxxxxx wrote:
>> On Sat, Apr 29, 2023 at 04:27:58PM +0800, Yin Fengwei wrote:
>>> free_transhuge_page() acquires split queue lock then check
>>> whether the THP was added to deferred list or not. It brings
>>> high deferred queue lock contention.
>>>
>>> It's safe to check whether the THP is in deferred list or not
>>> without holding the deferred queue lock in free_transhuge_page()
>>> because when code hit free_transhuge_page(), there is no one
>>> tries to add the folio to _deferred_list.
>>>
>>> Running page_fault1 of will-it-scale + order 2 folio for anonymous
>>> mapping with 96 processes on an Ice Lake 48C/96T test box, we could
>>> see the 61% split_queue_lock contention:
>>> -   63.02%     0.01%  page_fault1_pro  [kernel.kallsyms]         [k] free_transhuge_page
>>>    - 63.01% free_transhuge_page
>>>       + 62.91% _raw_spin_lock_irqsave
>>>
>>> With this patch applied, the split_queue_lock contention is less
>>> than 1%.
>>>
>>> Signed-off-by: Yin Fengwei <fengwei.yin@xxxxxxxxx>
>>
>> Acked-by: Kirill A. Shutemov <kirill.shutemov@xxxxxxxxxxxxxxx>
> I didn't get the green light for patch2 (which was trying to reduce lru lock contention)
> from Matthew. It may need more time to figure out how to reduce lru lock contention.
Andrew, thanks a lot for picking this patch.

Regards
Yin, Fengwei

> 
> I am wondering whether this patch1 (without patch2) can be picked as
>   - It has nothing to do with patch2
>   - It could reduce the deferred queue lock contention.
>   - It got acked-by from Kirill.
> 
> Let me know if you want me to resend this patch1. Thanks.
> 
> 
> Regards
> Yin, Fengwei
> 
>>




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux