forked from WildPlusKernel/kernel_patches
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path0002-constgran-vanilla-max-android-5.10.patch
73 lines (68 loc) · 3 KB
/
0002-constgran-vanilla-max-android-5.10.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--- ./kernel/sched/fair.c.orig 2025-02-15 23:02:40.778104500 -0500
+++ ./kernel/sched/fair.c 2025-02-15 23:13:59.487007974 -0500
@@ -38,11 +38,18 @@
* (to see the precise effective timeslice length of your workload,
* run vmstat and monitor the context-switches (cs) field)
*
- * (default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
+ * (BORE default: 24ms constant, units: nanoseconds)
+ * (CFS default: 6ms * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_SCHED_BORE
+unsigned int sysctl_sched_latency = 24000000ULL;
+EXPORT_SYMBOL_GPL(sysctl_sched_latency);
+static unsigned int normalized_sysctl_sched_latency = 24000000ULL;
+#else // CONFIG_SCHED_BORE
unsigned int sysctl_sched_latency = 6000000ULL;
EXPORT_SYMBOL_GPL(sysctl_sched_latency);
static unsigned int normalized_sysctl_sched_latency = 6000000ULL;
+#endif // CONFIG_SCHED_BORE
/*
* The initial- and re-scaling of tunables is configurable
@@ -53,18 +60,30 @@
* SCHED_TUNABLESCALING_LOG - scaled logarithmical, *1+ilog(ncpus)
* SCHED_TUNABLESCALING_LINEAR - scaled linear, *ncpus
*
- * (default SCHED_TUNABLESCALING_LOG = *(1+ilog(ncpus))
+ * (BORE default SCHED_TUNABLESCALING_NONE = *1 constant)
+ * (CFS default SCHED_TUNABLESCALING_LOG = *(1+ilog(ncpus))
*/
+#ifdef CONFIG_SCHED_BORE
+enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE;
+#else // CONFIG_SCHED_BORE
enum sched_tunable_scaling sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_LOG;
+#endif // CONFIG_SCHED_BORE
/*
* Minimal preemption granularity for CPU-bound tasks:
*
- * (default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
+ * (BORE default: 3 msec constant, units: nanoseconds)
+ * (CFS default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_SCHED_BORE
+unsigned int sysctl_sched_min_granularity = 3000000ULL;
+EXPORT_SYMBOL_GPL(sysctl_sched_min_granularity);
+unsigned int normalized_sysctl_sched_min_granularity = 3000000ULL;
+#else // CONFIG_SCHED_BORE
unsigned int sysctl_sched_min_granularity = 750000ULL;
EXPORT_SYMBOL_GPL(sysctl_sched_min_granularity);
static unsigned int normalized_sysctl_sched_min_granularity = 750000ULL;
+#endif // CONFIG_SCHED_BORE
/*
* This value is kept at sysctl_sched_latency/sysctl_sched_min_granularity
@@ -84,10 +103,16 @@
* and reduces their over-scheduling. Synchronous workloads will still
* have immediate wakeup/sleep latencies.
*
- * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
+ * (BORE default: 4 msec constant, units: nanoseconds)
+ * (CFS default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds)
*/
+#ifdef CONFIG_SCHED_BORE
+unsigned int sysctl_sched_wakeup_granularity = 4000000UL;
+static unsigned int normalized_sysctl_sched_wakeup_granularity = 4000000UL;
+#else // CONFIG_SCHED_BORE
unsigned int sysctl_sched_wakeup_granularity = 1000000UL;
static unsigned int normalized_sysctl_sched_wakeup_granularity = 1000000UL;
+#endif // CONFIG_SCHED_BORE
const_debug unsigned int sysctl_sched_migration_cost = 500000UL;