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

2008-09-04 Thread Sebastien Dugue
On Thu, 04 Sep 2008 12:52:19 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Wed, 2008-09-03 at 15:41 +0200, Sebastien Dugue wrote: On Wed, 20 Aug 2008 15:23:01 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: BTW. It would be good to try to turn the GFP_ATOMIC into

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

2008-09-04 Thread Benjamin Herrenschmidt
There's nothing to 'de-initialize' here, or am I missing something? radix_tree_insert() will return ENOMEM and won't insert anything. Forget my comment, just fallback. Or you can fallback if you don't find, as easy, probably easier since it shouldn't happen in practice. That's what

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

2008-09-04 Thread Sebastien Dugue
On Thu, 04 Sep 2008 17:58:56 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: There's nothing to 'de-initialize' here, or am I missing something? radix_tree_insert() will return ENOMEM and won't insert anything. Forget my comment, just fallback. Or you can fallback if you

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

2008-09-04 Thread Sebastien Dugue
The radix trees 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 lockless radix tree. Take advantage of this and of the fact that the items of the tree are pointers to a

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

2008-09-03 Thread Sebastien Dugue
On Wed, 20 Aug 2008 15:22:06 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: On Wed, 2008-08-06 at 15:30 +0200, Sebastien Dugue wrote: The radix trees used by interrupt controllers for their irq reverse mapping (currently only the XICS found on pSeries) have a complex locking scheme

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

2008-09-03 Thread Sebastien Dugue
On Wed, 20 Aug 2008 15:23:01 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: BTW. It would be good to try to turn the GFP_ATOMIC into GFP_KERNEL, That would be nice indeed maybe using a semaphore instead of a lock to protect insertion vs. initialisation. a semaphore? are you

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

2008-09-03 Thread Benjamin Herrenschmidt
On Wed, 2008-09-03 at 15:41 +0200, Sebastien Dugue wrote: On Wed, 20 Aug 2008 15:23:01 +1000 Benjamin Herrenschmidt [EMAIL PROTECTED] wrote: BTW. It would be good to try to turn the GFP_ATOMIC into GFP_KERNEL, That would be nice indeed maybe using a semaphore instead of a lock to

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

2008-08-19 Thread Benjamin Herrenschmidt
On Wed, 2008-08-06 at 15:30 +0200, Sebastien Dugue wrote: The radix trees 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 lockless radix tree. Take advantage of this

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

2008-08-19 Thread Benjamin Herrenschmidt
BTW. It would be good to try to turn the GFP_ATOMIC into GFP_KERNEL, maybe using a semaphore instead of a lock to protect insertion vs. initialisation. The old scheme was fine because if the atomic allocation failed, it could fallback to the linear search and try again on the next interrupt. Not

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

2008-08-06 Thread Sebastien Dugue
The radix trees 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 lockless radix tree. Take advantage of this and of the fact that the items of the tree are pointers to a