timers: fix itimer/many thread hang, cleanups
Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
@@ -430,7 +430,7 @@ struct pacct_struct {
|
|||||||
* @utime: time spent in user mode, in &cputime_t units
|
* @utime: time spent in user mode, in &cputime_t units
|
||||||
* @stime: time spent in kernel mode, in &cputime_t units
|
* @stime: time spent in kernel mode, in &cputime_t units
|
||||||
* @sum_exec_runtime: total time spent on the CPU, in nanoseconds
|
* @sum_exec_runtime: total time spent on the CPU, in nanoseconds
|
||||||
*
|
*
|
||||||
* This structure groups together three kinds of CPU time that are
|
* This structure groups together three kinds of CPU time that are
|
||||||
* tracked for threads and thread groups. Most things considering
|
* tracked for threads and thread groups. Most things considering
|
||||||
* CPU time want to group these counts together and treat all three
|
* CPU time want to group these counts together and treat all three
|
||||||
|
@@ -94,7 +94,7 @@ void update_rlimit_cpu(unsigned long rlim_new)
|
|||||||
|
|
||||||
cputime = secs_to_cputime(rlim_new);
|
cputime = secs_to_cputime(rlim_new);
|
||||||
if (cputime_eq(current->signal->it_prof_expires, cputime_zero) ||
|
if (cputime_eq(current->signal->it_prof_expires, cputime_zero) ||
|
||||||
cputime_lt(current->signal->it_prof_expires, cputime)) {
|
cputime_lt(current->signal->it_prof_expires, cputime)) {
|
||||||
spin_lock_irq(¤t->sighand->siglock);
|
spin_lock_irq(¤t->sighand->siglock);
|
||||||
set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
|
set_process_cpu_timer(current, CPUCLOCK_PROF, &cputime, NULL);
|
||||||
spin_unlock_irq(¤t->sighand->siglock);
|
spin_unlock_irq(¤t->sighand->siglock);
|
||||||
@@ -1372,9 +1372,9 @@ void run_posix_cpu_timers(struct task_struct *tsk)
|
|||||||
* tsk->signal is non-NULL; this probably can't happen but cover the
|
* tsk->signal is non-NULL; this probably can't happen but cover the
|
||||||
* possibility anyway.
|
* possibility anyway.
|
||||||
*/
|
*/
|
||||||
if (unlikely(!sig) || !fastpath_timer_check(tsk, sig)) {
|
if (unlikely(!sig) || !fastpath_timer_check(tsk, sig))
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
sighand = lock_task_sighand(tsk, &flags);
|
sighand = lock_task_sighand(tsk, &flags);
|
||||||
if (likely(sighand)) {
|
if (likely(sighand)) {
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user