Kobo/Elipsa: More fine-grained control over the amount of online CPU

cores

* Only keep a single core online most of the time.
* Device: Add an enableCPUCores method to allow controlling the amount of
  online CPU cores.
* Move the initial core onlining setup to Kobo:init, instead of the startup script.
* Enable two CPU cores while hinting new (e.g., cache miss) pages in PDF land.
* Enable two CPU cores while processing book metadata.
* Drive-by fix to isolate the DocCache pressure check to KoptInterface
  and actually apply it when it matters most (e.g., k2pdfopt stuff).
This commit is contained in:
NiLuJe
2021-09-23 17:13:18 +02:00
parent 65abac9431
commit 48da545e32
8 changed files with 126 additions and 38 deletions

View File

@@ -262,15 +262,6 @@ else
KOBO_TS_INPUT="/dev/input/event1"
fi
# Make sure we only keep two cores online on the Elipsa.
# NOTE: That's a bit optimistic, we might actually need to tone that down to one,
# and just toggle the second one on demand (e.g., PDF).
if [ "${PRODUCT}" = "europa" ]; then
echo "1" >"/sys/devices/system/cpu/cpu1/online"
echo "0" >"/sys/devices/system/cpu/cpu2/online"
echo "0" >"/sys/devices/system/cpu/cpu3/online"
fi
# We'll want to ensure Portrait rotation to allow us to use faster blitting codepaths @ 8bpp,
# so remember the current one before fbdepth does its thing.
IFS= read -r ORIG_FB_ROTA <"/sys/class/graphics/fb0/rotate"