scheduler fixes
Linus,
Please pull the latest sched-urgent-for-linus git tree from:
git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git sched-urgent-for-linus
HEAD: a841f8cef4bb124f0f5563314d0beaf2e1249d72 sched: Fix the relax_domain_level boot parameter
Thanks,
Ingo
------------------>
Alex Shi (1):
sched/numa: Load balance between remote nodes
Dimitri Sivanich (1):
sched: Fix the relax_domain_level boot parameter
Kamalesh Babulal (1):
sched/x86: Calculate booted cores after construction of sibling_mask
Peter Zijlstra (4):
sched/rt: Fix lockdep annotation within find_lock_lowest_rq()
sched: Fix domain iteration
sched: Always initialize cpu-power
sched: Validate assumptions in sched_init_numa()
arch/x86/kernel/smpboot.c | 9 +++ include/linux/sched.h | 11 +++ kernel/sched/core.c | 187 +++++++++++++++++++++++++++++++++++++--------- kernel/sched/fair.c | 7 +- kernel/sched/rt.c | 2 +- kernel/sched/sched.h | 2 + 6 files changed, 179 insertions(+), 39 deletions(-)
arch/x86/kernel/smpboot.c +9 -0
@@ -382,6 +382,15 @@ void __cpuinit set_cpu_sibling_map(int cpu)if ((i == cpu) || (has_mc &&match_llc (c, o)))link_mask (llc_shared, cpu, i); + } + +/* +* This needs a separate iteration over the cpus because we rely on all +* cpu_sibling_mask links to be set-up. +*/ +for_each_cpu (i, cpu_sibling_setup_mask) { + o = &cpu_data (i); +if ((i == cpu) || (has_mc &&match_mc (c, o))) {link_mask (core, cpu, i);
include/linux/sched.h +11 -0
@@ -876,6 +876,8 @@ struct sched_group_power {* Number of busy cpus in this group. */ atomic_t nr_busy_cpus; + +unsigned long cpumask[0 ];/* iteration mask */ };struct sched_group {
@@ -900,6 +902,15 @@ static inline struct cpumask *sched_group_cpus(struct sched_group *sg)return to_cpumask (sg->cpumask); } +/* +* cpumask masking which cpus in the group are allowed to iterate up the domain +* tree. +*/ +static inline struct cpumask *sched_group_mask (struct sched_group *sg) +{ +return to_cpumask (sg->sgp->cpumask); +} +/** * group_first_cpu - Returns the first cpu in the cpumask of a sched_group. * @group: The group whose first cpu is to be returned.
kernel/sched/core.c +152 -35
314 lines not on this page · raw message
kernel/sched/fair.c +4 -3
@@ -3602,7 +3602,7 @@ void update_group_power(struct sched_domain *sd, int cpu) }while (group != child->groups); } - sdg->sgp->power = power; + sdg->sgp->power_orig = sdg->sgp->power = power; }/*
@@ -3652,7 +3652,7 @@ static inline void update_sg_lb_stats(struct lb_env *env,int i;if (local_group) - balance_cpu =group_first_cpu (group); + balance_cpu =group_balance_cpu (group);/* Tally up the load of all CPUs in the group */ max_cpu_load =0 ;
@@ -3667,7 +3667,8 @@ static inline void update_sg_lb_stats(struct lb_env *env,/* Bias balancing toward cpus of our domain */ if (local_group) { -if (idle_cpu (i) && !first_idle_cpu) { +if (idle_cpu (i) && !first_idle_cpu && +cpumask_test_cpu (i,sched_group_mask (group))) { first_idle_cpu =1 ; balance_cpu = i; }
kernel/sched/rt.c +1 -1
@@ -1562,7 +1562,7 @@ static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq) task_running(rq, task) || !task->on_rq)) { -raw_spin_unlock (&lowest_rq->lock); +double_unlock_balance (rq, lowest_rq); lowest_rq =NULL ;break ; }
kernel/sched/sched.h +2 -0
@@ -526,6 +526,8 @@ static inline struct sched_domain *highest_flag_domain(int cpu, int flag) DECLARE_PER_CPU(struct sched_domain *, sd_llc);DECLARE_PER_CPU (int, sd_llc_id); +extern int group_balance_cpu (struct sched_group *sg); +#endif /* CONFIG_SMP */ #include "stats.h"