CPU core enabler.

This commit is contained in:
fewtarius 2023-01-03 05:13:05 -05:00
parent 51513be5e5
commit db0c587985
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
3 changed files with 18 additions and 6 deletions

View file

@ -28,14 +28,17 @@ set_online_cores() {
exit 1
fi
for core in $(seq 0 1 $(( ${1} - 1 )))
do
echo 1 >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null
done
if [ "${CORES}" -gt 0 ]
then
for core in $(seq 0 1 ${1})
do
echo 1 | tee /sys/devices/system/cpu/cpu${core}/online >/dev/null 2>&1
done
fi
for core in $(seq ${CORES} 1 ${AVAILABLE_CPUS})
do
echo ${MODE} >/sys/devices/system/cpu/cpu${core}/online 2>/dev/null
echo ${MODE} | tee /sys/devices/system/cpu/cpu${core}/online >/dev/null 2>&1
done
}

View file

@ -25,6 +25,15 @@ ln -sf /tmp/cache /storage/cache/.cores
### so we'll reset the mount option to 0.
set_setting clouddrive.mounted 0
### Enable the desired number of cores.
NUMCORES=$(get_setting "system.cores")
if [ -n "${NUMCORES}" ]
then
onlinecores ${NUMCORES} 0
else
onlinecores all 1
fi
### If we don't have a default governor set, set it
### to schedutil.
if [ -z "$(get_setting system.cpugovernor)" ]

View file

@ -3,7 +3,7 @@
# Copyright (C) 2020-present Fewtarius
PKG_NAME="emulationstation"
PKG_VERSION="c0966ea"
PKG_VERSION="6a41800"
PKG_GIT_CLONE_BRANCH="main"
PKG_REV="1"
PKG_ARCH="any"