u-boot/arch
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
..
arc global: Use proper project name U-Boot 2023-06-12 13:24:31 +02:00
arm arch: arm: npcm8xx: add cpu version and 4G ram support 2023-07-14 15:21:07 -04:00
m68k m68k: use asm-generic/unaligned.h 2023-05-31 14:05:34 -04:00
microblaze microblaze: u-boot-spl.lds: Pass _image_binary_end 2023-07-03 10:20:13 -04:00
mips Prepare v2023.07-rc6 2023-07-05 11:28:55 -04:00
nios2 dm: Emit the arch_cpu_init_dm() even only before relocation 2023-05-11 10:25:29 +08:00
powerpc powerpc: Fix flush_cache() speed regression 2023-07-14 15:21:08 -04:00
riscv riscv: dts: t-head: Add basic device tree for Sipeed Lichee PI 4A board 2023-07-12 13:21:41 +08:00
sandbox expo: Add tests for the configuration editor 2023-07-14 12:54:51 -04:00
sh sh: use asm-generic/unaligned.h 2023-05-31 14:05:34 -04:00
x86 Pull request efi-2023-07-rc7 2023-07-11 13:27:32 -04:00
xtensa global: Migrate CONFIG_MAX_MEM_MAPPED to CFG 2022-12-23 10:14:51 -05:00
.gitignore
Kconfig acpi: Create a new Kconfig for ACPI 2023-05-11 10:25:29 +08:00
Kconfig.nxp LFU-544: Kconfig.nxp: Fixed secure boot on LS-CH2 platforms 2023-07-06 13:04:56 +08:00
u-boot-elf.lds