Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Benjamin Herrenschmidt
On Tue, 2007-11-13 at 11:05 +0100, Peter Zijlstra wrote: > Looking at the code: > > /* radix tree not lockless safe ! we use a brlock-type mecanism > * for now, until we can use a lockless radix tree > */ > static void irq_radix_wrlock(unsigned long *flags) > > The RCU radix tree stuffs have

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 11:05 +0100, Peter Zijlstra wrote: > Anyway, it seems its the generic irq stuff that uses raw_spinlock_t and > disables IRQs, so there isn't much we can do from the ARCH level I'm > afraid :-( > > Ingo, any sane ideas? Ok benh came up with a workable idea, he just needs a

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Benjamin Herrenschmidt
On Tue, 2007-11-13 at 10:10 +0100, Peter Zijlstra wrote: > > Correct, -rt can't allocate -anything- when preemption if off. That is > the cost for having the allocators itself preemptable. > > Even radix_tree_preload() will not work as its functionality was based > on preempt disable to limit

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 10:10 +0100, Peter Zijlstra wrote: > On Tue, 2007-11-13 at 08:12 +1100, Benjamin Herrenschmidt wrote: > > > And here is an updated patch. There has to be a better way than the > > > #ifdef, but I need the two local variables, and breaking the intervening > > > code out into

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 08:12 +1100, Benjamin Herrenschmidt wrote: > > And here is an updated patch. There has to be a better way than the > > #ifdef, but I need the two local variables, and breaking the intervening > > code out into a separate function didn't quite seem right either. > > > >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 08:12 +1100, Benjamin Herrenschmidt wrote: And here is an updated patch. There has to be a better way than the #ifdef, but I need the two local variables, and breaking the intervening code out into a separate function didn't quite seem right either. Thoughts?

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 10:10 +0100, Peter Zijlstra wrote: On Tue, 2007-11-13 at 08:12 +1100, Benjamin Herrenschmidt wrote: And here is an updated patch. There has to be a better way than the #ifdef, but I need the two local variables, and breaking the intervening code out into a

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Benjamin Herrenschmidt
On Tue, 2007-11-13 at 10:10 +0100, Peter Zijlstra wrote: Correct, -rt can't allocate -anything- when preemption if off. That is the cost for having the allocators itself preemptable. Even radix_tree_preload() will not work as its functionality was based on preempt disable to limit access

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Peter Zijlstra
On Tue, 2007-11-13 at 11:05 +0100, Peter Zijlstra wrote: Anyway, it seems its the generic irq stuff that uses raw_spinlock_t and disables IRQs, so there isn't much we can do from the ARCH level I'm afraid :-( Ingo, any sane ideas? Ok benh came up with a workable idea, he just needs a

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-13 Thread Benjamin Herrenschmidt
On Tue, 2007-11-13 at 11:05 +0100, Peter Zijlstra wrote: Looking at the code: /* radix tree not lockless safe ! we use a brlock-type mecanism * for now, until we can use a lockless radix tree */ static void irq_radix_wrlock(unsigned long *flags) The RCU radix tree stuffs have gone

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Benjamin Herrenschmidt
> And here is an updated patch. There has to be a better way than the > #ifdef, but I need the two local variables, and breaking the intervening > code out into a separate function didn't quite seem right either. > > Thoughts? Nothing comes to mind right now... > This one does only one oops

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2007 at 07:48:45AM +1100, Benjamin Herrenschmidt wrote: > > On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: > > > Well, I suppose the patch could go in, maybe with some ifdef's > > around > > > the bits in _switch_to, there's little point in doing that on non-rt > > >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2007 at 07:48:45AM +1100, Benjamin Herrenschmidt wrote: > > On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: > > > Well, I suppose the patch could go in, maybe with some ifdef's > > around > > > the bits in _switch_to, there's little point in doing that on non-rt > > >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2007 at 07:48:45AM +1100, Benjamin Herrenschmidt wrote: On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: Well, I suppose the patch could go in, maybe with some ifdef's around the bits in _switch_to, there's little point in doing that on non-rt kernels. As

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Paul E. McKenney
On Mon, Nov 12, 2007 at 07:48:45AM +1100, Benjamin Herrenschmidt wrote: On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: Well, I suppose the patch could go in, maybe with some ifdef's around the bits in _switch_to, there's little point in doing that on non-rt kernels. As

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-12 Thread Benjamin Herrenschmidt
And here is an updated patch. There has to be a better way than the #ifdef, but I need the two local variables, and breaking the intervening code out into a separate function didn't quite seem right either. Thoughts? Nothing comes to mind right now... This one does only one oops during

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-11 Thread Benjamin Herrenschmidt
On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: > > Well, I suppose the patch could go in, maybe with some ifdef's > around > > the bits in _switch_to, there's little point in doing that on non-rt > > kernels. > > As Nick Piggin already stated, and I'll even state it for the RT >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-11 Thread Steven Rostedt
On Sun, 11 Nov 2007, Benjamin Herrenschmidt wrote: > > > Removed this as well, also seemed to work. Please note, however, that > > this is just running kernbench. But this did seem to get rid of some > > of the warnings as well. ;-) Now only have the xics_startup() warning. > > > > >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-11 Thread Steven Rostedt
On Sun, 11 Nov 2007, Benjamin Herrenschmidt wrote: Removed this as well, also seemed to work. Please note, however, that this is just running kernbench. But this did seem to get rid of some of the warnings as well. ;-) Now only have the xics_startup() warning. Overall, looks fine

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-11 Thread Benjamin Herrenschmidt
On Sun, 2007-11-11 at 09:45 -0500, Steven Rostedt wrote: Well, I suppose the patch could go in, maybe with some ifdef's around the bits in _switch_to, there's little point in doing that on non-rt kernels. As Nick Piggin already stated, and I'll even state it for the RT kernel, we do

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-10 Thread Benjamin Herrenschmidt
> Removed this as well, also seemed to work. Please note, however, that > this is just running kernbench. But this did seem to get rid of some > of the warnings as well. ;-) Now only have the xics_startup() warning. > > > Overall, looks fine ! > > I bet that there are more gotchas lurking

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-10 Thread Benjamin Herrenschmidt
Removed this as well, also seemed to work. Please note, however, that this is just running kernbench. But this did seem to get rid of some of the warnings as well. ;-) Now only have the xics_startup() warning. Overall, looks fine ! I bet that there are more gotchas lurking in there

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Nick Piggin
On Saturday 10 November 2007 07:52, Benjamin Herrenschmidt wrote: > > diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c > > linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c --- > > linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c2007-10-12 > > 09:43:44.0

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Paul E. McKenney
On Sat, Nov 10, 2007 at 07:52:04AM +1100, Benjamin Herrenschmidt wrote: > > diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c > > linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c > > --- linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c2007-10-12 > >

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Benjamin Herrenschmidt
> diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c > linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c > --- linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c 2007-10-12 > 09:43:44.0 -0700 > +++ linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Nick Piggin
On Saturday 10 November 2007 07:52, Benjamin Herrenschmidt wrote: diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c --- linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c2007-10-12 09:43:44.0 -0700 +++

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Benjamin Herrenschmidt
diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c --- linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c 2007-10-12 09:43:44.0 -0700 +++ linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c 2007-11-08

Re: [PATCH, RFC] improved hacks to allow -rt to run kernbench on POWER

2007-11-09 Thread Paul E. McKenney
On Sat, Nov 10, 2007 at 07:52:04AM +1100, Benjamin Herrenschmidt wrote: diff -urpNa -X dontdiff linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c linux-2.6.23.1-rt4-fix/arch/powerpc/kernel/process.c --- linux-2.6.23.1-rt4/arch/powerpc/kernel/process.c2007-10-12 09:43:44.0