From mboxrd@z Thu Jan 1 00:00:00 1970 From: Keir Fraser Subject: Re: [xen-unstable test] 6947: regressions - trouble: broken/fail/pass Date: Mon, 02 May 2011 18:07:51 +0100 Message-ID: References: <57c7db22-3761-4c60-9277-2fab94cee60a@default> Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <57c7db22-3761-4c60-9277-2fab94cee60a@default> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Dan Magenheimer , Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On 02/05/2011 17:36, "Dan Magenheimer" wrote: > I won't claim to understand RCU very well either, but I > actually explicitly chose a pre-RCU version of the Linux > radix tree code because tmem (which was the only user of > the radix tree code at the time IIRC) is write-often > AND read-often and my understanding of RCU is that it > works best for read-often-write-infrequently trees. That is where it gives the best performance boost (because it obviates the need for read-side locking, with its associated overheads). But there can be other reasons for using a lock-free synchronisation strategy -- our current motivation, sync'ing with interrupt handlers (or, similarly, signal handlers in Unix processes), is another common one. In terms of the cost of switching to an RCU radix-tree implementation, for those users that don't need it (i.e., tmem, because you have full lock-based synchronisation) it looks like node deletions unconditionally wait for an RCU grace period before freeing the old node. If tmem is doing a reasonable rate of deletion it might make sense for us to make that optional, selected when the tree is first initialised. It would be easy enough to add an 'rcu_safe' flag for that purpose. There's also a rcu_head struct added to every tree node. Not so much we can do about that. It's only 16 bytes, hopefully not too bad an issue for tmem. -- Keir