<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: MySQL Doesn&#8217;t Always Suck; This Time it&#8217;s AMD</title>
	<atom:link href="http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/feed/" rel="self" type="application/rss+xml" />
	<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/</link>
	<description>technical ramblings from a wanna-be unix dinosaur</description>
	<lastBuildDate>Wed, 21 Jul 2010 07:31:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Craden</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-407</link>
		<dc:creator>Craden</dc:creator>
		<pubDate>Wed, 16 Sep 2009 11:12:31 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-407</guid>
		<description>test</description>
		<content:encoded><![CDATA[<p>test</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: silverjam</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-406</link>
		<dc:creator>silverjam</dc:creator>
		<pubDate>Wed, 16 Sep 2009 04:59:01 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-406</guid>
		<description>The kernel bug:&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://bugzilla.kernel.org/show_bug.cgi?id=11305&quot; rel=&quot;nofollow&quot;&gt;http://bugzilla.kernel.org/show_bug.cgi?id=11305&lt;/a&gt;&lt;br&gt;&lt;br&gt;Which references an AMD &quot;errata 147&quot; from &quot;Revision Guide for AMD Athlon™ 64 and AMD Opteron™ Processors.&quot;&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://support.amd.com/us/Processor_TechDocs/25759.pdf&quot; rel=&quot;nofollow&quot;&gt;http://support.amd.com/us/Processor_TechDocs/25...&lt;/a&gt;&lt;br&gt;&lt;br&gt;Which says:&lt;br&gt;&quot;&quot;&quot;&lt;br&gt;Potential Violation of Read Ordering Rules Between Semaphore Operations and Unlocked Read-Modify-Write Instructions&lt;br&gt;&lt;br&gt;Description&lt;br&gt;&lt;br&gt;Under a highly specific set of internal timing circumstances, the memory read ordering between a&lt;br&gt;semaphore operation and a subsequent read-modify-write instruction (an instruction that uses the&lt;br&gt;same memory location as both a source and destination) may be incorrect and allow the read-modifywrite&lt;br&gt;instruction to operate on the memory location ahead of the completion of the semaphore&lt;br&gt;operation. The erratum will not occur if there is a LOCK prefix on the read-modify-write instruction.&lt;br&gt;This erratum does not apply if the read-only value in MSRC001_1023h[33] is 1b.&lt;br&gt;&lt;br&gt;Potential Effect on System&lt;br&gt;&lt;br&gt;In the unlikely event that the condition described above occurs, the read-modify-write instruction (in&lt;br&gt;the critical section) may operate on data that existed prior to the semaphore operation. This erratum&lt;br&gt;can only occur in multiprocessor or multicore configurations.&lt;br&gt;&lt;br&gt;Suggested Workaround&lt;br&gt;&lt;br&gt;To provide a workaround for this unlikely event, software can perform any of the following actions&lt;br&gt;for multiprocessor or multicore systems:&lt;br&gt;• Place a LFENCE instruction between the semaphore operation and any subsequent read-modifywrite&lt;br&gt;instruction(s) in the critical section.&lt;br&gt;• Use a LOCK prefix with the read-modify-write instruction.&lt;br&gt;• Decompose the read-modify-write instruction into separate instructions.&lt;br&gt;&lt;br&gt;No workaround is necessary if software checks that MSRC001_1023h[33] is set on all processors that&lt;br&gt;may execute the code. The value in MSRC001_1023h[33] may not be the same on all processors in a&lt;br&gt;multi-processor system.&lt;br&gt;&lt;br&gt;Fix Planned: Yes&lt;br&gt;&quot;&quot;&quot;</description>
		<content:encoded><![CDATA[<p>The kernel bug:</p>
<p><a href="http://bugzilla.kernel.org/show_bug.cgi?id=11305" rel="nofollow">http://bugzilla.kernel.org/show_bug.cgi?id=11305</a></p>
<p>Which references an AMD &#8220;errata 147&#8243; from &#8220;Revision Guide for AMD Athlon™ 64 and AMD Opteron™ Processors.&#8221;</p>
<p><a href="http://support.amd.com/us/Processor_TechDocs/25759.pdf" rel="nofollow"></a><a href="http://support.amd.com/us/Processor_TechDocs/25.." rel="nofollow">http://support.amd.com/us/Processor_TechDocs/25..</a>.</p>
<p>Which says:<br />&#8220;&#8221;"<br />Potential Violation of Read Ordering Rules Between Semaphore Operations and Unlocked Read-Modify-Write Instructions</p>
<p>Description</p>
<p>Under a highly specific set of internal timing circumstances, the memory read ordering between a<br />semaphore operation and a subsequent read-modify-write instruction (an instruction that uses the<br />same memory location as both a source and destination) may be incorrect and allow the read-modifywrite<br />instruction to operate on the memory location ahead of the completion of the semaphore<br />operation. The erratum will not occur if there is a LOCK prefix on the read-modify-write instruction.<br />This erratum does not apply if the read-only value in MSRC001_1023h[33] is 1b.</p>
<p>Potential Effect on System</p>
<p>In the unlikely event that the condition described above occurs, the read-modify-write instruction (in<br />the critical section) may operate on data that existed prior to the semaphore operation. This erratum<br />can only occur in multiprocessor or multicore configurations.</p>
<p>Suggested Workaround</p>
<p>To provide a workaround for this unlikely event, software can perform any of the following actions<br />for multiprocessor or multicore systems:<br />• Place a LFENCE instruction between the semaphore operation and any subsequent read-modifywrite<br />instruction(s) in the critical section.<br />• Use a LOCK prefix with the read-modify-write instruction.<br />• Decompose the read-modify-write instruction into separate instructions.</p>
<p>No workaround is necessary if software checks that MSRC001_1023h[33] is set on all processors that<br />may execute the code. The value in MSRC001_1023h[33] may not be the same on all processors in a<br />multi-processor system.</p>
<p>Fix Planned: Yes<br />&#8220;&#8221;"</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-243</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 27 Apr 2009 13:50:50 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-243</guid>
		<description>__sync_val_compare_and_swap() for non-bleeding on not just linux, but all OSs that gcc supports (on architectures that have an atomic instruction for it).&lt;br&gt;&lt;br&gt;&lt;a href=&quot;http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html&quot; rel=&quot;nofollow&quot;&gt;http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builti...&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>__sync_val_compare_and_swap() for non-bleeding on not just linux, but all OSs that gcc supports (on architectures that have an atomic instruction for it).</p>
<p><a href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" rel="nofollow"></a><a href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builti.." rel="nofollow">http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builti..</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bd_</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-208</link>
		<dc:creator>bd_</dc:creator>
		<pubDate>Tue, 07 Apr 2009 02:36:11 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-208</guid>
		<description>Patching this on Linux would be complicated by the fact that some synchronization primitives are implemented partially in user-space libraries - the kernel would need to be able to patch this, but glibc would need to do so as well, and so would anything else that uses the builtin atomic primitives...</description>
		<content:encoded><![CDATA[<p>Patching this on Linux would be complicated by the fact that some synchronization primitives are implemented partially in user-space libraries &#8211; the kernel would need to be able to patch this, but glibc would need to do so as well, and so would anything else that uses the builtin atomic primitives&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe Damato</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-206</link>
		<dc:creator>Joe Damato</dc:creator>
		<pubDate>Mon, 06 Apr 2009 22:02:19 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-206</guid>
		<description>@brian - thanks for the tip! didn&#039;t know there were builtins for atomics in gcc. Very cool.</description>
		<content:encoded><![CDATA[<p>@brian &#8211; thanks for the tip! didn&#8217;t know there were builtins for atomics in gcc. Very cool.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-205</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 06 Apr 2009 21:48:09 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-205</guid>
		<description>__sync_val_compare_and_swap() for non-bleeding on not just linux, but all OSs that gcc supports (on architectures that have an atomic instruction for it).

http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html</description>
		<content:encoded><![CDATA[<p>__sync_val_compare_and_swap() for non-bleeding on not just linux, but all OSs that gcc supports (on architectures that have an atomic instruction for it).</p>
<p><a href="http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html" rel="nofollow">http://gcc.gnu.org/onlinedocs/gcc/Atomic-Builtins.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: anon</title>
		<link>http://timetobleed.com/mysql-doesnt-always-suck-this-time-its-amd/comment-page-1/#comment-204</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Mon, 06 Apr 2009 19:14:50 +0000</pubDate>
		<guid isPermaLink="false">http://timetobleed.com/?p=352#comment-204</guid>
		<description>Is this worked around in the Linux kernel? Do you know which version?</description>
		<content:encoded><![CDATA[<p>Is this worked around in the Linux kernel? Do you know which version?</p>
]]></content:encoded>
	</item>
</channel>
</rss>
