<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule">

<channel>
	<title>Dan Siemon &#187; Linux</title>
	<atom:link href="http://www.coverfire.com/archives/tag/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.coverfire.com</link>
	<description>Thoughts and musings</description>
	<lastBuildDate>Sun, 22 Jan 2012 11:20:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by-sa/2.5/ca/</creativeCommons:license>		<item>
		<title>Making the Linux flow classifier tunnel aware</title>
		<link>http://www.coverfire.com/archives/2011/10/16/making-the-linux-flow-classifier-tunnel-aware/</link>
		<comments>http://www.coverfire.com/archives/2011/10/16/making-the-linux-flow-classifier-tunnel-aware/#comments</comments>
		<pubDate>Sun, 16 Oct 2011 22:28:09 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=1025</guid>
		<description><![CDATA[Flow Classifier The Linux kernel has many different tools for managing traffic. One of them is the flow classifier which allows the user to configure which fields of the packet headers should be used to create a hash which is &#8230; <a href="http://www.coverfire.com/archives/2011/10/16/making-the-linux-flow-classifier-tunnel-aware/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h1>Flow Classifier</h1>
<p>The Linux kernel has many different tools for managing traffic. One of them is the <a title="Flow classifier" href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=net/sched/cls_flow.c;h=6994214db8f84d652360d6edcf30f9bb7f94af7d;hb=HEAD">flow classifier</a> which allows the user to configure which fields of the packet headers should be used to create a hash which is then used to identify flows and manage them. For example, if the user selects src,dst,proto,proto-src,proto-dst they get a unique value for each flow (within the limits of the hash). Alternatively, using only src as the key will result in all flows being grouped by the source IP address.</p>
<h1>The Problem</h1>
<p>Below is a slightly simplified version of my home network.</p>
<div id="attachment_1029" class="wp-caption alignleft" style="width: 459px"><a href="http://www.coverfire.com/wp-content/uploads/2011/10/home_network_tunnels.png"><img class="size-full wp-image-1029" title="Simplified home network" src="http://www.coverfire.com/wp-content/uploads/2011/10/home_network_tunnels.png" alt="" width="449" height="523" /></a><p class="wp-caption-text">Figure 1: Simplified home network</p></div>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>&nbsp;</p>
<p>All of the traffic, both IPv4 and IPv6, is tunnelled through a Linux router which lives at my service provider. The reason for this complicated setup is that it gives me control of the traffic in both the upstream and downstream. By shaping the traffic to just below the maximum rate in each direction I am able to avoid <a title="Bufferbloat" href="http://www.bufferbloat.net">Bufferbloat</a> problems and prioritize latency sensitive traffic such as SSH, DNS and Vonage. Especially under load, my QoS scripts make marked difference in how fast the Internet feels.</p>
<p>The multiple tunnels present a problem for implementing my QoS scheme because from the perspective of the underlying interface there are only two flows on the network. One for the IP-IP tunnel and one for the IP-IPv6 tunnel. A work around I used for a while was to apply the QoS rules to the IP-IP tunnel interface because that&#8217;s where the bulk of the traffic flows. However, this meant that IPv6 traffic was not properly controlled and any time I had a significant amount of IPv6 traffic I lost all the advantages of my QoS scheme.</p>
<p>To solve this properly I needed a way to look into the tunnels in order to identify the inner network flows. So I&#8217;ve extended the flow classifier with the keys in the following table. IP-IP, IP-IPv6, IPv6-IP and IPv6-IPv6 tunnels are supported.</p>
<table border="0">
<tbody>
<tr>
<td><strong>Key</strong></td>
<td><strong>Description</strong></td>
</tr>
<tr>
<td>tunnel-src</td>
<td>Extract the source IP from the inner header</td>
</tr>
<tr>
<td>tunnel-dst</td>
<td>Extract the destination IP from the inner header</td>
</tr>
<tr>
<td>tunnel-proto</td>
<td>Extract the protocol from the inner header</td>
</tr>
<tr>
<td>tunnel-proto-src</td>
<td>Extract the transport protocol source port from the inner header</td>
</tr>
<tr>
<td>tunnel-proto-dst</td>
<td>Extract the transport protocol destination port from the inner header</td>
</tr>
</tbody>
</table>
<h1> Results</h1>
<p>In order to validate that this works I started a couple SCP uploads to max the upstream bandwidth and then ran <a title="Ping-exp" href="http://www.coverfire.com/projects/ping-exp/">ping-exp</a> to measure the latency. At the start of the test the flow classifier keys were src,dst,proto,proto-src,proto-dst. Approximately half way through I changed the keys to src,dst,proto,proto-src,proto-dst,tunnel-src,tunnel-dst,tunnel-proto,tunnel-proto-src,tunnel-proto-dst. The advantage of keeping the non-tunnel keys is that any traffic created by the router itself is still classified properly. Here is the <a href="http://www.coverfire.com/wp-content/uploads/2011/10/ppp0-simple-drr.txt">tc script </a>I used. You can see the results of this test in the figure 2 below.</p>
<div id="attachment_1069" class="wp-caption alignleft" style="width: 610px"><a href="http://www.coverfire.com/wp-content/uploads/2011/10/before_and_after_tunnel_keys.png"><img class="size-medium wp-image-1069" title="Before and after tunnel keys" src="http://www.coverfire.com/wp-content/uploads/2011/10/before_and_after_tunnel_keys-600x600.png" alt="" width="600" height="600" /></a><p class="wp-caption-text">Figure 2: Before and after tunnel keys</p></div>
<p>For the first half of the test you can see the high latency. This is due to all the traffic from the SCP upload and ICMP pings being placed into the same queue because from the perspective of the flow classifier there is only one flow. In the second half of the test the addition of the tunnel keys allows the flow classifier to place the ICMP packets into a different queue which is not affected by the SCP upload and therefore has much lower latency. The large amount of packet loss during the key change is because the script I used creates a large number of queues. While these queues are being created packets are dropped.</p>
<p>While my network setup may be a bit unique I think it&#8217;s likely that many home networks will have some form of tunnelling in the near future as tunnels are part of several IPv6 migration strategies. So hopefully this little addition will be useful in many different contexts.</p>
<p>Below are links to the two patches that are required. I&#8217;ll post them to Netdev for review shortly.</p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2011/10/clsflow-tunnel-20111016.patch_.txt">clsflow-tunnel-20111016.patch</a></p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2011/10/iproute-clsflow-tunnel-20111016.patch_.txt">iproute-clsflow-tunnel-20111016.patch</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2011/10/16/making-the-linux-flow-classifier-tunnel-aware/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux flow classifier proto-dst and TOS</title>
		<link>http://www.coverfire.com/archives/2011/10/15/linux-flow-classifier-proto-dst-and-tos/</link>
		<comments>http://www.coverfire.com/archives/2011/10/15/linux-flow-classifier-proto-dst-and-tos/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 15:08:27 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Latency]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=1032</guid>
		<description><![CDATA[Recently I&#8217;ve been playing around with the Linux flow classifier on my gateway. The flow classifier provides the ability to group network flows by configuring which parts of the packet headers (referred to as keys) are used in a hash &#8230; <a href="http://www.coverfire.com/archives/2011/10/15/linux-flow-classifier-proto-dst-and-tos/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been playing around with the Linux flow classifier on my gateway. The flow classifier provides the ability to group network flows by configuring which parts of the packet headers (referred to as keys) are used in a hash calculation which chooses the output queue.</p>
<p>All of my Internet traffic travels over an IPIP tunnel to another Linux box. I do this so I have control of the QoS in both the upstream and the downstream. A result of this configuration is that from the perspective of the output interface there is only a single network flow.</p>
<p>I configured the flow classifier to use the src,dst,proto,proto-src,proto-dst keys which aims to provide 5-tuple flow fairness. Here&#8217;s the <a href="http://www.coverfire.com/wp-content/uploads/2011/10/ppp0-simple-drr.sh_.txt">simple tc script</a> I used. Due to the IPIP tunnel I expected to see that all traffic would be placed into the same queue. Strangely, the below is what my little <a title="Ping-exp" href="http://www.coverfire.com/projects/ping-exp/">ping-exp</a> utility showed when running at the same time as an SCP upload.</p>
<div id="attachment_1034" class="wp-caption alignleft" style="width: 610px"><a href="http://www.coverfire.com/wp-content/uploads/2011/10/broken-flow-classifier.png"><img class="size-medium wp-image-1034" title="Unexpected flow classifier behavior" src="http://www.coverfire.com/wp-content/uploads/2011/10/broken-flow-classifier-600x600.png" alt="" width="600" height="600" /></a><p class="wp-caption-text">Figure 1: Unexpected flow classifier behaviour</p></div>
<p>Coincidentally I ran ping-exp configured to send three different streams of ICMP traffic with different IP TOS values. Note that SCP automatically sets the IP TOS to the equivalent of the &#8220;Low&#8221; stream in the test.</p>
<p>Notice that the pings using the high and default TOS values appear to be unaffected by low priority ping and SCP traffic. This was unexpected because none of src,dst,proto,proto-src or proto-dst keys should be affected by the TOS value.</p>
<p>After a bit of experimentation I determined that the proto-dst key was the source of the problem. If you spend a bit of time with the <a title="flow_proto_dst" href="https://github.com/torvalds/linux/blob/master/net/sched/cls_flow.c#L156">flow_get_proto_dst()</a> function in <a title="cls_flow.c" href="https://github.com/torvalds/linux/blob/master/net/sched/cls_flow.c">cls_flow.c</a> you&#8217;ll see that if the protocol is ICMP or IPIP, as it is in my test, then the following value is returned:</p>
<pre id="LC195">return addr_fold(skb_dst(skb)) ^ (__force u16)skb-&gt;protocol;</pre>
<p>skb_dst() returns a pointer to a dst_entry structure. Since Linux maintains separate dst_entry structures for each destination,TOS pair the source of the unexpected behaviour is obvious.</p>
<p>I&#8217;m not knowledgeable enough about the Linux network stack to be certain but I don&#8217;t see any value in returning a value for proto-dst which is random with respect to the actual traffic on the wire. At the very least this is not intuitive behaviour.</p>
<p>If you look at <a title="flow_get_proto_src()" href="https://github.com/torvalds/linux/blob/master/net/sched/cls_flow.c#L114">flow_get_proto_src()</a> you&#8217;ll see something similar:</p>
<div>
<pre id="LC153">return addr_fold(skb-&gt;sk);</pre>
<p>In this case a pointer to the local socket structure is used as a fallback. Again, this has no relation to the actual packets on the wire and if the packet does not originate at the local machine then no socket exists which causes this value to be zero anyway.</p>
<p>It seems to me that the most intuitive behaviour would be to have the proto-src and proto-dst keys return zero when they are applied to traffic that doesn&#8217;t have the notion of transport layer ports.</p>
</div>
<p>I&#8217;ll post to <a title="Netdev" href="http://vger.kernel.org/vger-lists.html#netdev">Netdev</a> about this and see what the kernel devs have to say.</p>
<p>Related to this, I have a patch to the flow classifier that adds tunnel awareness which I plan post to Netdev this weekend as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2011/10/15/linux-flow-classifier-proto-dst-and-tos/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fixed: pfifo_fast and ECN</title>
		<link>http://www.coverfire.com/archives/2011/03/17/fixed-pfifo_fast-and-ecn/</link>
		<comments>http://www.coverfire.com/archives/2011/03/17/fixed-pfifo_fast-and-ecn/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 01:50:46 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=972</guid>
		<description><![CDATA[Last weekend I wrote up a problem I discovered with the Linux pfifo_fast QDisc and ECN. This resulted in discussions on the Bufferbloat and Netdev lists and eventually a bug fix which is now in the net-next tree and will &#8230; <a href="http://www.coverfire.com/archives/2011/03/17/fixed-pfifo_fast-and-ecn/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last weekend I <a title="pfifo_fast and ECN" href="http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/">wrote up a problem</a> I discovered with the Linux pfifo_fast QDisc and ECN. This resulted in discussions on the <a title="pfifo_fast discussion on Bufferbloat" href="https://lists.bufferbloat.net/pipermail/bloat-devel/2011-March/thread.html#103">Bufferbloat</a> and <a title="Netdev discussion" href="http://comments.gmane.org/gmane.network.routing.bufferbloat/63">Netdev</a> lists and eventually a <a title="pfifo_fast and ECN fix" href="http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=commit;h=4a2b9c3756077c05dd8666e458a751d2248b61b6">bug fix</a> which is now in the <a title="net-next" href="http://git.kernel.org/?p=linux/kernel/git/davem/net-next-2.6.git;a=summary">net-next</a> tree and will eventually be in the mainline kernel.</p>
<p>Cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2011/03/17/fixed-pfifo_fast-and-ecn/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>pfifo_fast and ECN</title>
		<link>http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/</link>
		<comments>http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/#comments</comments>
		<pubDate>Sun, 13 Mar 2011 21:57:30 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=954</guid>
		<description><![CDATA[Summary The default queuing discipline used on Linux network interfaces deprioritizes ECN enabled flows because it uses a deprecated definition of the IP TOS byte. The problem By default Linux attaches a pfifo_fast queuing discipline (QDisc) to each network interface. &#8230; <a href="http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Summary</h2>
<p>The default queuing discipline used on Linux network interfaces deprioritizes ECN enabled flows because it uses a deprecated definition of the IP TOS byte.</p>
<h2>The problem</h2>
<p>By default Linux attaches a <a title="pfifo_fast description" href="http://lartc.org/howto/lartc.qdisc.classless.html">pfifo_fast</a> queuing discipline (QDisc) to each network interface. The pfifo_fast QDisc has three internal classes (also known as bands) numbered zero to two which are serviced in priority order. That is, any packets in class zero are sent before servicing class one, any packets in class one are sent before servicing class two. Packets are selected for each class based on the TOS value in the IP header.</p>
<p>The TOS byte in the IP header has an interesting history having been redefined several times.Â Pfifo_fast is based on the <a title="RFC 1349" href="http://www.ietf.org/rfc/rfc1349.txt">RFC 1349</a> definition.</p>
<pre>   0     1     2     3     4     5     6     7
+-----+-----+-----+-----+-----+-----+-----+-----+
|   PRECEDENCE    |       TOS             | MBZ |  <a href="http://tools.ietf.org/html/rfc1349">RFC 1349</a> (July 1992)
+-----+-----+-----+-----+-----+-----+-----+-----+</pre>
<p>Note that in the above definition there is a TOS field within the TOS byte.</p>
<p>Each bit in the TOS field indicates a particular QoS parameter to optimize for.</p>
<table>
<tbody>
<tr>
<td><strong>Value</strong></td>
<td><strong>Meaning</strong></td>
</tr>
<tr>
<td>1000</td>
<td>Minimize delay (md)</td>
</tr>
<tr>
<td>0100</td>
<td>Maximize throughput (mt)</td>
</tr>
<tr>
<td>0010</td>
<td>Maximize reliability (mr)</td>
</tr>
<tr>
<td>0001</td>
<td>Minimize monetary cost (mmc)</td>
</tr>
</tbody>
</table>
<p>Pfifo_fast uses the TOS bits to map packets into the priority classes using the following table. The general idea is to map high priority packets into class 0, normal traffic into class 1, and low priority traffic into class 2.</p>
<table>
<tbody>
<tr>
<td><strong>IP TOS field value</strong></td>
<td><strong>Class</strong></td>
</tr>
<tr>
<td>0000</td>
<td>1</td>
</tr>
<tr>
<td><strong>0001</strong></td>
<td><strong>2</strong></td>
</tr>
<tr>
<td>0010</td>
<td>1</td>
</tr>
<tr>
<td><strong>0011</strong></td>
<td><strong>1</strong></td>
</tr>
<tr>
<td>0100</td>
<td>2</td>
</tr>
<tr>
<td><strong>0101</strong></td>
<td><strong>2</strong></td>
</tr>
<tr>
<td>0110</td>
<td>2</td>
</tr>
<tr>
<td><strong>0111</strong></td>
<td><strong>2</strong></td>
</tr>
<tr>
<td>1000</td>
<td>0</td>
</tr>
<tr>
<td><strong>1001</strong></td>
<td><strong>0</strong></td>
</tr>
<tr>
<td>1010</td>
<td>0</td>
</tr>
<tr>
<td><strong>1011</strong></td>
<td><strong>0</strong></td>
</tr>
<tr>
<td>1100</td>
<td>1</td>
</tr>
<tr>
<td><strong>1101</strong></td>
<td><strong>1</strong></td>
</tr>
<tr>
<td>1110</td>
<td>1</td>
</tr>
<tr>
<td><strong>1111</strong></td>
<td><strong>1</strong></td>
</tr>
</tbody>
</table>
<p>This approach looks reasonable except that RFC 1349 has been deprecated by <a title="RFC 2474" href="http://www.rfc-editor.org/rfc/rfc2474.txt">RFC 2474</a> which changes the definition of the TOS byte.</p>
<pre>   0     1     2     3     4     5     6     7
+-----+-----+-----+-----+-----+-----+-----+-----+
|               DSCP                |    CU     |  <a title="RFC 2474" href="http://www.rfc-editor.org/rfc/rfc2474.txt">RFC 2474</a> (October 1998) and
+-----+-----+-----+-----+-----+-----+-----+-----+    RFC 2780 (March 2000)</pre>
<p>In this more recent definition, the first six bits of the TOS byte are used for the <a title="Diffserv" href="http://en.wikipedia.org/wiki/Differentiated_services">Diffserv</a> codepoint (DSCP) and the last two bits are reserved for use by <a title="ECN" href="http://en.wikipedia.org/wiki/Explicit_Congestion_Notification">explicit congestion notification</a> (ECN). ECN allows routers along a packet&#8217;s path to signal that they are nearing congestion. This information allows the sender to slow the transmit rate without requiring a lost packet as a congestion signal. The meanings of the ECN codepoints are outlined below.</p>
<pre>   6     7
+-----+-----+
|  0     0  |  Non-ECN capable transport
+-----+-----+

   6     7
+-----+-----+
|  1     0  |  ECN capable transport - ECT(1)
+-----+-----+

   6     7
+-----+-----+
|  0     1  |  ECN capable transport - ECT(0)
+-----+-----+

   6     7
+-----+-----+
|  1     1  |  Congestion encountered
+-----+-----+</pre>
<p>[Yes, the middle two codepoints have the same meaning. See <a title="RFC 3168" href="http://tools.ietf.org/html/rfc3168">RFC 3168</a> for more information.]</p>
<p>When ECN is enabled Linux sets the ECN codepoint to ECT(1) or 10 which indicates to routers on the path that ECN is supported.</p>
<p>Since most applications do not modify the TOS/DSCP value, the default of zero is by far the most commonly used. A zero value for the DSCP field combined with ECT(1) results in the IP TOS byte being set to 00000010.</p>
<p>Looking pfifo_fast&#8217;s TOS field to class mapping table (above), we can see that that a TOS field value of 00000010 results in ECN enabled packets being placed into the lowest priority (2) class. However, packets which do not use ECN, those with TOS byte 00000000, are placed into the normal priority class (1). The result is that ECN enabled packets with the default DSCP value are unduly deprioritized relative to non-ECN enabled packets.</p>
<p>The rest of the mappings in the pfifo_fast table effectively ignore the MMC bit so this problem is only present when the DSCP/TOS field is set to the default value (zero).</p>
<p>This problem could be fixed by either changing pfifo_fasts&#8217; default priority to class mapping in <a title="sch_generic.c" href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=net/sched/sch_generic.c;hb=HEAD">sch_generic.c</a> or changing the ip_tos2prio lookup table in <a title="route.c" href="http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=net/ipv4/route.c">route.c</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2011/03/13/pfifo_fast-and-ecn/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Linux x86_64 and Javascript</title>
		<link>http://www.coverfire.com/archives/2010/03/29/linux-x86_64-and-javascript/</link>
		<comments>http://www.coverfire.com/archives/2010/03/29/linux-x86_64-and-javascript/#comments</comments>
		<pubDate>Tue, 30 Mar 2010 02:45:39 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=686</guid>
		<description><![CDATA[The competition between browsers in the area of Javascript performance has led to some pretty dramatic performance increases in the last couple of years. A lot of this has been accomplished through Javascript just in time (JIT) compilers. What JITs &#8230; <a href="http://www.coverfire.com/archives/2010/03/29/linux-x86_64-and-javascript/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><span style="background-color: #ffffff;">The competition between browsers in the area of Javascript performance has led to some pretty dramatic performance increases in the last couple of years. A lot of this has been accomplished through Javascript just in time (JIT) compilers. What JITs do is convert the Javascript into native instructions which execute a lot faster than more abstract forms. The one downside to this approach is that each native architecture must be supported to get the speed boost.</span></p>
<p>If you follow Javascript performance you know that recent versions of Firefox have a JIT. What you may not know is that there is no JIT in Firefox for x86_64. This isn&#8217;t that big of a problem for Windows since there are so few 64-bit windows users but Linux distributions have been native 64-bit for quite some time. So if you&#8217;ve installed a 64-bit version of your faviourite Linux distribution you are getting far slower Javascript performance in Firefox than if you had installed the i686 version. How much slower?</p>
<p>The following benchmarks were executed on an i7-930 running Fedora 12, Firefox 3.5.8 and Epiphany 2.28.2. The benchmarks I used are the <a title="SunSpider" href="http://www2.webkit.org/perf/sunspider-0.9/sunspider.html">SunSpider</a> and <a title="V8 Javascript benchmark" href="http://v8.googlecode.com/svn/data/benchmarks/v5/run.html">V8</a> Javascript benchmarks.</p>
<table>
<tbody>
<tr>
<td>Browser/arch</td>
<td>V8 (higher is better)</td>
<td>SunSpider (lower is better)</td>
</tr>
<tr>
<td>Firefox i686 PAE</td>
<td>402</td>
<td>1002.6ms</td>
</tr>
<tr>
<td>Firefox x86_64</td>
<td>277</td>
<td>2131.2ms</td>
</tr>
<tr>
<td>Epiphany x86_64</td>
<td>887</td>
<td>1261.0ms</td>
</tr>
</tbody>
</table>
<p>These results show that the Javascript performance of i686 Firefox is a lot better than x86_64. The Epiphany web browser is based on Webkit which, based on these results, I&#8217;m guessing does have a x86_64 JIT.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2010/03/29/linux-x86_64-and-javascript/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Linux SFQ experimentation</title>
		<link>http://www.coverfire.com/archives/2009/06/28/linux-sfq-experimentation/</link>
		<comments>http://www.coverfire.com/archives/2009/06/28/linux-sfq-experimentation/#comments</comments>
		<pubDate>Sun, 28 Jun 2009 22:27:30 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=622</guid>
		<description><![CDATA[I&#8217;ve been doing some more experimentation with Linux QoS configurations using my ping-exp utility. Today I noticed that whenever I add a SFQ to the configuration there are large latency spikes. After a bit of digging it appears that these &#8230; <a href="http://www.coverfire.com/archives/2009/06/28/linux-sfq-experimentation/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been doing some more experimentation with Linux QoS configurations using my <a title="ping-exp: Ping experimentation tool" href="http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/">ping-exp</a> utility. Today I noticed that whenever I add a <a title="Linux classless queueing disciplines" href="http://lartc.org/howto/lartc.qdisc.classless.html">SFQ</a> to the configuration there are large latency spikes. After a bit of digging it appears that these spikes happen when the SFQ changes its flow hash. This occurs every perturb interval as configured when the SFQ is created.</p>
<p>Below are the results from a couple experiments which show this behavior. For both experiments I had two outbound ping floods of MTU sized packets. This saturated the outbound link. The experiment itself pinged three other hosts. I made sure to use four distinct hosts (one for flood, three for the experiment) to avoid collisions in the SFQs flow hash.</p>
<p>The PNGs below are not ideal for detailed inspection of the graphs. However, you can also download the data files from the experiment and load them using <a title="ping-exp" href="http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/">ping-exp</a>. This allows zooming in on the graph. See the links at the end.</p>
<div id="attachment_623" class="wp-caption alignnone" style="width: 610px"><a href="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb5.png"><img class="size-medium wp-image-623 " title="HTB SFQ limit 10 perturb 5" src="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb5-600x360.png" alt="HTB SFQ limit 10 perturb 5" width="600" height="360" /></a><p class="wp-caption-text">HTB SFQ limit 10 perturb 5</p></div>
<p>The above graph is based on an experiment where the perturb value was set to five seconds. Although the large latency spikes do not occur at every five second interval, when they do occur they are on the five second grid.</p>
<div id="attachment_624" class="wp-caption alignnone" style="width: 610px"><a href="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb20.png"><img class="size-medium wp-image-624 " title="HTB SFQ limit 10 perturb 20" src="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb20-600x360.png" alt="HTB SFQ limit 10 perturb 20" width="600" height="360" /></a><p class="wp-caption-text">HTB SFQ limit 10 perturb 20</p></div>
<p>The second experiment used a perturb time of twenty seconds. Again, the latency spikes do not occur every twenty seconds but they do occur on the twenty second grid.</p>
<p>During the experiment I ran a packet capture to make sure there wasn&#8217;t any activity that might skew the results. The amount of captured traffic was very small.</p>
<p>The network I performed this experiment on consists of a P3-450 Linux gateway where the QoS configuration is applied to the ppp0 device. The kernel version is 2.6.27.24-170.2.68.fc10.i686. A host behind the gateway was used to generate the ping floods and run ping-exp.</p>
<p><strong>Configuration and data files</strong></p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2009/06/tc-htb-sfq10-perturb5.sh">HTB SFQ limit 10 perturb 5 script</a></p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb5.data"></a><a href="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb5.data">HTB SFQ limit 10 perturb 5 ping-exp data file</a></p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2009/06/tc-htb-sfq10-perturb20.sh">HTB SFQ limit 10 perturb 20 script</a></p>
<p><a href="http://www.coverfire.com/wp-content/uploads/2009/06/htb-sfq10-perturb20.data">HTB SFQ limit 10 perturb 20 ping-exp data file</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2009/06/28/linux-sfq-experimentation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>ping-exp: Ping experiment utility</title>
		<link>http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/</link>
		<comments>http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/#comments</comments>
		<pubDate>Mon, 18 May 2009 17:36:26 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Networking]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=579</guid>
		<description><![CDATA[Recently I&#8217;ve been playing with Linux&#8217;s QoS features in order to make my home Internet service a little better. Since I&#8217;m primarily interested in latency I used ping to benchmark the various configurations. This works reasonably well but it quickly &#8230; <a href="http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Recently I&#8217;ve been playing with Linux&#8217;s QoS features in order to make my home Internet service a little better. Since I&#8217;m primarily interested in latency I used ping to benchmark the various configurations. This works reasonably well but it quickly becomes hard to compare the results.</p>
<p>So I decided to build a tool to perform several ping experiments, store the results and graph them. The result of this work is <a title="ping-exp" href="http://git.coverfire.com/?p=ping-exp.git;a=summary">ping-exp</a>.</p>
<p>At present ping-exp can vary the destination host name as well as the TOS field. The interval between pings and total number of pings is globally configurable. The results can be written to a file to be loaded later, output to a PNG or both. Line and scatter plots are supported. When not writing the image to a file ping-exp displays the graph using Matplotlib&#8217;s default graph viewer. This allows zooming in on interesting parts of the graph. In the future I&#8217;d like to add the ability to specify the ping packet size.</p>
<p>As an aside, Python and <a title="Matplotlib" href="http://matplotlib.sourceforge.net/">Matplotlib</a> make this kind of stuff so much fun.</p>
<p>Below are a few graphs created by <a title="ping-exp" href="http://git.coverfire.com/?p=ping-exp.git;a=summary">ping-exp</a>.</p>
<div id="attachment_581" class="wp-caption alignnone" style="width: 650px"><a href="http://www.coverfire.com/wp-content/uploads/2009/05/blog3.png"><img class="size-full wp-image-581 " title="ping-exp example #1" src="http://www.coverfire.com/wp-content/uploads/2009/05/blog3.png" alt="ping-exp example #1" width="640" height="384" /></a><p class="wp-caption-text">ping-exp example #1</p></div>
<div id="attachment_582" class="wp-caption alignnone" style="width: 650px"><a href="http://www.coverfire.com/wp-content/uploads/2009/05/blog1.png"><img class="size-full wp-image-582 " title="ping-exp example #2" src="http://www.coverfire.com/wp-content/uploads/2009/05/blog1.png" alt="ping-exp example #2" width="640" height="384" /></a><p class="wp-caption-text">ping-exp example #2</p></div>
<div id="attachment_583" class="wp-caption alignnone" style="width: 650px"><a href="http://www.coverfire.com/wp-content/uploads/2009/05/blog2.png"><img class="size-full wp-image-583 " title="ping-exp example #3" src="http://www.coverfire.com/wp-content/uploads/2009/05/blog2.png" alt="ping-exp example #3" width="640" height="384" /></a><p class="wp-caption-text">ping-exp example #3</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2009/05/18/ping-exp-ping-experiment-utility/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Linux/Fedora PPPoE problems and solutions</title>
		<link>http://www.coverfire.com/archives/2009/04/19/linuxfedora-pppoe-problems-and-solutions/</link>
		<comments>http://www.coverfire.com/archives/2009/04/19/linuxfedora-pppoe-problems-and-solutions/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 02:53:32 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Fedora]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[PPP]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/?p=518</guid>
		<description><![CDATA[This weekend I&#8217;ve been doing some network experimentation on my little DSL connection. I&#8217;ve learned a couple of things the hard way so I figured a quick blog post is in order in the hopes that it will save someone &#8230; <a href="http://www.coverfire.com/archives/2009/04/19/linuxfedora-pppoe-problems-and-solutions/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>This weekend I&#8217;ve been doing some network experimentation on my little DSL connection. I&#8217;ve learned a couple of things the hard way so I figured a quick blog post is in order in the hopes that it will save someone else time.</p>
<h1>PPP interface errors</h1>
<p>Over the last while my Internet connection has been a little slow. I noticed that there were occasionally packet drops but I didn&#8217;t take the time to figure out where they were occurring.Â  The testing I was doing this weekend was very sensitive to packet loss so I had to get to the bottom of this.</p>
<p>There were two symptoms. The first was a bunch of log entries like the following.</p>
<pre>Apr 19 12:03:21 titan pppoe[26690]: Bad TCP checksum 109c
Apr 19 12:10:35 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:10:35 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:10:36 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:10:36 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:24:50 titan pppoe[26690]: Bad TCP checksum 3821
Apr 19 12:31:54 titan pppoe[26690]: Bad TCP checksum 9aeb
Apr 19 12:33:22 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:33:49 titan pppd[26689]: Protocol-Reject for unsupported protocol 0xb00
Apr 19 12:33:57 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x2fe5
Apr 19 12:33:58 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:01 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:02 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:12 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x58e6
Apr 19 12:34:14 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:17 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:27 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:29 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:30 titan pppd[26689]: Protocol-Reject for unsupported protocol 0xb00
Apr 19 12:34:31 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x800
Apr 19 12:34:33 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x0
Apr 19 12:34:36 titan pppd[26689]: Protocol-Reject for unsupported protocol 0x7768</pre>
<p>The bad TCP checksum entries hinted at some kind of packet corruption. However, I didn&#8217;t know if this was coming from packets being transmitted or received. Since I don&#8217;t know the inner workings of PPP as well as I&#8217;d like, the Protocol-Reject messages were harder to get a handle on. I grabbed a capture on the Ethernet interface underlying ppp0 so I could look at the PPP messages in Wireshark.</p>
<div class="clearleft"></div>
<div id="attachment_519" class="wp-caption alignleft" style="width: 259px"><img class="size-full wp-image-519" title="Suspect PPP message" src="http://www.coverfire.com/wp-content/uploads/2009/04/ppp-unknown.png" alt="PPP Unknown protocol" width="249" height="218" /><p class="wp-caption-text">Suspect PPP message</p></div>
<div class="clearleft"></div>
<p>My PPPoE client sent a message with the protocol field set to 0. Wireshark doesn&#8217;t know what 0 is supposed to mean.</p>
<div class="clearleft"></div>
<div id="attachment_520" class="wp-caption alignleft" style="width: 297px"><img class="size-full wp-image-520" title="PPP rejection message" src="http://www.coverfire.com/wp-content/uploads/2009/04/ppp-reject.png" alt="PPP reject" width="287" height="331" /><p class="wp-caption-text">PPP rejection message</p></div>
<div class="clearleft"></div>
<p>And the remote PPPoE device is sending a message back rejecting the transmitted message. And it&#8217;s even nice enough to return the entire payload thereby wasting download bandwidth as well. From this packet capture I became pretty confident that the problem was on my end not the ISP&#8217;s. After this I wasted a bunch of time playing around with the clamp TCP MSS PPP option because the data size in the above messages (1412) matched clamp TCP MSS setting in my PPP interface configuration file.</p>
<p>The second symptom was a large number of receive errors on the ppp0 interface &#8211; the underlying Ethernet interface did not have any errors. Opposite to the PPP errors above, the receive errors made it look like the problem was in the PPP messages being received by my PPPoE client.</p>
<p>After several unsuccessful theories I finally figured out what the problem was. The PPPoE implementation on Linux has two modes: synchronous and asynchronous. Synchronous mode uses less CPU but requires a fast computer. I guess the P3-450 that I use as a gateway doesn&#8217;t qualify as fast because as soon as I switched to the asyncronous mode all of the errors went away.</p>
<p>Fixing the problem was good but this still didn&#8217;t make sense to me because I&#8217;ve been using this computer as a gateway for years. Then I discovered <a title="Fedora PPPoE bug" href="https://bugzilla.redhat.com/show_bug.cgi?id=475155">this Fedora bug</a>. It turns out that Fedora 10 shipped with a version of system-config-network which contained a bug that defaulted all PPPoE connections to synchronous mode. This bug has since been fixed and pushed out to all Fedora users but that didn&#8217;t fix the problem for me because the PPP connection configuration was already generated.</p>
<p>In summary, this was a real pain but I did learn more about PPP than I&#8217;ve ever had reason to in the past.</p>
<h1>Dropping PPP connections</h1>
<p>Some of the experimentation I&#8217;ve been doing this weekend required completely congesting the upload channel of my DSL connection. I don&#8217;t just mean a bunch of TCP uploads; this doesn&#8217;t cause any problems. What I was doing is running three copies of the following.</p>
<pre>ping -f -s 1450 alpha.coverfire.com</pre>
<p>This generates significantly more traffic than my little 768Kbps upload channel can handle. During these tests I noticed that occasionally the PPPoE connection would die and reconnect. Examples of the log entries associated with these events are below.</p>
<pre>
Apr 19 20:02:31 titan pppd[15627]: No response to 3 echo-requests
Apr 19 20:02:31 titan pppd[15627]: Serial link appears to be disconnected.
</pre>
<p>Since I had already been looking at PPP packet captures in Wireshark I recognized the following.</p>
<div class="clearleft"></div>
<div id="attachment_522" class="wp-caption alignleft" style="width: 477px"><img class="size-full wp-image-522" title="PPP echo" src="http://www.coverfire.com/wp-content/uploads/2009/04/ppp-echo.png" alt="PPP echo" width="467" height="89" /><p class="wp-caption-text">PPP echo</p></div>
<div class="clearleft"></div>
<p>It appears that too much upload traffic causes enough congestion that the PPP echos fail and the PPP connection is dropped after a timeout. I would have thought the PPP daemon would prioritize something like this over upper layer packets but nevertheless this appears to be the case. For the purposes of my testing this problem was easy to avoid by modifying the following lines in /etc/sysconfig/network-scripts/ifcfg-INTERFACE. I increased the failure count from 3 to 10.</p>
<pre>LCP_FAILURE=10
LCP_INTERVAL=20</pre>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2009/04/19/linuxfedora-pppoe-problems-and-solutions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Magazine titles and operating systems</title>
		<link>http://www.coverfire.com/archives/2008/02/10/magazine-titles-and-operating-systems/</link>
		<comments>http://www.coverfire.com/archives/2008/02/10/magazine-titles-and-operating-systems/#comments</comments>
		<pubDate>Sun, 10 Feb 2008 20:20:35 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/archives/2008/02/10/magazine-titles-and-operating-systems/</guid>
		<description><![CDATA[I little while ago I was standing in front of the computer magazine section at my local Chapters when I noticed something interesting. There were three magazines with &#8220;Windows&#8221; in the title, three with &#8220;Mac&#8221; in the title, and four &#8230; <a href="http://www.coverfire.com/archives/2008/02/10/magazine-titles-and-operating-systems/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I little while ago I was standing in front of the computer magazine section at my local <a href="http://chapters.ca" title="Chapters">Chapters</a> when I noticed something interesting. There were three magazines with &#8220;Windows&#8221; in the title, three with &#8220;Mac&#8221; in the title, and four with &#8220;Linux&#8221; in the title. Of course this is hardly statistically significant in terms of the magazine industry as a whole but it does show how Linux is becoming much more mainstream.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2008/02/10/magazine-titles-and-operating-systems/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>End-to-end in standards and software</title>
		<link>http://www.coverfire.com/archives/2008/01/28/end-to-end-in-standards-and-software/</link>
		<comments>http://www.coverfire.com/archives/2008/01/28/end-to-end-in-standards-and-software/#comments</comments>
		<pubDate>Mon, 28 Jan 2008 04:00:15 +0000</pubDate>
		<dc:creator>Dan Siemon</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Software development]]></category>

		<guid isPermaLink="false">http://www.coverfire.com/archives/2008/01/28/end-to-end-in-standards-and-software/</guid>
		<description><![CDATA[Two things. Both relate to Microsoft but that is just by coincidence. The first Apparently IE8 will allow the HTML author to specify the name and version number of the browser that the page was designed for. For example, the &#8230; <a href="http://www.coverfire.com/archives/2008/01/28/end-to-end-in-standards-and-software/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Two things. Both relate to Microsoft but that is just by coincidence.</p>
<h2>The first</h2>
<p>Apparently IE8 will allow the HTML author to <a href="http://blog.case.edu/jms18/2008/01/27/ie_8_something_web_indigestion_ensued" title="IE 8 something">specify the name and version number</a> of the browser that the page was designed for. For example, the author can add a meta tag that says essentially &#8220;IE6&#8243;. IE8 will see this tag and switch to rendering pages like IE6 does. Apparently this came about because IE7 became more standards compliant thereby &#8216;breaking&#8217; many pages, especially those on intranets which require the use of IE. The new browser version tag will allow MS to update the browser engine without breaking old pages. As a result they will be forced to maintain the old broken HTML rendering engine (or at least its behavior) for a very long time. This will consume development resources that could otherwise be put into improving IE. It will also increase the size, complexity and undoubtedly the number of bugs. As for the pages broken by newer more standards compliant browsers, what is their value? Any information in a corporate Intranet or otherwise that has value will be updated to retain its value. If no one bothers to update the page is was probably nearly worthless anyway. Also, most of the HTML pages now in use are generated by a templating system of some kind. It&#8217;s not like each and every page will have to be edited by hand.</p>
<h2>The second</h2>
<p>The Linux kernel development process is notorious for improving (breaking) the kernel&#8217;s internal driver APIs. This means that a driver written for version 2.6.x might not even compile against 2.6.x+1 let alone be binary compatible. This of course causes all kinds of trouble for companies not willing to open source their drivers. However, the advantages of this process are huge. It is completely normal that during the development process the author will learn a lot about how the particular problem can be solved. By allowing the internal APIs to change the Linux kernel development model allows the authors to apply this new found knowledge and not be slowed down by past mistakes. As I already mentioned this causes problems for binary only kernel drivers but if the product has value the manufacturer will update the driver to work with the new kernel release. If it doesn&#8217;t have value the driver it won&#8217;t get updated and the kernel doesn&#8217;t have to carry around the baggage of supporting the old inferior design. How does this relate to Microsoft? From <a href="http://www.kroah.com/log/linux/ols_2006_keynote.html" title="OLS 2006 keynote">Greg Kroah-Hartman</a>:</p>
<blockquote><p>Now Windows has also rewritten their USB stack at least 3 times, with Vista, it might be 4 times, I haven&#8217;t taken a look at it yet.  But each time they did a rework, and added new functions and fixed up older ones, they had to keep the old api functions around, as they have taken the stance that they can not break backward compatibility due to their stable API viewpoint.  They also don&#8217;t have access to the code in all of the different drivers, so they can&#8217;t fix them up.  So now the Windows core has all 3 sets of API functions in it, as they can&#8217;t delete things.  That means they maintain the old functions, and have to keep them in memory all the time, and it takes up engineering time to handle all of this extra complexity.  That&#8217;s their business decision to do this, and that&#8217;s fine, but with Linux, we didn&#8217;t make that decision, and it helps us remain a lot smaller, more stable, and more secure.</p></blockquote>
<h2>So what was the point?</h2>
<p>I don&#8217;t know what to make of these two little stories but the later has been bothering me for some time. Where does the responsibility for dealing with change belong? The Internet has taught us that we should push as much work as possible to the ends of the network. The alternative is rapidly growing complexity and inflexibility in the core. It seems to me that this applies to both of the situations I outlined here as well.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.coverfire.com/archives/2008/01/28/end-to-end-in-standards-and-software/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

