]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - kernel/posix-cpu-timers.c
[PATCH] Fix posix-cpu-timers sched_time accumulation
[linux-2.6-omap-h63xx.git] / kernel / posix-cpu-timers.c
index cae4f572899714369bcd8d5d18dad16f84d690a4..4c68edff900b17bbe46e504c78b12c1231dbf3de 100644 (file)
@@ -238,18 +238,7 @@ static int cpu_clock_sample_group_locked(unsigned int clock_idx,
                while ((t = next_thread(t)) != p) {
                        cpu->sched += t->sched_time;
                }
-               if (p->tgid == current->tgid) {
-                       /*
-                        * We're sampling ourselves, so include the
-                        * cycles not yet banked.  We still omit
-                        * other threads running on other CPUs,
-                        * so the total can always be behind as
-                        * much as max(nthreads-1,ncpus) * (NSEC_PER_SEC/HZ).
-                        */
-                       cpu->sched += current_sched_time(current);
-               } else {
-                       cpu->sched += p->sched_time;
-               }
+               cpu->sched += sched_ns(p);
                break;
        }
        return 0;