diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-cpu-timers.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index 35509c5a3ffb..79747b7d9420 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -1091,7 +1091,8 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
1091 | put_task_struct(p); | 1091 | put_task_struct(p); |
1092 | timer->it.cpu.task = p = NULL; | 1092 | timer->it.cpu.task = p = NULL; |
1093 | timer->it.cpu.expires = 0; | 1093 | timer->it.cpu.expires = 0; |
1094 | goto out_unlock; | 1094 | read_unlock(&tasklist_lock); |
1095 | goto out; | ||
1095 | } else if (unlikely(p->exit_state) && thread_group_empty(p)) { | 1096 | } else if (unlikely(p->exit_state) && thread_group_empty(p)) { |
1096 | /* | 1097 | /* |
1097 | * We've noticed that the thread is dead, but | 1098 | * We've noticed that the thread is dead, but |
@@ -1100,7 +1101,8 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
1100 | */ | 1101 | */ |
1101 | cpu_timer_sample_group(timer->it_clock, p, &now); | 1102 | cpu_timer_sample_group(timer->it_clock, p, &now); |
1102 | clear_dead_task(timer, now); | 1103 | clear_dead_task(timer, now); |
1103 | goto out_unlock; | 1104 | read_unlock(&tasklist_lock); |
1105 | goto out; | ||
1104 | } | 1106 | } |
1105 | spin_lock(&p->sighand->siglock); | 1107 | spin_lock(&p->sighand->siglock); |
1106 | cpu_timer_sample_group(timer->it_clock, p, &now); | 1108 | cpu_timer_sample_group(timer->it_clock, p, &now); |
@@ -1114,10 +1116,11 @@ void posix_cpu_timer_schedule(struct k_itimer *timer) | |||
1114 | BUG_ON(!irqs_disabled()); | 1116 | BUG_ON(!irqs_disabled()); |
1115 | arm_timer(timer); | 1117 | arm_timer(timer); |
1116 | spin_unlock(&p->sighand->siglock); | 1118 | spin_unlock(&p->sighand->siglock); |
1117 | |||
1118 | out_unlock: | ||
1119 | read_unlock(&tasklist_lock); | 1119 | read_unlock(&tasklist_lock); |
1120 | 1120 | ||
1121 | /* Kick full dynticks CPUs in case they need to tick on the new timer */ | ||
1122 | posix_cpu_timer_kick_nohz(); | ||
1123 | |||
1121 | out: | 1124 | out: |
1122 | timer->it_overrun_last = timer->it_overrun; | 1125 | timer->it_overrun_last = timer->it_overrun; |
1123 | timer->it_overrun = -1; | 1126 | timer->it_overrun = -1; |
@@ -1257,13 +1260,6 @@ void run_posix_cpu_timers(struct task_struct *tsk) | |||
1257 | cpu_timer_fire(timer); | 1260 | cpu_timer_fire(timer); |
1258 | spin_unlock(&timer->it_lock); | 1261 | spin_unlock(&timer->it_lock); |
1259 | } | 1262 | } |
1260 | |||
1261 | /* | ||
1262 | * In case some timers were rescheduled after the queue got emptied, | ||
1263 | * wake up full dynticks CPUs. | ||
1264 | */ | ||
1265 | if (tsk->signal->cputimer.running) | ||
1266 | posix_cpu_timer_kick_nohz(); | ||
1267 | } | 1263 | } |
1268 | 1264 | ||
1269 | /* | 1265 | /* |