lkml.org 
[lkml]   [2001]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectpkt_sched.h
Date
Hello,
I have two questoins regarding the pkt_sched.h file.
--
(1)
The pkt_sched.h file have following lines

#define PSCHED_GETTIMEOFDAY 1
#define PSCHED_JIFFIES 2
#define PSCHED_CPU 3
#define PSCHED_CLOCK_SOURCE PSCHED_JIFFIES

Does it means that the PSCHED_GET_TIME(stamp)
use PSCHED_JIFFIES?
If we change it become as follows, then the PSCHED_GET_TIME(stamp)
use PSCHED_CPU?

#define PSCHED_CLOCK_SOUCE PSCHED_CPU

--
(2)
How can we measure the delay of kernel function using
PSCHED_GET_TIME function?
(I only know how to use do_gettimeofday)

do_gettimeofday(&begin);
...
(kernel do something)
...
do_gettimeofday(&end);
if (end.tv_usec < begin.tv_usec) {
end.tv_usec += 1000000; end.tv_sec--;
}
end.tv_sedc -= begin.tv_sec;
end.tv_usec -= begin.tv_usec;
result = ((end.tv_sec*1000000) + end.tv_usec);
Thanks a lot.
Cheers,
Steven



-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:17    [from the cache]
©2003-2011 Jasper Spaans. Advertise on this site