lkml.org 
[lkml]   [2018]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] mremap: Increase LATENCY_LIMIT of mremap to reduce the number of TLB shootdowns
From
Date
Mel Gorman <mgorman@techsingularity.net> wrote:

> On Wed, Jun 06, 2018 at 08:55:15AM -0700, Nadav Amit wrote:
>>> -#define LATENCY_LIMIT (64 * PAGE_SIZE)
>>> +#define LATENCY_LIMIT (PMD_SIZE)
>>>
>>> unsigned long move_page_tables(struct vm_area_struct *vma,
>>> unsigned long old_addr, struct vm_area_struct *new_vma,
>>
>> This LATENCY_LIMIT is only used in move_page_tables() in the following
>> manner:
>>
>> next = (new_addr + PMD_SIZE) & PMD_MASK;
>> if (extent > next - new_addr)
>> extent = next - new_addr;
>> if (extent > LATENCY_LIMIT)
>> extent = LATENCY_LIMIT;
>>
>> If LATENCY_LIMIT is to be changed to PMD_SIZE, then IIUC the last condition
>> is not required, and LATENCY_LIMIT can just be removed (assuming there is no
>> underflow case that hides somewhere).
>
> I see no problem removing it other than we may forget that we ever limited
> PTE lock hold times for any reason. I'm skeptical it will matter unless
> mremap-intensive workloads are a lot more common than I believe.

I have no opinion regarding the behavior change. It is just that code with
no effect is oftentimes confusing. A comment (if needed) can replace the
code, and git history would provide how it was once supported.

\
 
 \ /
  Last update: 2018-06-06 20:20    [W:0.149 / U:0.684 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site