u-boot/arch/powerpc/lib
Christophe Leroy 64948e247e powerpc: Fix flush_cache() speed regression
Flushing kernel image after decompression was taking 113 milliseconds
with U-boot 2022.10. With U-boot 2023.01 and 2023.04, flushing
the same amount of memory takes approx 1.5 seconds. With
U-boot 2023.07-rc6, it takes 6.5 seconds.

powerpc flush_cache() function used to call WATCHDOG_RESET() after
flushing every cacheline. At that time WATCHDOG_RESET() was light
so the operation was almost seamless.

But commit 29caf9305b ("cyclic: Use schedule() instead of
WATCHDOG_RESET()") replaced WATCHDOG_RESET() by schedule() and that
started to hurt with U-boot 2022.10.

And in U-boot 2023.07-rc6 that's even worse after
commit 26e8ebcd7c ("watchdog: mpc8xxx: Make it generic").

In the meantime commit 729c1fe656 ("powerpc: introduce
CONFIG_CACHE_FLUSH_WATCHDOG_THRESHOLD") gives us the opportinity to
only call schedule() every given chunk of data instead of every
cacheline. As explained in that commit there is no point in pinging
the watchdog after every cacheline flush, so lets define a sensible
default chunk size of 4k which matches to size of a page on most
powerpc platforms.

With that new default threshold, the culprit flushing performed after
kernel image decompression now takes 85 milliseconds on a powerpc 8xx.

Fixes: 29caf9305b ("cyclic: Use schedule() instead of WATCHDOG_RESET()")
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
2023-07-14 15:21:08 -04:00
..
_ashldi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
_ashrdi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
_lshrdi3.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
bdinfo.c powerpc: Remove unused MPC8540/60ADS code 2022-03-03 16:51:19 -05:00
bootm.c Correct SPL uses of LMB 2023-02-10 07:41:39 -05:00
cache.c cyclic: Use schedule() instead of WATCHDOG_RESET() 2022-09-18 10:26:33 +02:00
extable.c common: Drop log.h from common header 2020-05-18 21:19:18 -04:00
interrupts.c global: Finish CONFIG -> CFG migration 2023-01-20 12:27:24 -05:00
Kconfig powerpc: Fix flush_cache() speed regression 2023-07-14 15:21:08 -04:00
kgdb.c common: Drop asm/ptrace.h from common header 2020-05-18 21:19:23 -04:00
Makefile ppc: Drop bat_rw 2023-02-07 14:33:47 -05:00
ppccache.S WS cleanup: remove trailing empty lines 2021-09-30 08:08:56 -04:00
ppcstring.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
reloc.S SPDX: Convert all of our single license tags to Linux Kernel style 2018-05-07 09:34:12 -04:00
spl.c global: Move remaining CONFIG_SYS_* to CFG_SYS_* 2022-12-05 16:06:08 -05:00
stack.c common/board_f: introduce arch_setup_dest_addr() 2022-10-06 21:05:17 -04:00
ticks.S watchdog: Get rid of ASSEMBLY hacks 2022-09-18 10:26:39 +02:00
time.c common: Drop linux/delay.h from common header 2020-05-18 21:19:23 -04:00
traps.c Revert "powerpc: fix regression in arch_initr_trap()" 2021-06-23 08:45:03 -04:00