SlideShare a Scribd company logo
Presented by
Date
Event
SoC Idling
&
CPU Cluster PM
Ulf Hansson
Lina Iyer
Kevin Hilman
BKK16-410 March 10, 2016
Linaro Connect BKK16
SoC Idling & CPU Cluster PM
● Idle management of devices via
runtime PM and the generic PM
domain (genpd). A proven concept!
● Idle management of CPUs and
clusters. Let’s have one “idle” to
rule them all!
Background
● Runtime PM
● System PM
● DevPM QoS
● Generic PM domain (genpd)
Users of genpd
SH-Mobile
S3C64xx
Exynos
Linux 3.1 Linux 3.4
SH-Mobile
Linux 3.18
SH-Mobile
S3C64xx
Exynos
IMX
Ux500
ZX
Qcom
BCM
Dove
Mediatek
Rockchip
Tegra
Linux 4.5
SH-Mobile
S3C64xx
Exynos
Highlights
● Genpd: Maintained by Ulf, Kevin and Rafael
● Various consolidation, fixing issues and regressions
● Genpd: Removing intermediate states from the power off sequence (4.3)
○ http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/base?id=ba2bbfbf63075850bb523e2adb815d45e3509995
● Genpd: Enabling the runtime PM centric approach
● Genpd: Support for multiple retention states (4.6)
Next steps
● Add genpd power statistics
● Avoid needless wakeup in System PM
TODAY
NEXT
CPU Cluster PM - Background and motivation
More...
● CPUs
● integrated devices
● power domains
● micro controllers
● firmware
Kernel needs to evolve...
Idle management today
● The linux kernel has two distinct ways of managing idle. The CPUidle
framework for CPUs and for all other devices: runtime PM combined with
generic power domains (genpd). In addition, CPUidle is not scaling well for
multi-cluster SMP systems and heterogeneous systems like big.LITTLE.
To better manage idle for modern SoCs with a hierarchical structure, we
are exploring extending runtime PM and genpd to CPUs so there is a
unified framework for managing idle across all devices.
?
CPUIDLE
CPUIDLE
SoC Idle: Today
CPU
CPU
?
?
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPU CLUSTER COHERENCY
Platform
hacks
CPUIDLE
CPUIDLE
SoC Idle: With CPU PM
CPU
CPU
Runtime PM GenPD
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPUIDLE
CPU PM
Platform Driver
CPU
CLUSTER &
COHERENCY
Recipe
Start with upstream kernel (v4.5-rc3)
● Prep
○ Extend genpd domains to support multiple idle levels ¹
○ Extend genpd to support IRQ-safe PM domains
● Add
○ Add CPU PM domain framework
○ Call Runtime PM from cpuidle
● Sample
○ Using CPU PM domains - OS-Initiated
○ DT changes for SoC
¹ Patches slated for merge in v4.6
● Init
○ Read domain topology from DT
○ Setup genpd PM domains
● Genpd
○ Last man determination
● Genpd Gov:
○ Determine cluster idle state
CPU PM framework
GenPD
governor
Init
GenPD
GenPD
Platform
Driver
CPU PM
CPU PM framework
● Better than coupled cpuidle
○ CPUs are not woken up when ready to enter coupled state
○ Handles multi-level CPU-Domain topology
● Is not MCPM
○ MCPM handles low level race between CPUs
○ Some v7 SoCs may still need MCPM with CPU PM framework
PSCI: PC vs OSI
● Platform Coordinated (PC)
○ Default PSCI mode
○ F/W decides on CPU-
Domain idle state when all
CPUs are idle
○ F/W does not know of Linux
CPU QoS requirements,
latency and next CPU
wakeup
○ F/W decision to power off
domain may be detrimental
to power and performance
● OS-Initiated (OSI)
○ Optional from PSCI v1.0
onwards
○ Linux decides the CPU-
Domain idle state
○ The last CPU in a domain
provides the idle state of the
cluster, coherency
○ Linux can make a wise
choice of CPU-Domain idle
state knowing QoS, latency,
predicted CPU wakeup etc.
OSI using CPU PM
● Query PSCI_FEATURES in F/W for OSI support
● Setup CPU PM Domains
○ Reads State-IDs for Cluster and Coherency idle levels from DT
● Callbacks for Domain ON/OFF
○ State-IDs passed from CPU PM
○ Aggregate State-IDs against the CPU
● CPU calls F/W with Composite State-ID
● NO SoC specific drivers needed for ARM v8
PSCI: Composite State-ID
CPU
CLUSTER
COHERENCY
COHERENCY CLUSTER CPU
● CPUidle: CPU state
● CPU PM Gov: Cluster state
● CPU PM Gov: Coherency state
cpuidle
Domain00
Domain10
Last CPU’
s PSCI arg
Changes for Vendors: ARM64
● DT
○ Domain hierarchy
○ Domain idle states
● Driver
○ None if F/W supports OSI
Changes for Vendors: ARM32
● DT
○ Domain hierarchy
○ Domain idle states
● Driver
○ Handle power ON/OFF callbacks
○ MCPM or any race avoiding last man logic
○ Revisit SoC specific CPUidle hacks
Genpd: IRQ-Safe Restriction
● IRQ-safe domains can only have IRQ-safe sub-domains
● Other cases with domains and devices remain the same
Status of patches
● PM / Domains: Multiple genpd states: Merged
● PM / Domains: IRQ safe domains: Under review
● CPU PM domains: New framework for CPU clusters : Under review
● PSCI 1.0 OS-Initiated: Support for domain hierarchy: Under review
RFC submission on ML:
[1]. RFC v3: http://www.spinics.net/lists/linux-arm-msm/msg19663.html
Sample ARM v7a implementation
[3]. https://git.linaro.org/people/lina.iyer/linux-next.git/shortlog/refs/heads/genpd-psci-8084
Results
● SoC idle saves power when CPUs are online
○ Critical power saving comes from powering off caches and peripheral
h/w
○ ~20 mA @800 Mhz of power saving at idle
● ~5 s addition to idle enter path
○ Exit latency depends on what happens at domain OFF
● Implemented and tested on DB410c / 96Board

