* [PATCH v5 0/6] CPUFreq driver using CPPC methods
@ 2015-05-25 21:49 Ashwin Chaugule
2015-05-26 2:12 ` Viresh Kumar
2015-05-26 17:23 ` [Linaro-acpi] " Al Stone
0 siblings, 2 replies; 7+ messages in thread
From: Ashwin Chaugule @ 2015-05-25 21:49 UTC (permalink / raw)
To: rjw
Cc: linux-pm, linaro-acpi, patches, jaswinder.singh, viresh.kumar,
sudeep.holla, Ashwin Chaugule
CPPC:
====
CPPC (Collaborative Processor Performance Control) is a new way to control CPU
performance using an abstract continous scale as against a discretized P-state scale
which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
the basic operation involves:
- OS makes a CPU performance request. (Can provide min and max tolerable bounds)
- Platform (such as BMC) is free to optimize request within requested bounds depending
on power/thermal budgets etc.
- Platform conveys its decision back to OS
The communication between OS and platform occurs through another medium called (PCC)
Platform communication Channel. This is a generic mailbox like mechanism which includes
doorbell semantics to indicate register updates. See drivers/mailbox/pcc.c
This patchset introduces a CPPC based CPUFreq driver that works with existing governors
such as ondemand. The CPPC table parsing and the CPPC communication semantics are
abstracted into separate files to allow future CPPC based drivers to implement their
own governors if required.
Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
recent experiments led to extensive modifications of the algorithm to calculate CPU
busyness. Until it is verified that these changes are worthwhile, the existing governors
should provide for a good enough starting point for ARM64 servers.
Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
specification.[2]
Changes since V4:
- Misc cleanups. Addressed feedback from Rafael.
- Made acpi_processor.c independent of C-states, P-states and others.
- Per CPU scanning for _CPC is now made from acpi_processor.c
- Added new Kconfig options for legacy C states and P states to enable future
support for newer alternatives as defined in the ACPI spec 6.0.
Changes since V3:
- Split CPPC backend methods into separate files.
- Add frontend driver which plugs into existing CPUfreq governors.
- Simplify PCC driver by moving communication space mapping and read/write
into client drivers.
Changes since V2:
- Select driver if !X86, since intel_pstate will use HWP extensions instead.
- Added more comments.
- Added Freq domain awareness and PSD parsing.
Changes since V1:
- Create a new driver based on Dirks suggestion.
- Fold in CPPC backend hooks into main driver.
Changes since V0: [1]
- Split intel_pstate.c into a generic PID governor and platform specific backend.
- Add CPPC accessors as PID backend.
[1] - http://lwn.net/Articles/608715/
[2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
[3] - https://patches.linaro.org/40705/
Ashwin Chaugule (6):
PCC: Initialize PCC Mailbox earlier at boot
ACPI: Make ACPI processor driver more extensible
ACPI: Introduce CPU performance controls using CPPC
CPPC: Add a CPUFreq driver for use with CPPC
CPPC: Probe for CPPC tables for each ACPI Processor object
PCC: Enable PCC only when needed
drivers/acpi/Kconfig | 58 ++-
drivers/acpi/Makefile | 8 +-
drivers/acpi/cppc_acpi.c | 808 ++++++++++++++++++++++++++++++++++++++++
drivers/acpi/processor_driver.c | 89 +++--
drivers/cpufreq/Kconfig | 2 +-
drivers/cpufreq/Kconfig.arm | 16 +
drivers/cpufreq/Kconfig.x86 | 2 +
drivers/cpufreq/Makefile | 2 +
drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
drivers/mailbox/Kconfig | 2 +-
drivers/mailbox/pcc.c | 2 +-
include/acpi/cppc_acpi.h | 137 +++++++
include/acpi/processor.h | 118 +++++-
13 files changed, 1380 insertions(+), 61 deletions(-)
create mode 100644 drivers/acpi/cppc_acpi.c
create mode 100644 drivers/cpufreq/cppc_cpufreq.c
create mode 100644 include/acpi/cppc_acpi.h
--
1.9.1
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-25 21:49 [PATCH v5 0/6] CPUFreq driver using CPPC methods Ashwin Chaugule
@ 2015-05-26 2:12 ` Viresh Kumar
2015-05-26 11:29 ` Ashwin Chaugule
2015-05-26 17:23 ` [Linaro-acpi] " Al Stone
1 sibling, 1 reply; 7+ messages in thread
From: Viresh Kumar @ 2015-05-26 2:12 UTC (permalink / raw)
To: Ashwin Chaugule
Cc: rjw, linux-pm, linaro-acpi, patches, jaswinder.singh,
sudeep.holla
On 25-05-15, 17:49, Ashwin Chaugule wrote:
Generate patches using --thread=shallow option of git, so that we see
all patches in a thread.
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-26 2:12 ` Viresh Kumar
@ 2015-05-26 11:29 ` Ashwin Chaugule
2015-05-26 11:56 ` Viresh Kumar
0 siblings, 1 reply; 7+ messages in thread
From: Ashwin Chaugule @ 2015-05-26 11:29 UTC (permalink / raw)
To: Viresh Kumar
Cc: Rafael J. Wysocki, linux-pm@vger.kernel.org,
Linaro ACPI Mailman List, Patch Tracking, Jaswinder Singh,
Sudeep Holla
On 25 May 2015 at 22:12, Viresh Kumar <viresh.kumar@linaro.org> wrote:
> On 25-05-15, 17:49, Ashwin Chaugule wrote:
>
> Generate patches using --thread=shallow option of git, so that we see
> all patches in a thread.
Thanks for the tip! I'll do that for the next revision onwards, unless
folks would prefer this version to be resent. (trying to avoid patch
traffic)
Thanks,
Ashwin.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-26 11:29 ` Ashwin Chaugule
@ 2015-05-26 11:56 ` Viresh Kumar
0 siblings, 0 replies; 7+ messages in thread
From: Viresh Kumar @ 2015-05-26 11:56 UTC (permalink / raw)
To: Ashwin Chaugule
Cc: Rafael J. Wysocki, linux-pm@vger.kernel.org,
Linaro ACPI Mailman List, Patch Tracking, Jaswinder Singh,
Sudeep Holla
On 26-05-15, 07:29, Ashwin Chaugule wrote:
> Thanks for the tip! I'll do that for the next revision onwards, unless
> folks would prefer this version to be resent.
> traffic)
Not at all, don't even think of sending them again for this :)
--
viresh
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linaro-acpi] [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-25 21:49 [PATCH v5 0/6] CPUFreq driver using CPPC methods Ashwin Chaugule
2015-05-26 2:12 ` Viresh Kumar
@ 2015-05-26 17:23 ` Al Stone
2015-05-26 18:32 ` Ashwin Chaugule
1 sibling, 1 reply; 7+ messages in thread
From: Al Stone @ 2015-05-26 17:23 UTC (permalink / raw)
To: Ashwin Chaugule, rjw
Cc: linaro-acpi, viresh.kumar, linux-pm, patches, jaswinder.singh,
sudeep.holla
On 05/25/2015 03:49 PM, Ashwin Chaugule wrote:
> CPPC:
> ====
>
> CPPC (Collaborative Processor Performance Control) is a new way to control CPU
> performance using an abstract continous scale as against a discretized P-state scale
> which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
> the basic operation involves:
> - OS makes a CPU performance request. (Can provide min and max tolerable bounds)
>
> - Platform (such as BMC) is free to optimize request within requested bounds depending
> on power/thermal budgets etc.
>
> - Platform conveys its decision back to OS
>
> The communication between OS and platform occurs through another medium called (PCC)
> Platform communication Channel. This is a generic mailbox like mechanism which includes
> doorbell semantics to indicate register updates. See drivers/mailbox/pcc.c
>
> This patchset introduces a CPPC based CPUFreq driver that works with existing governors
> such as ondemand. The CPPC table parsing and the CPPC communication semantics are
> abstracted into separate files to allow future CPPC based drivers to implement their
> own governors if required.
>
> Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
> recent experiments led to extensive modifications of the algorithm to calculate CPU
> busyness. Until it is verified that these changes are worthwhile, the existing governors
> should provide for a good enough starting point for ARM64 servers.
>
> Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
> specification.[2]
>
> Changes since V4:
> - Misc cleanups. Addressed feedback from Rafael.
> - Made acpi_processor.c independent of C-states, P-states and others.
> - Per CPU scanning for _CPC is now made from acpi_processor.c
> - Added new Kconfig options for legacy C states and P states to enable future
> support for newer alternatives as defined in the ACPI spec 6.0.
>
> Changes since V3:
> - Split CPPC backend methods into separate files.
> - Add frontend driver which plugs into existing CPUfreq governors.
> - Simplify PCC driver by moving communication space mapping and read/write
> into client drivers.
>
> Changes since V2:
> - Select driver if !X86, since intel_pstate will use HWP extensions instead.
> - Added more comments.
> - Added Freq domain awareness and PSD parsing.
>
> Changes since V1:
> - Create a new driver based on Dirks suggestion.
> - Fold in CPPC backend hooks into main driver.
>
> Changes since V0: [1]
> - Split intel_pstate.c into a generic PID governor and platform specific backend.
> - Add CPPC accessors as PID backend.
>
> [1] - http://lwn.net/Articles/608715/
> [2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
> [3] - https://patches.linaro.org/40705/
>
>
> Ashwin Chaugule (6):
> PCC: Initialize PCC Mailbox earlier at boot
> ACPI: Make ACPI processor driver more extensible
> ACPI: Introduce CPU performance controls using CPPC
> CPPC: Add a CPUFreq driver for use with CPPC
> CPPC: Probe for CPPC tables for each ACPI Processor object
> PCC: Enable PCC only when needed
>
> drivers/acpi/Kconfig | 58 ++-
> drivers/acpi/Makefile | 8 +-
> drivers/acpi/cppc_acpi.c | 808 ++++++++++++++++++++++++++++++++++++++++
> drivers/acpi/processor_driver.c | 89 +++--
> drivers/cpufreq/Kconfig | 2 +-
> drivers/cpufreq/Kconfig.arm | 16 +
> drivers/cpufreq/Kconfig.x86 | 2 +
> drivers/cpufreq/Makefile | 2 +
> drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
> drivers/mailbox/Kconfig | 2 +-
> drivers/mailbox/pcc.c | 2 +-
> include/acpi/cppc_acpi.h | 137 +++++++
> include/acpi/processor.h | 118 +++++-
> 13 files changed, 1380 insertions(+), 61 deletions(-)
> create mode 100644 drivers/acpi/cppc_acpi.c
> create mode 100644 drivers/cpufreq/cppc_cpufreq.c
> create mode 100644 include/acpi/cppc_acpi.h
>
Apart from how the patches showed up in email :), nice work, Ashwin.
Can you add a description of how you tested this, too?
Other than that,
Reviewed-by: Al Stone <al.stone@linaro.org>
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone@linaro.org
-----------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linaro-acpi] [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-26 17:23 ` [Linaro-acpi] " Al Stone
@ 2015-05-26 18:32 ` Ashwin Chaugule
2015-05-26 20:21 ` Al Stone
0 siblings, 1 reply; 7+ messages in thread
From: Ashwin Chaugule @ 2015-05-26 18:32 UTC (permalink / raw)
To: Al Stone
Cc: Rafael J. Wysocki, Linaro ACPI Mailman List, Viresh Kumar,
linux-pm@vger.kernel.org, Patch Tracking, Jaswinder Singh,
Sudeep Holla
On 26 May 2015 at 13:23, Al Stone <al.stone@linaro.org> wrote:
> On 05/25/2015 03:49 PM, Ashwin Chaugule wrote:
>> CPPC:
>> ====
>>
>> CPPC (Collaborative Processor Performance Control) is a new way to control CPU
>> performance using an abstract continous scale as against a discretized P-state scale
>> which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
>> the basic operation involves:
>> - OS makes a CPU performance request. (Can provide min and max tolerable bounds)
>>
>> - Platform (such as BMC) is free to optimize request within requested bounds depending
>> on power/thermal budgets etc.
>>
>> - Platform conveys its decision back to OS
>>
>> The communication between OS and platform occurs through another medium called (PCC)
>> Platform communication Channel. This is a generic mailbox like mechanism which includes
>> doorbell semantics to indicate register updates. See drivers/mailbox/pcc.c
>>
>> This patchset introduces a CPPC based CPUFreq driver that works with existing governors
>> such as ondemand. The CPPC table parsing and the CPPC communication semantics are
>> abstracted into separate files to allow future CPPC based drivers to implement their
>> own governors if required.
>>
>> Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
>> recent experiments led to extensive modifications of the algorithm to calculate CPU
>> busyness. Until it is verified that these changes are worthwhile, the existing governors
>> should provide for a good enough starting point for ARM64 servers.
>>
>> Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
>> specification.[2]
>>
>> Changes since V4:
>> - Misc cleanups. Addressed feedback from Rafael.
>> - Made acpi_processor.c independent of C-states, P-states and others.
>> - Per CPU scanning for _CPC is now made from acpi_processor.c
>> - Added new Kconfig options for legacy C states and P states to enable future
>> support for newer alternatives as defined in the ACPI spec 6.0.
>>
>> Changes since V3:
>> - Split CPPC backend methods into separate files.
>> - Add frontend driver which plugs into existing CPUfreq governors.
>> - Simplify PCC driver by moving communication space mapping and read/write
>> into client drivers.
>>
>> Changes since V2:
>> - Select driver if !X86, since intel_pstate will use HWP extensions instead.
>> - Added more comments.
>> - Added Freq domain awareness and PSD parsing.
>>
>> Changes since V1:
>> - Create a new driver based on Dirks suggestion.
>> - Fold in CPPC backend hooks into main driver.
>>
>> Changes since V0: [1]
>> - Split intel_pstate.c into a generic PID governor and platform specific backend.
>> - Add CPPC accessors as PID backend.
>>
>> [1] - http://lwn.net/Articles/608715/
>> [2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
>> [3] - https://patches.linaro.org/40705/
>>
>>
>> Ashwin Chaugule (6):
>> PCC: Initialize PCC Mailbox earlier at boot
>> ACPI: Make ACPI processor driver more extensible
>> ACPI: Introduce CPU performance controls using CPPC
>> CPPC: Add a CPUFreq driver for use with CPPC
>> CPPC: Probe for CPPC tables for each ACPI Processor object
>> PCC: Enable PCC only when needed
>>
>> drivers/acpi/Kconfig | 58 ++-
>> drivers/acpi/Makefile | 8 +-
>> drivers/acpi/cppc_acpi.c | 808 ++++++++++++++++++++++++++++++++++++++++
>> drivers/acpi/processor_driver.c | 89 +++--
>> drivers/cpufreq/Kconfig | 2 +-
>> drivers/cpufreq/Kconfig.arm | 16 +
>> drivers/cpufreq/Kconfig.x86 | 2 +
>> drivers/cpufreq/Makefile | 2 +
>> drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
>> drivers/mailbox/Kconfig | 2 +-
>> drivers/mailbox/pcc.c | 2 +-
>> include/acpi/cppc_acpi.h | 137 +++++++
>> include/acpi/processor.h | 118 +++++-
>> 13 files changed, 1380 insertions(+), 61 deletions(-)
>> create mode 100644 drivers/acpi/cppc_acpi.c
>> create mode 100644 drivers/cpufreq/cppc_cpufreq.c
>> create mode 100644 include/acpi/cppc_acpi.h
>>
>
> Apart from how the patches showed up in email :), nice work, Ashwin.
>
> Can you add a description of how you tested this, too?
This was tested on an SBSA compatible ARMv8 server with CPPCv2
firmware running on a remote processor. I verified that each CPUs
performance limits were detected and that new performance requests
were made by the on-demand governor proportional to the load on each
CPU. I also verified that using the acpi_processor driver correctly
maps the physical CPU ids to logical CPU ids, which helps in picking
up the proper _CPC details from a processor object, in the case where
CPU physical ids may not be contiguous.
>
> Other than that,
>
> Reviewed-by: Al Stone <al.stone@linaro.org>
Thanks a lot!
Cheers,
Ashwin.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [Linaro-acpi] [PATCH v5 0/6] CPUFreq driver using CPPC methods
2015-05-26 18:32 ` Ashwin Chaugule
@ 2015-05-26 20:21 ` Al Stone
0 siblings, 0 replies; 7+ messages in thread
From: Al Stone @ 2015-05-26 20:21 UTC (permalink / raw)
To: Ashwin Chaugule
Cc: Rafael J. Wysocki, Linaro ACPI Mailman List, Viresh Kumar,
linux-pm@vger.kernel.org, Patch Tracking, Jaswinder Singh,
Sudeep Holla
On 05/26/2015 12:32 PM, Ashwin Chaugule wrote:
> On 26 May 2015 at 13:23, Al Stone <al.stone@linaro.org> wrote:
>> On 05/25/2015 03:49 PM, Ashwin Chaugule wrote:
>>> CPPC:
>>> ====
>>>
>>> CPPC (Collaborative Processor Performance Control) is a new way to control CPU
>>> performance using an abstract continous scale as against a discretized P-state scale
>>> which is tied to CPU frequency only. It is defined in the ACPI 5.0+ spec. In brief,
>>> the basic operation involves:
>>> - OS makes a CPU performance request. (Can provide min and max tolerable bounds)
>>>
>>> - Platform (such as BMC) is free to optimize request within requested bounds depending
>>> on power/thermal budgets etc.
>>>
>>> - Platform conveys its decision back to OS
>>>
>>> The communication between OS and platform occurs through another medium called (PCC)
>>> Platform communication Channel. This is a generic mailbox like mechanism which includes
>>> doorbell semantics to indicate register updates. See drivers/mailbox/pcc.c
>>>
>>> This patchset introduces a CPPC based CPUFreq driver that works with existing governors
>>> such as ondemand. The CPPC table parsing and the CPPC communication semantics are
>>> abstracted into separate files to allow future CPPC based drivers to implement their
>>> own governors if required.
>>>
>>> Initial patchsets included an adaptation of the PID governor from intel_pstate.c. However
>>> recent experiments led to extensive modifications of the algorithm to calculate CPU
>>> busyness. Until it is verified that these changes are worthwhile, the existing governors
>>> should provide for a good enough starting point for ARM64 servers.
>>>
>>> Finer details about the PCC and CPPC spec are available in the latest ACPI 5.1
>>> specification.[2]
>>>
>>> Changes since V4:
>>> - Misc cleanups. Addressed feedback from Rafael.
>>> - Made acpi_processor.c independent of C-states, P-states and others.
>>> - Per CPU scanning for _CPC is now made from acpi_processor.c
>>> - Added new Kconfig options for legacy C states and P states to enable future
>>> support for newer alternatives as defined in the ACPI spec 6.0.
>>>
>>> Changes since V3:
>>> - Split CPPC backend methods into separate files.
>>> - Add frontend driver which plugs into existing CPUfreq governors.
>>> - Simplify PCC driver by moving communication space mapping and read/write
>>> into client drivers.
>>>
>>> Changes since V2:
>>> - Select driver if !X86, since intel_pstate will use HWP extensions instead.
>>> - Added more comments.
>>> - Added Freq domain awareness and PSD parsing.
>>>
>>> Changes since V1:
>>> - Create a new driver based on Dirks suggestion.
>>> - Fold in CPPC backend hooks into main driver.
>>>
>>> Changes since V0: [1]
>>> - Split intel_pstate.c into a generic PID governor and platform specific backend.
>>> - Add CPPC accessors as PID backend.
>>>
>>> [1] - http://lwn.net/Articles/608715/
>>> [2] - http://www.uefi.org/sites/default/files/resources/ACPI_5_1release.pdf
>>> [3] - https://patches.linaro.org/40705/
>>>
>>>
>>> Ashwin Chaugule (6):
>>> PCC: Initialize PCC Mailbox earlier at boot
>>> ACPI: Make ACPI processor driver more extensible
>>> ACPI: Introduce CPU performance controls using CPPC
>>> CPPC: Add a CPUFreq driver for use with CPPC
>>> CPPC: Probe for CPPC tables for each ACPI Processor object
>>> PCC: Enable PCC only when needed
>>>
>>> drivers/acpi/Kconfig | 58 ++-
>>> drivers/acpi/Makefile | 8 +-
>>> drivers/acpi/cppc_acpi.c | 808 ++++++++++++++++++++++++++++++++++++++++
>>> drivers/acpi/processor_driver.c | 89 +++--
>>> drivers/cpufreq/Kconfig | 2 +-
>>> drivers/cpufreq/Kconfig.arm | 16 +
>>> drivers/cpufreq/Kconfig.x86 | 2 +
>>> drivers/cpufreq/Makefile | 2 +
>>> drivers/cpufreq/cppc_cpufreq.c | 197 ++++++++++
>>> drivers/mailbox/Kconfig | 2 +-
>>> drivers/mailbox/pcc.c | 2 +-
>>> include/acpi/cppc_acpi.h | 137 +++++++
>>> include/acpi/processor.h | 118 +++++-
>>> 13 files changed, 1380 insertions(+), 61 deletions(-)
>>> create mode 100644 drivers/acpi/cppc_acpi.c
>>> create mode 100644 drivers/cpufreq/cppc_cpufreq.c
>>> create mode 100644 include/acpi/cppc_acpi.h
>>>
>>
>> Apart from how the patches showed up in email :), nice work, Ashwin.
>>
>> Can you add a description of how you tested this, too?
>
> This was tested on an SBSA compatible ARMv8 server with CPPCv2
> firmware running on a remote processor. I verified that each CPUs
> performance limits were detected and that new performance requests
> were made by the on-demand governor proportional to the load on each
> CPU. I also verified that using the acpi_processor driver correctly
> maps the physical CPU ids to logical CPU ids, which helps in picking
> up the proper _CPC details from a processor object, in the case where
> CPU physical ids may not be contiguous.
Excellent. Thanks, exactly what I was looking for.
--
ciao,
al
-----------------------------------
Al Stone
Software Engineer
Linaro Enterprise Group
al.stone@linaro.org
-----------------------------------
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2015-05-26 20:21 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-25 21:49 [PATCH v5 0/6] CPUFreq driver using CPPC methods Ashwin Chaugule
2015-05-26 2:12 ` Viresh Kumar
2015-05-26 11:29 ` Ashwin Chaugule
2015-05-26 11:56 ` Viresh Kumar
2015-05-26 17:23 ` [Linaro-acpi] " Al Stone
2015-05-26 18:32 ` Ashwin Chaugule
2015-05-26 20:21 ` Al Stone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).