aha/arch/sh
Paul Mundt c20351846e sh: Flush only the needed range when unmapping a VMA.
This follows the ARM change from Aaro Koskinen:

	When unmapping N pages (e.g. shared memory) the amount of TLB
	flushes done can be (N*PAGE_SIZE/ZAP_BLOCK_SIZE)*N although it
	should be N at maximum. With PREEMPT kernel ZAP_BLOCK_SIZE is 8
	pages, so there is a noticeable performance penalty when
	unmapping a large VMA and the system is spending its time in
	flush_tlb_range().

	The problem is that tlb_end_vma() is always flushing the full VMA
	range. The subrange that needs to be flushed can be calculated by
	tlb_remove_tlb_entry(). This approach was suggested by Hugh
	Dickins, and is also used by other arches.

	The speed increase is roughly 3x for 8M mappings and for larger
	mappings even more.

Bits and peices are taken from the ARM patch as well as the existing
arch/um implementation that is quite similar.

The end result is a significant reduction in both partial and full TLB
flushes initiated through flush_tlb_range().

At the same time, the nommu implementation was broken, had a superfluous
cache flush, and subsequently would have triggered a BUG_ON() if a
code-path had triggered it. Tidy this up for correctness and provide a
nopped-out implementation there.

More background on the initial discussion can be found at:

	http://marc.info/?t=123609820900002&r=1&w=2
	http://marc.info/?t=123660375800003&r=1&w=2

Signed-off-by: Paul Mundt <lethal@linux-sh.org>
2009-03-17 21:19:49 +09:00
..
boards sh: sh7763rdp: Change IRQ number for sh_eth of sh7763rdp 2009-03-17 15:20:59 +09:00
boot sh: Support fixed 32-bit PMB mappings from bootloader. 2009-03-10 15:49:54 +09:00
cchips sh: Switch HD64461 from hw_interrupt_type to irq_chip 2008-12-22 18:43:50 +09:00
configs sh: espt-giga board support 2009-03-17 15:18:52 +09:00
drivers sh: dma: Make G2 DMA configurable. 2009-03-17 12:47:56 +09:00
include sh: Flush only the needed range when unmapping a VMA. 2009-03-17 21:19:49 +09:00
kernel sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores. 2009-03-17 17:49:49 +09:00
lib sh: Handle calling csum_partial with misaligned data 2009-01-29 11:56:02 +09:00
lib64 sh: Provide sdivsi3/udivsi3/udivdi3 for sh64, kill off libgcc linking. 2008-12-22 18:44:05 +09:00
math-emu
mm sh: Update debugfs ASID dumping for 16-bit ASID support. 2009-03-17 17:59:31 +09:00
oprofile sh: Add support for SH7786 CPU subtype. 2009-03-03 15:40:25 +09:00
tools sh: espt-giga board support 2009-03-17 15:18:52 +09:00
Kconfig sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores. 2009-03-17 17:49:49 +09:00
Kconfig.cpu sh: Support for extended ASIDs on PTEAEX-capable SH-X3 cores. 2009-03-17 17:49:49 +09:00
Kconfig.debug sh: Conditionalize the code dumper on CONFIG_DUMP_CODE. 2008-12-22 18:44:47 +09:00
Makefile sh: Generate uImage by default on Urquell board. 2009-03-10 17:00:48 +09:00