More Related Content

What's hot (20)

PDF
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
Linaro
 
PDF
BKK16-309A Open Platform support in UEFI
Linaro
 
PDF
LAS16-403: GDB Linux Kernel Awareness
Linaro
 
PDF
Kernel Recipes 2015: Greybus
Anne Nicolas
 
PDF
LAS16-101: Efficient kernel backporting
Linaro
 
PDF
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Anne Nicolas
 
PDF
LAS16-200: SCMI - System Management and Control Interface
Linaro
 
PDF
Las16 200 - firmware summit - ras what is it- why do we need it
Linaro
 
ODP
Performance: Observe and Tune
Paul V. Novarese
 
PDF
BKK16-304 The State of GDB on AArch64
Linaro
 
PDF
Linux Kernel Live Patching
GlobalLogic Ukraine
 
PDF
Project ACRN I2C mediator introduction
Project ACRN
 
PDF
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
Linaro
 
PDF
BKK16-213 Where's the Hardware?
Linaro
 
PDF
Embedded Recipes 2019 - Introduction to JTAG debugging
Anne Nicolas
 
PDF
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
Linaro
 
PDF
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linaro
 
PDF
BKK16-TR08 How to generate power models for EAS and IPA
Linaro
 
PDF
LAS16-209: Finished and Upcoming Projects in LMG
Linaro
 
PDF
Mirko Damiani - An Embedded soft real time distributed system in Go
linuxlab_conf
 
LAS16-402: ARM Trusted Firmware – from Enterprise to Embedded
Linaro
 
BKK16-309A Open Platform support in UEFI
Linaro
 
LAS16-403: GDB Linux Kernel Awareness
Linaro
 
Kernel Recipes 2015: Greybus
Anne Nicolas
 
LAS16-101: Efficient kernel backporting
Linaro
 
Kernel Recipes 2015: Speed up your kernel development cycle with QEMU
Anne Nicolas
 
LAS16-200: SCMI - System Management and Control Interface
Linaro
 
Las16 200 - firmware summit - ras what is it- why do we need it
Linaro
 
Performance: Observe and Tune
Paul V. Novarese
 
BKK16-304 The State of GDB on AArch64
Linaro
 
Linux Kernel Live Patching
GlobalLogic Ukraine
 
Project ACRN I2C mediator introduction
Project ACRN
 
LAS16-105: Walkthrough of the EAS kernel adaptation to the Android Common Kernel
Linaro
 
BKK16-213 Where's the Hardware?
Linaro
 
Embedded Recipes 2019 - Introduction to JTAG debugging
Anne Nicolas
 
