<?xml version="1.0" encoding="utf-8"?>
<!-- If you are running a bot please visit this policy page outlining rules you must respect. http://www.livejournal.com/bots/ -->
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:lj="http://www.livejournal.com">
  <id>urn:lj:livejournal.com:atom1:paulmck</id>
  <title>Paul E. McKenney's Journal</title>
  <subtitle>paulmck</subtitle>
  <author>
    <name>paulmck</name>
  </author>
  <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/"/>
  <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom"/>
  <updated>2012-05-21T23:55:48Z</updated>
  <lj:journal userid="18342169" username="paulmck" type="personal"/>
  <link rel="service.feed" type="application/x.atom+xml" href="http://paulmck.livejournal.com/data/atom" title="Paul E. McKenney's Journal"/>
  <link rel="hub" href="http://pubsubhubbub.appspot.com/"/>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:32267</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/32267.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=32267"/>
    <title>Transactional Memory Everywhere: Hardware Transactional Lock Elision</title>
    <published>2012-05-19T17:41:36Z</published>
    <updated>2012-05-21T23:55:48Z</updated>
    <category term="parallel"/>
    <category term="transactional memory everywhere"/>
    <content type="html">My earlier posting on hardware transactional memory (&lt;a href='http://paulmck.livejournal.com/31853.html'&gt;http://paulmck.livejournal.com/31853.html&lt;/a&gt;) brought an unusual amount of private email, especially on my discussion of the hazards of eliding empty critical sections (&lt;a href='http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyEmptyLock.html' rel='nofollow'&gt;http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyEmptyLock.html&lt;/a&gt;).  Several people made the interesting claim that any correct code involving empty lock-based critical sections that relies entirely on memory references is guaranteed either to: (1)&amp;nbsp;operate correctly under HTM or (2)&amp;nbsp;result in an abort, causing execution to fall back to the lock-based code, again operating correctly.  I invested more time than I care to admit unsuccessfully attempting to generate a counter-example, so I am becoming more inclined to believe them, despite the lack of a formal proof.&lt;br /&gt;&lt;br /&gt;There is a straightforward rationale for their claim, namely that in strongly atomic HTM implementations, the results of a given transaction are not visible until after the transaction completes.  So if you can see that the transaction started, it has already finished, at which point a no-op will successfully wait for it.  So any sequence of code that tests variables to determine when a given critical section has started, and then uses an empty lock-based critical section to wait for it to complete will operate correctly even when the empty critical section becomes essentially a no-op under hardware transactional lock elision.&lt;br /&gt;&lt;br /&gt;Of course, this would not be true of a weakly atomic HTM implementation, but as far as I know all the currently proposed production HTM implementations are strongly atomic.&lt;br /&gt;&lt;br /&gt;But there are other ways to communicate than relying on memory references, for example, you could instead rely on the passage of time.  Please note that relying on the passage of time is very difficult to get right, especially on today's super-scalar hardware that relies so heavily on speculative execution.  And if your code is running on top of a hypervisor, relying on timing is even more risky.  And if I catch you trying to sneak a timing-based patch into the Linux kernel, I will almost certainly NAK it.  However, older computer systems were much more amenable to use of timing, so it would be no surprise if large legacy software made use of such techniques.  The following is an example of what a timing-based algorithm might look like.&lt;br /&gt;&lt;br /&gt;Each worker thread corresponds to a data feed out to some receiver.  Each worker thread records the current time (e.g., from &lt;code&gt;clock_gettime()&lt;/code&gt;) to a per-thread timestamp after executing each work unit.  Because this is a per-thread timestamp, a normal write suffices.  Because this is a real-time application, it is a fatal error for a given thread to fail to update its per-thread timestamp for more than (say) 100 microseconds.  Results are placed into a shared-memory buffer, which is drained by a separate set of threads that transmit the results out over the network.  Locks are used sparingly to access and update global state, and, again given that this is a real-time application, locks are granted in FIFO order within priority level.&lt;br /&gt;&lt;br /&gt;Worker threads can finish, and when they do they must disentangle themselves from the rest of the application.  Worker threads also indicate their status in a thread-local variable my_status that is initialized to -1.  However, worker threads do not exit:  They instead go to a thread pool to accommodate later processing requirements.&lt;br /&gt;&lt;br /&gt;There is also a control thread that monitors the worker threads.  In particular, it maintains a histogram of thread statuses for threads that have exited.  This same thread is responsible for assigning new threads or reassigning old ones, and runs at a priority no higher than that of the worker threads.&lt;br /&gt;&lt;br /&gt;Worker threads do something like the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
	int my_status = -1;  /* Thread-local variable. */

	while (continue_working()) {
		enqueue_any_new_work(); /* Might include locks. */
		wp = dequeue_work();  /* Thread-local, no locking. */
		do_work(wp);  /* Might include locks. */
		my_timestamp = clock_gettime(...); /* Thread-local. */
	}

	acquire_lock(&amp;departing_thread_lock);

	/*
	 * disentangle from application, might acquire other locks,
	 * can take much longer than MAX_LOOP_TIME, especially if
	 * many threads exit concurrently.
	 */

	my_status = get_return_status();

	release_lock(&amp;departing_thread_lock);

	/* thread awaits repurposing. */
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;The control thread might do the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
	for (;;) {
		for_each_thread(t) {
			ct = clock_gettime(...);
		        d = ct - per_thread(my_timestamp, t);
			if (d &amp;gt;= MAX_LOOP_TIME) {
				/* thread departing. */
				acquire_lock(&amp;departing_thread_lock);
				release_lock(&amp;departing_thread_lock);
				i = per_thread(my_status, t);
				status_hist[i]++; /* Bad idea if TLE! */
			}
		}
		/* Repurpose threads as needed. */
	}
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Here the passage of time is used to ensure that the empty lock-based critical section happens after the departing worker thread has acquired the departing_thread_lock.  If the empty lock is allowed to become a no-op, then the per_thread(my_status, t) access can abort the departing thread's transaction, so that the result is the initial value of -1.  This cannot happen with locking.&lt;br /&gt;&lt;br /&gt;Note that enclosing the access to my_status in a lock/transaction does not change things.  This problem is not the extra-transactional access, but rather the structure of the application.&lt;br /&gt;&lt;br /&gt;Again, please don't try this sort of thing on superscalar CPUs (which is almost all of them these days), and especially please don't try it in the Linux kernel.  In fact, you should be very cautious about doing this sort of thing even on systems specially designed for hard real-time response.  But the key point is that if you have a large application that is not well understood, you might want to be careful about applying HTM-based lock elision to it.  This should not be a surprise: What you have is a real-time program, and there has not yet been much work on TM in real-time environments.&lt;br /&gt;&lt;br /&gt;Speaking of real-time environments, &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/boost.html" rel="nofollow"&gt;how does priority boosting interact with HTM-based lock elision&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Acknoowledgments: Many thanks to Josh Triplett, Mathieu Desnoyers, Jon Walpole, Phil Howard, and Stephan Diestelhorst for many illuminating discussions.  Please note that my acknowledgment of these people's contributions to my understanding of transactional lock elision should in no way be interpreted to imply their agreement with anything I say here.  ;-)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:32177</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/32177.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=32177"/>
    <title>2012 LPC Call For Proposals</title>
    <published>2012-03-26T16:17:05Z</published>
    <updated>2012-03-29T16:12:48Z</updated>
    <category term="linux plumbers conference"/>
    <content type="html">The Planning Committee for the Linux Plumbers Conference (LPC) is pleased to announce a call for refereed-track proposals for the 2012 edition of LPC, which will be held August 29-31 in San Diego, CA, USA.  Refereed-track presentations are about 45 minutes in length, and should focus on a specific aspect of the "plumbing" in the Linux system.  The Linux system's plumbing includes kernel subsystems, core libraries, windowing systems, management tools, media creation/playback, and so on.  Proposals are due at 11:59PM Pacific time on May 1, 2012.&lt;br /&gt;&lt;br /&gt;The best presentations are not about finished work, but rather problems, proposals, or proof-of-concept solutions that require face-to-face discussions and debate among people from different areas of the Linux plumbing.  Ideally, the best presentations are also working sessions that result in patches to various portions of Linux's plumbing that make the Linux world a better place for its developers and (most important) its users.&lt;br /&gt;&lt;br /&gt;A proposal should be short: just a couple of paragraphs describing the topic, why it is important, and what parts of the plumbing it touches.&lt;br /&gt;&lt;br /&gt;Proposals are due at 11:59PM Pacific Time on Tuesday, May 1st, 2012.  Authors will be notified by Tuesday May 15th, 2012.  We look forward to seeing your proposal, and to seeing you in San Diego!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;SUBMITTING A PROPOSAL&lt;/h3&gt;&lt;br /&gt;We are using the Launchpad infrastructure this year, but it is still easy to submit a proposal.  Go to &lt;a href="https://blueprints.launchpad.net/sprints/lpc-2012/+addspec" rel="nofollow"&gt;this URL&lt;/a&gt;, which will take you to an account-creation page.  However, if Launchpad doesn't know you, in which case please create a new Launchpad account so that it does know you.  Once you have a Launchpad account, the above URL will take you to the "Register a new blueprint" page.&lt;br /&gt;Once you get to the "Register a new blueprint" page:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt;	In the "Project" field, enter "lpc".&lt;br /&gt;&lt;li&gt;	In the "Name" field, put a short identifier for your talk.  Please do -not- put your own name, as Launchpad already knows who you are.&lt;br&gt;For refereed-track presentations:&lt;br /&gt;	&lt;ul&gt;&lt;br /&gt;	&lt;li&gt;	In the "Name" field, enter a short name for your presentation starting with "lpc2012-ref-" for refereed-track presentations (for example, "lpc2012-ref-Grand-Unified-FOSS-Project").&lt;br /&gt;	&lt;/ul&gt;&lt;br /&gt;	For microconference presentations:&lt;br /&gt;	&lt;ul&gt;&lt;br /&gt;	&lt;li&gt;	In the "Name" field, enter the code shown on that microconference's wiki.  For a few examples:&lt;br /&gt;		&lt;ul&gt;&lt;br /&gt;		&lt;li&gt;	Containers microconference: &amp;ldquo;lpc2012-cont-&amp;rdquo;&lt;br /&gt;		&lt;li&gt;	Real-time microconference: &amp;ldquo;lpc2012-rt-&amp;rdquo;&lt;br /&gt;		&lt;li&gt;	Scaling microconference: &amp;ldquo;lpc2012-scale-&amp;rdquo;&lt;br /&gt;		&lt;li&gt;	Virtualization microconference: &amp;ldquo;lpc2012-virt-&amp;rdquo;&lt;br /&gt;		&lt;/ul&gt;&lt;br /&gt;	&lt;/ul&gt;&lt;br /&gt;&lt;li&gt;	In the "Title" field, enter your proposal's one-line title.&lt;br /&gt;&lt;li&gt;	The "Specification URL" field can be left blank, but feel free to enter a URL pointing to additional information.&lt;br /&gt;&lt;li&gt;	In the "Summary" field, enter:&lt;br /&gt;	&lt;ol&gt;&lt;br /&gt;	&lt;li&gt;	Your abstract, which should be short (a couple of paragraphs), but should clearly describe the problem, the affected areas of the Linux plumbing, and the intended audience.&lt;br /&gt;	&lt;li&gt;	A one-paragraph bio, describing your experience.&lt;br /&gt;	&lt;/ol&gt;&lt;br /&gt;&lt;li&gt;	The "Assignee", "Drafter", and "Approver" fields may be left blank.&lt;br /&gt;&lt;li&gt;	Please leave the "Definition Status" in the "New" state.  (Changing this field can result in your submission being lost.)&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;Then click the "Register Blueprint" button to submit your proposal!  You will automatically be recorded as the person submitting the proposal.&lt;br /&gt;If you have any difficulty submitting your abstract, please email the details to contact@linuxplumbersconf.org.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:31853</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/31853.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=31853"/>
    <title>Transactional Memory Everywhere: 2012 Update for HTM</title>
    <published>2012-03-09T23:16:42Z</published>
    <updated>2012-03-12T15:07:28Z</updated>
    <category term="transactional memory everywhere"/>
    <content type="html">In a &lt;a href="http://paulmck.livejournal.com/31285.html"&gt;recent post&lt;/a&gt;, I called out some of the past year's activity in the area of &lt;a href="http://en.wikipedia.org/wiki/Transactional_memory" rel="nofollow"&gt;transactional memory (TM)&lt;/a&gt;.  This post takes a closer look at &lt;a href="http://en.wikipedia.org/wiki/Hardware_transactional_memory" rel="nofollow"&gt;hardware transactional memory (HTM)&lt;/a&gt;, with an eye to where it might fit into the parallel programmer's toolbox.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;But first, what is HTM?&lt;br /&gt;&lt;p&gt;Current HTM implementations make use of processor caches and speculative execution to ensure that a designated group of statements (called a &amp;ldquo;transaction&amp;rdquo;) executes atomically from the viewpoint of any other transaction.  The beginning and end of a transaction is marked by begin-transaction and commit-transaction machine instructions, respectively, and might also include abort-transaction instructions.  The transaction is executed within the confines of its CPU, so that its work is not visible to other CPUs until the commit-transaction instruction is executed.  An abort-transaction instruction squashes the speculative execution, discarding any changes that the transaction might have carried out, while also branching to a failure handler.  The location of the failure handler is normally specified by the begin-transaction instruction, either as an explicit address or by means of condition codes.  This failure handler might then either: (1)&amp;nbsp;retry the transaction, (2)&amp;nbsp;execute a fallback code sequence, for example, using locking, or (3)&amp;nbsp;otherwise handle the transaction's failure.  In this way, each transaction either executes atomically with respect to all other transactions, or is aborted with no changes to shared state.&lt;br /&gt;&lt;p&gt;So where does HTM fit into the parallel programmer's toolbox?  Ideally, we would like a classification of the applicability of HTM similar to that shown for &lt;a href="http://en.wikipedia.org/wiki/Read-copy-update" rel="nofollow"&gt;RCU&lt;/a&gt; in the diagram below:&lt;br /&gt;&lt;p&gt;&lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/RCU/RCUAreaApp.html" rel="nofollow"&gt;&lt;img src="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/RCU/RCUApplicability.png" width="520" height="280" alt="Best for read-mostly data where inconsistency is tolerated"&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;On the other hand, I have been developing, using, and maintaining RCU in production for almost two decades.  Because the oldest commercially available HTM implementation is still quite young by comparison, any attempt to similarly classify its use must necessarily rely on educated guesses, extrapolation, and speculation.  But I am most certainly not going to let that stop me from making a first attempt! :-)&lt;br /&gt;&lt;p&gt;The remainder of this posting will look at a number of questions that need to be asked of current commercially available HTM implementations, but without focusing on any particular implementation.  The answers will be primarily about HTM in the publicly documented here-and-now, though some additional speculation about possible future implementations will inevitably leak in.  This additional speculation will draw on selected academic research projects.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Does HTM Belong In The Parallel Programmer's Toolbox?&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;The first question we need to ask is whether HTM has any place at all in the parallel programmer's toolbox.  After all, as the new entrant, it must prove its worth compared to any number of concurrency-control mechanisms that have been in production use for decades.  In addition, there has been no shortage of technologies that have roused great excitement but eventually failed of their promise, a historical tendency that is greatly illuminated by &lt;a href="http://medicine.plosjournals.org/perlserv?request=get-document&amp;amp;doi=10.1371/journal.pmed.0020124" rel="nofollow"&gt;Ioannidis's Sixth Corrollary&lt;/a&gt;.&lt;br /&gt;&lt;p&gt;Ioannidis notwithstanding, it seems quite likely that the answer to this first question is in the affirmative.  To quote &lt;a href="http://portal.acm.org/citation.cfm?id=1842733.1842749" rel="nofollow"&gt;Why The Grass May Not Be Greener On The Other Side: A Comparison of Locking vs. Transactional Memory&lt;/a&gt;, &amp;ldquo;An important TM near-term opportunity is thus update-heavy workloads using large non-partitionable data structures such as high-diameter unstructured graphs.&amp;rdquo; (Disclaimer: I co-authored this paper, which is a revision of the &lt;a href="http://doi.acm.org/10.1145/1376789.1376798" rel="nofollow"&gt;2007 PLOS paper by the same name&lt;/a&gt; with revised presentation &lt;a href="http://www.rdrop.com/users/paulmck/scalability/paper/TMevalSlides.2008.10.19a.pdf" rel="nofollow"&gt;here&lt;/a&gt;.) Although there are other mechanisms that can be used to handle large update-heavy non-partitionable data structures, these other methods suffer from cache-locality problems.  There is thus hope that HTM can provide performance advantages in this area.  In addition, use of HTM for transactional lock elision promises to greatly reduce the number of cache misses associated with lock acquisition and release, which is likely to provide large performance advantages to HTM for short lock-based critical sections&amp;mdash;at least in cases where none of the oft-written variables protected by the elided lock share a cache line with that lock.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Should HTM Be Used Universally?&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;Given that HTM very likely has a place in the parallel programmer's toolbox, the logical next question to ask is whether parallel programmers can simplify their lives by just using HTM for everything.&lt;br /&gt;&lt;p&gt;The answer to this question is an emphatic &amp;ldquo;no&amp;rdquo; for the following reasons:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt;	HTM is unable to handle non-idempotent operations, such as &lt;a href="http://paulmck.livejournal.com/10539.html"&gt;unbuffered I/O&lt;/a&gt; (especially things like &lt;a href="http://paulmck.livejournal.com/10912.html"&gt;remote procedure calls&lt;/a&gt;) and system calls including &lt;a href="http://paulmck.livejournal.com/11245.html"&gt;memory mapping&lt;/a&gt; and &lt;a href="http://paulmck.livejournal.com/13370.html"&gt;exec()&lt;/a&gt;.  This limitation appears to be inherent to HTM.&lt;br /&gt;&lt;li&gt;	HTM limits maximum transaction size.  &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyHTMSizeLim.html" rel="nofollow"&gt;So why do current commercially available HTM implementations limit transaction size and what can be done about it?&lt;/a&gt;&lt;br /&gt;&lt;li&gt;	HTM currently lacks forward-progress guarantees.  &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyHTMNoFwdProg.html" rel="nofollow"&gt;So why do current commercially available HTM implementations lack forward-progress guarantees?&lt;/a&gt;&lt;br /&gt;&lt;li&gt;	Even with forward-progress guarantees, HTM is subject to aborts and rollbacks, which (aside from wasting energy) are failure paths.  Failure code paths are in my experience difficult to work with.  The possibility of failure is not handled particularly well by human brain cells, which are programmed for optimism.  Failure code paths also pose difficulties for validation, particularly in cases where the probability of failure is low or in cases where multiple failures are required to reach a given code path.&lt;br /&gt;&lt;li&gt;	HTM is subject to thorny validation issues, including the inability to usefully set breakpoints in or single-step through transaction.  In addition, although transactional lock elision might greatly reduce the probability of deadlock, the fact that the fallback code might be executed means that fallback-code deadlock cannot be ignored.  Finally, in many cases the fallback code will be invoked quite infrequently, which might allow fallback-code bugs (including performance problems involving high levels of lock contention) to escape detection during validation, thus inflicting themselves on users.  Use of HTM will therefore likely require painstaking attention at validation time, and also tools to detect deadlock and exercise fallback code.&lt;br /&gt;&lt;li&gt;	There are subtle semantic differences between locking and transactional lock elision.  One example is interactions with outside accesses as &lt;a href="http://www.cis.upenn.edu/acg/papers/wddd05_atomic_semantics.pdf" rel="nofollow"&gt;shown by Blundell et al&lt;/a&gt;.  Another example is the empty lock-based critical section, which waits for all prior critical sections for locking, but is a no-op when all concurrent lock-based critical sections have been elided in favor of HTM execution.  This use of locking as a message-passing mechanism can also be used in non-empty critical sections. (More on this &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyEmptyLock.html" rel="nofollow"&gt;here&lt;/a&gt;.)&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;p&gt;We can see that HTM is useful on the one hand, but has substantial limitations on the other.  Therefore, the next section looks at where HTM is most likely to be helpful.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Where is HTM Most Likely to be Helpful?&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;HTM is likely to be at its best for large in-memory data structures that are difficult to statically partition but that are dynamically partitionable, in other words, the conflict probability is reasonably low.  There must be a reasonable non-TM fallback algorithm for every transaction.  The workload should ideally be update-heavy with small accesses and updates, and not subject to aggressive real-time constraints.  Finally, if HTM is used for transactional lock elision, any empty critical sections must continue to use explicit locking.&lt;br /&gt;&lt;p&gt;&lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/TransactionalMemoryEverywhere/WhyHTMOpt.html" rel="nofollow"&gt;Why is this situation best for HTM?&lt;/a&gt;&lt;br /&gt;&lt;p&gt;A thought experiment involving a red-black tree might be helpful.&lt;br /&gt;&lt;p&gt;First, consider a red-black tree that supports insertions, deletions, and lookups of single elements, but where all of these APIs return the exact number of elements in the tree.  In this case, the resulting transactions will be very prone to conflicts on the variable in which the element count is maintained, resulting in poor performance and scalability, especially for update-heavy workloads.&lt;br /&gt;&lt;p&gt;This should not be surprising, because returning the size causes insertion and deletion to be &lt;a href="http://lwn.net/Articles/423994" rel="nofollow"&gt;strongly non-commutative&lt;/a&gt;.  Maintaining and returning a consistent count is simply bad for parallelism.&lt;br /&gt;&lt;p&gt;Therefore, let's next consider a red-black tree with insertion, deletion, and lookup, but without the exact count of the number of elements in the tree.  In this case, if the tree is large, the conflict probabilities between random insertion, deletion, and lookup operations is extremely low.  In this case, HTM is likely to perform and scale quite well.&lt;br /&gt;&lt;p&gt;Finally, let's add an API that enumerates all the the nodes in the red-black tree.  A transaction implementing this API will conflict with all concurrent insertion or deletion operations, severely limiting performance and scalability.  In many cases, this situation can be alleviated by using hazard pointers or RCU to protect these large read-only accesses.  Although the RCU/hazard-pointer reader can still conflict with updates, the conflict window is now limited to each single read-side load, instead of extending across the entire read-side operation, as is the case for transactions. (RCU and hazard pointers could help even more if their loads didn't generate conflicts, but instead returned the old value of any variable written by an in-flight transaction, but current HTM implementations do not appear to do this.)&lt;br /&gt;&lt;p&gt;This last example illustrates the importance of using combinations of synchronization mechanisms in ways that play to each mechanism's strengths.&lt;br /&gt;&lt;br /&gt;&lt;h3&gt;Summary&lt;/h3&gt;&lt;br /&gt;&lt;p&gt;In summary, although it appears that HTM will be able to earn a place in the parallel programmer's toolbox, it is not a magic wand with which to wish away all concurrency problems.  Like every other tool in the toolbox, it will be necessary to carefully consider whether HTM is the right tool for a particular job.  Furthermore, like every other tool in the toolbox, it may in some cases be necessary to tune, restructure, or even redesign your code in order to obtain the full benefits of HTM.&lt;br /&gt;&lt;p&gt;HTM should therefore be an interesting and exciting learning experience for all concerned.  ;-)&lt;br /&gt;&lt;p&gt;(Thanks to a great number of people, especially Jon Walpole, Josh Triplett, and Andi Kleen for a number of illuminating discussions on TM in general and HTM in particular.)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:31622</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/31622.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=31622"/>
    <title>2012 LPC Call For Microconference Topics</title>
    <published>2012-03-01T14:39:47Z</published>
    <updated>2012-03-01T15:42:59Z</updated>
    <category term="linux plumbers conference"/>
    <content type="html">The 2012 Linux Plumbers Conference (LPC) will be held on August 29-31 in the Sheraton San Diego, and we hope to see you there!&lt;br /&gt;&lt;br /&gt;To that end, the LPC Planning Committee is pleased to announce a call for microconferences. These microconferences are working sessions that are roughly a half day in length, each focused on a specific aspect of the “plumbing” in the Linux system. The Linux system’s plumbing includes kernel subsystems, core libraries, windowing systems, media creation/playback, and so on. For reference, &lt;a href="http://www.linuxplumbersconf.org/2011/" rel="nofollow"&gt;last year’s LPC&lt;/a&gt; had tracks on Audio, Bufferbloat and Networking, Cloud, Containers and Cgroups, Desktop, Development Tools, Early Boot and Init Systems, File and Storage Systems, Mobile, Power Management, Scaling, Tracing, Unified Memory Management, and Virtualization.&lt;br /&gt;&lt;br /&gt;Please note that submissions to a given microconference should not normally cover finished work. The best submissions are instead problems, proposals, or proof-of-concept solutions that require face-to-face discussions and debate among people from different areas of the Linux plumbing. In other words, the best microconferences are working sessions that turn problems into patches representing solutions.&lt;br /&gt;&lt;br /&gt;Leading an LPC microconference can be a fun, exciting, and rewarding activity, but please see &lt;a href="http://wiki.linuxplumbersconf.org/2012:responsibilities_of_a_working_session_leader" rel="nofollow"&gt;here&lt;/a&gt; for the responsibilities of a microconference working session leader. If you have an idea for a good LPC microconference, and especially if you would like to lead up a particular microconference, please add it to the LPC wiki &lt;a href="http://wiki.linuxplumbersconf.org/2012:topics" rel="nofollow"&gt;here&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:31285</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/31285.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=31285"/>
    <title>Transactional Memory Everywhere: 2012 Update</title>
    <published>2012-02-12T02:22:34Z</published>
    <updated>2012-02-12T19:33:50Z</updated>
    <category term="parallel"/>
    <category term="transactional memory everywhere"/>
    <content type="html">The past year has been a busy one for &lt;a href="http://en.wikipedia.org/wiki/Transactional_memory" rel="nofollow"&gt;transactional memory (TM)&lt;/a&gt;.  IBM's &lt;a href="http://arstechnica.com/hardware/news/2011/08/ibms-new-transactional-memory-make-or-break-time-for-multithreaded-revolution.ars" rel="nofollow"&gt;Blue Gene/Q&lt;/a&gt; and Intel's &lt;a href="http://software.intel.com/en-us/blogs/2012/02/07/transactional-synchronization-in-haswell/" rel="nofollow"&gt;Haswell TSX&lt;/a&gt; have joined &lt;a href="http://research.sun.com/scalable/pubs/ASPLOS2009-RockHTM.pdf" rel="nofollow"&gt;Sun Rock&lt;/a&gt; and Azul's &lt;a href="http://www.azulsystems.com/blog/cliff-click/2009-02-25-and-now-some-hardware-transactional-memory-comments" rel="nofollow"&gt;Vega 2&lt;/a&gt; in offering &lt;a href="http://en.wikipedia.org/wiki/Hardware_transactional_memory" rel="nofollow"&gt;hardware transactional memory (HTM)&lt;/a&gt;.  All of these implementations seem to be focusing on &lt;a href="http://paulmck.livejournal.com/13841.html"&gt;TM in the small&lt;/a&gt;, wisely in my opinion, given TM's weak support for many programming-in-the-large use cases, particularly &lt;a href="http://paulmck.livejournal.com/10539.html"&gt;I/O&lt;/a&gt; and &lt;a href="http://paulmck.livejournal.com/13370.html"&gt;system calls&lt;/a&gt;.  A number of TM researchers seem to be coming around to this view, as evidenced by slide&amp;nbsp;279 of &lt;a href="http://www.cl.cam.ac.uk/~mgk25/u../teaching/1112/R204/slides-tharris.pdf" rel="nofollow"&gt;these lecture slides&lt;/a&gt;.  All of this is to the good, especially given some of the &lt;a href="http://www.theregister.co.uk/2008/07/28/sun_dziuba_tm/" rel="nofollow"&gt;unrealistically high expectations&lt;/a&gt; that some people have harbored for TM.&lt;br /&gt;&lt;br /&gt;So what do these HTM implementations offer?  Perhaps it can best be thought of as an extension of &lt;a href="http://en.wikipedia.org/wiki/Load-link/store-conditional" rel="nofollow"&gt;LL/SC&lt;/a&gt; or &lt;a href="http://en.wikipedia.org/wiki/Compare-and-swap" rel="nofollow"&gt;CAS&lt;/a&gt; that operate on more than one memory location, with the number being limited by hardware considerations such as cache geometry.  As with both LL/SC and CAS, TM can fail, both due to conflicts between concurrently executing transactions and because of hardware events such as exceptions and cache-line conflicts.  Interestingly enough, this means that in many cases, hardware transactions must have some other synchronization mechanism (such as locking!) as a fallback.  Unfortunately, this means that you cannot count on HTM to simplify deadlock cycles.  However, it might well increase performance for some common types of large non-statically-partitionable data structures subject to smallish updates.  The canonical example of such a data structure seems to be &lt;a href="http://en.wikipedia.org/wiki/Red%E2%80%93black_tree" rel="nofollow"&gt;red-black trees&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;One thing that disappoints me personally about all of these mechanisms is their limited support for RCU.  Don't get me wrong, you &lt;i&gt;can&lt;/i&gt; use RCU with HTM updates.  However, bare RCU readers will typically cause HTM updaters to unconditionally abort.  Although RCU's purpose is in fact to favor readers, this is entirely too much of a good thing.  For ideas for improved interactions between TM and RCU, please see &lt;a href="http://paulmck.livejournal.com/13764.html"&gt;an earlier posting&lt;/a&gt;.  It is also unclear to what extent HTM helps in cases involving severe real-time-response constraints.&lt;br /&gt;&lt;br /&gt;There have also been some interesting &lt;a href="http://en.wikipedia.org/wiki/Software_transactional_memory" rel="nofollow"&gt;software transactional memory (STM)&lt;/a&gt; papers.  Pankratius and Adl-Tabatabai published a productivity comparison in which the highest productivity was attained by teams that used both STM and locking.  Although one can argue that &lt;a href="http://www.cs.rochester.edu/u/scott/papers/2008_TRANSACT_inevitability.pdf" rel="nofollow"&gt;inevitable transactions&lt;/a&gt; will subsume the uses of locking in the Pankratius paper, inevitable transactions are normally implemented as a global lock. sharply limiting I/O scalability.&lt;br /&gt;&lt;br /&gt;Dragojevic et al. published what is often viewed as a riposte to Cascaval et al.'s &lt;a href="http://queue.acm.org/detail.cfm?id=1454466" rel="nofollow"&gt;Software Transactional Memory: Why Is It Only a Research Toy?&lt;/a&gt; in the CACM article entitled &lt;a href="http://dl.acm.org/citation.cfm?id=1924440" rel="nofollow"&gt;Why STM can be more than a Research Toy&lt;/a&gt; (see &lt;a href="http://lpd.epfl.ch/gramoli/doc/pubs/DFGG09.pdf" rel="nofollow"&gt;here&lt;/a&gt; for a related technical report).  The Dragojevic article has rare graphs showing semi-reasonable scalability, with up to 12 times sequential execution rate on 16 CPUs, which is certainly not splendid, but neither is it altogether embarrassing.  However, that speedup is the best results from a set of 17 benchmarks, many of which show negative scalability.&lt;br /&gt;&lt;br /&gt;But a closer reading shows that Dragojevic's and Cascaval's ideas of exactly what constitutes &amp;ldquo;software transactional memory&amp;rdquo; are quite different.  Dragojevic's results use a variant of STM that takes hints from the programmer in order to indicate which data is shared or not.  This is an interesting hack, and it is hard to argue with the improvement over straight STM, but it does seem to back away from the earlier TM promises of transparent parallelism.&lt;br /&gt;&lt;br /&gt;These hints raise some interesting possibilities.  Suppose that the programmer also hinted that certain pairs of transactions could never conflict due to accessing disjoint data.  One could take this a step further and use names for different disjoint subsets of the data.  Such hints could greatly reduce or even remove the need for complex contention managers and associated aborts and rollbacks.  But the best thing about this sort of scheme is that it has seen heavy production use with good performance and scalability extending back for decades.  It is called &amp;ldquo;locking&amp;rdquo;.  ;-)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:31058</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/31058.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=31058"/>
    <title>What is the overhead of rcu_read_lock()?</title>
    <published>2012-01-31T18:36:03Z</published>
    <updated>2012-02-01T05:39:24Z</updated>
    <category term="linaro"/>
    <category term="parallel"/>
    <category term="linux"/>
    <category term="stupid rcu tricks"/>
    <content type="html">A recent post to &lt;a href="http://lkml.org/lkml" rel="nofollow"&gt;LKML&lt;/a&gt; stated that the patch in question did not plan to hold any global locks, including &lt;code&gt;rcu_read_lock()&lt;/code&gt;, presumably because of concerns about contention or overhead.  This blog entry is intended to help address any lingering concerns about &lt;code&gt;rcu_read_lock()&lt;/code&gt; contention and overhead.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;To be fair, at first glance, &lt;code&gt;rcu_read_lock()&lt;/code&gt;'s source code does look a bit scary and slow:&lt;br /&gt;&lt;pre&gt;
