Miklos Szeredi 53da1d9456 fix ptrace slowness
This patch fixes bug #12208:

  Bug-Entry       : http://bugzilla.kernel.org/show_bug.cgi?id=12208
  Subject         : uml is very slow on 2.6.28 host

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 rescheduling in read_unlock() after
ptrace_stop() has woken up the tracer.

Thanks to Oleg Nesterov and Ingo Molnar for the feedback.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
CC: stable@kernel.org
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2009-03-23 09:22:31 -07:00
..
2009-02-08 10:00:26 -08:00
2009-02-18 15:37:54 -08:00
2008-10-16 11:21:30 -07:00
2009-02-11 18:24:08 +01:00
2008-07-28 14:37:38 +02:00
2007-07-16 09:05:50 -07:00
2009-01-06 15:59:27 -08:00
2008-12-10 08:01:54 -08:00
2008-08-13 12:55:10 +02:00
2008-10-20 15:43:10 +02:00
2009-02-21 14:17:17 -08:00
2009-01-08 08:31:02 -08:00
2009-01-08 08:31:12 -08:00
2008-09-02 19:21:40 -07:00
2009-01-06 11:07:15 +01:00
2008-11-05 10:30:14 +01:00
2009-03-23 09:22:31 -07:00
2008-02-06 10:41:02 -08:00
2008-10-16 11:21:47 -07:00