title: rdtsc accuracy across CPU cores
body: <p>I am sending network packets from one thread and receiving replies on a 2nd thread that runs on a different CPU core.  My process measures the time between send &amp; receive of each packet (similar to ping).  I am using rdtsc for getting high-resolution, low-overhead timing, which is needed by my implementation.</p>
  
  <p>All measurments looks reliable.  Still, I am worried about rdtsc accuracy across cores, since I've been reading some texts which implied that tsc is not synced between cores.</p>
  
  <p>I found the following info about <a href="http://en.wikipedia.org/wiki/Time_Stamp_Counter" rel="noreferrer">TSC in wikipedia</a></p>
  
  <blockquote>
    <p><em>Constant TSC behavior ensures that <strong>the duration of each clock tick is
    uniform and supports the use of the
    TSC as a wall clock timer even if the
    processor core changes frequency</strong>. This
    is the architectural behavior moving
    forward for all Intel processors.</em></p>
  </blockquote>
  
  <p><strong>Still I am worried about accruracy across cores, and this is my question</strong></p>
  
  <p><H1>More Info</H1></p>
  
  <ul>
  <li>I run my process on an Intel nehalem machine.</li>
  <li>Operating System is Linux.</li>
  <li>The "<strong>constant_tsc</strong>" cpu flag  is set for all the cores.</li>
  </ul>