<?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/"
	>

<channel>
	<title>the blog of Chris &#187; kernel</title>
	<atom:link href="http://blog.christophersmart.com/tag/kernel/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.christophersmart.com</link>
	<description>Fortiter Et Recte</description>
	<lastBuildDate>Wed, 28 Dec 2011 23:39:13 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Miracle patch out-performed by four lines of bash</title>
		<link>http://blog.christophersmart.com/2010/11/19/miracle-patch-out-performed-by-four-lines-of-bash/</link>
		<comments>http://blog.christophersmart.com/2010/11/19/miracle-patch-out-performed-by-four-lines-of-bash/#comments</comments>
		<pubDate>Fri, 19 Nov 2010 00:43:37 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[cfs]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scheduler]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2427</guid>
		<description><![CDATA[Well it&#8217;s nothing if not interesting. The ~200 line &#8220;miracle&#8221; patch promises a huge improvement in desktop responsiveness, but Lennart Poettering (from Red Hat) has replied to Linus&#8217; praising comments with 4 lines of bash which out-perform it, on the current vanilla kernel. (And by the way, Lennart seems to agree with Con Kolivas about [...]]]></description>
			<content:encoded><![CDATA[<p>Well it&#8217;s nothing if not interesting. The <a href="http://blog.christophersmart.com/2010/11/17/200-line-miracle-linux-patch/">~200 line &#8220;miracle&#8221; patch</a> promises a huge improvement in desktop responsiveness, but Lennart Poettering (from Red Hat) has <a href="http://lkml.org/lkml/2010/11/16/330">replied to Linus&#8217; praising comments</a> with 4 lines of bash which <a href="http://lkml.org/lkml/2010/11/16/392">out-perform it</a>, on the current vanilla kernel. (And by the way, Lennart seems to agree with <a href="http://blog.christophersmart.com/2010/11/18/con-kolivas-posts-his-thoughts-on-the-new-200-line-kernel-patch/">Con Kolivas about this patch</a>, in that make -j is <a href="http://lkml.org/lkml/2010/11/16/424">not a valid desktop use case</a>.)</p>
<p><a href="http://lkml.org/lkml/2010/11/16/299">Lennart said</a>:</p>
<blockquote><p>Binding something like this to TTYs is just backwards. No graphical<br />
session has a TTY attached anymore. And there might be multiple TTYs<br />
used in the same session.</p>
<p>I really wonder why logic like this should live in kernel space at all,<br />
since a) the kernel has no real notion of a session, except audit and b)<br />
this is policy and as soon as people have this kind of group then they<br />
probably want other kind of autogrouping as well for the other<br />
controllers, which hence means userspace is a better, and configurable<br />
place for this.</p></blockquote>
<p>To which <a href="http://lkml.org/lkml/2010/11/16/298">Linus then replied</a>:</p>
<blockquote><p>Numbers talk, bullshit walks.</p>
<p>The numbers have been quoted. The clear interactive behavior has been seen.</p>
<p>And you&#8217;re just full of bullshit.</p>
<p>Come back when you have something working and with numbers and better<br />
interactive performance.  Until then, nobody cares.</p></blockquote>
<p>So, Lennart <a href="http://lkml.org/lkml/2010/11/16/330">replied with his something better</a>, 4 lines of bash:</p>
<blockquote><p>Here&#8217;s my super-complex patch btw, to achieve exactly the same thing<br />
from userspace without involving any kernel or systemd patching and<br />
kernel-side logic. Simply edit your own ~/.bashrc and add this to the end:</p>
<p><code>  if [ "$PS1" ] ; then<br />
          mkdir -m 0700 /sys/fs/cgroup/cpu/user/$$<br />
          echo $$ > /sys/fs/cgroup/cpu/user/$$/tasks<br />
  fi</code><br />
Then, as the superuser do this:</p>
<p><code>  mount -t cgroup cgroup /sys/fs/cgroup/cpu -o cpu<br />
  mkdir -m 0777 /sys/fs/cgroup/cpu/user</code></p>
<p>Done. Same effect. However: not crazy.</p></blockquote>
<p>Of course the debate raged on because Linus thinks it&#8217;s stupid to make people have to set this up in userspace, and Lennart disagrees. Despite all this, finally everyone is at least acknowledging these issues and looking into them! Excellent.</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/19/miracle-patch-out-performed-by-four-lines-of-bash/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Con Kolivas posts his thoughts on the new ~200 line kernel patch</title>
		<link>http://blog.christophersmart.com/2010/11/18/con-kolivas-posts-his-thoughts-on-the-new-200-line-kernel-patch/</link>
		<comments>http://blog.christophersmart.com/2010/11/18/con-kolivas-posts-his-thoughts-on-the-new-200-line-kernel-patch/#comments</comments>
		<pubDate>Thu, 18 Nov 2010 00:29:40 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[patch]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[scheduler]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=2414</guid>
		<description><![CDATA[Con Kolivas (of SD/BFS fame) has posted his thoughts on the new ~200 line &#8220;miracle&#8221; kernel patch. It&#8217;s an interesting read. In short, he had already implemented something like this in a 10 line patch to his BFS scheduler, but he dropped them because it introduced regressions. Those following the development of the patches for [...]]]></description>
			<content:encoded><![CDATA[<p>Con Kolivas (of SD/BFS fame) has <a href="http://ck-hack.blogspot.com/2010/11/create-task-groups-by-tty-comment.html">posted his thoughts</a> on the new <a href="http://blog.christophersmart.com/2010/11/17/200-line-miracle-linux-patch/">~200 line &#8220;miracle&#8221; kernel patch</a>. It&#8217;s an interesting read.</p>
<p>In short, he had already implemented something like this in a 10 line patch to his BFS scheduler, but he dropped them because it <a href="http://ck-hack.blogspot.com/2010/10/further-updates-on-hierarchical-tree.html">introduced regressions</a>.</p>
<blockquote><p>Those following the development of the patches for interactivity at massive load, I have COMPLETELY DROPPED them as they introduce regressions at normal workloads, and I cannot under any circumstances approve changes to improve behaviour at ridiculous workloads which affect regular ones. I still see precisely zero point at optimising for absurd workloads. Proving how many un-niced jobs you can throw at your kernel compiles is not a measure of one&#8217;s prowess. It is just a mindless test.</p></blockquote>
<p>He goes on to say:</p>
<blockquote><p>Again, I can&#8217;t for the life of me see why you&#8217;d optimise for make -j64 on a quad core machine. It is one workload, unique to people who compile all the time, but done in a way you wouldn&#8217;t normally do it anyway. It is not going to magically make anything else better. If for some god-forsaken reason you wanted to do that, you could already do that with nice, or even better, by running it SCHED_IDLEPRIO.</p></blockquote>
<p>Perhaps this patch really helps the existing CFS implementation, but it&#8217;s still lacking when compared to BFS. Maybe it is a step in the wrong direction, but perhaps some improvement like this is better than none at all? It might be the catalyst needed to improve the kernel further. I never could understand why we couldn&#8217;t have more than one CPU scheduler in the kernel (like we do for block I/O).</p>
<p>Anyway, this is all quite interesting!</p>
<p>-c</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2010/11/18/con-kolivas-posts-his-thoughts-on-the-new-200-line-kernel-patch/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ksplice awarded most innovative security technology of 2009</title>
		<link>http://blog.christophersmart.com/2009/09/15/ksplice-awarded-most-innovative-security-technology-of-2009/</link>
		<comments>http://blog.christophersmart.com/2009/09/15/ksplice-awarded-most-innovative-security-technology-of-2009/#comments</comments>
		<pubDate>Mon, 14 Sep 2009 23:16:39 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[award]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[ksplice]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[patch]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=1167</guid>
		<description><![CDATA[Congratulations to the Ksplice team which has just been awarded the Wall Street Journal Technology Innovation Award in Security/Privacy for 2009! Ksplice is technology which can apply patches to the Linux kernel on the fly, without needing a reboot. Also see my interview with Waseem Daher, one of the founding members of the team.]]></description>
			<content:encoded><![CDATA[<p>Congratulations to the <a href="http://www.ksplice.com/news/20090914-wsj">Ksplice team</a> which has just been awarded the Wall Street Journal <a href="http://online.wsj.com/article/SB10001424052970203440104574399714096167656.html">Technology Innovation Award in Security/Privacy</a> for 2009!</p>
<p>Ksplice is technology which can <a href="http://www.linux-mag.com/id/7403">apply patches to the Linux kernel on the fly</a>, without needing a reboot. Also see my <a href="http://www.linux-mag.com/id/7406">interview with Waseem Daher</a>, one of the founding members of the team.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/09/15/ksplice-awarded-most-innovative-security-technology-of-2009/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Microsoft&#8217;s HV driver to enter 2.6.32, out in 2.6.33?</title>
		<link>http://blog.christophersmart.com/2009/09/10/microsofts-hv-driver-to-enter-2-6-32-out-in-2-6-33/</link>
		<comments>http://blog.christophersmart.com/2009/09/10/microsofts-hv-driver-to-enter-2-6-32-out-in-2-6-33/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 23:26:31 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[hyper-v]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[microsoft]]></category>
		<category><![CDATA[virtualisation]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=1158</guid>
		<description><![CDATA[Greg Kroah-Hartman has posted a status update for drivers in the 2.6.32 kernel. This in particular, was rather funny: hv (Microsoft Hyper-V) drivers. Over 200 patches make up the massive cleanup effort needed to just get this code into a semi-sane kernel coding style (someone owes me a bit bottle of rum for that work!) [...]]]></description>
			<content:encoded><![CDATA[<p>Greg Kroah-Hartman has posted a <a href="http://www.kroah.com/log/linux/staging-status-09-2009.html">status update for drivers in the 2.6.32 kernel</a>. This in particular, was rather funny:</p>
<blockquote><p>hv (Microsoft Hyper-V) drivers. Over 200 patches make up the<br />
massive cleanup effort needed to just get this code into a<br />
semi-sane kernel coding style (someone owes me a bit bottle of<br />
rum for that work!) Unfortunately the Microsoft developers<br />
seem to have disappeared, and no one is answering my emails.<br />
If they do not show back up to claim this driver soon, it will<br />
be removed in the 2.6.33 release. So sad&#8230;</p></blockquote>
<p>After all his work to get the patches in, Microsoft no longer gives a crap? Perhaps they <em>did</em> just do it because they were <a href="http://www.h-online.com/open/Microsoft-and-Vyatta-rebut-reports-of-GPL-violation--/news/113837">forced to after violating the GPL</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/09/10/microsofts-hv-driver-to-enter-2-6-32-out-in-2-6-33/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Arrrrch!</title>
		<link>http://blog.christophersmart.com/2009/03/18/arrrrch/</link>
		<comments>http://blog.christophersmart.com/2009/03/18/arrrrch/#comments</comments>
		<pubDate>Wed, 18 Mar 2009 01:00:36 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[Tech]]></category>
		<category><![CDATA[32bit]]></category>
		<category><![CDATA[64bit]]></category>
		<category><![CDATA[arch]]></category>
		<category><![CDATA[architecture]]></category>
		<category><![CDATA[cpu]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[make]]></category>
		<category><![CDATA[menuconfig]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=480</guid>
		<description><![CDATA[From time to time I need to compile a 32bit kernel on a 64bit system and the kernel&#8217;s make scripts appear to detect my hardware and override my settings. I always forget what option to pass (even though it&#8217;s really, really easy), so I&#8217;m just blogging it here for my own future reference make menuconfig [...]]]></description>
			<content:encoded><![CDATA[<p>From time to time I need to compile a 32bit kernel on a 64bit system and the kernel&#8217;s make scripts appear to detect my hardware and override my settings. I always forget what option to pass (even though it&#8217;s really, really easy), so I&#8217;m just blogging it here for my own future reference <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><code>make menuconfig ARCH=i386<br />
make -j2 ARCH=i386<br />
make modules -j2 ARCH=i386<br />
make modules_install ARCH=i386<br />
make install ARCH=i386</code></p>
<p>Phew.. glad I have that written down somewhere!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2009/03/18/arrrrch/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The openmoko is sooo Qt</title>
		<link>http://blog.christophersmart.com/2008/10/12/the-openmoko-is-sooo-qt/</link>
		<comments>http://blog.christophersmart.com/2008/10/12/the-openmoko-is-sooo-qt/#comments</comments>
		<pubDate>Sun, 12 Oct 2008 12:53:33 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[openmoko]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[qt]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=203</guid>
		<description><![CDATA[Ever since I heard about the Openmoko, a completely open mobile phone, I was really interested. Open hardware, open software, Linux, handy little device that might be useful? Awesome. The latest developer model, the Neo Freerunner GTA02, has been available for a few months now and Jason bought one (which means I get to play [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://christophersmart.com/images/neo-freerunner-sml.png" alt="" align="left" />Ever since I heard about the <a href="http://openmoko.org" target="_blank">Openmoko</a>, a completely open mobile phone, I was really interested. Open hardware, open software, Linux, handy little device that might be useful? Awesome.</p>
<p>The latest developer model, the Neo Freerunner GTA02, has been available for a few months now and Jason bought one (which means I get to play with it). Originally the moko was developed using GTK, but now there are lots of different images for it.</p>
<p>Recently, <a href="http://qtextended.org" target="_blank">Qt Extended</a> (formally Qt Embedded pre Nokia purchase of Trolltech) released an image for the moko based on their 4.4.1 codebase. I thought I&#8217;d check it out and I was pretty impressed!</p>
<p><strong>Note, that if you&#8217;re following this, make sure you get the correct version for your moko. The Freerunner is GTA02, while the original Neo1973 is GTA01.</strong></p>
<p>First I had to <a href="http://qtextended.org/modules/mydownloads/viewcat.php?cid=6" target="_blank">download</a> the <a href="http://qtextended.org/modules/mydownloads/visit.php?lid=91">kernel image</a> and the <a href="http://qtextended.org/modules/mydownloads/visit.php?lid=86">root image</a> (for the GTA02, of course).<br />
<span id="more-203"></span><br />
The wiki has a good article on how to <a href="http://wiki.openmoko.org/wiki/Flashing_the_Neo_FreeRunner" target="_blank">flash the moko</a>. Essentially we use a program called <a href="http://wiki.openmoko.org/wiki/Dfu-util" target="_blank">dfu-util</a>, which I had to run under a 32bit chroot as it seems to do weird things in 64bit.</p>
<p>From here, it&#8217;s pretty simple!</p>
<p><strong>Step 1</strong><br />
Boot your moko to the uBoot menu, in preparation for flashing. To do this, make sure the moko is off, then hold down the option button on the top left while pressing the power button. You should see the uBoot menu.<br />
<a href="http://christophersmart.com/images/openmoko-uboot-lrg.jpg" target="_blank"><img src="http://christophersmart.com/images/openmoko-uboot-sml.jpg" alt="" /></a></p>
<p><strong>Step 2</strong><br />
Plug the moko into the computer via the provided USB cable, in preparation to flash the unit.</p>
<p>Run the flashing utility to make sure you can see the device<br />
<code><span style="color: green;">./dfu-util -l<br />
Found Runtime: [0x1d50:0x5119] devnum=10, cfg=0, intf=2, alt=0, name="USB Device Firmware Upgrade"</span></code></p>
<p>If you can see your device, then you&#8217;re ready to begin! Flash the kernel and then flash the root system<br />
<code><span style="color: green;">./dfu-util -a kernel -R -D Desktop/uImage-gta02-g291a9d50_mwester-stable.bin &amp;&amp; ./dfu-util -a rootfs -R -D qtextended-4.4.1-gta02-rootfs-release-10022309.jffs2<br />
</span></code></p>
<p>Wait 15 min while the USB 1.1 interface transfers the files (slowly) and the unit is flashed.</p>
<p><strong>Step 3</strong><br />
Boot the unit <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>The default interface is a dark colour, but Jason wanted something lighter. We changed the theme to one called &#8216;Smart&#8217; &#8211; I assure you I had no influence over that decision!</p>
<p>Time for some screenshots..</p>
<table>
<tbody>
<tr>
<td><a href="http://christophersmart.com/images/openmoko-frontscreen-lrg.jpg" target="_blank"><img src="http://christophersmart.com/images/openmoko-frontscreen-sml.jpg" alt="" /></a></td>
<td><a href="http://christophersmart.com/images/openmoko-mainmenu-lrg.jpg" target="_blank"><img src="http://christophersmart.com/images/openmoko-mainmenu-sml.jpg" alt="" /></a></td>
</tr>
<tr>
<td>The front screen after boot</td>
<td>The main menu</td>
</tr>
<tr>
<td><a href="http://christophersmart.com/images/openmoko-settings-lrg.jpg" target="_blank"><img src="http://christophersmart.com/images/openmoko-settings-sml.jpg" alt="" /></a></td>
<td><a href="http://christophersmart.com/images/openmoko-call-lrg.jpg" target="_blank"><img src="http://christophersmart.com/images/openmoko-call-sml.jpg" alt="" /></a></td>
</tr>
<tr>
<td>The settings menu</td>
<td>Making a call</td>
</tr>
</tbody>
</table>
<p>There&#8217;s a handy little application called &#8216;screenshot&#8217;, which I used to take these</p>
<table>
<tbody>
<tr>
<td><a href="http://christophersmart.com/images/openmoko-frontscreen-lrg.png" target="_blank"><img src="http://christophersmart.com/images/openmoko-frontscreen-sml.png" alt="" /></a></td>
<td><a href="http://christophersmart.com/images/openmoko-mainmenu-lrg.png" target="_blank"><img src="http://christophersmart.com/images/openmoko-mainmenu-sml.png" alt="" /></a></td>
<td><a href="http://christophersmart.com/images/openmoko-apps-lrg.png" target="_blank"><img src="http://christophersmart.com/images/openmoko-apps-sml.png" alt="" /></a></td>
</tr>
<tr>
<td>The front screen again</td>
<td>The main menu</td>
<td>The applications menu, where I&#8217;m scrolling it with my finger like on an iPhone..</td>
</tr>
</tbody>
</table>
<p>The phone is a fantastic toy for the hacker but it&#8217;s definitely not ready for the consumer market, just yet. If you want a phone that&#8217;s fun to play with and are happy to hack around, then the moko is a great option. Apart from the stability of the software, the only main drawback is poor battery life (lasting about a day), but I&#8217;m sure this will improve with newer kernels.</p>
<p>Now, if only we could get Arjan&#8217;s <a href="http://lwn.net/Articles/299483/" target="blank">5 second boot</a> working on the moko..</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2008/10/12/the-openmoko-is-sooo-qt/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Linux 2.6.27</title>
		<link>http://blog.christophersmart.com/2008/10/10/linux-2627/</link>
		<comments>http://blog.christophersmart.com/2008/10/10/linux-2627/#comments</comments>
		<pubDate>Fri, 10 Oct 2008 05:49:38 +0000</pubDate>
		<dc:creator>Chris</dc:creator>
				<category><![CDATA[FOSS]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://blog.christophersmart.com/?p=260</guid>
		<description><![CDATA[New kernel is out, yay! Of particular interest to me is using kexec as a way to suspend the machine, although it is only 32bit at the moment There are plenty of other neat new features.]]></description>
			<content:encoded><![CDATA[<p><img align=left src="http://christophersmart.com/images/tux.png" /><a target="_blank" href="http://kernel.org">New kernel</a> is out, yay!</p>
<p>Of particular interest to me is using kexec as a way to suspend the machine, although it is only 32bit at the moment <img src='http://blog.christophersmart.com/wp-includes/images/smilies/icon_sad.gif' alt=':(' class='wp-smiley' /><br />
There are plenty of other neat new <a target="_blank" href="http://kernelnewbies.org/Linux_2_6_27">features</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.christophersmart.com/2008/10/10/linux-2627/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

