linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: linux@arm.linux.org.uk (Russell King - ARM Linux)
To: linux-arm-kernel@lists.infradead.org
Subject: Unnecessary cache-line flush on page table updates ?
Date: Mon, 11 Jul 2011 18:01:41 +0100	[thread overview]
Message-ID: <20110711170141.GA8486@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <20110711164919.GB18871@e102109-lin.cambridge.arm.com>

On Mon, Jul 11, 2011 at 05:49:20PM +0100, Catalin Marinas wrote:
> On Wed, Jul 06, 2011 at 07:08:14PM +0100, Russell King - ARM Linux wrote:
> > Okay, so I can say with confidence then that how things stand in my tree,
> > which limits BTC invalidation to:
> > 
> > 1. For kernel mappings, flush_icache_range() which must be called prior
> >    to code placed in them being executed.
> > 
> > 2. For user mappings, __sync_icache_dcache's icache flush, which is
> >    called before a non-zero user PTE is inserted.
> 
> What about:
> 
> flush_cache_user_range()
> flush_ptrace_access()
> 
> They are fine as long as you haven't removed the BTC invalidation from
> __cpuc_coherent_(kern|user)_range.

That's the basis of flush_icache_range(), so that still has the BTC
invalidate.

> > The area which needs more to focus some further work is
> > __sync_icache_dcache(), which is fairly over-zealous about all the
> > flushing.
> 
> Another thing that could be optimised is not to clean and invalidate the
> D-cache but only clean to the PoU. The only problem is that
> (flush|invalidate)_kernel_vmap_area, functions that seem to used only in
> a single place. The semantics in cachetlb.txt claim to be used for I/O,
> which means that they are already broken since we don't handle the L2
> cache.

Those are newly introduced to cope with XFS wanting DMA to vmap'd areas
to work.  They're there to handle the vmalloc-space alias of the pages.
The DMA API sorts out the kernel direct-mapped plus L2 for non-virtually
tagged L2 caches.

So they're just an additional pre-flush and post-invalidate calls around
the DMA API to cope with vmalloc space aliases.  So I don't think they're
broken.

  reply	other threads:[~2011-07-11 17:01 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-01  7:04 Unnecessary cache-line flush on page table updates ? heechul Yun
2011-07-01 10:10 ` Catalin Marinas
2011-07-01 21:42   ` heechul Yun
2011-07-04  9:45     ` Catalin Marinas
2011-07-04 10:02       ` Russell King - ARM Linux
2011-07-04 10:43         ` Catalin Marinas
2011-07-04 11:13           ` Russell King - ARM Linux
2011-07-04 15:58             ` Catalin Marinas
2011-07-04 19:58               ` Russell King - ARM Linux
2011-07-04 23:20                 ` Russell King - ARM Linux
2011-07-06 16:05                   ` Catalin Marinas
2011-07-06 18:08                     ` Russell King - ARM Linux
2011-07-11 16:49                       ` Catalin Marinas
2011-07-11 17:01                         ` Russell King - ARM Linux [this message]
2011-07-12 13:09                           ` Catalin Marinas
2011-07-15 16:24                             ` Russell King - ARM Linux
2011-07-05 10:07                 ` Catalin Marinas
2011-07-04 21:55             ` Russell King - ARM Linux
2011-07-05  9:26               ` Catalin Marinas
2011-07-05  9:46                 ` Russell King - ARM Linux
2011-07-06 15:52                   ` Catalin Marinas
2011-07-06 15:55                     ` Russell King - ARM Linux
2011-07-06 16:15                       ` Catalin Marinas
2011-07-05 10:48                 ` Russell King - ARM Linux
2011-07-05 13:54                   ` Catalin Marinas
2011-07-05 14:15                     ` Russell King - ARM Linux
2011-07-05 14:40                       ` Catalin Marinas
2011-07-04 13:05           ` Russell King - ARM Linux
2011-07-04 13:15             ` Catalin Marinas
2011-07-04 14:59       ` heechul Yun
2011-07-04 21:24     ` heechul Yun

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=20110711170141.GA8486@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --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).