Thread (1 message) 1 message, 1 author, 2015-08-14
DORMANTno replies

[PATCH 9/9] ARM: smp: Add runtime PM support for CPU hotplug

From: khilman@kernel.org (Kevin Hilman)
Date: 2015-08-14 18:59:31
Also in: linux-pm

Lina Iyer [off-list ref] writes:
On Wed, Aug 12 2015 at 14:28 -0600, Kevin Hilman wrote:
quoted
Lina Iyer [off-list ref] writes:
quoted
Enable runtime PM for CPU devices. Do a runtime get of the CPU device
when the CPU is hotplugged in and a runtime put of the CPU device when
the CPU is hotplugged off. When all the CPUs in a domain are hotplugged
off, the domain may also be powered off and cluster_pm_enter/exit()
notifications are be sent out.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Lorenzo Pieralisi <redacted>
Signed-off-by: Lina Iyer <redacted>
How does the runtiem PM usage with hotplug work with the runtime PM
usage in idle?

IIUC, when a CPU is hotplugged in, it will always have a usecount of at
least 1, right?  and if it's not idle, it will have done a _get() so it
will have a usecount of at least 2.   So I'm not quite seeing how the
usecount will ever go to zero in idle and allow the domain to power_off.
When the CPU is online and running, it would have a ref count of 1. Then
cpuidle would do a _put and the ref count would go to 0 and when coming
out of idle, cpuidle would get a _get and the ref count will be back at
1. Ref count is not incremented when cpuidle is initialized on the CPU.
So whenever the CPU is running, it would have a ref count of 1.
Ah, OK, that was the part I was missing.

Thanks,

Kevin
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help