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: David Miller <davem@xxxxxxxxxxxxx>
- Subject: Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
- From: Joel Fernandes <joel@xxxxxxxxxxxxxxxxx>
- Date: Fri, 12 Oct 2018 18:35:40 -0700
- Cc: kirill@xxxxxxxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, kernel-team@xxxxxxxxxxx, minchan@xxxxxxxxxx, pantin@xxxxxxxxxx, hughd@xxxxxxxxxx, lokeshgidra@xxxxxxxxxx, dancol@xxxxxxxxxx, mhocko@xxxxxxxxxx, 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@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, peterz@xxxxxxxxxxxxx, richard@xxxxxx
- In-reply-to: <20181012.111836.1569129998592378186.davem@davemloft.net>
- References: <20181012013756.11285-2-joel@joelfernandes.org> <20181012113056.gxhcbrqyu7k7xnyv@kshutemo-mobl1> <20181012125046.GA170912@joelaf.mtv.corp.google.com> <20181012.111836.1569129998592378186.davem@davemloft.net>
- User-agent: Mutt/1.10.1 (2018-07-13)
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]