From: catalin.marinas@arm.com (Catalin Marinas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap
Date: Tue, 10 Jun 2014 11:39:01 +0100 [thread overview]
Message-ID: <20140610103901.GB3523@arm.com> (raw)
In-Reply-To: <20140609163954.GA22876@linaro.org>
On Mon, Jun 09, 2014 at 05:40:05PM +0100, Steve Capper wrote:
> On Mon, Jun 09, 2014 at 02:38:59PM +0100, Catalin Marinas wrote:
> > On Mon, Jun 09, 2014 at 02:24:29PM +0100, Leif Lindholm wrote:
> > > On Mon, Jun 09, 2014 at 12:03:56PM +0100, Catalin Marinas wrote:
> > > > A quick grep through the kernel shows that we have other set_pte() calls
> > > > without additional dsb() like create_mapping(), I think kvm_set_pte() as
> > > > well.
> > > >
> > > > So I'm proposing an alternative patch (which needs some benchmarking as
> > > > well to see if anything is affected, maybe application startup time).
> > >
> > > I'm happy for any fix which can be included in 3.16.
> >
> > Steve Capper made a point about performance. He'll follow up.
>
> My concern was initially about splitting THPs, as with a 64K granule,
> we will have 2048 calls to set_pte_at in a loop. Having thought about
> it, these should be relatively rare events though.
Are there any THP benchmarks?
> There will be an impact on various aspects of the memory system (for
> instance fork), but this will need to be measured.
There is but I don't think we have an easy around. Grep'ing the kernel
for set_pte_at() shows several places where this is called without a
corresponding DSB (currently only as part of flush_cache_vmap and
update_mmu_cache).
For example, insert_page(), though insert_pfn() calls update_mmu_cache()
and it even has a comment "why not for insert page?".
So we need to run some benchmarks to assess the impact. If significant,
we can look at alternatives (in addition to the above, possibly adding
barriers to arch_leave_lazy_mmu_mode).
--
Catalin
next prev parent reply other threads:[~2014-06-10 10:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-06 10:29 [PATCH] arm64: Add flush_cache_vmap call in __early_set_fixmap Leif Lindholm
2014-06-06 14:37 ` Mark Salter
2014-06-06 14:53 ` Leif Lindholm
2014-06-06 15:09 ` Mark Salter
2014-06-09 11:03 ` Catalin Marinas
2014-06-09 13:24 ` Leif Lindholm
2014-06-09 13:38 ` Catalin Marinas
2014-06-09 16:40 ` Steve Capper
2014-06-10 10:39 ` Catalin Marinas [this message]
2014-06-16 14:17 ` Will Deacon
2014-06-16 14:12 ` Will Deacon
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=20140610103901.GB3523@arm.com \
--to=catalin.marinas@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).