Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54756
b: refs/heads/master
c: bdecea3
h: refs/heads/master
v: v3
  • Loading branch information
Siddha, Suresh B authored and Linus Torvalds committed May 8, 2007
1 parent 053cfa9 commit e7224d5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 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: 2bd7e20e0d24325b0799544bc8105cc57cc8e2aa
refs/heads/master: bdecea3a9282d529b54954f3f1e59877629baba1
12 changes: 5 additions & 7 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ struct rq {
unsigned long raw_weighted_load;
#ifdef CONFIG_SMP
unsigned long cpu_load[3];
unsigned char idle_at_tick;
#endif
unsigned long long nr_switches;

Expand Down Expand Up @@ -2943,12 +2944,7 @@ static void run_rebalance_domains(struct softirq_action *h)
struct rq *this_rq = cpu_rq(this_cpu);
unsigned long interval;
struct sched_domain *sd;
/*
* We are idle if there are no processes running. This
* is valid even if we are the idle process (SMT).
*/
enum idle_type idle = !this_rq->nr_running ?
SCHED_IDLE : NOT_IDLE;
enum idle_type idle = this_rq->idle_at_tick ? SCHED_IDLE : NOT_IDLE;
/* Earliest time when we have to call run_rebalance_domains again */
unsigned long next_balance = jiffies + 60*HZ;

Expand Down Expand Up @@ -3218,14 +3214,16 @@ void scheduler_tick(void)
unsigned long long now = sched_clock();
struct task_struct *p = current;
int cpu = smp_processor_id();
int idle_at_tick = idle_cpu(cpu);
struct rq *rq = cpu_rq(cpu);

update_cpu_clock(p, rq, now);

if (p != rq->idle)
if (!idle_at_tick)
task_running_tick(rq, p);
#ifdef CONFIG_SMP
update_load(rq);
rq->idle_at_tick = idle_at_tick;
if (time_after_eq(jiffies, rq->next_balance))
raise_softirq(SCHED_SOFTIRQ);
#endif
Expand Down

0 comments on commit e7224d5

Please sign in to comment.