lkml.org 
[lkml]   [2006]   [May]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH -rt] irqd starvation on SMP by a single process?
john stultz wrote:
> On Fri, 2006-05-12 at 07:50 +0200, Ingo Molnar wrote:
>> + if (!cpus_equal(current->cpus_allowed, irq_affinity[irq]));
>> + set_cpus_allowed(current, irq_affinity[irq]);
>
> Gah! I introduced a terrible bug there.
>
> Note the semi-colon at the end of the if statement! Sorry about that!
>
> The following patch (which I've tested as well) fixes that.
>
> --- 2.6-rt/kernel/irq/manage.c 2006-05-11 18:37:36.000000000 -0500
> +++ dev-rt/kernel/irq/manage.c 2006-05-12 12:55:56.000000000 -0500
> @@ -724,6 +724,7 @@
> set_current_state(TASK_INTERRUPTIBLE);
> do_hardirq(desc);
> cond_resched_all();
> + local_irq_disable();
> __do_softirq();
> // do_softirq_from_hardirq();
> local_irq_enable();
> @@ -731,10 +732,8 @@
> /*
> * Did IRQ affinities change?
> */
> - if (!cpu_isset(smp_processor_id(), irq_affinity[irq])) {
> - mask = cpumask_of_cpu(any_online_cpu(irq_affinity[irq]));
> - set_cpus_allowed(current, mask);
> - }
> + if(!cpus_equal(current->cpus_allowed, irq_affinity[irq]))
> + set_cpus_allowed(current, irq_affinity[irq]);
> #endif
> schedule();
> }
>
>
>
>

FYI,

I just looked at rt21 and the first version of this patch seems to be in
it. Not this version.

Mark

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-05-12 22:07    [W:0.067 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site