<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.kerneltrap.org"  xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>KernelTrap - BKL</title>
 <link>http://www.kerneltrap.org/taxonomy/term/1246/0</link>
 <description></description>
 <language>en-local</language>
<item>
 <title>Linux: Removing The Big Kernel Lock</title>
 <link>http://www.kerneltrap.org/Linux/Removing_The_Big_Kernel_Lock2</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;Arnd Bergmann noted that he&#039;s working on removing the &lt;a href=&quot;http://kerneltrap.org/BKL&quot;&gt;BKL&lt;/a&gt; from the &lt;a href=&quot;http://kerneltrap.org/Linux&quot;&gt;Linux&lt;/a&gt; kernel, &quot;&lt;i&gt;I&#039;ve spent some time continuing the work of the people on Cc and many others to remove the big kernel lock from Linux and I now have [a] bkl-removal branch in my git tree&lt;/i&gt;&quot;.  He went on to explain that his branch is working, and lets him run the Linux kernel, &quot;&lt;i&gt;on [a] quad-core machine with the only users of the BKL being mostly obscure device driver modules.&lt;/i&gt;&quot;  Arnd noted that this effort has a long history, &quot;&lt;i&gt;the oldest patch in this series is roughly eight years old and is Willy&#039;s patch to remove the BKL from fs/locks.c, and I took a series of patches from Jan that removes it from most of the VFS.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;p&gt;Arnd noted that his patch adds a global mutex to the TTY layer, which he called the &#039;Big TTY Mutex&#039; and described as, &quot;the basic idea here is to make recursive locking and the release-on-sleep explicit, so every mutex_lock, wait_event, workqueue_flush and schedule in the TTY layer now explicitly releases the BTM before blocking.&quot;  &lt;a href=&quot;http://kerneltrap.org/Alan_Cox&quot;&gt;Alan Cox&lt;/a&gt; suggested that this portion of the patch was best dropped for now, &quot;&lt;i&gt;it would be nice to get the other bits in first removing BKL from most of the kernel and building kernels which are non BKL except for the tty layer. That (after &lt;a href=&quot;http://kerneltrap.org/Ingo_Molnar&quot;&gt;Ingo&lt;/a&gt;&#039;s box from hell has run it a bit) would reasonably test the assertion that the tty layer has no BKL requirements that are driven by [code] external to tty layer code.&lt;/i&gt;&quot;  &lt;a href=&quot;http://kerneltrap.org/Andrew_Morton&quot;&gt;Andrew Morton&lt;/a&gt; suggested that the patches be pushed upstream to their appropriate maintainers for an additional sanity check, &quot;&lt;i&gt;Seems that there might be a few tricksy bits in here.  Please do push at least the non-obvious parts out to the relevant people.&lt;/i&gt;&quot;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/Removing_The_Big_Kernel_Lock2&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/Removing_The_Big_Kernel_Lock2#comments</comments>
 <category domain="http://www.kerneltrap.org/Alan_Cox">Alan Cox</category>
 <category domain="http://www.kerneltrap.org/Andrew_Morton">Andrew Morton</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1274">Arnd Bergmann</category>
 <category domain="http://www.kerneltrap.org/BKL">BKL</category>
 <category domain="http://www.kerneltrap.org/Ingo_Molnar">Ingo Molnar</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Thu, 01 Apr 2010 14:52:12 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">55703 at http://www.kerneltrap.org</guid>
