Skip to content

Commit

Permalink
CacULE r3
Browse files Browse the repository at this point in the history
  • Loading branch information
hamadmarri committed Aug 3, 2021
1 parent 3ae45b9 commit b363f91
Show file tree
Hide file tree
Showing 7 changed files with 233 additions and 156 deletions.
1 change: 1 addition & 0 deletions include/linux/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,7 @@ struct cacule_node {
struct cacule_node* next;
struct cacule_node* prev;
u64 cacule_start_time;
u64 last_run;
u64 vruntime;
};
#endif
Expand Down
4 changes: 4 additions & 0 deletions include/linux/sched/sysctl.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ extern unsigned int sysctl_sched_wakeup_granularity;
#ifdef CONFIG_CACULE_SCHED
extern unsigned int interactivity_factor;
extern unsigned int cacule_max_lifetime;
extern unsigned int cache_factor;
extern unsigned int cache_divisor;
extern unsigned int starve_factor;
extern unsigned int starve_divisor;
extern int cacule_yield;
#endif

Expand Down
7 changes: 3 additions & 4 deletions init/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -846,14 +846,14 @@ config CACULE_SCHED

config CACULE_RDB
bool "RDB (Response Driven Balancer)"
default n
default y
depends on CACULE_SCHED
help
This is an experimental load balancer for CacULE. It is a lightweight
load balancer which is a replacement of CFS load balancer. It migrates
tasks based on their interactivity scores.

If unsure, say N.
If unsure, say Y here.

config RDB_INTERVAL
int "RDB load balancer interval"
Expand Down Expand Up @@ -996,7 +996,6 @@ config CGROUP_WRITEBACK

menuconfig CGROUP_SCHED
bool "CPU controller"
depends on !CACULE_RDB
default n
help
This feature lets CPU scheduler recognize task groups and control CPU
Expand Down Expand Up @@ -1274,10 +1273,10 @@ config CHECKPOINT_RESTORE

config SCHED_AUTOGROUP
bool "Automatic process group scheduling"
depends on !CACULE_RDB
select CGROUPS
select CGROUP_SCHED
select FAIR_GROUP_SCHED
default y
help
This option optimizes the scheduler for common desktop workloads by
automatically creating and populating task groups. This separation
Expand Down
8 changes: 5 additions & 3 deletions kernel/sched/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -8143,10 +8143,12 @@ void __init sched_init(void)
BUG_ON(&dl_sched_class + 1 != &stop_sched_class);
#endif

#ifdef CONFIG_CACULE_SCHED
#ifdef CONFIG_CACULE_RDB
printk(KERN_INFO "CacULE CPU scheduler (RDB) v5.13-r2 by Hamad Al Marri.");
#elif CONFIG_CACULE_SCHED
printk(KERN_INFO "CacULE CPU scheduler v5.13-r2 by Hamad Al Marri.");
printk(KERN_INFO "CacULE CPU scheduler (RDB) v5.13-r3 by Hamad Al Marri.");
#else
printk(KERN_INFO "CacULE CPU scheduler v5.13-r3 by Hamad Al Marri.");
#endif
#endif

wait_bit_init();
Expand Down

0 comments on commit b363f91

Please sign in to comment.