<?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: Playing with Realtime with Python</title>
	<atom:link href="http://www.larsen-b.com/Article/221.html/feed" rel="self" type="application/rss+xml" />
	<link>http://www.larsen-b.com/Article/221.html</link>
	<description>Titanium Exposé</description>
	<lastBuildDate>Mon, 02 Jul 2018 13:54:48 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5</generator>
	<item>
		<title>By: BobC</title>
		<link>http://www.larsen-b.com/Article/221.html/comment-page-1#comment-6822</link>
		<dc:creator>BobC</dc:creator>
		<pubDate>Fri, 17 Oct 2008 18:01:37 +0000</pubDate>
		<guid isPermaLink="false">#comment-6822</guid>
		<description><![CDATA[There&#039;s also the PowerNap extension that provides some advanced RTC capabilities: http://dis-dot-dat.net/index.cgi?item=/code/powernap/]]></description>
		<content:encoded><![CDATA[<p>There&#8217;s also the PowerNap extension that provides some advanced RTC capabilities: <a href="http://dis-dot-dat.net/index.cgi?item=/code/powernap/" rel="nofollow">http://dis-dot-dat.net/index.cgi?item=/code/powernap/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.larsen-b.com/Article/221.html/comment-page-1#comment-444</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-444</guid>
		<description><![CDATA[&lt;p&gt;I don&#039;t understand the structure of your code. I also fail to see where you make use of the Pyrex module.
Could you elaborate further?&lt;/p&gt;
&lt;p&gt;Alain&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>I don&#8217;t understand the structure of your code. I also fail to see where you make use of the Pyrex module.<br />
Could you elaborate further?</p>
<p>Alain</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkx</title>
		<link>http://www.larsen-b.com/Article/221.html/comment-page-1#comment-445</link>
		<dc:creator>Jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-445</guid>
		<description><![CDATA[&lt;p&gt;The structure is quite simple, just set the right value in /dev/rtc, and after call the read on it. It will block until you receive an interrupt.&lt;/p&gt;
&lt;p&gt;The pyrex code, simply implement a switchRTCPriority(nb), that should be call before setting the rtc. (I added this after, so it isn&#039;t really clear)&lt;/p&gt;
&lt;p&gt;The right code should be:&lt;/p&gt;
&lt;pre class=&quot;literal-block&quot;&gt;
import os, time

# some linux kernel header
RTC_IRQP_SET = 1074032652
RTC_PIE_ON =  28677
RTC_PIE_OFF = 28678


# get a hight priority
switchRTCPriority(60)

# open the realtime clock
....
&lt;/pre&gt;
]]></description>
		<content:encoded><![CDATA[<p>The structure is quite simple, just set the right value in /dev/rtc, and after call the read on it. It will block until you receive an interrupt.</p>
<p>The pyrex code, simply implement a switchRTCPriority(nb), that should be call before setting the rtc. (I added this after, so it isn&#8217;t really clear)</p>
<p>The right code should be:</p>
<pre class="literal-block">
import os, time

# some linux kernel header
RTC_IRQP_SET = 1074032652
RTC_PIE_ON =  28677
RTC_PIE_OFF = 28678


# get a hight priority
switchRTCPriority(60)

# open the realtime clock
....
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Wilson</title>
		<link>http://www.larsen-b.com/Article/221.html/comment-page-1#comment-446</link>
		<dc:creator>David Wilson</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-446</guid>
		<description><![CDATA[&lt;p&gt;Have you considered the possibility of using the Linux networking stack to limit your send rate? This would greatly reduce the CPU load induced by your idle loop, and allow the networking stack to cooperatively provide QoS with any other network streams active in the system.&lt;/p&gt;
&lt;p&gt;You main loop could then simply become a select() that blocks until your socket is writeable, and everything else is delegated back to the system.&lt;/p&gt;
&lt;p&gt;I couldn&#039;t even begin to advise you as to how to go about setting up Linux to do this, although I believe TLDP has several HOWTOs on the subject.&lt;/p&gt;
&lt;p&gt;HTH,&lt;/p&gt;
&lt;p&gt;David.&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Have you considered the possibility of using the Linux networking stack to limit your send rate? This would greatly reduce the CPU load induced by your idle loop, and allow the networking stack to cooperatively provide QoS with any other network streams active in the system.</p>
<p>You main loop could then simply become a select() that blocks until your socket is writeable, and everything else is delegated back to the system.</p>
<p>I couldn&#8217;t even begin to advise you as to how to go about setting up Linux to do this, although I believe TLDP has several HOWTOs on the subject.</p>
<p>HTH,</p>
<p>David.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jkx</title>
		<link>http://www.larsen-b.com/Article/221.html/comment-page-1#comment-447</link>
		<dc:creator>Jkx</dc:creator>
		<pubDate>Wed, 30 Nov -0001 00:00:00 +0000</pubDate>
		<guid isPermaLink="false">#comment-447</guid>
		<description><![CDATA[&lt;p&gt;Hi, David&lt;/p&gt;
&lt;p&gt;This is a quite nice way to do of course. But first the idle loop doesn&#039;t eat a lot of CPU (This surprise me a lot too, but this stuff is really efficient).&lt;/p&gt;
&lt;p&gt;The main issue,  is that Linux and QOS is a pure nightmare. I setup several QOS in a past life using some BSD (pf based on netbsd).. and the syntax is clean, and works out of the box. On Linux you have bunch of QOS module, each doing a different stuffs..&lt;/p&gt;
&lt;p&gt;On the other side, I think I gonna build a traffic shapper in pure python. I&#039;ve been to busy right now.. but perhaps a day until I get too old.&lt;/p&gt;
&lt;p&gt;Enjoy  ;)&lt;/p&gt;
]]></description>
		<content:encoded><![CDATA[<p>Hi, David</p>
<p>This is a quite nice way to do of course. But first the idle loop doesn&#8217;t eat a lot of CPU (This surprise me a lot too, but this stuff is really efficient).</p>
<p>The main issue,  is that Linux and QOS is a pure nightmare. I setup several QOS in a past life using some BSD (pf based on netbsd).. and the syntax is clean, and works out of the box. On Linux you have bunch of QOS module, each doing a different stuffs..</p>
<p>On the other side, I think I gonna build a traffic shapper in pure python. I&#8217;ve been to busy right now.. but perhaps a day until I get too old.</p>
<p>Enjoy  ;)</p>
]]></content:encoded>
	</item>
</channel>
</rss>
