<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic TSC Synchronization Across Cores in Software Tuning, Performance Optimization &amp; Platform Monitoring</title>
    <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932561#M1575</link>
    <description>&lt;P&gt;In the&amp;nbsp;Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3B Sec 17.13.1 it says:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"On processors with invariant TSC support, the OS may use the TSC for wall clock timer services."&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this formally imply that the TSC is always synchronized across all cores?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 Apr 2013 03:00:25 GMT</pubDate>
    <dc:creator>Samuel_M_1</dc:creator>
    <dc:date>2013-04-17T03:00:25Z</dc:date>
    <item>
      <title>TSC Synchronization Across Cores</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932561#M1575</link>
      <description>&lt;P&gt;In the&amp;nbsp;Intel® 64 and IA-32 Architectures Software Developer’s Manual Volume 3B Sec 17.13.1 it says:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;"On processors with invariant TSC support, the OS may use the TSC for wall clock timer services."&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Does this formally imply that the TSC is always synchronized across all cores?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 03:00:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932561#M1575</guid>
      <dc:creator>Samuel_M_1</dc:creator>
      <dc:date>2013-04-17T03:00:25Z</dc:date>
    </item>
    <item>
      <title>Hello Samuel,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932562#M1576</link>
      <description>&lt;P&gt;Hello Samuel,&lt;/P&gt;
&lt;P&gt;The 'Invariant TSC' means that the TSC runs at a fixed frequency and doesn't stop when the cpu halts.&lt;/P&gt;
&lt;P&gt;The TSCs are not guaranteed to be synchronized although the OS usually does try to synchronize the TSC at boot time. This is one reason for the rdtscp instruction. On Nehalem and later cpus, the rdtscp instruction returns the TSC and an identifier indicating on which cpu you read the TSC. RDTSCP is a serializing instruction... unlike the regular rdtsc instruction.&lt;/P&gt;
&lt;P&gt;Pat&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 03:23:34 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932562#M1576</guid>
      <dc:creator>Patrick_F_Intel1</dc:creator>
      <dc:date>2013-04-17T03:23:34Z</dc:date>
    </item>
    <item>
      <title>Thank you for your reply</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932563#M1577</link>
      <description>&lt;P&gt;Thank you for your reply Patrick. Could you please clarify: if it is established that the OS synchronizes the TSC at startup and that the system has an invariant TSC, so that the TSC's on different cores will not be skewed by different cores having different instances of SpeedStep/TurboBoost triggering, is there any way for the TSCs to get out of sync in the course of the system being up for a significant period fo time?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 05:14:44 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932563#M1577</guid>
      <dc:creator>Samuel_M_1</dc:creator>
      <dc:date>2013-04-17T05:14:44Z</dc:date>
    </item>
    <item>
      <title>An Invariant TSC won't vary</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932564#M1578</link>
      <description>&lt;P&gt;An Invariant&amp;nbsp;TSC won't vary with Speedstep nor TurboBoost. There shouldn't be any way for the TSCs to get out sync but I've never actually checked this.&lt;/P&gt;</description>
      <pubDate>Wed, 17 Apr 2013 12:21:39 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932564#M1578</guid>
      <dc:creator>Patrick_F_Intel1</dc:creator>
      <dc:date>2013-04-17T12:21:39Z</dc:date>
    </item>
    <item>
      <title>The smallest difference in</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932565#M1579</link>
      <description>The smallest difference in TSC values for two different cores I've measured was 708 nano-seconds. It should be less for fast 3rd generation CPUs, like Ivy Bridge, etc, and take a look at:

Forum Topic: &lt;STRONG&gt;Synchronizing Time Stamp Counter&lt;/STRONG&gt;
Web-link: software.intel.com/en-us/forums/topic/332570

&lt;STRONG&gt;Note:&lt;/STRONG&gt; A test case is attached to my post dated on &lt;STRONG&gt;Tue, 11/06/2012 - 06:49&lt;/STRONG&gt;</description>
      <pubDate>Thu, 18 Apr 2013 04:30:19 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932565#M1579</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-18T04:30:19Z</dc:date>
    </item>
    <item>
      <title>Presumably, the TSCs on a</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932566#M1580</link>
      <description>&lt;P&gt;Presumably, the TSCs on a single CPU share internal resources.&amp;nbsp; Even between CPUs, they are locked to a single time base, so they should not drift apart after being started by a shared reset signal.&lt;/P&gt;
