Skip to content

Commit 88cb0cf

Browse files
committedAug 3, 2021
Merge branch 'cacule-5.13-rdb-autogroup-testing' into cacule-5.13
CacULE r3
2 parents 5172c77 + 91e2081 commit 88cb0cf

File tree

6 files changed

+595
-87
lines changed

6 files changed

+595
-87
lines changed
 

‎include/linux/sched/sysctl.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@ extern unsigned int sysctl_sched_wakeup_granularity;
3535
#ifdef CONFIG_CACULE_SCHED
3636
extern unsigned int interactivity_factor;
3737
extern unsigned int cacule_max_lifetime;
38-
extern int cacule_yield;
3938
extern unsigned int cache_factor;
4039
extern unsigned int cache_divisor;
4140
extern unsigned int starve_factor;
4241
extern unsigned int starve_divisor;
42+
extern int cacule_yield;
4343
#endif
4444

4545
enum sched_tunable_scaling {

‎init/Kconfig

+34
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,40 @@ config CACULE_SCHED
844844

845845
If unsure, say Y here.
846846

847+
config CACULE_RDB
848+
bool "RDB (Response Driven Balancer)"
849+
default y
850+
depends on CACULE_SCHED
851+
help
852+
This is an experimental load balancer for CacULE. It is a lightweight
853+
load balancer which is a replacement of CFS load balancer. It migrates
854+
tasks based on their interactivity scores.
855+
856+
If unsure, say Y here.
857+
858+
config RDB_INTERVAL
859+
int "RDB load balancer interval"
860+
default 19
861+
depends on CACULE_RDB
862+
help
863+
This is an interval to control load balance time period.
864+
The trigger_load_balance runs in every tick. For High HZ values, the
865+
load balance could be overwhelming. RDB load balance includes rq locking
866+
which can reduce the performance. The balance interval can help to avoid
867+
running load balance on every tick. For example, RDB_INTERVAL=3 will
868+
only run load balance every 3ms. Setting RDB_INTERVAL depends on HZ.
869+
If you want load balancer run every 2ms while HZ=500 then it is not
870+
needed and better to set RDB_INTERVAL=0 since 500HZ already (1000ms
871+
/ 500HZ = 2ms). However, if you have 1000HZ and want to avoid load
872+
balancer from running every 1ms, you could set RDB_INTERVAL=4ms for
873+
example to make load balancer run every 4ms. Less RDB_INTERVAL values
874+
(or 0 to disable) could make sure tasks are balanced ASAP, but with
875+
the cost of locking/blocking time. High RDB_INTERVAL values can relax
876+
balancing locking but with the cost of imbalanced workload for that
877+
period of time (i.e. if RDB_INTERVAL=100ms) there will be no balancing
878+
for 100ms (except for newidle_balance which is not effected by RDB_INTERVAL).
879+
880+
If in doubt, use the default value.
847881

848882
#
849883
# For architectures that want to enable the support for NUMA-affine scheduler

‎kernel/sched/core.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -8141,7 +8141,11 @@ void __init sched_init(void)
81418141
#endif
81428142

81438143
#ifdef CONFIG_CACULE_SCHED
8144-
printk(KERN_INFO "CacULE CPU scheduler v5.13-r2 by Hamad Al Marri.");
8144+
#ifdef CONFIG_CACULE_RDB
8145+
printk(KERN_INFO "CacULE CPU scheduler (RDB) v5.13-r3 by Hamad Al Marri.");
8146+
#else
8147+
printk(KERN_INFO "CacULE CPU scheduler v5.13-r3 by Hamad Al Marri.");
8148+
#endif
81458149
#endif
81468150

81478151
wait_bit_init();

0 commit comments

Comments
 (0)
Please sign in to comment.