Skip to content

Commit

Permalink
Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
Linus Torvalds committed Sep 21, 2010
2 parents 87ac6fa + f6c3f16 commit 1ce1e41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions kernel/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);

if (total) {
u64 temp;
u64 temp = rtime;

temp = (u64)(rtime * utime);
temp *= utime;
do_div(temp, total);
utime = (cputime_t)temp;
} else
Expand Down Expand Up @@ -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);

if (total) {
u64 temp;
u64 temp = rtime;

temp = (u64)(rtime * cputime.utime);
temp *= cputime.utime;
do_div(temp, total);
utime = (cputime_t)temp;
} else
Expand Down
2 changes: 1 addition & 1 deletion kernel/sched_fair.c
Original file line number Diff line number Diff line change
Expand Up @@ -3630,7 +3630,7 @@ static inline int nohz_kick_needed(struct rq *rq, int cpu)
if (time_before(now, nohz.next_balance))
return 0;

if (!rq->nr_running)
if (rq->idle_at_tick)
return 0;

first_pick_cpu = atomic_read(&nohz.first_pick_cpu);
Expand Down

0 comments on commit 1ce1e41

Please sign in to comment.