From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2] arm64: mm: Optimise tlb flush logic where we have >4K granule
Date: Fri, 2 May 2014 13:59:06 +0100 [thread overview]
Message-ID: <20140502125906.GF17370@arm.com> (raw)
In-Reply-To: <20140502123011.GA4054@linaro.org>
On Fri, May 02, 2014 at 01:31:28PM +0100, Steve Capper wrote:
> On Fri, May 02, 2014 at 12:26:18PM +0100, Will Deacon wrote:
> > On Fri, May 02, 2014 at 11:37:14AM +0100, Steve Capper wrote:
> > > The tlb maintainence functions: __cpu_flush_user_tlb_range and
> > > __cpu_flush_kern_tlb_range do not take into consideration the page
> > > granule when looping through the address range, and repeatedly flush
> > > tlb entries for the same page when operating with 64K pages.
> > >
> > > This patch re-works the logic s.t. we instead advance the loop by
> > > 1 << (PAGE_SHIFT - 12), so avoid repeating ourselves.
> > >
> > > Also the routines have been converted from assembler to static inline
> > > functions to aid with legibility and potential compiler optimisations.
> > >
> > > Signed-off-by: Steve Capper <steve.capper@linaro.org>
> > > Acked-by: Will Deacon <will.deacon@arm.com>
> > > ---
> > > Changed in V2: added the missing isb(.) to the kernel tlb flush.
> >
> > Hold your horses ;)
>
> :-)
>
> >
> > You mentioned remapping kernel text rw/ro, but if you think about it, it's
> > still executable for both of these, so the isb() isn't needed. Do we have a
> > case for changing whether or not something is executable?
>
> I think module loading and unloading in future would likely need this.
> i.e. if we get stuff like set_memory_nx and friends for ARM64.
>
> We've just had this added to ARM:
> 75374ad ARM: mm: Define set_memory_* functions for ARM
Ok, but if it's just set_memory_nx that needs this, I'd rather put the isb()
there instead of penalising all kernel TLB flushes.
Will
next prev parent reply other threads:[~2014-05-02 12:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-02 10:37 [PATCH V2] arm64: mm: Optimise tlb flush logic where we have >4K granule Steve Capper
2014-05-02 11:26 ` Will Deacon
2014-05-02 12:31 ` Steve Capper
2014-05-02 12:59 ` Will Deacon [this message]
2014-05-02 13:27 ` Steve Capper
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140502125906.GF17370@arm.com \
--to=will.deacon@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).