Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-24 Thread Michael Neuling
size_t size =3D 0; FILE *file; sprintf(buf, /proc/irq/%i/smp_affinity, number); - file =3D fopen(buf, r); + file =3D fopen(buf, r+); if (!file)

Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-24 Thread Neil Horman
On Fri, Sep 24, 2010 at 04:56:34PM +1000, Michael Neuling wrote: size_t size =3D 0; FILE *file; sprintf(buf, /proc/irq/%i/smp_affinity, number); - file =3D fopen(buf, r); +

Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-23 Thread Michael Ellerman
On Wed, 2010-09-22 at 16:04 +1000, Michael Neuling wrote: When irqblance attempts writes to the IPI smp_affinity (ie. /proc/irq/16/smp_affinity in the above example) it fails but irqbalance ignores currently ignores this. This patch catches these write fails and in this case adds that IRQ

Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-23 Thread Michael Neuling
+ if (fwrite(line, strlen(line) - 1, 1, file) == 0) if (fputs(line, file) == EOF) Good point thanks... new patch below Mikey irqbalance, powerpc: add IRQs without settable SMP affinity to banned list On pseries powerpc, IPIs are registered with an IRQ number so /proc/interrupts

Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-23 Thread Neil Horman
On Thu, Sep 23, 2010 at 08:57:20PM +1000, Michael Neuling wrote: + if (fwrite(line, strlen(line) - 1, 1, file) == 0) if (fputs(line, file) == EOF) Good point thanks... new patch below Mikey irqbalance, powerpc: add IRQs without settable SMP affinity to banned list On

Re: [PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-23 Thread Michael Ellerman
On Thu, 2010-09-23 at 09:13 -0400, Neil Horman wrote: On Thu, Sep 23, 2010 at 08:57:20PM +1000, Michael Neuling wrote: + if (fwrite(line, strlen(line) - 1, 1, file) == 0) if (fputs(line, file) == EOF) Good point thanks... new patch below Mikey

[PATCH] irqbalance, powerpc: add IRQs without settable SMP affinity to banned list

2010-09-22 Thread Michael Neuling
On pseries powerpc, IPIs are registered with an IRQ number so /proc/interrupts looks like this on a 2 core/2 thread machine: CPU0 CPU1 CPU2 CPU3 16:316428232905141138794 983121 XICS Level IPI 18:2605674 0 304994