Re: [ck] [REPORT] 2.6.21.1 vs 2.6.21-sd046 vs 2.6.21-cfs-v6

William Lee Irwin III
2007-05-03T07:22:46Z

> William Lee Irwin III wrote:
On Thu, May 03, 2007 at 09:42:51AM +0300, Al Boldi wrote:
> sched_rr_get_interval(0, &ts);
> printf("pid %d, prio %3d, interval of %d nsec\n", getpid(), getpriority(PRIO_PROCESS, 0), ts.tv_nsec);

Oh dear. What are you trying to figure out from the task's timeslice?
That's not even meaningful in cfs.

On Thu, May 03, 2007 at 09:42:51AM +0300, Al Boldi wrote:
> start = last = stamp();
> while(1) {
> cur = stamp();
> delta = cur-last;
> if (delta > thresh_ticks) {
> act = last - start;
> printf("pid %d, prio %3d, out for %4llu ms, ran for %4llu ms, load %3llu%\n"
> , getpid(), getpriority(PRIO_PROCESS, 0), delta/1000, act/1000,(act*100)/(cur-start));
> start = cur = stamp();
> }
> last = cur;
> }
>
> return 0;
> }

This is looking for scheduling latencies, which are necessarily O(tasks).
This is not the way to do it.

-- wli