]> git.baikalelectronics.ru Git - kernel.git/commit
parisc: Optimze cache flush algorithms
authorJohn David Anglin <dave.anglin@bell.net>
Sat, 20 Oct 2018 00:48:12 +0000 (20:48 -0400)
committerHelge Deller <deller@gmx.de>
Sat, 20 Oct 2018 19:10:26 +0000 (21:10 +0200)
commit3b48b867965b10cceb8765a500d1817a865de8de
tree00140541092c416503ed71d4fec7d45350b5d379
parent5323f95fe192a095ae663f2fa09fac7170359592
parisc: Optimze cache flush algorithms

The attached patch implements three optimizations:

1) Loops in flush_user_dcache_range_asm, flush_kernel_dcache_range_asm,
purge_kernel_dcache_range_asm, flush_user_icache_range_asm, and
flush_kernel_icache_range_asm are unrolled to reduce branch overhead.

2) The static branch prediction for cmpb instructions in pacache.S have
been reviewed and the operand order adjusted where necessary.

3) For flush routines in cache.c, we purge rather flush when we have no
context.  The pdc instruction at level 0 is not required to write back
dirty lines to memory. This provides a performance improvement over the
fdc instruction if the feature is implemented.

Version 2 adds alternative patching.

The patch provides an average improvement of about 2%.

Signed-off-by: John David Anglin <dave.anglin@bell.net>
Signed-off-by: Helge Deller <deller@gmx.de>
arch/parisc/kernel/cache.c
arch/parisc/kernel/pacache.S