lkml.org 
[lkml]   [2011]   [Nov]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH RT] tasklet/rt: Prevent tasklets from going into infinite spin in RT
From
Date
On Wed, 2011-11-30 at 13:45 +0100, Mike Galbraith wrote:
> On Wed, 2011-11-30 at 11:24 +0100, Thomas Gleixner wrote:
> > On Wed, 30 Nov 2011, Mike Galbraith wrote:

> > > @@ -131,11 +155,18 @@ void softirq_check_pending_idle(void)
> > > */
> > > static void wakeup_softirqd(void)
> > > {
> > > - /* Interrupts are disabled: no need to stop preemption */
> > > - struct task_struct *tsk = __this_cpu_read(ksoftirqd);
> > > + struct task_struct *tsk;
> > > + u32 pending = local_softirq_pending(), mask, i;
> > >
> > > - if (tsk && tsk->state != TASK_RUNNING)
> > > - wake_up_process(tsk);
> > > + /* Interrupts are disabled: no need to stop preemption */
> > > + for (i = 0; pending && i < NR_SOFTIRQ_THREADS; i++) {
> > > + mask = __get_cpu_var(ksoftirqd)[i].mask;
> > > + if (!(pending & mask))
> > > + continue;
> > > + tsk = __get_cpu_var(ksoftirqd)[i].tsk;
> > > + if (tsk && tsk->state != TASK_RUNNING)
> > > + wake_up_process(tsk);
> > > + }
> > > }
> >
> > Dammned serious is seems. :)

'course here I should have just used the busy bits directly.

-Mike



\
 
 \ /
  Last update: 2011-11-30 14:07    [W:0.317 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site