hamadmarri/TT-CPU-Scheduler

high-hz.patch info

antonellocaroli opened this issue · 7 comments

Hi,

if I want to add more frequencies, do I just have to edit this?

config HZ
@@ -53,7 +90,13 @@ config HZ
 	default 100 if HZ_100
 	default 250 if HZ_250
 	default 300 if HZ_300
+	default 417 if HZ_417
+	default 833 if HZ_833
 	default 1000 if HZ_1000
+	default 1666 if HZ_1666
+	default 3333 if HZ_3333
+	default 5000 if HZ_5000
+	default 10000 if HZ_10000

in for example

config HZ
@@ -53,7 +90,13 @@ config HZ
 	default 100 if HZ_100
 	default 250 if HZ_250
 	default 300 if HZ_300
+	default 417 if HZ_417
+	default 833 if HZ_833
 	default 1000 if HZ_1000
+	default 1666 if HZ_1666
+	default 3333 if HZ_3333
+	default 5000 if HZ_5000
+	default 10000 if HZ_10000
+	default 44100 if HZ_44100
+	default 88200 if HZ_88200
+	default 176400 if HZ_176400

yes

PS: isn't there a version for the 5.10.x kernel?

@antonellocaroli

Currently it should be better, if you add these values also to the choices also, example you can see here:

@ptr1337 thanks!
probably also need to be changed?

diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h
index 5e13f80..b427f8a 100644
--- a/include/linux/jiffies.h
+++ b/include/linux/jiffies.h
@@ -40,6 +40,14 @@
 # define SHIFT_HZ	12
 #elif HZ >= 6144 && HZ < 12288
 # define SHIFT_HZ	13
+#elif HZ >= 12288 && HZ < 24576
+# define SHIFT_HZ	14
+#elif HZ >= 24576 && HZ < 49152
+# define SHIFT_HZ	15
+#elif HZ >= 49152 && HZ < 98304
+# define SHIFT_HZ	16
+#elif HZ >= 98304 && HZ < 196608
+# define SHIFT_HZ	17
 #else
 # error Invalid value of HZ.
 #endif

@antonellocaroli

Yes, should also be added. But i dont think that that high values would help anymore. Already at 10k+ the kernel/your hardware wont be able to handle this. But you can test it out and show your results :)