Re: 2.6.14-rt22 (and mainline) excessive latency

Paul E. McKenney
2005-12-21T01:47:55Z

On Tue, Dec 20, 2005 at 05:24:42AM +0100, Ingo Molnar wrote:
>
> * Lee Revell <rlrevell@joe-job.com> wrote:
>
> > I captured this 3+ ms latency trace when killing a process with a few
> > thousand threads. Can a cond_resched be added to this code path?
>
> > bash-17992 0.n.1 29us : eligible_child (do_wait)
> >
> > [ 3000+ of these deleted ]
> >
> > bash-17992 0.n.1 3296us : eligible_child (do_wait)
>
> Atomicity of signal delivery is pretty much a must, so i'm not sure this
> particular latency can be fixed, short of running PREEMPT_RT. Paul E.
> McKenney is doing some excellent stuff by RCU-ifying the task lookup and
> signal code, but i'm not sure whether it could cover do_wait().

Took a quick break from repeatedly shooting myself in the foot with
RCU read-side priority boosting (still have a few toes left) to take
a quick look at this. The TASK_TRACED and TASK_STOPPED cases seem
non-trivial, and I am concerned about races with exit.

Any thoughts on whether the latency is due to contention on the
tasklist lock vs. the "goto repeat" in do_wait()?

Thanx, Paul