From: Dan Magenheimer Subject: RE: [xen-unstable test] 6947: regressions - trouble: broken/fail/pass Date: Mon, 2 May 2011 09:36:10 -0700 (PDT) Message-ID: <57c7db22-3761-4c60-9277-2fab94cee60a@default> References: <4DBED61F020000780003F2D3@vpn.id2.novell.com C9E4900E.17180%keir.xen@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Keir Fraser , Jan Beulich Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org > No, I think you just misunderstand RCU. What I (and now also you, a bit > independently ;-) have described is how to synchronise writers against > other > writers -- e.g., someone inserting concurrently with deleting, as you > describe above. What RCU is all about is synchronising *readers* > against > writers, without needing a lock. And we still need it because the > radix-tree > updates will happen under d->event_lock, which the readers in IRQ > context > will not be holding. The main thing that RCU generally needs is that, > when a > node is deleted from a structure (radix-tree in this case) it cannot be > freed until an RCU grace period because concurrent lock-free readers > may > still hold a pointer to it. There are also other details to consider > but > actually the whole RCU issue appears to be handled by Linux's radix- > tree > implementation -- we just need to pull an up-to-date version across > into > Xen. 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. Dan