Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 125330
b: refs/heads/master
c: 0e3900e
h: refs/heads/master
v: v3
  • Loading branch information
Rusty Russell authored and Ingo Molnar committed Nov 24, 2008
1 parent a189172 commit 300cff8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 24600ce89a819a8f2fb4fd69fd777218a82ade20
refs/heads/master: 0e3900e6d3b04c44737ebc505604dcd8ed30e354
1 change: 1 addition & 0 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -8018,6 +8018,7 @@ void __init sched_init_smp(void)
free_cpumask_var(non_isolated_cpus);

alloc_cpumask_var(&fallback_doms, GFP_KERNEL);
init_sched_rt_class();
}
#else
void __init sched_init_smp(void)
Expand Down
13 changes: 11 additions & 2 deletions trunk/kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@ static struct task_struct *pick_next_highest_task_rt(struct rq *rq, int cpu)
return next;
}

static DEFINE_PER_CPU(cpumask_t, local_cpu_mask);
static DEFINE_PER_CPU(cpumask_var_t, local_cpu_mask);

static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
{
Expand All @@ -982,7 +982,7 @@ static inline int pick_optimal_cpu(int this_cpu, cpumask_t *mask)
static int find_lowest_rq(struct task_struct *task)
{
struct sched_domain *sd;
cpumask_t *lowest_mask = &__get_cpu_var(local_cpu_mask);
cpumask_t *lowest_mask = __get_cpu_var(local_cpu_mask);
int this_cpu = smp_processor_id();
int cpu = task_cpu(task);

Expand Down Expand Up @@ -1551,3 +1551,12 @@ static void print_rt_stats(struct seq_file *m, int cpu)
rcu_read_unlock();
}
#endif /* CONFIG_SCHED_DEBUG */

/* Note that this is never called for !SMP, but that's OK. */
static inline void init_sched_rt_class(void)
{
unsigned int i;

for_each_possible_cpu(i)
alloc_cpumask_var(&per_cpu(local_cpu_mask, i), GFP_KERNEL);
}

0 comments on commit 300cff8

Please sign in to comment.