Thread (12 messages) 12 messages, 4 authors, 2008-07-25

Re: [PATCH 2/2][RT] powerpc - Make the irq reverse mapping radix tree lockless

From: Sebastien Dugue <hidden>
Date: 2008-07-24 12:18:23
Also in: linux-rt-users, lkml

On Thu, 24 Jul 2008 21:11:34 +1000 Nick Piggin [off-list ref] wrote:
On Thursday 24 July 2008 20:50, Sebastien Dugue wrote:
quoted
From: Sebastien Dugue <redacted>
Date: Tue, 22 Jul 2008 11:56:41 +0200
Subject: [PATCH][RT] powerpc - Make the irq reverse mapping radix tree
lockless

  The radix tree used by interrupt controllers for their irq reverse
mapping (currently only the XICS found on pSeries) have a complex locking
scheme dating back to before the advent of the concurrent radix tree on
preempt-rt.

  Take advantage of this and of the fact that the items of the tree are
pointers to a static array (irq_map) elements which can never go under us
to simplify the locking.

  Concurrency between readers and writers are handled by the intrinsic
properties of the concurrent radix tree. Concurrency between the tree
initialization which is done asynchronously with readers and writers access
is handled via an atomic variable (revmap_trees_allocated) set when the
tree has been initialized and checked before any reader or writer access
just like we used to check for tree.gfp_mask != 0 before.
Hmm, RCU radix tree is in mainline too for quite a while. I thought
Ben had already converted this code over ages ago...
  Mainline does not have the concurrent radix tree which this patch
is based on, but maybe it's overkill and the RCU radix tree is enough.
Not sure, will have to think about it a bit more.
Nothing against the -rt patch, but mainline should probably be updated
to use RCU as well?
  If rcu radix tree is enough, then definitely yes.

  Sebastien.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help