linux/kernel/sched
Peter Zijlstra f319da0c68 sched: Fix load avg vs cpu-hotplug
Rabik and Paul reported two different issues related to the same few
lines of code.

Rabik's issue is that the nr_uninterruptible migration code is wrong in
that he sees artifacts due to this (Rabik please do expand in more
detail).

Paul's issue is that this code as it stands relies on us using
stop_machine() for unplug, we all would like to remove this assumption
so that eventually we can remove this stop_machine() usage altogether.

The only reason we'd have to migrate nr_uninterruptible is so that we
could use for_each_online_cpu() loops in favour of
for_each_possible_cpu() loops, however since nr_uninterruptible() is the
only such loop and its using possible lets not bother at all.

The problem Rabik sees is (probably) caused by the fact that by
migrating nr_uninterruptible we screw rq->calc_load_active for both rqs
involved.

So don't bother with fancy migration schemes (meaning we now have to
keep using for_each_possible_cpu()) and instead fold any nr_active delta
after we migrate all tasks away to make sure we don't have any skewed
nr_active accounting.

Reported-by: Rakib Mullick <rakib.mullick@gmail.com>
Reported-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1345454817.23018.27.camel@twins
Signed-off-by: Ingo Molnar <mingo@kernel.org>
2012-09-04 14:30:18 +02:00
..
Makefile init_task: Create generic init_task instance 2012-05-05 13:00:21 +02:00
auto_group.c sched: Clean up parameter passing of proc_sched_autogroup_set_nice() 2012-03-02 12:23:49 +01:00
auto_group.h sched: Move all scheduler bits into kernel/sched/ 2011-11-17 12:20:22 +01:00
clock.c sched: Move all scheduler bits into kernel/sched/ 2011-11-17 12:20:22 +01:00
core.c sched: Fix load avg vs cpu-hotplug 2012-09-04 14:30:18 +02:00
cpupri.c sched: Fix minor code style issues 2012-07-26 11:47:00 +02:00
cpupri.h sched: Move all scheduler bits into kernel/sched/ 2011-11-17 12:20:22 +01:00
debug.c sched/debug: Fix printing large integers on 32-bit platforms 2012-05-14 15:05:28 +02:00
fair.c sched, cgroup: Reduce rq->lock hold times for large cgroup hierarchies 2012-08-13 18:41:54 +02:00
features.h sched: Fix more load-balancing fallout 2012-04-26 12:54:52 +02:00
idle_task.c sched/nohz: Rewrite and fix load-avg computation -- again 2012-07-05 20:58:13 +02:00
rt.c sched,rt: fix isolated CPUs leaving root_task_group indefinitely throttled 2012-08-13 18:41:55 +02:00
sched.h sched,cgroup: Fix up task_groups list 2012-08-13 18:41:54 +02:00
stats.c sched: Remove sched_switch 2012-01-27 13:28:53 +01:00
stats.h Merge branch 'sched/core' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into cputime-tip 2011-12-19 19:23:15 +01:00
stop_task.c sched: Fix migration thread runtime bogosity 2012-08-13 18:41:55 +02:00