static inline void rcu_read_lock(void)
{       
        __rcu_read_lock();
        __acquire(RCU);
        rcu_lock_acquire(&amp;rcu_lock_map);
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;However, a closer look reveals that both &lt;code&gt;__acquire()&lt;/code&gt; and &lt;code&gt;rcu_lock_acquire()&lt;/code&gt; compile to nothing in production kernels (&lt;code&gt;CONFIG_PROVE_LOCKING=n&lt;/code&gt;).  This leaves &lt;code&gt;__rcu_read_lock()&lt;/code&gt;, which is compiled differently for different settings of &lt;code&gt;CONFIG_PREEMPT&lt;/code&gt;.&lt;br /&gt;&lt;p&gt;Let's start with &lt;code&gt;CONFIG_PREEMPT=n&lt;/code&gt;.  We have:&lt;br /&gt;&lt;pre&gt;
static inline void __rcu_read_lock(void)
{       
        preempt_disable();
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;And, again for &lt;code&gt;CONFIG_PREEMPT=n&lt;/code&gt;:&lt;br /&gt;&lt;pre&gt;
#define preempt_disable()               do { } while (0)
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The overall result for &lt;code&gt;rcu_read_lock()&lt;/code&gt; when &lt;code&gt;CONFIG_PREEMPT=n&lt;/code&gt; is therefore as follows:&lt;br /&gt;&lt;pre&gt;
static inline void rcu_read_lock(void)
{       
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Similar analysis of rcu_read_unlock()&amp;lt;/code&amp;gt; reveals that it is also an empty static inline function for &lt;code&gt;CONFIG_PREEMPT=n&lt;/code&gt;.  It is to be hoped that this is sufficiently lightweight for most practical purposes.  If you find a case where it is too heavyweight, I would be very interested in hearing about it!&lt;br /&gt;&lt;p&gt;That leaves &lt;code&gt;CONFIG_PREEMPT=y&lt;/code&gt;, which actually has executable code in its definition of &lt;code&gt;__rcu_read_lock()&lt;/code&gt; as follows:&lt;br /&gt;&lt;pre&gt;
void __rcu_read_lock(void)
{       
        current-&amp;gt;rcu_read_lock_nesting++;
        barrier();
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The first statement is a simple non-atomic increment of a simple &lt;code&gt;int&lt;/code&gt; that is located in the task's own &lt;code&gt;task_struct&lt;/code&gt;.  The &lt;code&gt;barrier&lt;/code&gt; in the second statement expands as follows:&lt;br /&gt;&lt;pre&gt;
#define barrier() __asm__ __volatile__("": : :"memory")
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This is an empty asm that generates no code, but that does disable code-motion optimizations that might otherwise move memory references across the &lt;code&gt;barrier()&lt;/code&gt; statement.  So, the executable code for &lt;code&gt;rcu_read_lock()&lt;/code&gt; for &lt;code&gt;CONFIG_PREEMPT=y&lt;/code&gt; is as follows:&lt;br /&gt;&lt;pre&gt;
void rcu_read_lock(void)
{       
        current-&amp;gt;rcu_read_lock_nesting++;
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;A similar analysis of &lt;code&gt;rcu_read_unlock()&lt;/code&gt; for &lt;code&gt;CONFIG_PREEMPT=y&lt;/code&gt; yields the following:&lt;br /&gt;&lt;pre&gt;
void __rcu_read_unlock(void)
{
        struct task_struct *t = current;

        if (t-&amp;gt;rcu_read_lock_nesting != 1)
                --t-&amp;gt;rcu_read_lock_nesting;
        else {
                t-&amp;gt;rcu_read_lock_nesting = INT_MIN;
                if (unlikely(ACCESS_ONCE(t-&amp;gt;rcu_read_unlock_special)))
                        rcu_read_unlock_special(t);
                t-&amp;gt;rcu_read_lock_nesting = 0;
        }
}
&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The common case of a single level of &lt;code&gt;rcu_read_lock()&lt;/code&gt; nesting executes the &lt;code&gt;else&lt;/code&gt; clause of the first &lt;code&gt;if&lt;/code&gt; statement, and only executes the &lt;code&gt;then&lt;/code&gt; clause of the second &lt;code&gt;if&lt;/code&gt; statement when the RCU read-side critical section was either preempted or ran for several milliseconds.&lt;br /&gt;&lt;p&gt;So in the common case, &lt;code&gt;rcu_read_unlock()&lt;/code&gt; for &lt;code&gt;CONFIG_PREEMPT=y&lt;/code&gt; executes two tests of task-local variables and two assignments to task-local variables.&lt;br /&gt;&lt;p&gt;This should be sufficiently lightweight for most purposes.&lt;br /&gt;&lt;p&gt;Of course, RCU is intended for read-mostly situations, and RCU updates can have significant overhead, incurring significant latency, CPU overhead, and/or cache misses.  That said, there are some special cases where RCU updates can be extremely fast, as shown in Figures&amp;nbsp;12 and&amp;nbsp;13 of the supplementary materials to &lt;a href="http://doi.ieeecomputersociety.org/10.1109/TPDS.2011.159" rel="nofollow"&gt;User-Level Implementations of Read-Copy Update&lt;/a&gt;.  (No, the supplementary materials are &lt;i&gt;not&lt;/i&gt; behind a paywall: Click on the &amp;ldquo;Supplemental Material(PDF)&amp;rdquo; link.)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:30936</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/30936.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=30936"/>
    <title>User-Level Implementations of Read-Copy Update</title>
    <published>2011-12-29T21:34:21Z</published>
    <updated>2011-12-29T21:34:21Z</updated>
    <category term="readings"/>
    <content type="html">Woo-hoo!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.computer.org/csdl/trans/td/2012/02/ttd2012020375-abs.html" rel="nofollow"&gt;User-Level Implementations of Read-Copy Update&lt;/a&gt; has appeared in the February 2012 issue of &lt;a href="http://www.computer.org/portal/web/tpds" rel="nofollow"&gt;IEEE Transactions on Parallel and Distributed Systems&lt;/a&gt;.  Many thanks to everyone involved, especially co-authors Jon Walpole, Michel R. Dagenais, Alan Stern (who did the symbolic-logic heavy lifting), and Mathieu Desnoyers (who is the lead author).  Mathieu also managed to convince me to go once more into the breach, which was not an easy task given that I received my license to collect &lt;a href="http://www.rdrop.com/users/paulmck/RCU" rel="nofollow"&gt;RCU&lt;/a&gt; rejection notices all the way back in 1995.  ;-)&lt;br /&gt;&lt;br /&gt;So it does feel very good to see this finally hit print!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:30643</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/30643.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=30643"/>
    <title>Confessions of a Recovering Proprietary Programmer, Part VIII</title>
    <published>2011-12-29T04:13:20Z</published>
    <updated>2011-12-29T04:24:53Z</updated>
    <category term="real-time"/>
    <category term="confessions"/>
    <content type="html">My presentation at the &lt;a href="https://www.osadl.org" rel="nofollow"&gt;Real Time Linux Workshop&lt;/a&gt; this past October, titled &amp;ldquo;&lt;a href="https://www.osadl.org/?id=1198" rel="nofollow"&gt;On migrate_disable() and Lantencies&lt;/a&gt;&amp;rdquo; (&lt;a href="http://www.rdrop.com/users/paulmck/realtime/paper/MigrateDisableTheory.2011.10.29a.pdf" rel="nofollow"&gt;presentation&lt;/a&gt;), was a bit of a departure for me. This presentation used a &lt;a href="http://en.wikipedia.org/wiki/Markov_model" rel="nofollow"&gt;Markov model&lt;/a&gt; to analyze the behavior of some recent changes to the scheduler for the 3.0 series of -rt kernels.&lt;br /&gt;&lt;br /&gt;Although this approach produced some interesting results, one difficulty is that a number of the corresponding scheduler measurement simply do not fit the exponential distribution very well.  This question of course came up during my talk, where an audience member suggested instead using the Erlang distribution.  Unfortunately, my only memory of Erlang distributions was of a 1980s operations-research class, where I learned how to use an Erlang distribution, but not why anyone would want to, at least not beyond the professor's vague assurances that it is helpful when modeling telephony networks.&lt;br /&gt;&lt;br /&gt;So I answered that I might consider an Erlang distribution, but that I figured that I could match the data quite well by using cascaded Markov-model stages to represent a single state in the higher-level model.  The big advantage of this cascading approach is that the math and software remains the same: You simply map additional states into the model.&lt;br /&gt;&lt;br /&gt;However, my work reducing RCU's need for scheduler-clock ticks took precedence, so it was only recently that I got time to work out the math for cascaded Markov-model stages.  I got the results I expected, but I figured that I should also do a quick review of the Erlang distribution.  So I got out my old copy of &amp;ldquo;Introduction to Operations Research&amp;rdquo; by Hillier and Lieberman.  Imagine my surprise to learn that the Erlang distribution is &lt;i&gt;exactly&lt;/i&gt; cascaded Markov-model stages!&lt;br /&gt;&lt;br /&gt;So my response to the question during my talk was essentially: &amp;ldquo;I might try the Erlang distribution, but I am going to try deriving it from scratch first.&amp;rdquo;  Oh well, I would much rather look foolish with the correct answer than to look smart with the wrong answer!&lt;br /&gt;&lt;br /&gt;On the other hand, this approach did give me a very good understanding of not only how to use the Erlang distribution, but also how to derive it and why you might want to use it.  :-)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:30386</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/30386.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=30386"/>
    <title>The accretion of meaning</title>
    <published>2011-12-26T22:22:09Z</published>
    <updated>2011-12-26T22:22:09Z</updated>
    <category term="language"/>
    <category term="readings"/>
    <content type="html">Noam Chomsky once wrote &lt;a href="http://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_furiously" rel="nofollow"&gt;&amp;ldquo;Colorless green ideas sleep furiously&amp;rdquo;&lt;/a&gt; as an example of a sentence that is grammatically correct but nonsensical.  However, my daughter Sarah and I were discussing this earlier today, and each of us managed to generate meanings for this phrase.&lt;br /&gt;&lt;br /&gt;Sarah:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Colorless: Uninspiring to the lumpen proletariat.&lt;br /&gt;&lt;li&gt; Green: Pertaining to improving the environment.&lt;br /&gt;&lt;li&gt; Sleep: Ignored by mainstream words and actions.&lt;br /&gt;&lt;li&gt; Furiously: Angering the idea's proponents.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In other words, uninspiring ideas for improving the environment are ignored by the mainstream, to the fury of their proponents.&lt;br /&gt;&lt;br /&gt;Paul:&lt;br /&gt;&lt;ul&gt;&lt;br /&gt;&lt;li&gt; Colorless: Pertaining to transparency, as in window glass and also as in &lt;a href="http://spectrum.ieee.org/biomedical/devices/transparent-transistors" rel="nofollow"&gt;transparent transistors&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; Sleep: Residing in an idle state, as in idle CPUs.&lt;br /&gt;&lt;li&gt; Furiously: Consuming excessive quantities of electrical power.&lt;br /&gt;&lt;/ul&gt;&lt;br /&gt;In other words, if you fail to specify &lt;code&gt;CONFIG_NO_HZ=n&lt;/code&gt; when building the Linux kernel for a computer constructed of transparent transistors fabbed onto a pane of glass that controls that pane of glass, this colorless green idea will sleep furiously.&lt;br /&gt;&lt;br /&gt;In both cases, the key element is the recently added meaning for the word &amp;ldquo;green&amp;rdquo;: As the word &amp;ldquo;green&amp;rdquo; has accreted a meaning, so has the sentence &amp;ldquo;Colorless green ideas sleep furiously.&amp;rdquo;&lt;br /&gt;&lt;br /&gt;However, it turns out that Sarah's and my line of thought has been anticipated &lt;a href="http://en.wikipedia.org/wiki/Colorless_green_ideas_sleep_furiously" rel="nofollow"&gt;here&lt;/a&gt;, &lt;a href="http://www.tiac.net/~cri/1997/chomsky.html" rel="nofollow"&gt;here&lt;/a&gt;, and &lt;a href="http://web.archive.org/web/20060830210332/http://www-linguistics.stanford.edu/Archives/Sesquipedalian/1996-97/msg00033.html" rel="nofollow"&gt;here&lt;/a&gt;, and most probably elsewhere as well.&lt;br /&gt;&lt;br /&gt;But that is OK.  It turns out that Chomsky himself was also anticipated by &lt;a href="http://en.wikipedia.org/wiki/Lucien_Tesni%C3%A8re" rel="nofollow"&gt;Lucien Tesnière&lt;/a&gt;, the game &lt;a href="http://en.wikipedia.org/wiki/Exquisite_corpse" rel="nofollow"&gt;cadavre exquis&lt;/a&gt;, and possibly also &lt;a href="http://en.wikipedia.org/wiki/Bertrand_Russell" rel="nofollow"&gt;Bertrand Russell&lt;/a&gt;.  Furthermore, a poet managed to accrete meaning onto Russell's &amp;ldquo;Quadruplicity drinks procrastination,&amp;rdquo; as can be seen &lt;a href="http://lilith.gotdns.org/~victor/writings/0044russell.htm" rel="nofollow"&gt;here&lt;/a&gt;.  The poet had originally intended to accrete meaning onto Chomsky's sentence, but, finding that others had beat him to it, turned to Russell's sentence instead.&lt;br /&gt;&lt;br /&gt;The fact is that thinking up a new-to-you idea can be just as much fun as thinking up a new-to-the-human-race idea.  Perhaps there really is nothing new under the sun.  Even if there is something new under the sun, the human race is not the only thing under the sun!  ;-)</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:30164</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/30164.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=30164"/>
    <title>Confessions of a Recovering Proprietary Programmer, Part VII</title>
    <published>2011-12-15T21:54:19Z</published>
    <updated>2011-12-15T21:54:19Z</updated>
    <category term="confessions"/>
    <content type="html">My work on RCU does require a pioneering spirit.  For example, there are no classes to guide my efforts other than those I teach, and there are no publications to draw from other than those I write.  One saving grace is that I work in the Linux community, which means that people can (and often do!) contribute their thoughts and ideas, many of which are now reflected throughout the Linux kernel's RCU implementation.  (Thank you all!  You know who you are, and there are too many of you to name you all.  If you want the list, the &lt;code&gt;git log&lt;/code&gt; command is your friend.)  Nevertheless, being too afraid to stray from the beaten path implies being too afraid to work on RCU.&lt;br /&gt;&lt;br /&gt;But there are times when the RCU implementation needs a more sane approach.  During those times, I must find some other outlet for my insanity: To do otherwise is to break RCU.  Fortunately, this time around, an appropriate outlet was readily available in the guise of Ubuntu's new Unity window manager.&lt;br /&gt;&lt;br /&gt;I decided to emulate the environment of a typical Linux hacker.  This meant installing, configuring, and using Unity without the advice and counsel of my acquaintances within Ubuntu.  To those acquaintances who might feel some irritation at the contents of the remainder of this blog entry, I do apologize in advance.  However, experiments are invalid unless the environment is properly controlled, and part of the control for this experiment was to isolate myself from such help.  I did search the web, including of course &lt;a href="http://ubuntuforums.org/" rel="nofollow"&gt;ubuntuforums.org&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;So here are the issues I encountered, more or less in the order I encountered them:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Right-clicking doesn't give you a way to configure the desktop, aside from setting the background image (pure black for me!).  I found the answer in ubuntuforums.org: install and run &amp;ldquo;ccsm&amp;rdquo; to make major changes desktop configuration.&lt;br /&gt;&lt;li&gt; I work with large numbers of xterms, so that each desktop has nine 24x80 xterms in a three-by-three pattern.  (And yes, when screens were smaller, I used a four-by-four pattern.)  I use a script creatively named &amp;ldquo;xterms&amp;rdquo; to create them, and I expect them to be automatically placed in a non-overlapping three-by-three pattern, which they did under Gnome.  But under Unity, many of them will be placed directly on top of each other.  The solution is to add a &amp;ldquo;sleep&amp;nbsp;0.250&amp;ldquo; in my script's loop.  So Unity appears to be trying to do the right thing, but is a bit slow on the uptake.  I learned about this experimentally, mostly because when you query for &amp;ldquo;tiled&amp;rdquo; you get advice on how to make your windows &lt;i&gt;never&lt;/i&gt; overlap.  In contrast, I want my windows to be non-overlapping by default, but if I am (say) debugging &lt;code&gt;rcu_start_gp()&lt;/code&gt;, I want to be able to expand the window from 24x80 vertically to use the full screen size, and in that case, I am happy with the resulting overlapping windows.&lt;br /&gt;&lt;li&gt; Unity uses &amp;ldquo;workspaces&amp;rdquo; rather than &amp;ldquo;desktops&amp;rdquo;.  Unfortunately, there doesn't seem to be to identify the windows of a given type that have been minimized from a given workspace.  So if I have nine xterms in one workspace for my RCU work and another nine in another workspace for working on a paper, clicking the xterm button gets me all 18, shuffled around so that I cannot easily tell which goes with which workspace.  Perhaps shift-click should show only those xterms associated with the current workspace!&lt;br /&gt;&lt;li&gt; I tried to work around the above problem by creating multiple desktops via &amp;ldquo;ccsm&amp;rdquo;.  However, although the additional desktops exist, Unity cannot show you any windows assigned to them.  The only way to see them again is to reduce the number of desktops back to 1, which will force them back onto the sole remaining desktop.  (This might actually be a useful feature, but...)  Worse yet, when you have more than one desktop, you lose the ability to move a given window to some other workspace by right-clicking on it: Instead, you can only move it to other desktops.  Longer term, Unity should more gracefully handle multiple desktops.  Until then, &amp;ldquo;ccsm&amp;rdquo; should not offer to create more than one desktop.  And until then, just say &amp;ldquo;no&amp;rdquo; to the temptation to create multiple desktops.  Use workspaces instead.&lt;br /&gt;&lt;li&gt; My habit of clicking on icons at the lower right corner of my screen to move among desktops died hard, but the window-s hotkey does turn out to be very nice.  When you hit window-s, you get a screen that shows you all your workspaces, and you can use the arrow keys to move among them.  When you get to your destination workspace, just hit the enter key.&lt;br /&gt;&lt;li&gt; Unfortunately, focus does not always follow you from one workspace to another.  A quick window-s;left-arrow;enter;"cd /foo";enter sequence is quite likely to cause the xterm on the previous workspace to change to directory &lt;code&gt;/foo&lt;/code&gt;, which can be a bit disconcerting.  This really badly needs fixing, as the mental effort to verify that focus has indeed followed me sometimes causes me to forget why I wanted to be in the new workspace in the first place.  This can be frustrating.  (And yes, I am not as young as I used to be.  Then again, neither are you!)&lt;br /&gt;&lt;li&gt; In Gnome, deleting a window (for example, typing &lt;code&gt;exit&lt;/code&gt; to a bash prompt) automatically transfers focus to some other window on that same desktop.  In contrast, in Unity, deleting a window &lt;i&gt;sometimes&lt;/i&gt; transfers focus.  &lt;i&gt;Always&lt;/i&gt; would be far preferable!&lt;br /&gt;&lt;li&gt; I searched for &lt;code&gt;synaptic&lt;/code&gt; in vain, finally learning about the new Ubuntu Software Center icon, which is the shopping-bag icon on the left-hand toolbar.  Ubuntu Software Center seems OK, though I am not sure whether or not I would be happy to do without &lt;code&gt;apt-get&lt;/code&gt; on the command line.  Fortunately, I have both.&lt;br /&gt;&lt;li&gt; The left-hand toolbar did grow on me due to the fact that it seems to track the most heavily used applications.  Unfortunately, there is no way to use this toolbar to query for the existence of an application: if there is an instance, it moves to the workspace containing the instance and transfers focus to it, but if there is no instance it creates one.  (If there are multiple instances, it displays them all and lets you choose &amp;mdash; but without letting you know which instance goes with which workspace.)  Again, perhaps a job for shift-click, though there needs to be a way to: (1) query the current workspace and (2) query all workspaces.  And a way to see which instances are associated with which workspaces.  And a way to see which instances have been minimized.&lt;br /&gt;&lt;li&gt; A natural reaction to this sort of behavior is to fire up &amp;ldquo;ccsm&amp;rdquo; and experiment with different settings.  Bad move!  Doing this has a high probability of fatally confusing Unity.  &amp;ldquo;You too can power-cycle your laptop.&amp;rdquo;&lt;br /&gt;&lt;li&gt; Unity sometimes loses track of the keyboard.  Moving back and forth among workspaces helps it find the keyboard again.  Unless the screen is locked, in which case life appears to be quite hard, with power-cycling the only option I have found thus far.  Fortunately, this seems to be quite rare, only two sightings in the several weeks that I have been using Unity.  Oops, make that three sightings.  Hmmm...  Four sightings.  OK, this problem appears to be triggered by switching to a workspace then immediately hitting shift-F1.&lt;br /&gt;&lt;li&gt; Under Gnome, resizing an xterm displays a handy popup showing how many rows and columns of text the xterm contains as it is being resized.  Unity badly needs this feature.&lt;br /&gt;&lt;li&gt; Where did the application and system menus go???  Well, they are gone.  Once I got used to it, the replacement works much better for me.  Shift-F1 pops up a window that allows you to search for apps, so that shift-F1;chr;enter pops up an instance of the Chromium browser.  Shift-F2 works as it does in Gnome, except that it displays the possible completions as icons.  Unfortunately, in both cases, Unity doesn't always keep up with touch-typists.  Sometimes it re-executes the previous command instead of the one you just typed, even though the display has already updated to show the new icon.  This indicates some performance, coordination, and concurrency issues: Unity's right hand does not always know what my left hand is doing!  It is therefore not obvious to me that the Unity development and test teams include any touch typists.  One way or another, this sort of thing badly needs fixing.&lt;br /&gt;&lt;li&gt; Banshee is quite similar to Rhythmbox.  One nice thing about Banshee is that it does not come with a pile of Internet radio stations preconfigured, so that you can easily find the ones you add.  (My tastes in music are such that my favorites are never going to appear in any reasonable set of defaults.)&lt;br /&gt;&lt;li&gt; If you push a window beyond the bounds of the sides or bottom of the screen, it ends up spanning multiple workspaces, where the workspaces are connected in a toroidal fashion.  This is sort of OK, except that windows that span multiple workspaces (up to four of them!) are not handled gracefully by the left-hand taskbar.  Although this behavior was mildly entertaining for a while, I would prefer that the workspaces not be connected.&lt;br /&gt;&lt;li&gt; If you push a window up to the top of the screen, it maximizes.  This is almost never what I want &amp;mdash; the reason I pushed the window to the top of the screen was to have it appear at the top of the screen, not to have it monopolize the entire screen!!!  On the rare occasions when I need to maximize a window, double-clicking the title bar works just fine, thank you!!!&lt;br /&gt;&lt;li&gt; Where did the per-window menus go?  Well, they are mostly gone.  You can get them back by right-clicking the title bar of a given menu, but I am growing to like the alternative, which is to move the mouse to the very top of the screen, causing the per-window menus to appear on the screen's upper bar.  This leaves more screen real estate for the rest of the application.  However, some applications keep the window-bar menus, and I have no idea why.&lt;br /&gt;&lt;li&gt; So I have a browser in one workspace, and I want one in another workspace.  Clicking on the icon on the left-hand bar pops me back to the original workspace: Not what I wanted!  Right-clicking on the icon pops up a menu that allows me to create a new browser instance in the current workspace.  However, this works only for some applications.&lt;br /&gt;&lt;li&gt; The &lt;code&gt;soffice&lt;/code&gt; command does not automatically background itself, in unhappy contrast to Maverick's &lt;code&gt;ooffice&lt;/code&gt; command.  OK, OK, I can easily type &lt;code&gt;&amp;amp;&lt;/code&gt;, but it is still annoying.&lt;br /&gt;&lt;li&gt; If you start &lt;code&gt;soffice&lt;/code&gt; from an xterm, it splats on that xterm every time you do &amp;ldquo;save as&amp;rdquo;.  Yes, I know that you failed to open the file!  I wouldn't have done &amp;ldquo;save as&amp;rdquo; if the file already existed!&lt;br /&gt;&lt;li&gt; The &lt;code&gt;soffice&lt;/code&gt; application occasionally goes into contrarian mode when you resize it.  For example, an attempted horizontal expansion of the window might instead be applied vertically.  Sometimes &lt;code&gt;soffice&lt;/code&gt; simply refuses to let you resize it, which can be especially frustrating if it has decided that it should be so small that there is no room to actually display the document in question.  Repeatedly maximizing and unmaximizing the window seems to get it out of this passive-aggressive mode of operation.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;So Unity does appear to have some potential, and I intend to keep using it for at least a little while longer.  However, it does still need a fair amount of additional work.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:29801</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/29801.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=29801"/>
    <title>And it used to be so simple...</title>
    <published>2011-11-11T18:12:19Z</published>
    <updated>2011-11-11T18:12:19Z</updated>
    <category term="rcu"/>
    <category term="bugs"/>
    <category term="linux"/>
    <content type="html">It is something I have done many times under many different operating systems.  You write something into the startup scripts, take the system down, then regain control at startup.  So I planned to take this approach for my KVM-based rcutorture setup: Mount the image file, deposit a test script in the startup scripts, unmount the image file, start qemu, then analyze the results (either deposited in the filesystem or dumped to the console).  What could be easier?&lt;br /&gt;&lt;br /&gt;So I manually mounted the file I use as the qemu disk image, my plan being to manually create simple tests as a first step towards automation.&lt;br /&gt;&lt;br /&gt;Hmmm...  Everything looks very strange and unfamiliar.  Ah, yes, this is upstart.  No problem, the Internet is but a mouse-click away, right?  But wait, the documentation says that upstart and the more-familiar (to old guys like myself, anyway) sysvinit can co-exist on the same system.  And what about this new &lt;a href="http://0pointer.de/blog/projects/systemd-for-admins-1.html" rel="nofollow"&gt;systemd&lt;/a&gt; thing that I keep hearing about?&lt;br /&gt;&lt;br /&gt;So my tests are going to have to inspect the filesystem and figure out which of these three things is installed.  And maybe someone installed one of them, then switched to the other, leaving traces of their earlier choice lying around.  How is my script supposed to figure all that out?  Of course, if it was just me running the tests, I could simply make sure that a pre-selected boot-up mechanism was installed.  But that is silly &amp;mdash; anyone anywhere should be able to test RCU.  So I need to be able to deal with any of the three boot-up mechanisms.  But wait, it is far worse than that:  What is my script supposed to do when someone else comes up with a fourth, fifth, or sixth boot-up mechanism?  Ouch!!!&lt;br /&gt;&lt;br /&gt;It is clearly time to just say &amp;ldquo;no&amp;rdquo;!  After all, my main test (rcutorture) is coded in the kernel, so it is clearly going to be far easier to translate my driver scripts to Linux kernel code than to code up a script that can outwit all present and future perpetrators of bootup mechanisms.  In-kernel coding will allow me to fully control the test using kernel boot parameters, and thus happily ignore which of sysvinit, upstart, systemd, or whatever is installed.  Some times you just have to &lt;a href="http://theoldmotor.com/wp-content/uploads/2011/03/Get-A-Horse.jpg" rel="nofollow"&gt;get a horse&lt;/a&gt;!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:29618</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/29618.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=29618"/>
    <title>The -rcu tree is back on kernel.org</title>
    <published>2011-11-02T17:04:31Z</published>
    <updated>2011-11-02T17:04:31Z</updated>
    <category term="rcu"/>
    <category term="linux"/>
    <content type="html">Thanks to the key-signing last week, -rcu is back on kernel.org, though at a slightly different address: git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:29301</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/29301.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=29301"/>
    <title>Parallel Programming: Back on kernel.org, Chinese translation</title>
    <published>2011-10-29T06:01:31Z</published>
    <updated>2011-10-29T06:01:31Z</updated>
    <category term="is parallel programming hard"/>
    <content type="html">The git archive for &amp;ldquo;Is Parallel Programming Hard, And, If So, What Can You Do About It?&amp;rdquo; is once again available from git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git.  A big &amp;ldquo;thank you&amp;rdquo; to everyone who worked so hard to get kernel.org back!!!&lt;br /&gt;&lt;br /&gt;In addition, Lu Yang, Xie Baoyou, and Yu Chen are working on another translation effort, with much of the book already translated to Chinese.  A download is said to be available &lt;a href="http://download.csdn.net/detail/xiebaoyou/3552357" rel="nofollow"&gt;here&lt;/a&gt;, though my Chinese is not up to the task of figuring out exactly how to download it, even with the help of Google Translate.&lt;br /&gt;&lt;br /&gt;I am hoping that this group and the &lt;a href="http://paulmck.livejournal.com/29049.html"&gt;group reported earlier&lt;/a&gt; will continue to make great progress on this!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:29049</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/29049.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=29049"/>
    <title>Parallel Programming: Chinese Translation In Progress</title>
    <published>2011-10-02T22:12:42Z</published>
    <updated>2011-10-02T22:12:42Z</updated>
    <category term="is parallel programming hard"/>
    <content type="html">Cheedoong Drung has started a &lt;a href="http://code.taobao.org/p/perfbook/" rel="nofollow"&gt;Chinese translation&lt;/a&gt; of &amp;ldquo;Is Parallel Programming Hard, And, If So, What Can You Do About It?&amp;rdquo;.  He is making good progress, and would also be &lt;a href="http://code.taobao.org/p/perfbook/wiki/index/" rel="nofollow"&gt;happy to have others join in&lt;/a&gt;.  So if you have good Chinese and English skills (I guess I am one for two on that one), get in touch with Cheedoong.  (His contact information is on &lt;a href="http://code.taobao.org/p/perfbook/" rel="nofollow"&gt;his web site&lt;/a&gt;).</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:28890</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/28890.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=28890"/>
    <title>Linux Plumbers Conference 2011</title>
    <published>2011-09-12T18:21:41Z</published>
    <updated>2011-12-16T20:49:44Z</updated>
    <category term="linux plumbers conference"/>
    <content type="html">Now that Linux Plumbers Conference has come to a successful conclusion and I have had a weekend to catch up on sleep, I want to offer my heartfelt thanks to the members of the program committee, whose efforts were key to this conference's success, in email-address order: Allison Randal, Jon Corbet, James Bottomley, Jesse Barnes, Jes Sorenson, Jesse Barker, Joel Becker, James Morris, Julia Lawall, Kate Stewart, John Linville, Matthew Garret, Rafael Wysocki, Thomas Gleixner, and Tom Herbert. And of course to the speakers and attendees as well!&lt;br /&gt;&lt;br /&gt;Almost all of the presentations are now available on the session pages linked from the &lt;a href="http://www.linuxplumbersconf.org/2011/ocw/events/LPC2011/schedule" rel="nofollow"&gt;schedule&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On the Development Tools Microconference: Julia Lawall noted that there were many different types of tools presented. As a result, she posted a survey to gather ideas for further directions on development tools: Please take a few minutes to fill out the &lt;a href="http://surveymonkey.com/s/D93QFCX" rel="nofollow"&gt;survey&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;On the Bufferbloat Microconference: Jim Gettys was happy to see that most people now agree that there is a serious buffer-management problem (as opposed to merely a specific active queue management (AQM) problem), he remains concerned that to few people understand how serious the problem really is.  ;&amp;mdash;)&lt;br /&gt;&lt;br /&gt;On the Scaling Microconference: Good presentations by Mathieu Desnoyers on user-space scalability and by Andi Kleen on kernel scalability, but only a very few members of the audience were actively working on user-space scalability, despite a number of prominent user-space applications having single global locks that sharply limit scalability.&lt;br /&gt;&lt;br /&gt;On the Tracing Microconference: There was some good discussion of coordinated tracing in virtualized environments between host and guest OSes, which should be helpful to the increasing numbers of people running such environments.&lt;br /&gt;&lt;br /&gt;And much much more...</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:28514</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/28514.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=28514"/>
    <title>Parallel Programming: Temporary Home</title>
    <published>2011-09-12T01:07:07Z</published>
    <updated>2011-09-12T01:07:07Z</updated>
    <category term="is parallel programming hard"/>
    <category term="perfbook"/>
    <content type="html">Due to some unscheduled downtime, perfbook's usual home is unavailable.  I have therefore posted a recent PDF of perfbook &lt;a href="http://www.rdrop.com/users/paulmck/perfbook/perfbook.2011.08.28a.pdf" rel="nofollow"&gt;here&lt;/a&gt;.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:28283</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/28283.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=28283"/>
    <title>Parallel Programming: August 2011 Update</title>
    <published>2011-08-29T16:40:37Z</published>
    <updated>2011-08-29T16:40:37Z</updated>
    <category term="is parallel programming hard"/>
    <category term="perfbook"/>
    <content type="html">This release of &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html" rel="nofollow"&gt;the parallel programming book&lt;/a&gt; features a new data-ownership chapter, the start of a new validation chapter, and lots of fixes, primarily from Elie De Brauwer.&lt;br /&gt;&lt;br /&gt;I expect to put out the next release in December.  I will continue on validation, and hopefully get a few other things accomplished.&lt;br /&gt;&lt;br /&gt;As always, git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git will be updated in real time.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:28018</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/28018.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=28018"/>
    <title>Stupid RCU Tricks: Bug Hunt Number 2</title>
    <published>2011-08-15T13:25:57Z</published>
    <updated>2011-08-15T13:25:57Z</updated>
    <category term="bugs"/>
    <category term="stupid rcu tricks"/>
    <content type="html">Lai Jiangshan spotted another bug in the solution posted for &lt;a href="http://paulmck.livejournal.com/27219.html"&gt;bug hunt number 1&lt;/a&gt;.  Here is the fixed (but still buggy) version:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
  1 struct foo {
  2   struct list_head list;
  3   int key;
  4   int data;
  5 };
  6
  7 LIST_HEAD(mylist);
  8 DEFINE_SPINLOCK(mylock);
  9 struct foo *cache;
 10
 11 int search(int key, int *data)
 12 {
 13   struct foo *p;
 14
 15   rcu_read_lock();
 16   p = rcu_dereference(cache);
 17   if (p != NULL &amp;amp;&amp;amp; p-&amp;gt;key == key)
 18     goto found;
 19   list_for_each_entry_rcu(p, &amp;amp;mylist, list)
 20     if (p-&amp;gt;key == key) {
 21       rcu_assign_pointer(cache, p);
 22       goto found;
 23     }
 24   rcu_read_unlock();
 25   return -ENOENT;
 26 found:
 27   *data = p-&amp;gt;data;
 28   rcu_read_unlock();
 29   return 0;
 30 }
 31
 32 int insert(int key, int data)
 33 {
 34   struct foo *p = kmalloc(sizeof(*p), GFP_KERNEL);
 35
 36   if (p == NULL)
 37     return -ENOMEM;
 38   p-&amp;gt;key = key;
 39   p-&amp;gt;data = data;
 40   spin_lock(&amp;amp;mylock);
 41   list_add_rcu(&amp;amp;p-&amp;gt;list, &amp;amp;mylist);
 42   spin_unlock(&amp;amp;mylock);
 43 }
 44
 45 int delete(int key)
 46 {
 47   struct foo *p;
 48
 49   spin_lock(&amp;amp;mylock);
 50   list_for_each_entry(p, &amp;amp;mylist, list)
 51     if (p-&amp;gt;key == key) {
 52       list_del_rcu(&amp;amp;p-&amp;gt;list);
 53       RCU_INIT_POINTER(cache, NULL);
 54       spin_unlock(&amp;amp;mylock);
 55       synchronize_rcu();
 56       free(p);
 57       return 0;
 58     }
 59   spin_unlock(&amp;amp;mylock);
 60   return -ENOENT;
 61 }
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/RCU/RCUdp1.html" rel="nofollow"&gt;Can you spot the additional bug&lt;/a&gt;?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:27792</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/27792.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=27792"/>
    <title>Stupid RCU Tricks: RCU-Protected Deletion</title>
    <published>2011-07-26T16:45:52Z</published>
    <updated>2011-07-26T16:45:52Z</updated>
    <category term="bugs"/>
    <category term="stupid rcu tricks"/>
    <content type="html">Consider the following code fragment:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
  1 rcu_read_lock();
  2 p = rcu_dereference(gp);
  3 if (must_delete(p)) {
  4   spin_lock(&amp;amp;my_lock);
  5   if (must_delete(p)) {
  6     kfree_rcu(p);
  7     rcu_assign_pointer(gp, q);
  8     already_deleted(p);
  9   }
 10   spin_unlock(&amp;amp;my_lock);
 11 } else {
 12   do_something_with(p);
 13 }
 14 rcu_read_unlock();
&lt;/pre&gt;&lt;br /&gt;Note that the whole fragment is enclosed in an RCU read-side critical section.  Line&amp;nbsp;2 picks up a local pointer to the global RCU-protected pointer &lt;code&gt;gp&lt;/code&gt;, which we assume is never &lt;code&gt;NULL&lt;/code&gt;.  Line&amp;nbsp;3 checks to see if it is necessary to delete the structure referenced by &lt;code&gt;gp&lt;/code&gt;, and, if so, lines&amp;nbsp;4-10 do the deleting.  Otherwise, line&amp;nbsp;12 does something with the just-accessed structure.&lt;br /&gt;&lt;br /&gt;If the structure must be deleted, we first acquire a spinlock on line&amp;nbsp;4, and then line&amp;nbsp;5 re-checks whether it is still necessary to delete the structure, but this time under the lock.  If the structure still needs to be deleted, then line&amp;nbsp;6 frees it (but only after an RCU grace period has elapsed) and line&amp;nbsp;7 makes &lt;code&gt;gp&lt;/code&gt; point to some replacement structure &lt;code&gt;q&lt;/code&gt;.  Clearly this replacement structure must have been allocated somehow, but the details of exactly how that happens are not important to this example.  Next, line&amp;nbsp;8 marks the old structure as having already been deleted, which resolves races when multiple CPUs concurrently notice that the structure needs deleting, and is also the reason that line&amp;nbsp;5 rechecks under the lock.  Finally, line&amp;nbsp;10 releases the spinlock.&lt;br /&gt;&lt;br /&gt;This code fragment is a bit unconventional:  Normally lines&amp;nbsp;6 and 7 would be interchanged.  But the RCU read-side critical section will prevent the structure from being freed until after the global pointer is updated, right?  &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/RCU/ProtDel.html" rel="nofollow"&gt;Why or why not&lt;/a&gt;?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:27627</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/27627.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=27627"/>
    <title>Puzzle: How many unlock paths?</title>
    <published>2011-07-23T20:56:25Z</published>
    <updated>2011-07-23T20:56:25Z</updated>
    <category term="puzzle"/>
    <content type="html">I was recently at dinner with some Linux kernel hackers who were showing off their smartphones. These phones have an interesting unlock mechanism: the phone displays an 3-by-3 array of circles, and the user traces out a path among the circles. If the path is correct, the phone unlocks.&lt;br /&gt;&lt;br /&gt;The paths are not arbitrary. From what I could see, here are the rules governing them:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Paths are composed of a series of straight line segments.&lt;br /&gt;&lt;li&gt; Each line segment connects a pair of circles.&lt;br /&gt;&lt;li&gt; If the preceding line segment arrived at a given circle, then the next line segment must leave that same circle.&lt;br /&gt;&lt;li&gt; A given circle may be visited only once.&lt;br /&gt;&lt;li&gt; A line segment may pass over a given circle without visiting it only if that circle has already been visited. (Attempting to pass over a not-yet-visited circle will instead visit that circle.) &lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/Solns/AndroidUnlock.html" rel="nofollow"&gt;How many unique paths are there?&lt;/a&gt;</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:27219</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/27219.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=27219"/>
    <title>Stupid RCU Tricks: Bug Hunt Number 1</title>
    <published>2011-06-05T23:29:18Z</published>
    <updated>2012-01-17T16:15:32Z</updated>
    <category term="bugs"/>
    <category term="stupid rcu tricks"/>
    <content type="html">The following code fragment contains a bug semi-similar to one recently found in the Linux kernel.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;
struct foo {
	struct list_head list;
	int key;
	int data;
};

LIST_HEAD(mylist);
DEFINE_SPINLOCK(mylock);
struct foo *cache;

int search(int key, int *data)
{
	struct foo *p;

	rcu_read_lock();
	p = rcu_dereference(cache);
	if (p != NULL &amp;amp;&amp;amp; p-&amp;gt;key == key)
		goto found;
	list_for_each_entry_rcu(p, &amp;amp;mylist, list)
		if (p-&amp;gt;key == key) {
			rcu_assign_pointer(cache, p);
			goto found;
		}
	rcu_read_unlock();
	return -ENOENT;
found:
	*data = p-&amp;gt;data;
	rcu_read_unlock();
	return 0;
}

int insert(int key, int data)
{
	struct foo *p = kmalloc(sizeof(*p), GFP_KERNEL);

	if (p == NULL)
		return -ENOMEM;
	p-&amp;gt;key = key;
	p-&amp;gt;data = data;
	spin_lock(&amp;amp;mylock);
	list_add_rcu(&amp;amp;p-&amp;gt;list, &amp;amp;mylist);
	spin_unlock(&amp;amp;mylock);
}

int delete(int key)
{
	struct foo *p;

	spin_lock(&amp;amp;mylock);
	list_for_each_entry(p, &amp;amp;mylist, list)
		if (p-&amp;gt;key == key) {
			list_del_rcu(&amp;amp;p-&amp;gt;list);
			spin_unlock(&amp;amp;mylock);
			synchronize_rcu();
			kfree(p);
			return 0;
		}
	spin_unlock(&amp;amp;mylock);
	return -ENOENT;
}
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/Answers/RCU/RCUdp.html" rel="nofollow"&gt;Can you find it and fix it&lt;/a&gt;?</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:26906</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/26906.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=26906"/>
    <title>Parallel Programming: May 2011 Update</title>
    <published>2011-05-31T12:55:49Z</published>
    <updated>2012-01-17T16:14:47Z</updated>
    <category term="is parallel programming hard"/>
    <category term="perfbook"/>
    <content type="html">Once again, a big thank you for everyone who contributed to the &lt;a href="http://kernel.org/pub/linux/kernel/people/paulmck/perfbook/perfbook.html" rel="nofollow"&gt;parallel-programming book&lt;/a&gt;.  This edition includes:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; Nicer fonts, courtesy of Tom Gunderson.&lt;br /&gt;&lt;li&gt; Front and back cover art, courtesy of Melissa Broussard.&lt;br /&gt;&lt;li&gt; Greatly expanded locking chapter (though this chapter never really will be complete).&lt;br /&gt;&lt;li&gt; An appendix covering recent history of RCU in the Linux kernel.&lt;br /&gt;&lt;li&gt; A section introducing RCU concepts as preparation for RCU fundamentals.&lt;br /&gt;&lt;li&gt; A section covering seqlock.&lt;br /&gt;&lt;li&gt; A conflicting-views section covering CPU evolution.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;I expect to put out the next update in August.  My guess is that I will focus on data ownership and perhaps a bit on data structures, but I do reserve the right to change plans at any point.  ;&amp;ndash;)&lt;br /&gt;&lt;br /&gt;As always, git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/perfbook.git will be updated in real time.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:26736</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/26736.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=26736"/>
    <title>Linaro Developers Summit: ARM Linux Consolidation Summing Up</title>
    <published>2011-05-23T15:15:29Z</published>
    <updated>2012-01-17T16:14:14Z</updated>
    <category term="linaro"/>
    <content type="html">I wrote up a &lt;a href="http://lwn.net/Articles/443510/" rel="nofollow"&gt;summary&lt;/a&gt; for &lt;a href="http://lwn.net" rel="nofollow"&gt;LWN&lt;/a&gt;.  In other news, Jon Corbet published a &lt;a href="http://www.linux.com/news/featured-blogs/171-jonathan-corbet/445344-whats-up-with-arm&amp;quot;" rel="nofollow"&gt;blog entry&lt;/a&gt; on this topic that is well worth reading.  In addition, another &lt;a href="http://lwn.net/Articles/443531/" rel="nofollow"&gt;LWN article&lt;/a&gt; gives an excellent parable illustrating the forces that lead to code duplication.</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:26599</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/26599.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=26599"/>
    <title>Linaro Developers Summit: Even More ARM Linux Consolidation</title>
    <published>2011-05-13T10:19:46Z</published>
    <updated>2012-01-17T16:17:19Z</updated>
    <category term="linaro"/>
    <content type="html">Thursday's pair of sessions covered Device Tree and the how/who of ARM Linux consolidation.  This was followed by a wrap-up session on Friday morning.&lt;br /&gt;&lt;br /&gt;On Device Tree, Russell King acked the infrastructure patches, so we can now open the floodgates for its exploitation by ARM boards and SoCs.  Woo-hoo!!!  ;&amp;ndash;)&lt;br /&gt;&lt;br /&gt;Grant Likely expects to get these patches into 2.6.40, where they will serve the PowerPC as well as the ARM architectures.  PowerPC will make fuller use of this infrastructure by moving to the new-style irq domain by 2.6.41.  Note that we once again have Linux core code rather than ARM-specific code.  This has a number of important benefits: (1) A larger number of developers can be focused on a common piece of code, which should increase quality and maintainability. (2) Use of Linux core code instead of ARM-specific code reduces the pressure on the ARM maintainers.&lt;br /&gt;&lt;br /&gt;The ARM portion of the device-tree effort is not limited to Linaro members.  For example, David Brown of Qualcomm will be starting on device tree for MSM and Grant Likely and Arnd Bergmann will be working with the Xilincs folks to get Xilincs support with device tree merged in 2.6.40.&lt;br /&gt;&lt;br /&gt;Device Tree requires .dts files that describe a given system, and so much discussion centered around where these files might live.  We eventually settled on placing them in the kernel source tree in the short term, but moving them to a new device-tree repository once this effort is well under way.&lt;br /&gt;&lt;br /&gt;Finally, Device Tree is not complete.  Over time, new bindings will need to be defined to cover additional hardware and IP blocks.  But this will always be the case: new types of IP blocks will appear, and as they appear, device tree may need to evolve to accommodate them.  I never could have predicted that accelerometers and GPS units would appear in hand-held battery powered devices, and so I freely admit that I cannot imagine what will appear over the next five or ten years.  But I do know that whatever strange devices might appear, device tree must evolve to handle them.&lt;br /&gt;&lt;br /&gt;The next Thursday session covered specifically how to handle the ARM-Linus interface going forward.&lt;br /&gt;&lt;br /&gt;There will (of course) be a new git tree.  After all, just as every computer-science problem seems to be solvable by an additional level of indirection, every maintainership problem seems to be solvable by an additional level of git tree.  This new git tree will have at least one branch per participating ARM subarchitecture, and these branches will not normally be subject to rebasing.  As you would expect, maintainers of participating ARM sub-architectures will send pull requests to a group of maintainers for this new git tree.  A merge of all the branches will be sent to Stephen Rothwell's -next tree, but the branches will be individually pushed to Linus Torvalds.&lt;br /&gt;&lt;br /&gt;Please note that this new maintainership regime is not limited to Linaro, but neither is it mandatory for non-Linaro ARM subarchitectures.&lt;br /&gt;&lt;br /&gt;The membership of this overall ARM subarchitecture maintainers group will start with Arnd Bergman, Nicolas Pitre, and Marc Zyngier, with help from Thomas Gleixner.  Russell King will also have write access to this tree.  This effort will start with 2.6.41.  The plan is to start small and evolve to handle the load.&lt;br /&gt;&lt;br /&gt;Will this solve all ARM maintainership problems?&lt;br /&gt;&lt;br /&gt;Of course not!&lt;br /&gt;&lt;br /&gt;For but one example, there will still be a need for more maintainers for the various ARM subarchitectures, many of which are quite complex.  However, this new effort will be very helpful, and the parallel ARM consolidation efforts should also help reduce the size of the ARM tsunami of Linux kernel code.  We were all in favor this group evolving to meeting changing needs rather than attempting any sort of &amp;ldquo;intelligent design&amp;rdquo;.&lt;br /&gt;&lt;br /&gt;Friday's session was wrap-up.  The notes for all sessions are publicly available:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-1/" rel="nofollow"&gt;Monday session&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-2/" rel="nofollow"&gt;Tuesday session&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-3/" rel="nofollow"&gt;Wednesday session&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-4/" rel="nofollow"&gt;Thursday session&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-5/" rel="nofollow"&gt;Second Thursday session&lt;/a&gt;.&lt;br /&gt;&lt;li&gt; &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-maintainership/" rel="nofollow"&gt;Third Thursday session&lt;/a&gt;.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;Wrap-up notes may be found at the end of &lt;a href="http://summit.ubuntu.com/uds-o/meeting/linaro-kernel-o-arm-linus-interface-5/" rel="nofollow"&gt;this session&lt;/a&gt;, search for "summary of".&lt;br /&gt;&lt;br /&gt;Look for additional discussion/flaming on the arm-linux-kernel and linux-kernel mailing lists!</content>
  </entry>
  <entry>
    <id>urn:lj:livejournal.com:atom1:paulmck:26362</id>
    <link rel="alternate" type="text/html" href="http://paulmck.livejournal.com/26362.html"/>
    <link rel="self" type="text/xml" href="http://paulmck.livejournal.com/data/atom/?itemid=26362"/>
    <title>Linaro Developers Summit: More ARM Linux Consolidation</title>
    <published>2011-05-11T20:05:43Z</published>
    <updated>2012-01-17T16:13:00Z</updated>
    <category term="linaro"/>
    <content type="html">We had a principled discussion today.  In particular, we arrived at several principles:&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&amp;nbsp;&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; The only ARM-specific code is (a) ARM core architecture and (b) ARM SoC core architecture.&lt;br /&gt;&lt;li&gt; What would otherwise be ARM board-specific code should be handled by (a) device tree and (b) device drivers in /drivers/*.&lt;br /&gt;&lt;li&gt; Functionality should be grouped by purpose rather than by implementation, which will help bring out common patterns and opportunities for further consolidation.&lt;br /&gt;&lt;li&gt; The more SoCs there are, the greater the motivation and practicality of pulling out common code.  The number of SoCs is expected to continue to increase over time.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;The &amp;ldquo;ARM SoC core architecture&amp;rdquo; should consist primarily of plugins for common frameworks.  These frameworks should preferably be Linux-kernel-wide rather than being confined to the ARM tree.  It is quite possible that the ARM SoC core architecture will turn out to be nonexistent.  This would be a good thing: the more we consolidate code into common frameworks, the better able we will be to productively develop and maintain Linux on ARM.&lt;br /&gt;&lt;br /&gt;We also continued &lt;a href="http://paulmck.livejournal.com/25785.html"&gt;our earlier discussion&lt;/a&gt; on opportunities for consolidation and people who are best positioned to take on this work:&lt;br /&gt;&lt;ol&gt;&lt;br /&gt;&lt;li&gt; GPIO (Grant Likely, Linus Walleij).&lt;br /&gt;&lt;li&gt; Pinmux (Linus Walleij).&lt;br /&gt;&lt;li&gt; MM and IOMMU (move the drivers to common place: individual sub-arch maintainers, Joerg Roedel might need some help for embedded).&lt;br /&gt;&lt;li&gt; CPU freq drivers (move the drivers to common place: individual sub-arch maintainers).&lt;br /&gt;&lt;li&gt; CPU idle drivers (move the drivers to common place: individual sub-arch maintainers).&lt;br /&gt;&lt;li&gt; Demultiplexed interrupts (Thomas Gleixner).&lt;br /&gt;&lt;li&gt; Cascaded interrupt controllers (especially the 256-interrupt parts where you use 1 interrupt).&lt;br /&gt;&lt;li&gt; Convert timer init to "earlytimer" like SH (Magnus Damm).&lt;br /&gt;&lt;li&gt; API  to use multiple HW timers (for example, OMAP has 32 in some cases). Do  we gain anything by just having them in the kernel? Have yet to see a  real good use for this where existing timer interfaces in kernel don't  work. In some cases, the Linux kernel is reserving a HW timer to be used  by a DSP OS. Need to understand the uses cases to create proper API to  manage these.  (Thomas Gleixner and Kevin Hilman to look at use cases and derive appropriate solution.)&lt;br /&gt;&lt;li&gt; PWM drivers (move the drivers to common place: individual sub-arch maintainers).&lt;br /&gt;&lt;li&gt; Industrial I/O drivers (now in staging, should stay out of arch/arm: Kyungmin Park &amp; Jonathan Cameron). &lt;br /&gt;&lt;li&gt; drivers/mfd: (multi-function devices) getting overused&amp;mdash;"just a bag of platform devices".  This is OK for the device driver itself, but the subdrivers should go into the appropriate GPIO location.  Again, align with hardware&amp;mdash;IP block separate from how it is connected.  (Samuel Ortiz is the maintainer, so we clearly need to work this out with with him).&lt;br /&gt;&lt;li&gt; &lt;a href="http://processors.wiki.ti.com/index.php/Programmable_Realtime_Unit_Subsystem" rel="nofollow"&gt;pruss&lt;/a&gt; DSP: patches being proposed, Arnd has been reviewing.  These patches are being generated by new-to-Linux developers.  &lt;br /&gt;&lt;li&gt; General infrastructure to handle instantiation of new devices at runtime as well as at boot: DSPs, FPGAs (Mark Brown).&lt;br /&gt;&lt;li&gt; Near-Field Communication drivers: Nokia has driver upstream, discussion about long-term interface, leaning towards sockets-based interface.&lt;br /&gt;&lt;li&gt; Maintainer for drivers/misc and drivers/char: Arnd Bergmann.  Goal: force drivers to move into appropriate place, rather than dumping random functionality into drivers/misc and drivers/char.&lt;br /&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Of course, the discussion is the easy part.  The proof of the pudding with be the patches.</content>
  </entry>
</feed>

