Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 163019
b: refs/heads/master
c: 3b64089
h: refs/heads/master
i:
  163017: f3ed5c1
  163015: 10db5ab
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Sep 16, 2009
1 parent ff09e1b commit 9e235b9
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 23 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: 7c423e98856df9b941223a7e7845b2502ad84b00
refs/heads/master: 3b6408942206f940dd538e980e9904e48f4b64f8
7 changes: 0 additions & 7 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,6 @@ static inline void set_task_rq(struct task_struct *p, unsigned int cpu)

#else

#ifdef CONFIG_SMP
static int root_task_group_empty(void)
{
return 1;
}
#endif

static inline void set_task_rq(struct task_struct *p, unsigned int cpu) { }
static inline struct task_group *task_group(struct task_struct *p)
{
Expand Down
23 changes: 9 additions & 14 deletions trunk/kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ find_idlest_cpu(struct sched_group *group, struct task_struct *p, int this_cpu)
*/
static int select_task_rq_fair(struct task_struct *p, int sd_flag, int flags)
{
struct sched_domain *tmp, *sd = NULL;
struct sched_domain *tmp, *shares = NULL, *sd = NULL;
int cpu = smp_processor_id();
int prev_cpu = task_cpu(p);
int new_cpu = cpu;
Expand Down Expand Up @@ -1387,22 +1387,14 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int flags)
break;
}

switch (sd_flag) {
case SD_BALANCE_WAKE:
if (!sched_feat(LB_WAKEUP_UPDATE))
break;
case SD_BALANCE_FORK:
case SD_BALANCE_EXEC:
if (root_task_group_empty())
break;
update_shares(tmp);
default:
break;
}

if (want_affine && (tmp->flags & SD_WAKE_AFFINE) &&
cpumask_test_cpu(prev_cpu, sched_domain_span(tmp))) {

if (sched_feat(LB_SHARES_UPDATE)) {
update_shares(tmp);
shares = tmp;
}

if (wake_affine(tmp, p, sync)) {
new_cpu = cpu;
goto out;
Expand All @@ -1417,6 +1409,9 @@ static int select_task_rq_fair(struct task_struct *p, int sd_flag, int flags)
sd = tmp;
}

if (sd && sd != shares && sched_feat(LB_SHARES_UPDATE))
update_shares(sd);

while (sd) {
struct sched_group *group;
int weight;
Expand Down
2 changes: 1 addition & 1 deletion trunk/kernel/sched_features.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ SCHED_FEAT(ARCH_POWER, 0)
SCHED_FEAT(HRTICK, 0)
SCHED_FEAT(DOUBLE_TICK, 0)
SCHED_FEAT(LB_BIAS, 1)
SCHED_FEAT(LB_WAKEUP_UPDATE, 1)
SCHED_FEAT(LB_SHARES_UPDATE, 1)
SCHED_FEAT(ASYM_EFF_LOAD, 1)

/*
Expand Down

0 comments on commit 9e235b9

Please sign in to comment.