lkml.org 
[lkml]   [2002]   [Sep]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectdo_gettimeofday vs. rdtsc in the scheduler
Date


I'm writing a patch for the scheduler that allows normal processes to run
occasionally even though real-time processes completely dominate the CPU. In
order to do this the way I want to for a specific real-time application, I
need to keep track of the times that the schedule(void) function gets called.
This time is then used to calculate the time difference between when a normal
process was run last and the current time. I was trying to avoid
do_gettimeofday because of the overhead, but now I'm wondering if rdtsc on an
SMP machine may mess up my readings because the TSC from two different
processors may be read. Am I right in assuming this? Secondly, any good
suggestions on how to proceed with my patch?


Thanks,

Anton
-
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:28    [W:0.027 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site