]> err.no Git - linux-2.6/commit
pm_qos_requirement might sleep
authorJohn Kacur <jkacur@gmail.com>
Tue, 2 Sep 2008 21:36:13 +0000 (14:36 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 3 Sep 2008 02:21:40 +0000 (19:21 -0700)
commit9d3593574702ae1899e23a1535da1ac71f928042
tree0ea17d5e2a922df5e1d2f52c545728084afee78c
parent74c4633da7994eddcfcd2762a448c6889cc2b5bd
pm_qos_requirement might sleep

Make PM_QOS and CPU_IDLE play nicer when run with the RT-Preempt kernel.

The purpose of the patch is to remove the spin_lock around the read in the
function pm_qos_requirement - since spinlocks can sleep in -rt and this
function is called from idle.

CPU_IDLE polls the target_value's of some of the pm_qos parameters from
the idle loop causing sleeping locking warnings.  Changing the
target_value to an atomic avoids this issue.

Remove the spinlock in pm_qos_requirement by making target_value an atomic
type.

Signed-off-by: mark gross <mgross@linux.intel.com>
Signed-off-by: John Kacur <jkacur@gmail.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
kernel/pm_qos_params.c