&lt;P&gt;People are still getting tied in knots over this, particularly on Windows, where gfortran is now in the middle of a system_clock strategy change (and ifort doesn't have consistent results for intervals less than 10 ms).&lt;/P&gt;
&lt;P&gt;I'm expecting to go some rounds with an Intel expert on Ivy Bridge dual CPU next week.&amp;nbsp; There may be a new round of questions to resolve about synchronization between CPUs, with faster RAM, ....&amp;nbsp; No, I don't intend to try Windows on it.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 10:33:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932566#M1580</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-04-18T10:33:55Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Does this formally imply</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932567#M1581</link>
      <description>Duplicate - deleted. There are strange performance issues today!</description>
      <pubDate>Thu, 18 Apr 2013 13:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932567#M1581</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-18T13:32:00Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Does this formally imply</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932568#M1582</link>
      <description>&amp;gt;&amp;gt;...Does this formally imply that the TSC is always synchronized across all cores?

Every computer system has one Reset signal and how is it possible to have different TSC values for different cores? What I see is just measurements errors and in a multi-threaded environment it is impossible to accurately measure all TSC values for all CPUs at the same time.</description>
      <pubDate>Thu, 18 Apr 2013 13:32:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932568#M1582</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-18T13:32:00Z</dc:date>
    </item>
    <item>
      <title>MultiThreaded application</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932569#M1583</link>
      <description>&lt;P&gt;MultiThreaded application measurement with TSC counters cannot be exactly precise because user mode code cannot&amp;nbsp; be guaranteed to take control of the executing core for the period of sampling.More priviledged code mainly ISR and its DPC can preeempt user mode code in any moment and by doing this measurement inaccuracy can be large.&lt;/P&gt;</description>
      <pubDate>Thu, 18 Apr 2013 16:58:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932569#M1583</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-04-18T16:58:02Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...I'm expecting to go some</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932570#M1584</link>
      <description>&amp;gt;&amp;gt;...I'm expecting to go some rounds with an Intel expert on Ivy Bridge dual CPU next week...

It would be nice to hear results of your discussion. Thanks in advance.</description>
      <pubDate>Thu, 18 Apr 2013 17:40:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932570#M1584</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-18T17:40:48Z</dc:date>
    </item>
    <item>
      <title>There is a possiblity to</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932571#M1585</link>
      <description>&lt;P&gt;There is a possiblity to spawn kernel mode thread run it on cpu while the others logical processors are spinning in busy-wait loop at DPC level.So one can literally use the logical processor for performance sampling while other code is stalled.&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2013 10:00:33 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932571#M1585</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-04-23T10:00:33Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;...Does this formally imply</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932572#M1586</link>
      <description>&amp;gt;&amp;gt;...Does this formally imply that the TSC is always synchronized across all cores?

Samuel, try to imaging if they are Not synchronized and what implications it would create on all the rest hardware subsystems.</description>
      <pubDate>Tue, 23 Apr 2013 13:41:12 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932572#M1586</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-23T13:41:12Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt; Samuel, try to imaging if</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932573#M1587</link>
      <description>&lt;P&gt;&amp;gt;&amp;gt;&amp;nbsp;Samuel, try to imaging if they are Not synchronized and what implications it would create on all the rest hardware subsystems.&lt;/P&gt;
&lt;P&gt;Could you please elaborate?&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2013 21:53:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932573#M1587</guid>
      <dc:creator>Samuel_M_1</dc:creator>
      <dc:date>2013-04-23T21:53:53Z</dc:date>
    </item>
    <item>
      <title>Quote:Sergey Kostrov wrote:</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932574#M1588</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Sergey Kostrov wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;gt;&amp;gt;...I'm expecting to go some rounds with an Intel expert on Ivy Bridge dual CPU next week...&lt;/P&gt;
&lt;P&gt;It would be nice to hear results of your discussion. Thanks in advance. &lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;As you pointed out, this took it well off topic.&lt;/P&gt;</description>
      <pubDate>Wed, 24 Apr 2013 16:41:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932574#M1588</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-04-24T16:41:00Z</dc:date>
    </item>
    <item>
      <title>Hi Tim,</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932575#M1589</link>
      <description>&lt;P&gt;Hi Tim,&lt;/P&gt;
&lt;P&gt;is not BIOS vendor free to implement any functionality he wants in his code?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 08:13:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932575#M1589</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-04-25T08:13:03Z</dc:date>
    </item>
    <item>
      <title>I wonder how Tim's response</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932576#M1590</link>
      <description>I wonder how Tim's response is relevant to the subject of the thread? I don't think it answers the original question or provides more technical details. Thanks anyway.</description>
      <pubDate>Thu, 25 Apr 2013 12:49:09 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932576#M1590</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-25T12:49:09Z</dc:date>
    </item>
    <item>
      <title>Quote:iliyapolak wrote:</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932577#M1591</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;iliyapolak wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi Tim,&lt;/P&gt;
&lt;P&gt;is not BIOS vendor free to implement any functionality he wants in his code?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;
&lt;P&gt;It's a difficult question, which I'm not in position to discuss in any depth.&amp;nbsp; OEMs do have flexibility in their relationships with their BIOS writers, if they choose not to use whichever BIOS Intel has chosen for a similar platform.&amp;nbsp; I believe there are BIOS writers' guides, which are very closely held, and of course I expect Intel to be passing requirements through OEMs when they are responsible for developing initial versions of products.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 13:38:24 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932577#M1591</guid>
      <dc:creator>TimP</dc:creator>
      <dc:date>2013-04-25T13:38:24Z</dc:date>
    </item>
    <item>
      <title>Tim thanks for the answer.</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932578#M1592</link>
      <description>&lt;P&gt;Tim thanks for the answer.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Apr 2013 09:19:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932578#M1592</guid>
      <dc:creator>Bernard</dc:creator>
      <dc:date>2013-04-26T09:19:02Z</dc:date>
    </item>
    <item>
      <title>&gt;&gt;In the Intel(R) 64 and IA</title>
      <link>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932579#M1593</link>
      <description>&amp;gt;&amp;gt;In the Intel(R) 64 and IA-32 Architectures Software Developer’s Manual Volume 3B Sec 17.13.1 it says: 
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;"On processors with invariant TSC support, the OS may use the TSC for wall clock timer services." 
&amp;gt;&amp;gt;
&amp;gt;&amp;gt;&lt;STRONG&gt;Does this formally imply that the TSC is always synchronized across all cores?&lt;/STRONG&gt;

By default the TSC is synchronized across all cores. However, the TSC value of a core could be changed by some software subsystem using the &lt;STRONG&gt;WRMSR&lt;/STRONG&gt; instruction. Take a look at quotes below and I hope they finally answer your question:

&lt;STRONG&gt;Intel(R) 64 and IA-32 Architectures Software Developer’s Manual Volume 3 (3A, 3B &amp;amp; 3C):&lt;/STRONG&gt;
&lt;STRONG&gt;System Programming Guide&lt;/STRONG&gt;

Order Number: 325384-044US
August 2012

&lt;STRONG&gt;Page 571&lt;/STRONG&gt;

&lt;STRONG&gt;17.13 TIME-STAMP COUNTER&lt;/STRONG&gt;
...
Constant TSC behavior ensures that 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.
...

&lt;STRONG&gt;Page 572&lt;/STRONG&gt;

&lt;STRONG&gt;17.13.3 Time-Stamp Counter Adjustment&lt;/STRONG&gt;
...
Software &lt;STRONG&gt;can modify the value of the time-stamp counter (TSC)&lt;/STRONG&gt; of a logical processor by using the &lt;STRONG&gt;WRMSR&lt;/STRONG&gt; instruction
to write to the IA32_TIME_STAMP_COUNTER MSR (address 10H). Because such a write applies only to that
logical processor, software seeking to synchronize the TSC values of multiple logical processors must perform these
writes on each logical processor. It may be &lt;STRONG&gt;difficult&lt;/STRONG&gt; for software to do this in a way &lt;STRONG&gt;than ensures that all logical
processors will have the same value for the TSC at a given point in time&lt;/STRONG&gt;.
The synchronization of TSC adjustment can be simplified by using the 64-bit IA32_TSC_ADJUST MSR ( address
3BH ). Like the IA32_TIME_STAMP_COUNTER MSR, the IA32_TSC_ADJUST MSR is maintained separately for each
logical processor.
...</description>
      <pubDate>Sat, 27 Apr 2013 03:49:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Software-Tuning-Performance/TSC-Synchronization-Across-Cores/m-p/932579#M1593</guid>
      <dc:creator>SergeyKostrov</dc:creator>
      <dc:date>2013-04-27T03:49:13Z</dc:date>
    </item>
  </channel>
</rss>