BKK16-302: Android Optimizing Compiler: New Member Assimilation Guide
Linaro
 
Linux-wpan: IEEE 802.15.4 and 6LoWPAN in the Linux Kernel - BUD17-120
Linaro
 
BKK16-TR08 How to generate power models for EAS and IPA
Linaro
 
LAS16-209: Finished and Upcoming Projects in LMG
Linaro
 
Mirko Damiani - An Embedded soft real time distributed system in Go
linuxlab_conf
 

Viewers also liked (6)

PPT
Chip Ex2010 Gert Goossens
Alona Gradman
 
PDF
SoC Idling for unconf COSCUP 2016
Koan-Sin Tan
 
PDF
Understanding Android Benchmarks
Koan-Sin Tan
 
PDF
RapidScale Virtualization GPU Compute
RapidScale
 
PPTX
Introduction to the Cluster Infrastructure and the Systems Provisioning Engin...
Angelo Failla
 
PDF
Second review presentation
Arvind Krishnaa
 
Chip Ex2010 Gert Goossens
Alona Gradman
 
SoC Idling for unconf COSCUP 2016
Koan-Sin Tan
 
Understanding Android Benchmarks
Koan-Sin Tan
 
RapidScale Virtualization GPU Compute
RapidScale
 
Introduction to the Cluster Infrastructure and the Systems Provisioning Engin...
Angelo Failla
 
Second review presentation
Arvind Krishnaa
 
Ad

Similar to BKK16-410 SoC Idling & CPU Cluster PM (20)

PDF
100Gbps OpenStack For Providing High-Performance NFV
NTT Communications Technology Development
 
PDF
Measuring a 25 and 40Gb/s Data Plane
Open-NFP
 
PDF
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
Linaro
 
PDF
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Nicola La Gloria
 
PDF
AMP Kynetics - ELC 2018 Portland
Kynetics
 
PDF
Kubernetes from scratch at veepee sysadmins days 2019
🔧 Loïc BLOT
 
PDF
LCA13: CPUIDLE: One driver to rule them all?
Linaro
 
PDF
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
Linaro
 
PDF
Improving Scalability of Xen: The 3,000 Domains Experiment
The Linux Foundation
 
PDF
20160927-tierney-improving-performance-40G-100G-data-transfer-nodes.pdf
JunZhao68
 
PDF
Porting Android
Opersys inc.
 
PPTX
Steen_Dissertation_March5
Steen Larsen
 
PDF
PowerDRC/LVS 2.0.1 released by POLYTEDA
Alexander Grudanov
 
PDF
OSN days 2019 - Open Networking and Programmable Switch
Chun Ming Ou
 
PDF
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
The Linux Foundation
 
PDF
Current and Future of Non-Volatile Memory on Linux
mountpoint.io
 
DOCX
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Scott Tsai
 
PDF
A Journey into Hexagon: Dissecting Qualcomm Basebands
Priyanka Aash
 
ODP
µCLinux on Pluto 6 Project presentation
edlangley
 
ODP
UWE Linux Boot Camp 2007: Hacking embedded Linux on the cheap
edlangley
 
100Gbps OpenStack For Providing High-Performance NFV
NTT Communications Technology Development
 
Measuring a 25 and 40Gb/s Data Plane
Open-NFP
 
SFO15-502: Using generic cpuidle framework for ARM/ARM64 in your driver
Linaro
 
Asymmetric Multiprocessing - Kynetics ELC 2018 portland
Nicola La Gloria
 
AMP Kynetics - ELC 2018 Portland
Kynetics
 
Kubernetes from scratch at veepee sysadmins days 2019
🔧 Loïc BLOT
 
LCA13: CPUIDLE: One driver to rule them all?
Linaro
 
HKG15-107: ACPI Power Management on ARM64 Servers (v2)
Linaro
 
Improving Scalability of Xen: The 3,000 Domains Experiment
The Linux Foundation
 
20160927-tierney-improving-performance-40G-100G-data-transfer-nodes.pdf
JunZhao68
 
Porting Android
Opersys inc.
 
Steen_Dissertation_March5
Steen Larsen
 
PowerDRC/LVS 2.0.1 released by POLYTEDA
Alexander Grudanov
 
OSN days 2019 - Open Networking and Programmable Switch
Chun Ming Ou
 
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
The Linux Foundation
 
Current and Future of Non-Volatile Memory on Linux
mountpoint.io
 
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Scott Tsai
 
