File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -176,6 +176,75 @@ gpu() {
176176 esac
177177}
178178
179+ cpu_iowait_boost () {
180+ clear
181+ red
182+ animation_title
183+ echo " ********************************"
184+ animation_title
185+ echo " × IO Wait Boost × "
186+ animation_title
187+ echo " ********************************"
188+ green
189+ space
190+ animation
191+ echo " 1 - Enable IO Wait Boost"
192+ animation
193+ echo " 2 - Disable IO Wait Boost"
194+ animation
195+ echo " 3 - Go back"
196+ animation
197+ echo " 4 - Main"
198+ animation
199+ echo " 5 - Exit"
200+ reset
201+ space
202+ echo " Your input: "
203+ read input
204+ case $input in
205+ 1)
206+ if [ -d $S2 ]; then
207+ echo " 1" > $S2 /iowait_boost_enable
208+ elif [ -e $SC ]; then
209+ for cpu in /sys/devices/system/cpu/* /cpufreq/schedutil
210+ do
211+ echo " 1" > " ${cpu} /iowait_boost_enable"
212+ done
213+ fi
214+ sed -i ' /^IOWAIT_BOOST=/c\IOWAIT_BOOST="1"' $CONFIG
215+ finish
216+ cpu
217+ ;;
218+ 2)
219+ if [ -d $S2 ]; then
220+ echo " 0" > $S2 /iowait_boost_enable
221+ elif [ -e $SC ]; then
222+ for cpu in /sys/devices/system/cpu/* /cpufreq/schedutil
223+ do
224+ echo " 0" > " ${cpu} /iowait_boost_enable"
225+ done
226+ fi
227+ sed -i ' /^IOWAIT_BOOST=/c\IOWAIT_BOOST="0"' $CONFIG
228+ finish
229+ cpu
230+ ;;
231+ 3)
232+ cpu
233+ ;;
234+ 4)
235+ main
236+ ;;
237+ 5)
238+ leave
239+ ;;
240+ * )
241+ red
242+ echo " Invalid input!"
243+ reset
244+ ;;
245+ esac
246+ }
247+
179248cpu () {
180249 clear
181250 red
@@ -216,7 +285,7 @@ cpu() {
216285 cpu
217286 ;;
218287 2)
219-
288+ cpu_iowait_boost
220289 ;;
221290 3)
222291 main
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ S2=/sys/devices/system/cpu/cpufreq/schedutil
66SC=/sys/devices/system/cpu/cpu0/cpufreq/schedutil
77GPU_THROTTLING=
88CPU_RATELIMITS=
9+ IOWAIT_BOOST=
910
1011if [ " $GPU_THROTTLING " -eq 1 ]; then
1112 echo " 1" > $KGSL /throttling
@@ -24,4 +25,24 @@ if [ "$CPU_RATELIMITS" -eq 1 ]; then
2425 echo " 20000" > " ${cpu} /down_rate_limit_us"
2526 done
2627 fi
28+ fi
29+
30+ if [ " $IOWAIT_BOOST " -eq 1 ]; then
31+ if [ -d $S2 ]; then
32+ echo " 1" > $S2 /iowait_boost_enable
33+ elif [ -e $SC ]; then
34+ for cpu in /sys/devices/system/cpu/* /cpufreq/schedutil
35+ do
36+ echo " 1" > " ${cpu} /iowait_boost_enable"
37+ done
38+ fi
39+ elif [ " $IOWAIT_BOOST " -eq 0 ]; then
40+ if [ -d $S2 ]; then
41+ echo " 0" > $S2 /iowait_boost_enable
42+ elif [ -e $SC ]; then
43+ for cpu in /sys/devices/system/cpu/* /cpufreq/schedutil
44+ do
45+ echo " 0" > " ${cpu} /iowait_boost_enable"
46+ done
47+ fi
2748fi
You can’t perform that action at this time.
0 commit comments