Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>
- Subject: Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
- From: Daniel Colascione <dancol@xxxxxxxxxx>
- Date: Fri, 12 Oct 2018 18:39:45 -0700
- Cc: David Miller <davem@xxxxxxxxxxxxx>, kirill@xxxxxxxxxxxxx, linux-kernel <linux-kernel@xxxxxxxxxxxxxxx>, kernel-team@xxxxxxxxxxx, Minchan Kim <minchan@xxxxxxxxxx>, Ramon Pantin <pantin@xxxxxxxxxx>, hughd@xxxxxxxxxx, Lokesh Gidra <lokeshgidra@xxxxxxxxxx>, Michal Hocko <mhocko@xxxxxxxxxx>, Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>, aryabinin@xxxxxxxxxxxxx, luto@xxxxxxxxxx, bp@xxxxxxxxx, catalin.marinas@xxxxxxx, chris@xxxxxxxxxx, dave.hansen@xxxxxxxxxxxxxxx, elfring@xxxxxxxxxxxxxxxxxxxxx, fenghua.yu@xxxxxxxxx, geert@xxxxxxxxxxxxxx, gxt@xxxxxxxxxx, deller@xxxxxx, mingo@xxxxxxxxxx, jejb@xxxxxxxxxxxxxxxx, jdike@xxxxxxxxxxx, jonas@xxxxxxxxxxxx, Julia.Lawall@xxxxxxx, kasan-dev@xxxxxxxxxxxxxxxx, kvmarm@xxxxxxxxxxxxxxxxxxxxx, lftan@xxxxxxxxxx, linux-alpha@xxxxxxxxxxxxxxx, linux-hexagon@xxxxxxxxxxxxxxx, linux-ia64@xxxxxxxxxxxxxxx, linux-m68k@xxxxxxxxxxxxxxx, linux-mips@xxxxxxxxxxxxxx, linux-mm <linux-mm@xxxxxxxxx>, linux-parisc@xxxxxxxxxxxxxxx, linuxppc-dev@xxxxxxxxxxxxxxxx, linux-riscv@xxxxxxxxxxxxxxxxxxx, linux-s390@xxxxxxxxxxxxxxx, linux-sh@xxxxxxxxxxxxxxx, linux-snps-arc@xxxxxxxxxxxxxxxxxxx, linux-um@xxxxxxxxxxxxxxxxxxx, linux-xtensa@xxxxxxxxxxxxxxxx, jcmvbkbc@xxxxxxxxx, nios2-dev@xxxxxxxxxxxxxxxxxxxxxx, Peter Zijlstra <peterz@xxxxxxxxxxxxx>, richard@xxxxxx
- In-reply-to: <20181013013540.GA207108@joelaf.mtv.corp.google.com>
- References: <20181012013756.11285-2-joel@joelfernandes.org> <20181012113056.gxhcbrqyu7k7xnyv@kshutemo-mobl1> <20181012125046.GA170912@joelaf.mtv.corp.google.com> <20181012.111836.1569129998592378186.davem@davemloft.net> <20181013013540.GA207108@joelaf.mtv.corp.google.com>
Not 32-bit ARM?
On Fri, Oct 12, 2018 at 6:35 PM, Joel Fernandes <joel@xxxxxxxxxxxxxxxxx> wrote:
> On Fri, Oct 12, 2018 at 11:18:36AM -0700, David Miller wrote:
>> From: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>
> [...]
>> > Also, do we not flush the caches from any path when we munmap
>> > address space? We do call do_munmap on the old mapping from mremap
>> > after moving to the new one.
>>
>> Sparc makes sure that shared mapping have consistent colors. Therefore
>> all that's left are private mappings and those will be initialized by
>> block stores to clear the page out or similar.
>>
>> Also, when creating new mappings, we flush the D-cache when necessary
>> in update_mmu_cache().
>>
>> We also maintain a bit in the page struct to track when a page which
>> was potentially written to on one cpu ends up mapped into another
>> address space and flush as necessary.
>>
>> The cache is write-through, which simplifies the preconditions we have
>> to maintain.
>
> Makes sense, thanks. For the moment I sent patches to enable this on arm64
> and x86. We can enable it on sparc as well at a later time as it sounds it
> could be a safe optimization to apply to that architecture as well.
>
> thanks,
>
> - Joel
>
[Index of Archives]
[Linux Kernel]
[Sparc Linux]
[DCCP]
[Linux ARM]
[Yosemite News]
[Linux SCSI]
[Linux x86_64]
[Linux for Ham Radio]