A Journey into Hexagon: Dissecting Qualcomm Basebands
Priyanka Aash
 
µCLinux on Pluto 6 Project presentation
edlangley
 
UWE Linux Boot Camp 2007: Hacking embedded Linux on the cheap
edlangley
 
Ad

More from Linaro (20)

PDF
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
PDF
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Linaro
 
PDF
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Linaro
 
PDF
Bud17 113: distribution ci using qemu and open qa
Linaro
 
PDF
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
Linaro
 
PDF
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
PDF
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Linaro
 
PDF
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
PDF
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Linaro
 
PDF
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
PDF
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
PDF
HKG18-318 - OpenAMP Workshop
Linaro
 
PDF
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
PDF
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
Linaro
 
PDF
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
PDF
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
PDF
HKG18-113- Secure Data Path work with i.MX8M
Linaro
 
PPTX
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
PPTX
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Linaro
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Linaro
 
Bud17 113: distribution ci using qemu and open qa
Linaro
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-100K1 - George Grey: Opening Keynote
Linaro
 
HKG18-318 - OpenAMP Workshop
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-113- Secure Data Path work with i.MX8M
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Recently uploaded (20)

PPTX
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
PDF
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
PPTX
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
PDF
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
PDF
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
PPTX
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PPTX
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
PDF
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
PDF
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
PDF
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 
cloud computing vai.pptx for the project
vaibhavdobariyal79
 
Economic Impact of Data Centres to the Malaysian Economy
flintglobalapac
 
Agentic AI in Healthcare Driving the Next Wave of Digital Transformation
danielle hunter
 
CIFDAQ's Market Wrap : Bears Back in Control?
CIFDAQ
 
MASTERDECK GRAPHSUMMIT SYDNEY (Public).pdf
Neo4j
 
AI and Robotics for Human Well-being.pptx
JAYMIN SUTHAR
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
AVL ( audio, visuals or led ), technology.
Rajeshwri Panchal
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
Agile Chennai 18-19 July 2025 | Emerging patterns in Agentic AI by Bharani Su...
AgileNetwork
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
Build with AI and GDG Cloud Bydgoszcz- ADK .pdf
jaroslawgajewski1
 
State-Dependent Conformal Perception Bounds for Neuro-Symbolic Verification
Ivan Ruchkin
 
Researching The Best Chat SDK Providers in 2025
Ray Fields
 
Presentation about Hardware and Software in Computer
snehamodhawadiya
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
AI Unleashed - Shaping the Future -Starting Today - AIOUG Yatra 2025 - For Co...
Sandesh Rao
 

