• Miklos Szeredi's avatar
    fix ptrace slowness · 53da1d94
    Miklos Szeredi authored
    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: default avatarMiklos Szeredi <mszeredi@suse.cz>
    CC: stable@kernel.org
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    53da1d94
Name
Last commit
Last update
..
irq Loading commit data...
power Loading commit data...
time Loading commit data...
trace Loading commit data...
.gitignore Loading commit data...
Kconfig.freezer Loading commit data...
Kconfig.hz Loading commit data...
Kconfig.preempt Loading commit data...
Makefile Loading commit data...
acct.c Loading commit data...
async.c Loading commit data...
audit.c Loading commit data...
audit.h Loading commit data...
audit_tree.c Loading commit data...
auditfilter.c Loading commit data...
auditsc.c Loading commit data...
backtracetest.c Loading commit data...
bounds.c Loading commit data...
capability.c Loading commit data...
cgroup.c Loading commit data...
cgroup_debug.c Loading commit data...
cgroup_freezer.c Loading commit data...
compat.c Loading commit data...
configs.c Loading commit data...
cpu.c Loading commit data...
cpuset.c Loading commit data...
cred-internals.h Loading commit data...
cred.c Loading commit data...
delayacct.c Loading commit data...
dma-coherent.c Loading commit data...
dma.c Loading commit data...
exec_domain.c Loading commit data...
exit.c Loading commit data...
extable.c Loading commit data...
fork.c Loading commit data...
freezer.c Loading commit data...
futex.c Loading commit data...
futex_compat.c Loading commit data...
hrtimer.c Loading commit data...
itimer.c Loading commit data...
kallsyms.c Loading commit data...
kexec.c Loading commit data...
kfifo.c Loading commit data...
kgdb.c Loading commit data...
kmod.c Loading commit data...
kprobes.c Loading commit data...
ksysfs.c Loading commit data...
kthread.c Loading commit data...
latencytop.c Loading commit data...
lockdep.c Loading commit data...
lockdep_internals.h Loading commit data...
lockdep_proc.c Loading commit data...
marker.c Loading commit data...
module.c Loading commit data...
mutex-debug.c Loading commit data...
mutex-debug.h Loading commit data...
mutex.c Loading commit data...
mutex.h Loading commit data...
notifier.c Loading commit data...
ns_cgroup.c Loading commit data...
nsproxy.c Loading commit data...
panic.c Loading commit data...
params.c Loading commit data...
pid.c Loading commit data...
pid_namespace.c Loading commit data...
pm_qos_params.c Loading commit data...
posix-cpu-timers.c Loading commit data...
posix-timers.c Loading commit data...
printk.c Loading commit data...
profile.c Loading commit data...
ptrace.c Loading commit data...
rcuclassic.c Loading commit data...
rcupdate.c Loading commit data...
rcupreempt.c Loading commit data...
rcupreempt_trace.c Loading commit data...
rcutorture.c Loading commit data...
rcutree.c Loading commit data...
rcutree_trace.c Loading commit data...
relay.c Loading commit data...
res_counter.c Loading commit data...
resource.c Loading commit data...
rtmutex-debug.c Loading commit data...
rtmutex-debug.h Loading commit data...
rtmutex-tester.c Loading commit data...
rtmutex.c Loading commit data...
rtmutex.h Loading commit data...
rtmutex_common.h Loading commit data...
rwsem.c Loading commit data...
sched.c Loading commit data...
sched_clock.c Loading commit data...
sched_cpupri.c Loading commit data...
sched_cpupri.h Loading commit data...
sched_debug.c Loading commit data...
sched_fair.c Loading commit data...
sched_features.h Loading commit data...
sched_idletask.c Loading commit data...
sched_rt.c Loading commit data...
sched_stats.h Loading commit data...
seccomp.c Loading commit data...
semaphore.c Loading commit data...
signal.c Loading commit data...
smp.c Loading commit data...
softirq.c Loading commit data...
softlockup.c Loading commit data...
spinlock.c Loading commit data...
srcu.c Loading commit data...
stacktrace.c Loading commit data...
stop_machine.c Loading commit data...
sys.c Loading commit data...
sys_ni.c Loading commit data...
sysctl.c Loading commit data...
sysctl_check.c Loading commit data...
taskstats.c Loading commit data...
test_kprobes.c Loading commit data...
time.c Loading commit data...
timeconst.pl Loading commit data...
timer.c Loading commit data...
tracepoint.c Loading commit data...
tsacct.c Loading commit data...
uid16.c Loading commit data...
up.c Loading commit data...
user.c Loading commit data...
user_namespace.c Loading commit data...
utsname.c Loading commit data...
utsname_sysctl.c Loading commit data...
wait.c Loading commit data...
workqueue.c Loading commit data...