pkt_sched.h

From: gis88530 (gis88530@cis.nctu.edu.tw)
Date: Fri Mar 16 2001 - 10:55:02 EST


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/



This archive was generated by hypermail 2b29 : Fri Mar 23 2001 - 21:00:08 EST