Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  sched: Fix nohz balance kick
  sched: Fix user time incorrectly accounted as system time on 32-bit
This commit is contained in:
Linus Torvalds 2010-09-21 13:22:10 -07:00
commit 1ce1e41c1b
2 changed files with 5 additions and 5 deletions

View File

@ -3513,9 +3513,9 @@ void task_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
rtime = nsecs_to_cputime(p->se.sum_exec_runtime); rtime = nsecs_to_cputime(p->se.sum_exec_runtime);
if (total) { if (total) {
u64 temp; u64 temp = rtime;
temp = (u64)(rtime * utime); temp *= utime;
do_div(temp, total); do_div(temp, total);
utime = (cputime_t)temp; utime = (cputime_t)temp;
} else } else
@ -3546,9 +3546,9 @@ void thread_group_times(struct task_struct *p, cputime_t *ut, cputime_t *st)
rtime = nsecs_to_cputime(cputime.sum_exec_runtime); rtime = nsecs_to_cputime(cputime.sum_exec_runtime);
if (total) { if (total) {
u64 temp; u64 temp = rtime;
temp = (u64)(rtime * cputime.utime); temp *= cputime.utime;
do_div(temp, total); do_div(temp, total);
utime = (cputime_t)temp; utime = (cputime_t)temp;
} else } else

View File

@ -3630,7 +3630,7 @@ static inline int nohz_kick_needed(struct rq *rq, int cpu)
if (time_before(now, nohz.next_balance)) if (time_before(now, nohz.next_balance))
return 0; return 0;
if (!rq->nr_running) if (rq->idle_at_tick)
return 0; return 0;
first_pick_cpu = atomic_read(&nohz.first_pick_cpu); first_pick_cpu = atomic_read(&nohz.first_pick_cpu);