</item>
<item>
 <title>2.6.27-rc1, &quot;Pretty Dang Busy&quot;</title>
 <link>http://www.kerneltrap.org/Linux/2.6.27-rc1_Pretty_Dang_Busy</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;It&#039;s two weeks (and one day), and the merge window is over,&lt;/i&gt;&quot; began Linus Torvalds, announcing the 2.6.27-rc1 kernel.  He continued, &quot;&lt;i&gt;finally. I don&#039;t know why, but this one really did feel pretty dang busy. And the size of the -rc1 patch bears that out - at 12MB, it&#039;s about 50% bigger than 26-rc1 (but not that much bigger than 24/25-rc1, so it&#039;s not like it&#039;s anything unheard of).&lt;/i&gt;&quot;  He reflected, &quot;&lt;i&gt;the pure size of the -rc&#039;s _is_ making me a bit nervous, though. Sure, it means that we are good at merging it all, but I have to say that I sometimes wonder if we don&#039;t merge too much in one go, and even our current (fairly short) release cycle is actually too big.&lt;/i&gt;&quot;  As for the actual changes, Linus explained:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;Much of -rc1 was in linux-next, but certainly not everything. We&#039;ll see how that whole thing ends up evolving - it certainly didn&#039;t solve all problems, and there was some bickering about things that weren&#039;t there (and some things that mostly were ;), but maybe it helped.  There&#039;s a ton of new stuff in there, but at least personally the interesting things are the BKL pushdown and perhaps the introduction of the lockless get_user_pages_fast(). The build system also got updated to allow moving the architecture include files (&#039;include/asm-xyz&#039;) into the architecture subdirectories (&#039;arch/xyz/include/asm&#039;), and sparc seems to have taken advantage of that already.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Other changes Linus highlighted included merging the UBI filesystem, as well as, &quot;&lt;i&gt;tracing, firmware loading, continued x86 arch merging, and moving more code to generic support (unified generic IPI handling, coherent dma memory allocation, show_mem etc).  Bootmem rewrites. [And] some support for further scalability (ie 4k cpu cores).&lt;/i&gt;&quot;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/2.6.27-rc1_Pretty_Dang_Busy&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/2.6.27-rc1_Pretty_Dang_Busy#comments</comments>
 <category domain="http://www.kerneltrap.org/-rc">-rc</category>
 <category domain="http://www.kerneltrap.org/-rc1">-rc1</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1305">2.6.27</category>
 <category domain="http://www.kerneltrap.org/taxonomy/term/1306">2.6.27-rc1</category>
 <category domain="http://www.kerneltrap.org/BKL">BKL</category>
 <category domain="http://www.kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kerneltrap.org/linux-next">linux-next</category>
 <category domain="http://www.kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Tue, 29 Jul 2008 23:18:23 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">16440 at http://www.kerneltrap.org</guid>
</item>
<item>
 <title>Removing the Big Kernel Lock</title>
 <link>http://www.kerneltrap.org/Linux/Removing_the_Big_Kernel_Lock</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;As some of the latency junkies on lkml already know, commit 8e3e076 in v2.6.26-rc2 removed the preemptible BKL feature and made the Big Kernel Lock a spinlock and thus turned it into non-preemptible code again. This commit returned the BKL code to the 2.6.7 state of affairs in essence,&lt;/i&gt;&quot; &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2008/5/14/1821774&quot;&gt;began Ingo Molnar&lt;/a&gt;.  He noted that this had a very negative effect on the real time kernel efforts, adding that Linux creator Linus Torvalds indicated the only acceptable way forward was to completely remove the BKL.  Ingo explained:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;This task is not easy at all. 12 years after Linux has been converted to an SMP OS we still have 1300+ legacy BKL using sites. There are 400+ lock_kernel() critical sections and 800+ ioctls. They are spread out across rather difficult areas of often legacy code that few people understand and few people dare to touch.  It takes top people like Alan Cox to map the semantics and to remove BKL code, and even for Alan (who is doing this for the TTY code) it is a long and difficult task.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;p&gt;Ingo went on to describe how the BKL works, how it differs from other locking mechanisms, and why this complicates removing it permanently from the kernel.  He noted that the various dependencies of the lock are lost in the haze of 15 years of code changes, &quot;&lt;i&gt;all this has built up to a kind of Fear, Uncertainty and Doubt about the BKL: nobody really knows it, nobody really dares to touch it and code can break silently and subtly if BKL locking is wrong.&lt;/i&gt;&quot;  He then suggested &quot;changing the rules of the game&quot;, creating a &quot;kill-the-BKL&quot; branch which &quot;&lt;i&gt;turns the BKL into an ordinary albeit somewhat big mutex, with a quirky lock/unlock interface called &#039;lock_kernel()&#039; and &#039;unlock_kernel()&#039;.&quot;&lt;/i&gt;&lt;/p&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/Removing_the_Big_Kernel_Lock&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/Removing_the_Big_Kernel_Lock#comments</comments>
 <category domain="http://www.kerneltrap.org/2.6.26-rc2">2.6.26-rc2</category>
 <category domain="http://www.kerneltrap.org/2.6.7">2.6.7</category>
 <category domain="http://www.kerneltrap.org/Alan_Cox">Alan Cox</category>
 <category domain="http://www.kerneltrap.org/BKL">BKL</category>
 <category domain="http://www.kerneltrap.org/Ingo_Molnar">Ingo Molnar</category>
 <category domain="http://www.kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kerneltrap.org/news/linux">Linux news</category>
 <pubDate>Thu, 15 May 2008 15:52:29 +0000</pubDate>
 <dc:creator>Jeremy</dc:creator>
 <guid isPermaLink="false">16137 at http://www.kerneltrap.org</guid>
