RE: [PATCH] cpuidle: Fix the CPU stuck at C0 for 2-3s after PM_QOS back to DEFAULT
From: Liu, Chuansheng
Date: Thu Aug 14 2014 - 09:58:03 EST
> -----Original Message-----
> From: Daniel Lezcano [mailto:daniel.lezcano@xxxxxxxxxx]
> Sent: Thursday, August 14, 2014 9:30 PM
> To: Peter Zijlstra
> Cc: Liu, Chuansheng; Rafael J. Wysocki; linux-pm@xxxxxxxxxxxxxxx; LKML; Liu,
> Changcheng; Wang, Xiaoming; Chakravarty, Souvik K
> Subject: Re: [PATCH] cpuidle: Fix the CPU stuck at C0 for 2-3s after PM_QOS
> back to DEFAULT
> I think the main issue here is to exit the poll_idle loop when an IPI is
> received. IIUC, there is a pm_qos user, perhaps a driver (Chuansheng can
> give more details), setting a very short latency, so the cpuidle
> framework choose a shallow state like the poll_idle and then the driver
> sets a bigger latency, leading to the IPI to wake all the cpus. As the
> CPUs are in the poll_idle, they don't exit until an event make them to
> exit the need_resched() loop (reschedule or whatever). This situation
> can let the CPUs to stand in the infinite loop several seconds while we
> are expecting them to exit the poll_idle and enter a deeper idle state,
> thus with an extra energy consumption.
>
Exactly, no function error here. But do not enter the deeper C-state will bring more power
consumption, in some mp3 standby mode, even 10% power can be saved.
And this is the patch's aim here.