public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
From: Paul Mundt <lethal@linux-sh.org>
To: Michal Simek <monstr@monstr.eu>
Cc: David Miller <davem@davemloft.net>,
	lkml <linux-arch@vger.kernel.org>,
	John Williams <john.williams@petalogix.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	Russell King <rmk+lkml@arm.linux.org.uk>,
	Haavard Skinnemoen <haavard.skinnemoen@atmel.com>,
	chris@zankel.net, Ralf Baechle <ralf@linux-mips.org>
Subject: Re: Microblaze caches + tlb handling
Date: Sat, 17 Oct 2009 22:35:16 +0900	[thread overview]
Message-ID: <20091017133516.GA20090@linux-sh.org> (raw)
In-Reply-To: <4AD87791.5050502@monstr.eu>

On Fri, Oct 16, 2009 at 03:39:29PM +0200, Michal Simek wrote:
> The second thing which I would like to check is number of functions which are empty.
> 
> flush_dcache_page, flush_dcache_mmap_lock, flush_dcache_mmap_unlock, flush_cache_dup_mm,
> flush_cache_vmap, flush_cache_vunmap, flush_cache_mm, flush_cache_page, flush_icache_page
> 
There is no generic answer regarding whether you need these or not, it
all depends on your cache architecture and you've left those details out.
If you are on a PIPT non-aliasing cache, then obviously you aren't going
to care about most of these.

flush_icache_page() likewise is something that these days is split up and
handled through flush_dcache_page() and update_mmu_cache(). If you're
doing a from scratch implementation, you probably want to avoid dealing
with it at all.

Having said that, all of ARM/MIPS/SH support a wide variety of cache
configurations, so it's fairly trivial to see which types of strategies
can be undertaken with different cache types just by reading through
those.

> The second part of this email but it is related. It is about tlb_start_vma and tlb_end_vma.
> arm, avr32, sh, sparc and xtensa implement it and mips implement only tlb_start_vma.
> Implementation is almost the same. My question is, if is any reason to implement(or not implement) them?
> 
That would be an optimization to reduce expensive TLB flushing for large
mappings. With these implemented it's possible to track the range and
work out whether to do a partial or full MM flush, which can offer
sizeable performance gains, especially if your platform supports ASID
tags and your full MM flush is just bumping up the ASID (MIPS and SH both
do this, for example).

You can look at c20351846efcb755ba849d9fb701fbd9a1ffb7c2 to see the SH
change that implemented this, which in turn was derived from an earlier
ARM one. That has some more background information and links to the
earlier discussion about it.

  reply	other threads:[~2009-10-17 13:36 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-16 13:39 Microblaze caches + tlb handling Michal Simek
2009-10-17 13:35 ` Paul Mundt [this message]
2009-10-19 12:05   ` Michal Simek

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=20091017133516.GA20090@linux-sh.org \
    --to=lethal@linux-sh.org \
    --cc=akpm@linux-foundation.org \
    --cc=chris@zankel.net \
    --cc=davem@davemloft.net \
    --cc=haavard.skinnemoen@atmel.com \
    --cc=john.williams@petalogix.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=monstr@monstr.eu \
    --cc=ralf@linux-mips.org \
    --cc=rmk+lkml@arm.linux.org.uk \
    /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