]> git.baikalelectronics.ru Git - kernel.git/commit
sched: fix nr_uninterruptible accounting of frozen tasks really
authorThomas Gleixner <tglx@linutronix.de>
Fri, 17 Jul 2009 12:15:47 +0000 (14:15 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Sat, 18 Jul 2009 12:19:53 +0000 (14:19 +0200)
commit43e27fdfee28b0489e0a35b3df67ed08b79c22b6
tree7201f406d135212bae3775dc7d71cbdd6990e5de
parent0e42b5f3ff9f6fdefcbd4ca4fcd72bc3a08b9887
sched: fix nr_uninterruptible accounting of frozen tasks really

commit 1c9303b927 (sched: do not count frozen tasks toward load) broke
the nr_uninterruptible accounting on freeze/thaw. On freeze the task
is excluded from accounting with a check for (task->flags &
PF_FROZEN), but that flag is cleared before the task is thawed. So
while we prevent that the task with state TASK_UNINTERRUPTIBLE
is accounted to nr_uninterruptible on freeze we decrement
nr_uninterruptible on thaw.

Use a separate flag which is handled by the freezing task itself. Set
it before calling the scheduler with TASK_UNINTERRUPTIBLE state and
clear it after we return from frozen state.

Cc: <stable@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/sched.h
kernel/freezer.c