Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76187
b: refs/heads/master
c: 5a52dd5
h: refs/heads/master
i:
  76185: d7aa363
  76183: b3e691c
v: v3
  • Loading branch information
Peter Zijlstra authored and Ingo Molnar committed Jan 25, 2008
1 parent 2c92024 commit f1727e3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 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: 1020387f5f3b52929b387103cf976321981f8e26
refs/heads/master: 5a52dd50091b6a6e710a1293db741028f8cc5aac
3 changes: 2 additions & 1 deletion trunk/kernel/posix-cpu-timers.c
Original file line number Diff line number Diff line change
Expand Up @@ -1020,7 +1020,8 @@ static void check_thread_timers(struct task_struct *tsk,
unsigned long hard = sig->rlim[RLIMIT_RTTIME].rlim_max;
unsigned long *soft = &sig->rlim[RLIMIT_RTTIME].rlim_cur;

if (tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) {
if (hard != RLIM_INFINITY &&
tsk->rt.timeout > DIV_ROUND_UP(hard, USEC_PER_SEC/HZ)) {
/*
* At the hard limit, we just die.
* No need to calculate anything else now.
Expand Down
8 changes: 1 addition & 7 deletions trunk/kernel/sched_rt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,13 +1125,7 @@ static void watchdog(struct rq *rq, struct task_struct *p)

p->rt.timeout++;
next = DIV_ROUND_UP(min(soft, hard), USEC_PER_SEC/HZ);
if (next > p->rt.timeout) {
u64 next_time = p->se.sum_exec_runtime;

next_time += next * (NSEC_PER_SEC/HZ);
if (p->it_sched_expires > next_time)
p->it_sched_expires = next_time;
} else
if (p->rt.timeout > next)
p->it_sched_expires = p->se.sum_exec_runtime;
}
}
Expand Down

0 comments on commit f1727e3

Please sign in to comment.