]> git.baikalelectronics.ru Git - kernel.git/commit
sched: fix SysRq-N (normalize RT tasks)
authorIngo Molnar <mingo@elte.hu>
Sun, 17 Jun 2007 16:37:45 +0000 (18:37 +0200)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 18 Jun 2007 18:52:55 +0000 (11:52 -0700)
commit76f4ed50365e6d45fd5f1b0749702fd963580816
tree8ff6c211cd190aa6152e8ef4bd9f142277ed4a9f
parent63b38ff4452913b9447ce5ecc256b44ec554dc51
sched: fix SysRq-N (normalize RT tasks)

Gene Heskett reported the following problem while testing CFS: SysRq-N
is not always effective in normalizing tasks back to SCHED_OTHER.

The reason for that turns out to be the following bug:

 - normalize_rt_tasks() uses for_each_process() to iterate through all
   tasks in the system.  The problem is, this method does not iterate
   through all tasks, it iterates through all thread groups.

The proper mechanism to enumerate over all threads is to use a
do_each_thread() + while_each_thread() loop.

Reported-by: Gene Heskett <gene.heskett@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/sched.c