BKK16-410 SoC Idling & CPU Cluster PM

  • 1. Presented by Date Event SoC Idling & CPU Cluster PM Ulf Hansson Lina Iyer Kevin Hilman BKK16-410 March 10, 2016 Linaro Connect BKK16
  • 2. SoC Idling & CPU Cluster PM ● Idle management of devices via runtime PM and the generic PM domain (genpd). A proven concept! ● Idle management of CPUs and clusters. Let’s have one “idle” to rule them all!
  • 3. Background ● Runtime PM ● System PM ● DevPM QoS ● Generic PM domain (genpd)
  • 4. Users of genpd SH-Mobile S3C64xx Exynos Linux 3.1 Linux 3.4 SH-Mobile Linux 3.18 SH-Mobile S3C64xx Exynos IMX Ux500 ZX Qcom BCM Dove Mediatek Rockchip Tegra Linux 4.5 SH-Mobile S3C64xx Exynos
  • 5. Highlights ● Genpd: Maintained by Ulf, Kevin and Rafael ● Various consolidation, fixing issues and regressions ● Genpd: Removing intermediate states from the power off sequence (4.3) ○ http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/drivers/base?id=ba2bbfbf63075850bb523e2adb815d45e3509995 ● Genpd: Enabling the runtime PM centric approach ● Genpd: Support for multiple retention states (4.6)
  • 6. Next steps ● Add genpd power statistics ● Avoid needless wakeup in System PM TODAY NEXT
  • 7. CPU Cluster PM - Background and motivation More... ● CPUs ● integrated devices ● power domains ● micro controllers ● firmware Kernel needs to evolve...
  • 8. Idle management today ● The linux kernel has two distinct ways of managing idle. The CPUidle framework for CPUs and for all other devices: runtime PM combined with generic power domains (genpd). In addition, CPUidle is not scaling well for multi-cluster SMP systems and heterogeneous systems like big.LITTLE. To better manage idle for modern SoCs with a hierarchical structure, we are exploring extending runtime PM and genpd to CPUs so there is a unified framework for managing idle across all devices.
  • 10. CPUIDLE CPUIDLE SoC Idle: With CPU PM CPU CPU Runtime PM GenPD CPUIDLE CPUIDLE CPUIDLE CPUIDLE CPUIDLE CPUIDLE CPU PM Platform Driver CPU CLUSTER & COHERENCY
  • 11. Recipe Start with upstream kernel (v4.5-rc3) ● Prep ○ Extend genpd domains to support multiple idle levels ¹ ○ Extend genpd to support IRQ-safe PM domains ● Add ○ Add CPU PM domain framework ○ Call Runtime PM from cpuidle ● Sample ○ Using CPU PM domains - OS-Initiated ○ DT changes for SoC ¹ Patches slated for merge in v4.6
  • 12. ● Init ○ Read domain topology from DT ○ Setup genpd PM domains ● Genpd ○ Last man determination ● Genpd Gov: ○ Determine cluster idle state CPU PM framework GenPD governor Init GenPD GenPD Platform Driver CPU PM
  • 13. CPU PM framework ● Better than coupled cpuidle ○ CPUs are not woken up when ready to enter coupled state ○ Handles multi-level CPU-Domain topology ● Is not MCPM ○ MCPM handles low level race between CPUs ○ Some v7 SoCs may still need MCPM with CPU PM framework
  • 14. PSCI: PC vs OSI ● Platform Coordinated (PC) ○ Default PSCI mode ○ F/W decides on CPU- Domain idle state when all CPUs are idle ○ F/W does not know of Linux CPU QoS requirements, latency and next CPU wakeup ○ F/W decision to power off domain may be detrimental to power and performance ● OS-Initiated (OSI) ○ Optional from PSCI v1.0 onwards ○ Linux decides the CPU- Domain idle state ○ The last CPU in a domain provides the idle state of the cluster, coherency ○ Linux can make a wise choice of CPU-Domain idle state knowing QoS, latency, predicted CPU wakeup etc.
  • 15. OSI using CPU PM ● Query PSCI_FEATURES in F/W for OSI support ● Setup CPU PM Domains ○ Reads State-IDs for Cluster and Coherency idle levels from DT ● Callbacks for Domain ON/OFF ○ State-IDs passed from CPU PM ○ Aggregate State-IDs against the CPU ● CPU calls F/W with Composite State-ID ● NO SoC specific drivers needed for ARM v8
  • 16. PSCI: Composite State-ID CPU CLUSTER COHERENCY COHERENCY CLUSTER CPU ● CPUidle: CPU state ● CPU PM Gov: Cluster state ● CPU PM Gov: Coherency state cpuidle Domain00 Domain10 Last CPU’ s PSCI arg
  • 17. Changes for Vendors: ARM64 ● DT ○ Domain hierarchy ○ Domain idle states ● Driver ○ None if F/W supports OSI
  • 18. Changes for Vendors: ARM32 ● DT ○ Domain hierarchy ○ Domain idle states ● Driver ○ Handle power ON/OFF callbacks ○ MCPM or any race avoiding last man logic ○ Revisit SoC specific CPUidle hacks
  • 19. Genpd: IRQ-Safe Restriction ● IRQ-safe domains can only have IRQ-safe sub-domains ● Other cases with domains and devices remain the same
  • 20. Status of patches ● PM / Domains: Multiple genpd states: Merged ● PM / Domains: IRQ safe domains: Under review ● CPU PM domains: New framework for CPU clusters : Under review ● PSCI 1.0 OS-Initiated: Support for domain hierarchy: Under review RFC submission on ML: [1]. RFC v3: http://www.spinics.net/lists/linux-arm-msm/msg19663.html Sample ARM v7a implementation [3]. https://git.linaro.org/people/lina.iyer/linux-next.git/shortlog/refs/heads/genpd-psci-8084
  • 21. Results ● SoC idle saves power when CPUs are online ○ Critical power saving comes from powering off caches and peripheral h/w ○ ~20 mA @800 Mhz of power saving at idle ● ~5 s addition to idle enter path ○ Exit latency depends on what happens at domain OFF ● Implemented and tested on DB410c / 96Board