提交 d020283d 编写于 作者: V Venkatesh Pallipadi 提交者: Rafael J. Wysocki

PM / QoS: CPU C-state breakage with PM Qos change

Looks like change "PM QoS: Move and rename the implementation files"
merged during the 3.2 development cycle made PM QoS depend on
CONFIG_PM which depends on (PM_SLEEP || PM_RUNTIME).

That breaks CPU C-states with kernels not having these CONFIGs, causing CPUs
to spend time in Polling loop idle instead of going into deep C-states,
consuming way way more power. This is with either acpi idle or intel idle
enabled.

Either CONFIG_PM should be enabled with any pm_qos users or
the !CONFIG_PM pm_qos_request() should return sane defaults not to break
the existing users. Here's is the patch for the latter option.

[rjw: Modified the changelog slightly.]
Signed-off-by: NVenkatesh Pallipadi <venki@google.com>
Signed-off-by: NRafael J. Wysocki <rjw@sisk.pl>
Cc: stable@vger.kernel.org
上级 379e0be8
......@@ -110,7 +110,19 @@ static inline void pm_qos_remove_request(struct pm_qos_request *req)
{ return; }
static inline int pm_qos_request(int pm_qos_class)
{ return 0; }
{
switch (pm_qos_class) {
case PM_QOS_CPU_DMA_LATENCY:
return PM_QOS_CPU_DMA_LAT_DEFAULT_VALUE;
case PM_QOS_NETWORK_LATENCY:
return PM_QOS_NETWORK_LAT_DEFAULT_VALUE;
case PM_QOS_NETWORK_THROUGHPUT:
return PM_QOS_NETWORK_THROUGHPUT_DEFAULT_VALUE;
default:
return PM_QOS_DEFAULT_VALUE;
}
}
static inline int pm_qos_add_notifier(int pm_qos_class,
struct notifier_block *notifier)
{ return 0; }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册