Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 69122
b: refs/heads/master
c: 178be79
h: refs/heads/master
v: v3
  • Loading branch information
Ingo Molnar committed Oct 15, 2007
1 parent f40258a commit 301e0a1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 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: 1666703af948ae87c87c2bc7121aa34271cc52ab
refs/heads/master: 178be793485d70d871a0fd46b29e9e3e7da636ad
18 changes: 7 additions & 11 deletions trunk/kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -365,15 +365,6 @@ static inline int cpu_of(struct rq *rq)
#endif
}

static inline int is_migration_thread(struct task_struct *p, struct rq *rq)
{
#ifdef CONFIG_SMP
return p == rq->migration_thread;
#else
return 0;
#endif
}

/*
* Update the per-runqueue clock, as finegrained as the platform can give
* us, but without assuming monotonicity, etc.:
Expand Down Expand Up @@ -6563,6 +6554,12 @@ void normalize_rt_tasks(void)

read_lock_irq(&tasklist_lock);
do_each_thread(g, p) {
/*
* Only normalize user tasks:
*/
if (!p->mm)
continue;

p->se.exec_start = 0;
#ifdef CONFIG_SCHEDSTATS
p->se.wait_start = 0;
Expand All @@ -6584,8 +6581,7 @@ void normalize_rt_tasks(void)
spin_lock_irqsave(&p->pi_lock, flags);
rq = __task_rq_lock(p);

if (!is_migration_thread(p, rq))
normalize_task(rq, p);
normalize_task(rq, p);

__task_rq_unlock(rq);
spin_unlock_irqrestore(&p->pi_lock, flags);
Expand Down

0 comments on commit 301e0a1

Please sign in to comment.