ANNOUNCE: BLD-3.16 release.
Hello everyone,
It's been quite a long time since the announcement of the Barbershop Load Distribution (BLD) Algorithm. Quite a few changes have been made, since then. Now it more reflects what it really should be ;-). It's a simplistic approach towards load balancing, typical x86 SMP boxes should run okay (tested personally) , but, yes it can break your boxes too. I'm looking forward to get some feedback, to keep further development up and going.
(This patch is made for kernel version 3.16.)
Thanks,
Rakib
---
Signed-off-by Rakib Mullick <[email protected]>
init/Kconfig +9 -0
@@ -36,6 +36,15 @@ config BROKEN_ON_SMP depends on BROKEN || !SMP default y +config BLD + bool "An alternate CPU load distribution technique for task scheduler" + depends on SMP + default y + help + This is an alternate CPU load distribution technique based for task + scheduler based on The Barbershop Load Distribution algorithm. Not + suitable for NUMA, should work well on SMP. + config INIT_ENV_ARG_LIMIT int default 32 if !UML
kernel/sched/bld.h new file +207 -0
207 lines not on this page · raw message
kernel/sched/core.c +45 -2
145 lines not on this page · raw message
kernel/sched/fair.c +42 -30
158 lines not on this page · raw message
kernel/sched/rt.c +4 -0
@@ -1291,6 +1291,7 @@ static void yield_task_rt(struct rq *rq) #ifdef CONFIG_SMP static int find_lowest_rq(struct task_struct *task); +#ifndef CONFIG_BLD static int select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) {
@@ -1344,6 +1345,7 @@ select_task_rq_rt(struct task_struct *p, int cpu, int sd_flag, int flags) out: return cpu; } +#endif /* CONFIG_BLD */ static void check_preempt_equal_prio (struct rq *rq,struct task_struct *p) {
@@ -2108,7 +2110,9 @@ const struct sched_class rt_sched_class = { .put_prev_task = put_prev_task_rt,#ifdef CONFIG_SMP +#ifndef CONFIG_BLD .select_task_rq = select_task_rq_rt, +#endif .set_cpus_allowed = set_cpus_allowed_rt, .rq_online = rq_online_rt,
kernel/sched/sched.h +11 -3
@@ -358,9 +358,8 @@ struct cfs_rq {#endif /* CONFIG_FAIR_GROUP_SCHED */ #endif /* CONFIG_SMP */ -#ifdef CONFIG_FAIR_GROUP_SCHED struct rq *rq;/* cpu runqueue to which this cfs_rq is attached */ - +#ifdef CONFIG_FAIR_GROUP_SCHED /* * leaf cfs_rqs are those that hold tasks (lowest schedulable entity in * a hierarchy). Non-leaf lrqs hold other higher schedulable entities
@@ -384,6 +383,11 @@ struct cfs_rq {struct list_head throttled_list;#endif /* CONFIG_CFS_BANDWIDTH */ #endif /* CONFIG_FAIR_GROUP_SCHED */ + +#ifdef CONFIG_BLD +struct list_head bld_cfs_list; +char pos; +#endif };static inline int rt_bandwidth_enabled (void )
@@ -417,12 +421,16 @@ struct rt_rq {/* Nests inside the rq lock: */ raw_spinlock_t rt_runtime_lock; +struct rq *rq;#ifdef CONFIG_RT_GROUP_SCHED unsigned long rt_nr_boosted; -struct rq *rq;struct task_group *tg;#endif +#ifdef CONFIG_BLD +struct list_head bld_rt_list; +int lowbit; +#endif };/* Deadline class' related fields in a runqueue */