<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Thread an Kern binden]]></title><description><![CDATA[<p>Ich würde gerne meine Threads in einem Programm an bestimmte Kerne binden, damit Datenaustäusche möglichst effizient sind.</p>
<p>Nun habe ich allerdings gelesen, dass set_affinity einen kleinen Schönheitsfehler hat:</p>
<blockquote>
<p>Actually, part of the problem with using native POSIX threads is that the bit positions in the bitmask are not necessarily in any particular order when compared to the actual processor/memory topology. Just because bits are close in the mask doesn't mean that they are &quot;close&quot; in the sense of sharing a cache.</p>
</blockquote>
<p>Ist dem tatsächlich so?</p>
<p>Ka&lt;nn man da etwas machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/326093/thread-an-kern-binden</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Jul 2026 12:45:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/326093.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 01 Jun 2014 11:58:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 11:58:24 GMT]]></title><description><![CDATA[<p>Ich würde gerne meine Threads in einem Programm an bestimmte Kerne binden, damit Datenaustäusche möglichst effizient sind.</p>
<p>Nun habe ich allerdings gelesen, dass set_affinity einen kleinen Schönheitsfehler hat:</p>
<blockquote>
<p>Actually, part of the problem with using native POSIX threads is that the bit positions in the bitmask are not necessarily in any particular order when compared to the actual processor/memory topology. Just because bits are close in the mask doesn't mean that they are &quot;close&quot; in the sense of sharing a cache.</p>
</blockquote>
<p>Ist dem tatsächlich so?</p>
<p>Ka&lt;nn man da etwas machen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401876</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401876</guid><dc:creator><![CDATA[shisha]]></dc:creator><pubDate>Sun, 01 Jun 2014 11:58:24 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 13:17:45 GMT]]></title><description><![CDATA[<p>Mh, ich weis dass es in MPI möglich ist logische Strukturen nachzubauen. Wie du ja herausgefunden hast gibt es set_affinity, aber das sind nur Empfehlungen an das Laufzeitsystem. Das könnte es auch besser wissen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401884</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401884</guid><dc:creator><![CDATA[Skym0sh0]]></dc:creator><pubDate>Sun, 01 Jun 2014 13:17:45 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 13:27:15 GMT]]></title><description><![CDATA[<p>shisha schrieb:</p>
<blockquote>
<p>Ich würde gerne meine Threads in einem Programm an bestimmte Kerne binden, damit Datenaustäusche möglichst effizient sind.</p>
</blockquote>
<p>Warum sollte das so effizienter sein?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401886</guid><dc:creator><![CDATA[Codepopel]]></dc:creator><pubDate>Sun, 01 Jun 2014 13:27:15 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 13:34:06 GMT]]></title><description><![CDATA[<p>Codepopel schrieb:</p>
<blockquote>
<p>shisha schrieb:</p>
<blockquote>
<p>Ich würde gerne meine Threads in einem Programm an bestimmte Kerne binden, damit Datenaustäusche möglichst effizient sind.</p>
</blockquote>
<p>Warum sollte das so effizienter sein?</p>
</blockquote>
<p>Siehe <a href="http://en.wikipedia.org/wiki/Non-uniform_memory_access" rel="nofollow">NUMA</a>-Architekturen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401890</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401890</guid><dc:creator><![CDATA[icarus2]]></dc:creator><pubDate>Sun, 01 Jun 2014 13:34:06 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 15:15:11 GMT]]></title><description><![CDATA[<p>shisha schrieb:</p>
<blockquote>
<p>Ist dem tatsächlich so?</p>
</blockquote>
<p>lol<br />
Natürlich ist das so.<br />
Wenn nicht, dann müsste es irgendwo genau dokumentiert sein, wie man aus der Bitposition auf z.B. die Node-Nummer schliessen kann.</p>
<blockquote>
<p>Ka&lt;nn man da etwas machen?</p>
</blockquote>
<p>Ja, du kannst das Problem an den User auslagern. D.h. der soll die Core-Nummer über ein Config-File irgendwo einstellen, wenn er will dass die Threads gepinnt werden.<br />
Ansonsten: lass das OS mal machen, das kümmert sich normalerweise selbst darum dass die Threads &quot;passend&quot; geschuduled werden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401917</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401917</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Sun, 01 Jun 2014 15:15:11 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Sun, 01 Jun 2014 18:32:22 GMT]]></title><description><![CDATA[<p>Für welches OS soll das denn funktionieren? Unter Windows kannst du Threads per <code>SetThreadAffinityMask</code> an bestimmte Kerne binden.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401949</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401949</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Sun, 01 Jun 2014 18:32:22 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Wed, 11 Jun 2014 22:08:17 GMT]]></title><description><![CDATA[<p>...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2401961</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2401961</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Wed, 11 Jun 2014 22:08:17 GMT</pubDate></item><item><title><![CDATA[Reply to Thread an Kern binden on Mon, 02 Jun 2014 07:41:36 GMT]]></title><description><![CDATA[<p>Falls doch Windows: <a href="http://msdn.microsoft.com/en-us/library/windows/desktop/dd405488.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/dd405488.aspx</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2402017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2402017</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Mon, 02 Jun 2014 07:41:36 GMT</pubDate></item></channel></rss>