Re: [PATCH v4] softlockup: remove hung_task_check_count

From: Peter Zijlstra
Date: Wed Jan 28 2009 - 03:25:23 EST


On Tue, 2009-01-27 at 10:48 -0800, Mandeep Singh Baines wrote:
> Ingo Molnar (mingo@xxxxxxx) wrote:
> >
> > * Mandeep Singh Baines <msb@xxxxxxxxxx> wrote:
> >
> > > The design was proposed by FrÃdÃric Weisbecker. Peter Zijlstra suggested
> > > the use of RCU.
> >
> > ok, this looks _much_ cleaner.
> >
> > One question:
> >
> > > - read_lock(&tasklist_lock);
> > > + rcu_read_lock();
> > > do_each_thread(g, t) {
> > > - if (!--max_count)
> > > + if (need_resched())
> > > goto unlock;
> >
> > Isnt it dangerous to skip a check just because we got marked for
> > reschedule? Since it runs so rarely it could by accident be preempted and
> > we'd not get any checking done for a long time.
> >
>
> Yeah, the checking could be deferred indefinitely. So you could have a system
> where tasks are hung but it takes a really long time to detect this and
> finally panic the system. Not so good for high-availability.

Why break out at all? Are you that worried about khungtaskd introducing
latencies? Is using preemptible RCU an option for you?

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