[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1237537169.24626.29.camel@twins>
Date: Fri, 20 Mar 2009 09:19:29 +0100
From: Peter Zijlstra <peterz@...radead.org>
To: Miklos Szeredi <miklos@...redi.hu>
Cc: roland@...hat.com, efault@....de, rjw@...k.pl, jdike@...toit.com,
mingo@...e.hu, user-mode-linux-devel@...ts.sourceforge.net,
linux-kernel@...r.kernel.org
Subject: Re: [patch] fix uml slowness caused by ptrace preemption bug on
host
On Thu, 2009-03-19 at 23:23 +0100, Miklos Szeredi wrote:
> From: Miklos Szeredi <mszeredi@...e.cz>
>
> This patch fixes bug #12208.
>
> This turned out to be not a scheduler regression, but an already
> existing problem in ptrace being triggered by subtle scheduler
> changes.
>
> The problem is this:
>
> - task A is ptracing task B
> - task B stops on a trace event
> - task A is woken up and preempts task B
> - task A calls ptrace on task B, which does ptrace_check_attach()
> - this calls wait_task_inactive(), which sees that task B is still on the runq
> - task A goes to sleep for a jiffy
> - ...
>
> Since UML does lots of the above sequences, those jiffies quickly add
> up to make it slow as hell.
>
> This patch solves this by not scheduling on preempt_enable() after
> ptrace_stop() has woken up the tracer.
Nice,.. however did you find this?
Ingo is looking at changing wait_task_inactive() to not be quite so
stupid. I'll let him respond with more details when he's done poking at
the code :-)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists