From: Nadav Amit <nadav.amit@gmail.com>
To: Mel Gorman <mgorman@techsingularity.net>
Cc: Andrew Morton <akpm@linux-foundation.org>,
Dave Hansen <dave.hansen@intel.com>,
mhocko@kernel.org, vbabka@suse.cz, Aaron Lu <aaron.lu@intel.com>,
linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: Re: [PATCH] mremap: Increase LATENCY_LIMIT of mremap to reduce the number of TLB shootdowns
Date: Wed, 6 Jun 2018 11:20:08 -0700 [thread overview]
Message-ID: <70CFD0DC-FEBD-4B51-9AE9-0786AF66149F@gmail.com> (raw)
In-Reply-To: <20180606174723.bag3o55fvqp6nbvc@techsingularity.net>
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.
prev parent reply other threads:[~2018-06-06 18:20 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-06-06 14:02 Mel Gorman
2018-06-06 15:55 ` Nadav Amit
2018-06-06 17:47 ` Mel Gorman
2018-06-06 18:20 ` Nadav Amit [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=70CFD0DC-FEBD-4B51-9AE9-0786AF66149F@gmail.com \
--to=nadav.amit@gmail.com \
--cc=aaron.lu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=dave.hansen@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mgorman@techsingularity.net \
--cc=mhocko@kernel.org \
--cc=vbabka@suse.cz \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox