[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKOZueuNvWvn18vffJWpbpg7h-uScT8gXrrudTB2pnT4M2HJ_w@mail.gmail.com>
Date: Fri, 12 Oct 2018 18:39:45 -0700
From: Daniel Colascione <dancol@...gle.com>
To: Joel Fernandes <joel@...lfernandes.org>
Cc: David Miller <davem@...emloft.net>, kirill@...temov.name,
linux-kernel <linux-kernel@...r.kernel.org>,
kernel-team@...roid.com, Minchan Kim <minchan@...nel.org>,
Ramon Pantin <pantin@...gle.com>, hughd@...gle.com,
Lokesh Gidra <lokeshgidra@...gle.com>,
Michal Hocko <mhocko@...nel.org>,
Andrew Morton <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 <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,
Peter Zijlstra <peterz@...radead.org>, richard@....at
Subject: Re: [PATCH v2 2/2] mm: speed up mremap by 500x on large regions
Not 32-bit ARM?
On Fri, Oct 12, 2018 at 6:35 PM, Joel Fernandes <joel@...lfernandes.org> wrote:
> 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