From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: 2016-08-18 12:58:15
Install the callbacks via the state machine.
Cc: "Rafael J. Wysocki" <redacted>
Cc: Daniel Lezcano <redacted>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/cpuidle/cpuidle-pseries.c | 50 +++++++++++++++++----------------------
include/linux/cpuhotplug.h | 1 +
2 files changed, 23 insertions(+), 28 deletions(-)
From: Daniel Lezcano <hidden> Date: 2016-08-22 16:16:49
On 08/18/2016 02:57 PM, Sebastian Andrzej Siewior wrote:
quoted hunk
Install the callbacks via the state machine.
Cc: "Rafael J. Wysocki" <redacted>
Cc: Daniel Lezcano <redacted>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: 2016-08-22 19:04:17
On 2016-08-22 18:09:47 [+0200], Daniel Lezcano wrote:
On 08/18/2016 02:57 PM, Sebastian Andrzej Siewior wrote:
quoted
Install the callbacks via the state machine.
Cc: "Rafael J. Wysocki" <redacted>
Cc: Daniel Lezcano <redacted>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
Can't we directly merge these into CPUHP_CPUIDLE_DEAD instead ? Or is it
planned to be done separately ?
You mean CPUHP_CPUIDLE_DEAD instead of _PSERIES_DEAD and _POWERNV_DEAD?
We could do that but you would have to ensure that only one CPUIDLE
driver registers itself at a time and for those powerpc drivers it looks
like you could have two registered (not sure about ARM's little/big (if
you could have two of those later at run-time)).
For the ONLINE state we have dynamic allocation of IDs. If it is
possible to rework the code to use only ONLINE & PRE_DOWN instead of
DEAD then we wouldn't have this. I can't say at this point if we do
dynamic allocation of the DEAD IDs.
Sebastian
From: Daniel Lezcano <hidden> Date: 2016-08-23 14:16:20
On 08/22/2016 09:04 PM, Sebastian Andrzej Siewior wrote:
On 2016-08-22 18:09:47 [+0200], Daniel Lezcano wrote:
quoted
On 08/18/2016 02:57 PM, Sebastian Andrzej Siewior wrote:
quoted
Install the callbacks via the state machine.
Cc: "Rafael J. Wysocki" <redacted>
Cc: Daniel Lezcano <redacted>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
Can't we directly merge these into CPUHP_CPUIDLE_DEAD instead ? Or is it
planned to be done separately ?
You mean CPUHP_CPUIDLE_DEAD instead of _PSERIES_DEAD and _POWERNV_DEAD?
Yes. If we can limit the number of duplicating enum for the same purpose
right now, it would be nice.
We could do that but you would have to ensure that only one CPUIDLE
driver registers itself at a time and for those powerpc drivers it looks
like you could have two registered (not sure about ARM's little/big (if
you could have two of those later at run-time)).
At the first glance, I don't think it is possible to register the cpu
hotplug callback twice because the cpuidle drivers are doing:
...
retval = cpuidle_register(&pseries_idle_driver, NULL);
if (retval) {
printk(KERN_DEBUG "Registration of pseries driver
failed.\n");
return retval;
}
register_cpu_notifier(&setup_hotplug_notifier);
So if a previous driver was already registered, cpuidle_register will
fail and register_cpu_notifier won't be hit.
There is the same scenario for intel_idle and processor_idle (acpi).
For the ONLINE state we have dynamic allocation of IDs. If it is
possible to rework the code to use only ONLINE & PRE_DOWN instead of
DEAD then we wouldn't have this. I can't say at this point if we do
dynamic allocation of the DEAD IDs.
Sebastian
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: 2016-08-23 16:32:16
On 2016-08-23 16:16:12 [+0200], Daniel Lezcano wrote:
Yes. If we can limit the number of duplicating enum for the same purpose
right now, it would be nice.
Okay.
quoted
We could do that but you would have to ensure that only one CPUIDLE
driver registers itself at a time and for those powerpc drivers it looks
like you could have two registered (not sure about ARM's little/big (if
you could have two of those later at run-time)).
At the first glance, I don't think it is possible to register the cpu
hotplug callback twice because the cpuidle drivers are doing:
…
So if a previous driver was already registered, cpuidle_register will
fail and register_cpu_notifier won't be hit.
There is the same scenario for intel_idle and processor_idle (acpi).
I tried to preserve everything as-is during the conversation. However if
you are explicitly asking for this and you are sure that it will work
then you can get it. No problem :)
Sebastian
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: 2016-08-24 09:09:41
Install the callbacks via the state machine.
v1…v2: Use only CPUHP_CPUIDLE_DEAD (requested by Daniel Lezcano)
Cc: "Rafael J. Wysocki" <redacted>
Cc: Daniel Lezcano <redacted>
Cc: linux-pm@vger.kernel.org
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
drivers/cpuidle/cpuidle-pseries.c | 53 ++++++++++++++++++---------------------
include/linux/cpuhotplug.h | 1 +
2 files changed, 26 insertions(+), 28 deletions(-)