</item>
<item>
 <title>2.6.26-rc2, &quot;Little Exciting Here&quot;</title>
 <link>http://www.kerneltrap.org/Linux/2.6.26-rc2_Little_Exciting_Here</link>
 <description>&lt;div class=&quot;taxonomy-images&quot;&gt;&lt;a href=&quot;/news/linux&quot; class=&quot;taxonomy-image-links&quot;&gt;&lt;img src=&quot;http://kerneltrap.org/files/category_pictures/K-Linux.gif&quot; alt=&quot;Linux news&quot; title=&quot;Linux news&quot;  width=&quot;75&quot; height=&quot;75&quot; /&gt;&lt;/a&gt;&lt;/div&gt;&lt;!-- google_ad_section_start --&gt;&lt;p&gt;&quot;&lt;i&gt;About 45% architecture updates (counting the include files too), about 30% drivers, and about 25% odds-and-ends. The odds-and-ends are mainly Documentation, filesystems (mostly cifs) and core kernel (scheduler  updates etc),&lt;/i&gt;&quot; said Linux creator Linus Torvalds, &lt;a href=&quot;http://kerneltrap.org/mailarchive/linux-kernel/2008/5/12/1797224&quot;&gt;announcing the 2.6.26-rc2 kernel&lt;/a&gt;.  He added, &quot;&lt;i&gt;if you read the shortlog and get the feeling that most of it is pretty boring small details, you&#039;d be right. There is little exciting there.&lt;/i&gt;&quot;  He continued:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;&quot;A fairly small part of it, but quite possibly the most noticeable one, is how the semaphore changes impacted the BKL (the old &#039;big kernel lock&#039; that is still used for some legacy code, for you non-core people out there), which in the past had different versions (&#039;regular&#039;, &#039;preemptable&#039;).  A few months ago we dropped the regular BKL version, but in 2.6.25-rc1 we then had performance (and then correctness) issues with the interaction between the semaphore implementation and the preemptable BKL, so we&#039;re back to the old regular version for now.&quot;&lt;/p&gt;&lt;/blockquote&gt;
&lt;!-- google_ad_section_end --&gt;&lt;p&gt;&lt;a href=&quot;http://www.kerneltrap.org/Linux/2.6.26-rc2_Little_Exciting_Here&quot; target=&quot;_blank&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.kerneltrap.org/Linux/2.6.26-rc2_Little_Exciting_Here#comments</comments>
 <category domain="http://www.kerneltrap.org/-rc">-rc</category>
 <category domain="http://www.kerneltrap.org/-rc2">-rc2</category>
 <category domain="http://www.kerneltrap.org/2.6.26">2.6.26</category>
 <category domain="http://www.kerneltrap.org/2.6.26-rc2">2.6.26-rc2</category>
 <category domain="http://www.kerneltrap.org/BKL">BKL</category>
 <category domain="http://www.kerneltrap.org/Linus_Torvalds">Linus Torvalds</category>
 <category domain="http://www.kerneltrap.org/Linux">Linux</category>
 <category domain="http://www.kernelt