diff options
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/posix-cpu-timers.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/kernel/posix-cpu-timers.c b/kernel/posix-cpu-timers.c index cae4f5728997..4c68edff900b 100644 --- a/kernel/posix-cpu-timers.c +++ b/kernel/posix-cpu-timers.c | |||
@@ -238,18 +238,7 @@ static int cpu_clock_sample_group_locked(unsigned int clock_idx, | |||
238 | while ((t = next_thread(t)) != p) { | 238 | while ((t = next_thread(t)) != p) { |
239 | cpu->sched += t->sched_time; | 239 | cpu->sched += t->sched_time; |
240 | } | 240 | } |
241 | if (p->tgid == current->tgid) { | 241 | cpu->sched += sched_ns(p); |
242 | /* | ||
243 | * We're sampling ourselves, so include the | ||
244 | * cycles not yet banked. We still omit | ||
245 | * other threads running on other CPUs, | ||
246 | * so the total can always be behind as | ||
247 | * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ). | ||
248 | */ | ||
249 | cpu->sched += current_sched_time(current); | ||
250 | } else { | ||
251 | cpu->sched += p->sched_time; | ||
252 | } | ||
253 | break; | 242 | break; |
254 | } | 243 | } |
255 | return 0; | 244 | return 0; |