linux57-tkg: Tweak MuQSS default yield type. The global default of 0 reportedly leads to stability issues on -at least- some AMD Ryzen platforms, so let's default to 1 (sched default) instead.

master
Tk-Glitch 2020-06-22 23:41:02 +07:00
parent db6dab74c2
commit 2c65df54fb
1 changed files with 14 additions and 4 deletions

@ -89,7 +89,7 @@ pkgname=("${pkgbase}" "${pkgbase}-headers")
_basekernel=5.7 _basekernel=5.7
_sub=5 _sub=5
pkgver="${_basekernel}"."${_sub}" pkgver="${_basekernel}"."${_sub}"
pkgrel=10 pkgrel=11
pkgdesc='Linux-tkg' pkgdesc='Linux-tkg'
arch=('x86_64') # no i686 in here arch=('x86_64') # no i686 in here
url="http://www.kernel.org/" url="http://www.kernel.org/"
@ -363,16 +363,26 @@ prepare() {
plain "0: No yield." plain "0: No yield."
plain "1: Deboost and requeue task. (default)" plain "1: Deboost and requeue task. (default)"
plain "2: Set rq skip task." plain "2: Set rq skip task."
read -rp "`echo $'\n > 0. Recommended option for gaming on PDS and MuQSS - "tkg" default\n 1. Default, but can lead to stability issues on some platforms\n 2. Can be a good option with low rr_interval on MuQSS\n [0-2?]: '`" CONDITION0; if [ "${_cpusched}" == "MuQSS" ]; then
read -rp "`echo $'\n 0. Supposedly best option for gaming performance - could lead to stability issues on some (AMD) platforms when combined with MuQSS\n > 1. Default and recommended option for MuQSS - could lead to stability issues on some (Intel) platforms\n 2. Can be a good option with low rr_interval on MuQSS\n [0-2?]: '`" CONDITION0;
else
read -rp "`echo $'\n > 0. Recommended option for gaming on PDS - "tkg" default\n 1. Default, but can lead to stability issues on some platforms\n 2. Can be a good option with low rr_interval on MuQSS\n [0-2?]: '`" CONDITION0;
fi fi
if [ "$CONDITION0" == "1" ]; then fi
if [ "$CONDITION0" == "0" ]; then
sed -i -e 's/int sched_yield_type __read_mostly = 1;/int sched_yield_type __read_mostly = 0;/' ./kernel/sched/"${_cpusched}".c
elif [ "$CONDITION0" == "1" ]; then
msg2 "Using default CPU sched yield type (1)" msg2 "Using default CPU sched yield type (1)"
elif [ "$CONDITION0" == "2" ]; then elif [ "$CONDITION0" == "2" ]; then
sed -i -e 's/int sched_yield_type __read_mostly = 1;/int sched_yield_type __read_mostly = 2;/' ./kernel/sched/"${_cpusched}".c sed -i -e 's/int sched_yield_type __read_mostly = 1;/int sched_yield_type __read_mostly = 2;/' ./kernel/sched/"${_cpusched}".c
else
if [ "${_cpusched}" == "MuQSS" ]; then
msg2 "Using default CPU sched yield type (1)"
else else
sed -i -e 's/int sched_yield_type __read_mostly = 1;/int sched_yield_type __read_mostly = 0;/' ./kernel/sched/"${_cpusched}".c sed -i -e 's/int sched_yield_type __read_mostly = 1;/int sched_yield_type __read_mostly = 0;/' ./kernel/sched/"${_cpusched}".c
fi fi
fi fi
fi
# Round Robin interval # Round Robin interval
if [ "${_cpusched}" == "MuQSS" ] || [ "${_cpusched}" == "pds" ] || [ "${_cpusched}" == "bmq" ]; then if [ "${_cpusched}" == "MuQSS" ] || [ "${_cpusched}" == "pds" ] || [ "${_cpusched}" == "bmq" ]; then