diff options
author | Taijian | 2023-05-09 13:31:24 +0200 |
---|---|---|
committer | Taijian | 2023-05-09 13:31:24 +0200 |
commit | 49aeaf6639822a0d281567420bd8d1666f3d1bd8 (patch) | |
tree | 81e8d1ce4c3a08ada6f28509e2b7a06559f06012 /0001-constgran-v2.patch | |
parent | 2bbfe28010ae41a3b1c86d9c25a6f290c684d73c (diff) | |
download | aur-49aeaf6639822a0d281567420bd8d1666f3d1bd8.tar.gz |
update to 6.3.1
Diffstat (limited to '0001-constgran-v2.patch')
-rw-r--r-- | 0001-constgran-v2.patch | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/0001-constgran-v2.patch b/0001-constgran-v2.patch new file mode 100644 index 000000000000..2c5ded27ba70 --- /dev/null +++ b/0001-constgran-v2.patch @@ -0,0 +1,86 @@ +From 823fb7f07b91a3c7b7d1a4d6a3532a4e4c337e70 Mon Sep 17 00:00:00 2001 +From: Masahito S <firelzrd@gmail.com> +Date: Fri, 7 Apr 2023 00:57:07 +0900 +Subject: [PATCH] constgran v2 sched: Make latency / granularity constant + tunable_scaling = 1 (logarithmic) -> 0 (constant) latency_ns = variable + 6-24ms -> constant 12.8ms min_granularity_ns = variable 0.75-3ms -> constant + 1.6ms wakeup_granularity_ns = variable 1-4ms -> constant 9.6ms + +--- + kernel/sched/fair.c | 31 +++++++++++++++++++++++++++---- + 1 file changed, 27 insertions(+), 4 deletions(-) + +diff --git a/kernel/sched/fair.c b/kernel/sched/fair.c +index 44de1349c..3ad82e1ab 100644 +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -36,10 +36,16 @@ + * (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: 12.8ms constant, units: nanoseconds) ++ * (CFS default: 6ms * (1 + ilog(ncpus)), units: nanoseconds) + */ ++#ifdef CONFIG_SCHED_BORE ++unsigned int sysctl_sched_latency = 12800000ULL; ++static unsigned int normalized_sysctl_sched_latency = 12800000ULL; ++#else // CONFIG_SCHED_BORE + unsigned int sysctl_sched_latency = 6000000ULL; + static unsigned int normalized_sysctl_sched_latency = 6000000ULL; ++#endif // CONFIG_SCHED_BORE + + /* + * The initial- and re-scaling of tunables is configurable +@@ -50,17 +56,28 @@ static unsigned int normalized_sysctl_sched_latency = 6000000ULL; + * 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 ++unsigned int sysctl_sched_tunable_scaling = SCHED_TUNABLESCALING_NONE; ++#else // CONFIG_SCHED_BORE + unsigned int 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: 1.6 msec constant, units: nanoseconds) ++ * (CFS default: 0.75 msec * (1 + ilog(ncpus)), units: nanoseconds) + */ ++#ifdef CONFIG_SCHED_BORE ++unsigned int sysctl_sched_min_granularity = 1600000ULL; ++static unsigned int normalized_sysctl_sched_min_granularity = 1600000ULL; ++#else // CONFIG_SCHED_BORE + unsigned int sysctl_sched_min_granularity = 750000ULL; + 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 +@@ -80,10 +97,16 @@ unsigned int sysctl_sched_child_runs_first __read_mostly; + * and reduces their over-scheduling. Synchronous workloads will still + * have immediate wakeup/sleep latencies. + * +- * (default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds) ++ * (BORE default: 9.6 msec constant, units: nanoseconds) ++ * (CFS default: 1 msec * (1 + ilog(ncpus)), units: nanoseconds) + */ ++#ifdef CONFIG_SCHED_BORE ++unsigned int sysctl_sched_wakeup_granularity = 9600000UL; ++static unsigned int normalized_sysctl_sched_wakeup_granularity = 9600000UL; ++#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; + +-- +2.25.1 + |