[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20181013013540.GA207108@joelaf.mtv.corp.google.com>
Date: Fri, 12 Oct 2018 18:35:40 -0700
From: Joel Fernandes <joel@...lfernandes.org>
To: David Miller <davem@...emloft.net>
Cc: kirill@...temov.name, linux-kernel@...r.kernel.org,
kernel-team@...roid.com, minchan@...nel.org, pantin@...gle.com,
hughd@...gle.com, lokeshgidra@...gle.com, dancol@...gle.com,
mhocko@...nel.org, akpm@...ux-foundation.org,
aryabinin@...tuozzo.com, luto@...nel.org, bp@...en8.de,
catalin.marinas@....com, chris@...kel.net,
dave.hansen@...ux.intel.com, elfring@...rs.sourceforge.net,
fenghua.yu@...el.com, geert@...ux-m68k.org, gxt@....edu.cn,
deller@....de, mingo@...hat.com, jejb@...isc-linux.org,
jdike@...toit.com, jonas@...thpole.se, Julia.Lawall@...6.fr,
kasan-dev@...glegroups.com, kvmarm@...ts.cs.columbia.edu,
lftan@...era.com, linux-alpha@...r.kernel.org,
linux-hexagon@...r.kernel.org, linux-ia64@...r.kernel.org,
linux-m68k@...ts.linux-m68k.org, linux-mips@...ux-mips.org,
linux-mm@...ck.org, linux-parisc@...r.kernel.org,
linuxppc-dev@...ts.ozlabs.org, linux-riscv@...ts.infradead.org,
linux-s390@...r.kernel.org, linux-sh@...r.kernel.org,
linux-snps-arc@...ts.infradead.org, linux-um@...ts.infradead.org,
linux-xtensa@...ux-xtensa.org, jcmvbkbc@...il.com,
nios2-dev@...ts.rocketboards.org, peterz@...radead.org,
richard@....at
Subject: Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
On Fri, Oct 12, 2018 at 11:18:36AM -0700, David Miller wrote:
> From: Joel Fernandes <joel@...lfernandes.org>
[...]
> > 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
Powered by blists - more mailing lists