[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20181012.111836.1569129998592378186.davem@davemloft.net>
Date: Fri, 12 Oct 2018 11:18:36 -0700 (PDT)
From: David Miller <davem@...emloft.net>
To: joel@...lfernandes.org
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-arm-kernel@...ts.infradead.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, openrisc@...ts.librecores.org,
peterz@...radead.org, richard@....at
Subject: Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
From: Joel Fernandes <joel@...lfernandes.org>
Date: Fri, 12 Oct 2018 05:50:46 -0700
> If its an issue, then how do transparent huge pages work on Sparc? I don't
> see the huge page code (move_huge_pages) during mremap doing anything special
> for Sparc architecture when moving PMDs..
This is because all huge pages are larger than SHMLBA. So no cache flushing
necessary.
> 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.
Powered by blists - more mailing lists