diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-11-07 10:29:58 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-11-07 10:29:58 +0100 |
commit | 258594a138f4ca9adf214f5272592d7f21def610 (patch) | |
tree | d97ee71c997b0412f79b9ec4150cb52ce838fe13 /kernel/sched.c | |
parent | a87d091434ed2a34d647979ab12084139ee1fe41 (diff) | |
parent | ca3273f9646694e0419cfb9d6c12deb1c9aff27c (diff) | |
download | kernel_samsung_crespo-258594a138f4ca9adf214f5272592d7f21def610.zip kernel_samsung_crespo-258594a138f4ca9adf214f5272592d7f21def610.tar.gz kernel_samsung_crespo-258594a138f4ca9adf214f5272592d7f21def610.tar.bz2 |
Merge branch 'sched/urgent' into sched/core
Diffstat (limited to 'kernel/sched.c')
-rw-r--r-- | kernel/sched.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/kernel/sched.c b/kernel/sched.c index 213cad5..b24e57a 100644 --- a/kernel/sched.c +++ b/kernel/sched.c @@ -397,7 +397,7 @@ struct cfs_rq { * 'curr' points to currently running entity on this cfs_rq. * It is set to NULL otherwise (i.e when none are currently running). */ - struct sched_entity *curr, *next; + struct sched_entity *curr, *next, *last; unsigned long nr_spread_over; @@ -1785,7 +1785,9 @@ task_hot(struct task_struct *p, u64 now, struct sched_domain *sd) /* * Buddy candidates are cache hot: */ - if (sched_feat(CACHE_HOT_BUDDY) && (&p->se == cfs_rq_of(&p->se)->next)) + if (sched_feat(CACHE_HOT_BUDDY) && + (&p->se == cfs_rq_of(&p->se)->next || + &p->se == cfs_rq_of(&p->se)->last)) return 1; if (p->sched_class != &fair_sched_class) @@ -6832,15 +6834,17 @@ cpu_attach_domain(struct sched_domain *sd, struct root_domain *rd, int cpu) struct sched_domain *tmp; /* Remove the sched domains which do not contribute to scheduling. */ - for (tmp = sd; tmp; tmp = tmp->parent) { + for (tmp = sd; tmp; ) { struct sched_domain *parent = tmp->parent; if (!parent) break; + if (sd_parent_degenerate(tmp, parent)) { tmp->parent = parent->parent; if (parent->parent) parent->parent->child = tmp; - } + } else + tmp = tmp->parent; } if (sd && sd_degenerate(sd)) { @@ -7629,6 +7633,7 @@ static int __build_sched_domains(const cpumask_t *cpu_map, error: free_sched_groups(cpu_map, tmpmask); SCHED_CPUMASK_FREE((void *)allmasks); + kfree(rd); return -ENOMEM; #endif } |