SlideShare una empresa de Scribd logo
1 de 22
Descargar para leer sin conexión
1
ACPI-next C-States
Charles Garcia-Tobin
Oct 2013
2
ACPI-Next C-states
 Numerical non-equivalency – Types of states
 Topology awareness
 Additional Information: Version, BreakEven, S/R, Cache
 Device, Power Resource, and Interrupt dependencies
 PSCI
3
Standardise types of State for ARM
 ARM Linux community uses ACPI derived terminology:
 C-State, P-state
 But it’s not done in a very standard way. Some “general
rules”
 C1 tend to be WFI
 Larger numbers mean deeper states
 Hard to compare systems
 ACPI has strong definitions for C0-C3 states
 Allows more states, but they are of type C1,C2 or C3
 But are not defined in ARM terms
4
Types of State
Run
Hierarchy is running fully operational
Idle
Hierarchy is not executing, but has preserved all
context, will wake up through an interrupt
Sleep
Hierarchy is not executing, context is lost and must be
saved/restored, will wake up through an interrupt.
Caches in the hierarchy are off
Off
Hierarchy is not executing, context is lost and wake up
will only occur by an explicit software command or By
physical hardware reset
zzz
RIP
5
Types of State
Run
Hierarchy is running fully operational
Idle
Hierarchy is not executing, but has preserved all
context, will wake up through an interrupt
Sleep
Hierarchy is not executing, context is lost and must be
saved/restored, will wake up through an interrupt
Caches in the hierarchy are off
Off
Hierarchy is not executing, context is lost and wake up
will only occur by an explicit software command or By
physical hardware reset
zzz
RIP
C0
C3
C1
6
Types of State
 Propose updating language for C1,C2,C3 so that for ARM
based systems:
 C1 is state (WFI) and also a type of state Idle
 C2 not used on ARM systems (as type of state)
 C3 as a type of state has the semantics of Sleep
7
Topology
 ACPI uses _CSD to express coupled C-states
 _CSD relies on the notion of symmetry : Same states for all
processors
 This doesn’t bode well for heterogeneous systems that might
have different number of states per processor
 Feedback from OSVs, is that _CSD is not a very nice object
to work with in kernel
8
Topology
 ACPI has a tree like name space
 We can use that to represent topology directly
 Modules : Structure that can contain other modules or
devices
 We can declare individual CPU states
 We can declare cluster/system states
 Can represent any arbitrary topology
9
Topology
Module System {
_CST(Sleep System)
Module Cluster 0 {
_CST(Sleep Cluster)
Processor CPU0 {
_CST(Idle,
Retention1,Sleep)
}
Processor CPU1 {
_CST(Idle,Sleep)
}
}
Module Cluster 1 {
_CST(Sleep Cluster)
Processor CPU2 {
_CST(Idle,
Retention1,
Retention2,
Sleep)
}
}}
10
Additional Information
 _CST doesn’t have enough information for an OSPM to
manage an ARM system’s power states
 No representation of what context may be lost
 No representation of what caches may be lost/if they need
management or not
 Last core?
 Break Even Latency missing
 No easy way to link C-states with device states or power resource
states
 No easy way to describe wake capability of an interrupt
 Not every interrupt can wake you from every state
 No versioning
11
Additional Information
 Proposal is to replace _CST with new object method _CSX
Package {
Version, // Integer (WORD)
Count, // Integer (WORD)
CStatesX[0], // Package
…
CStatesX[N-1] // Package
}
 Version is self explanatory. It would start at 0
12
Additional Information
 CStateX
Package(9) {
Register // Buffer (Resource Descriptor)
Type // Integer (BYTE)
Latency // Integer (WORD)
Power // Integer (DWORD)
BreakEven // Integer (DWORD)
GenStateFlags // Integer (WORD)
ArchStateFlags // Integer (DWORD)
PowerDepth, // Integer (BYTE)
LastMan, // Reference
}
13
Additional Information
 BreakEven:
 How long do I have to be in this state compared to WFI to save power
 GenStateFlags:
 OSPM_MANAGE_CACHE:
 Set if OSPM has to manage caches,
 CACHES_CONTENTS_LOST
 Set if caches up to current topology level are lost with this power state
 (More on this later)
 PLATFORM_COORDINATED:
 If set, platform coordinates and does last man standing.
 If state is requested it will be entered when last CPU requests that state
or deeper
 If clear if state is requested it will be entered. OSPM has to coordinate
 ArchStateFlags:
 Architecture specific flags. For ARM: what context needs to be saved/restored
 Generic Registers, VFP, Debug context, Timer, CPU Interface, GICD
14
Additional Information
 PowerDepth:
 Identifier describing how deep a power state is
 Bigger number -> Bigger power savings -> Bigger latencies
 Defaults to 0
 Used to describe dependencies
 PowerResources: if ON States of depth X or higher are not available
 Requires augmenting PowerResource Definition
 Device state D0, D1, D2, D3hot then:
 States of depth X=FunctionOfDState or higher are not available
 Requires new methods
 IRQ X can wake up power states of PowerDepth Y or lower
 Required augmenting IRQ descriptions
15
Additional Information
 LastMan:
 Allows for cases where only one specific CPU can enter a coupled
State
 If Plaform Coordinated (PLATFORM_COORDINATED flag
set) this should be undefined
 If CPU only power state this should be undefined
 If it is a coupled C state:
 If state can be initiated on any CPU (doesn’t matter who last man is) it
must be undefined
 Otherwise reference to processor node that must initiate the power
state transition
16
Cache
 Propose that each level of topology has a Cache object,
_CLV
 Describes Caches that are private to that part of the topology
 Simplest instance could be simply a list of caches:
_CLV return package of integers
eg: Core has L1 cache = {L1}
Cluster has L2 cache = {L2}
 Combines with flags, CACHES_CONTENTS_LOST and
OSPM_MANAGE_CACHE
17
Cache
 When not all CPUs have
entered a coupled state:
 Caches in sub-hierarchies
will be lost
 CPUx: L1 Module Cluster 0 {
_CSX(…
CStateX : CACHES_CONTENTS_LOST
…)
_CLV( L2 )
Processor CPU0 {
CSX(…)
_CLV( L1)
}
Processor CPU0 {
CSX(…)
_CLV( L1)
}}
L1
CPU1
L1
CPU0
Cluster 0
L2
18
Cache
 When not all CPUs have
entered a coupled state:
 Caches in sub-hierarchies
will be lost
 CPUx: L1
 When last CPU enters
cluster state:
 All caches up to topology
level are lost
 L2, all L1s
Module Cluster 0 {
_CSX(…
CStateX : CACHES_CONTENTS_LOST
…)
_CLV( L2 )
Processor CPU0 {
CSX(…)
_CLV( L1)
}
Processor CPU0 {
CSX(…)
_CLV( L1)
}}
L1
CPU1
L1
CPU0
Cluster 0
L2
19
PSCI
 Two flags in FADT Flags field:
PSCI_PRESENT: 1 if PSCI is implemented
USE_HVC: 1 if HVC is should be used in preference to SMC as
PSCI conduit
 Note no override or function IDs
20
PSCI
 CStateX uses Register to denote how to enter a C-state
 Registers represented GAS: Generic Address Structure
 GAS is very flexible and allows encapsulating “Software as
Hardware” in very specific cirmcunstance. This is called
Function Fixed Hardware
 Power State Parameter of CPU_SUSPEND is the Registers
Address
 Equivalent to method used for Intel today
21
PSCI
 GAS Register format for a C-State
Field Description
Address Space ID 0x7f (FFH identifier)
Register Bit Width 32
Register Bit Offset 0
Access Size 3 (DWORD)
Address Upper DWORD must be zero
Lower DWORD must denote the PSCI power_state
parameter for the CPU_SUSPEND call
Address: 0xF000000_00000000 is reserved for WFI
this would not result in a PSCI call
22
Questions
???

Más contenido relacionado

Destacado

Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
boyw165
 

Destacado (10)

Note - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and InstallNote - (EDK2) Acpi Tables Compile and Install
Note - (EDK2) Acpi Tables Compile and Install
 
BIOS, Linux and Firmware Test Suite in-between
BIOS, Linux and  Firmware Test Suite in-betweenBIOS, Linux and  Firmware Test Suite in-between
BIOS, Linux and Firmware Test Suite in-between
 
Las16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need itLas16 200 - firmware summit - ras what is it- why do we need it
Las16 200 - firmware summit - ras what is it- why do we need it
 
Linux Initialization Process (1)
Linux Initialization Process (1)Linux Initialization Process (1)
Linux Initialization Process (1)
 
Hardware Probing in the Linux Kernel
Hardware Probing in the Linux KernelHardware Probing in the Linux Kernel
Hardware Probing in the Linux Kernel
 
High Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux KernelHigh Performance Storage Devices in the Linux Kernel
High Performance Storage Devices in the Linux Kernel
 
Linux Initialization Process (2)
Linux Initialization Process (2)Linux Initialization Process (2)
Linux Initialization Process (2)
 
UEFI presentation
UEFI presentationUEFI presentation
UEFI presentation
 
Power aware operating system
Power aware operating systemPower aware operating system
Power aware operating system
 
BUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open SourceBUD17-TR01: Philosophy of Open Source
BUD17-TR01: Philosophy of Open Source
 

Similar a LCU13: ACPI power state mapping

Hibernation in Linux 2.6.29
Hibernation in Linux 2.6.29Hibernation in Linux 2.6.29
Hibernation in Linux 2.6.29
Varun Mahajan
 
Smashing the stack for fun and profit
Smashing the stack for fun and profitSmashing the stack for fun and profit
Smashing the stack for fun and profit
Alexey Miasoedov
 
SCSI Protocol
SCSI ProtocolSCSI Protocol
SCSI Protocol
Rakesh T
 
HA, SRX Cluster & Redundancy Groups
HA, SRX Cluster & Redundancy GroupsHA, SRX Cluster & Redundancy Groups
HA, SRX Cluster & Redundancy Groups
Kashif Latif
 
Cache performance-x86-2009
Cache performance-x86-2009Cache performance-x86-2009
Cache performance-x86-2009
Léia de Sousa
 
Chassis Cluster Configuration
Chassis Cluster ConfigurationChassis Cluster Configuration
Chassis Cluster Configuration
Kashif Latif
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 Architecture
ChangWoo Min
 

Similar a LCU13: ACPI power state mapping (20)

Q2.12: Idle Power States Nomenclature
Q2.12: Idle Power States NomenclatureQ2.12: Idle Power States Nomenclature
Q2.12: Idle Power States Nomenclature
 
LCA13: Power State Coordination Interface
LCA13: Power State Coordination InterfaceLCA13: Power State Coordination Interface
LCA13: Power State Coordination Interface
 
Hibernation in Linux 2.6.29
Hibernation in Linux 2.6.29Hibernation in Linux 2.6.29
Hibernation in Linux 2.6.29
 
Linux_swspnd_v0.3_pub1
Linux_swspnd_v0.3_pub1Linux_swspnd_v0.3_pub1
Linux_swspnd_v0.3_pub1
 
“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”“Linux Kernel CPU Hotplug in the Multicore System”
“Linux Kernel CPU Hotplug in the Multicore System”
 
Smashing the stack for fun and profit
Smashing the stack for fun and profitSmashing the stack for fun and profit
Smashing the stack for fun and profit
 
ARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/SpectreARM Architecture and Meltdown/Spectre
ARM Architecture and Meltdown/Spectre
 
SCSI Protocol
SCSI ProtocolSCSI Protocol
SCSI Protocol
 
Different type of shells In Netapp Cluster mode 8.X and how to access them t...
Different type of shells In Netapp Cluster mode 8.X  and how to access them t...Different type of shells In Netapp Cluster mode 8.X  and how to access them t...
Different type of shells In Netapp Cluster mode 8.X and how to access them t...
 
Cassandra no sql ecosystem
Cassandra no sql ecosystemCassandra no sql ecosystem
Cassandra no sql ecosystem
 
x86_1.ppt
x86_1.pptx86_1.ppt
x86_1.ppt
 
All you didn't know about the CAP theorem
All you didn't know about the CAP theoremAll you didn't know about the CAP theorem
All you didn't know about the CAP theorem
 
Juniper Trouble Shooting
Juniper Trouble ShootingJuniper Trouble Shooting
Juniper Trouble Shooting
 
Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0Cassandra Fundamentals - C* 2.0
Cassandra Fundamentals - C* 2.0
 
HA, SRX Cluster & Redundancy Groups
HA, SRX Cluster & Redundancy GroupsHA, SRX Cluster & Redundancy Groups
HA, SRX Cluster & Redundancy Groups
 
Cache performance-x86-2009
Cache performance-x86-2009Cache performance-x86-2009
Cache performance-x86-2009
 
Chassis Cluster Configuration
Chassis Cluster ConfigurationChassis Cluster Configuration
Chassis Cluster Configuration
 
Intel x86 Architecture
Intel x86 ArchitectureIntel x86 Architecture
Intel x86 Architecture
 
Arm11
Arm11Arm11
Arm11
 
LCA13: ARMv8 Status and Updates
LCA13: ARMv8 Status and UpdatesLCA13: ARMv8 Status and Updates
LCA13: ARMv8 Status and Updates
 

Más de Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
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
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Más de Linaro (20)

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

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 

Último (20)

Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 

LCU13: ACPI power state mapping

  • 2. 2 ACPI-Next C-states  Numerical non-equivalency – Types of states  Topology awareness  Additional Information: Version, BreakEven, S/R, Cache  Device, Power Resource, and Interrupt dependencies  PSCI
  • 3. 3 Standardise types of State for ARM  ARM Linux community uses ACPI derived terminology:  C-State, P-state  But it’s not done in a very standard way. Some “general rules”  C1 tend to be WFI  Larger numbers mean deeper states  Hard to compare systems  ACPI has strong definitions for C0-C3 states  Allows more states, but they are of type C1,C2 or C3  But are not defined in ARM terms
  • 4. 4 Types of State Run Hierarchy is running fully operational Idle Hierarchy is not executing, but has preserved all context, will wake up through an interrupt Sleep Hierarchy is not executing, context is lost and must be saved/restored, will wake up through an interrupt. Caches in the hierarchy are off Off Hierarchy is not executing, context is lost and wake up will only occur by an explicit software command or By physical hardware reset zzz RIP
  • 5. 5 Types of State Run Hierarchy is running fully operational Idle Hierarchy is not executing, but has preserved all context, will wake up through an interrupt Sleep Hierarchy is not executing, context is lost and must be saved/restored, will wake up through an interrupt Caches in the hierarchy are off Off Hierarchy is not executing, context is lost and wake up will only occur by an explicit software command or By physical hardware reset zzz RIP C0 C3 C1
  • 6. 6 Types of State  Propose updating language for C1,C2,C3 so that for ARM based systems:  C1 is state (WFI) and also a type of state Idle  C2 not used on ARM systems (as type of state)  C3 as a type of state has the semantics of Sleep
  • 7. 7 Topology  ACPI uses _CSD to express coupled C-states  _CSD relies on the notion of symmetry : Same states for all processors  This doesn’t bode well for heterogeneous systems that might have different number of states per processor  Feedback from OSVs, is that _CSD is not a very nice object to work with in kernel
  • 8. 8 Topology  ACPI has a tree like name space  We can use that to represent topology directly  Modules : Structure that can contain other modules or devices  We can declare individual CPU states  We can declare cluster/system states  Can represent any arbitrary topology
  • 9. 9 Topology Module System { _CST(Sleep System) Module Cluster 0 { _CST(Sleep Cluster) Processor CPU0 { _CST(Idle, Retention1,Sleep) } Processor CPU1 { _CST(Idle,Sleep) } } Module Cluster 1 { _CST(Sleep Cluster) Processor CPU2 { _CST(Idle, Retention1, Retention2, Sleep) } }}
  • 10. 10 Additional Information  _CST doesn’t have enough information for an OSPM to manage an ARM system’s power states  No representation of what context may be lost  No representation of what caches may be lost/if they need management or not  Last core?  Break Even Latency missing  No easy way to link C-states with device states or power resource states  No easy way to describe wake capability of an interrupt  Not every interrupt can wake you from every state  No versioning
  • 11. 11 Additional Information  Proposal is to replace _CST with new object method _CSX Package { Version, // Integer (WORD) Count, // Integer (WORD) CStatesX[0], // Package … CStatesX[N-1] // Package }  Version is self explanatory. It would start at 0
  • 12. 12 Additional Information  CStateX Package(9) { Register // Buffer (Resource Descriptor) Type // Integer (BYTE) Latency // Integer (WORD) Power // Integer (DWORD) BreakEven // Integer (DWORD) GenStateFlags // Integer (WORD) ArchStateFlags // Integer (DWORD) PowerDepth, // Integer (BYTE) LastMan, // Reference }
  • 13. 13 Additional Information  BreakEven:  How long do I have to be in this state compared to WFI to save power  GenStateFlags:  OSPM_MANAGE_CACHE:  Set if OSPM has to manage caches,  CACHES_CONTENTS_LOST  Set if caches up to current topology level are lost with this power state  (More on this later)  PLATFORM_COORDINATED:  If set, platform coordinates and does last man standing.  If state is requested it will be entered when last CPU requests that state or deeper  If clear if state is requested it will be entered. OSPM has to coordinate  ArchStateFlags:  Architecture specific flags. For ARM: what context needs to be saved/restored  Generic Registers, VFP, Debug context, Timer, CPU Interface, GICD
  • 14. 14 Additional Information  PowerDepth:  Identifier describing how deep a power state is  Bigger number -> Bigger power savings -> Bigger latencies  Defaults to 0  Used to describe dependencies  PowerResources: if ON States of depth X or higher are not available  Requires augmenting PowerResource Definition  Device state D0, D1, D2, D3hot then:  States of depth X=FunctionOfDState or higher are not available  Requires new methods  IRQ X can wake up power states of PowerDepth Y or lower  Required augmenting IRQ descriptions
  • 15. 15 Additional Information  LastMan:  Allows for cases where only one specific CPU can enter a coupled State  If Plaform Coordinated (PLATFORM_COORDINATED flag set) this should be undefined  If CPU only power state this should be undefined  If it is a coupled C state:  If state can be initiated on any CPU (doesn’t matter who last man is) it must be undefined  Otherwise reference to processor node that must initiate the power state transition
  • 16. 16 Cache  Propose that each level of topology has a Cache object, _CLV  Describes Caches that are private to that part of the topology  Simplest instance could be simply a list of caches: _CLV return package of integers eg: Core has L1 cache = {L1} Cluster has L2 cache = {L2}  Combines with flags, CACHES_CONTENTS_LOST and OSPM_MANAGE_CACHE
  • 17. 17 Cache  When not all CPUs have entered a coupled state:  Caches in sub-hierarchies will be lost  CPUx: L1 Module Cluster 0 { _CSX(… CStateX : CACHES_CONTENTS_LOST …) _CLV( L2 ) Processor CPU0 { CSX(…) _CLV( L1) } Processor CPU0 { CSX(…) _CLV( L1) }} L1 CPU1 L1 CPU0 Cluster 0 L2
  • 18. 18 Cache  When not all CPUs have entered a coupled state:  Caches in sub-hierarchies will be lost  CPUx: L1  When last CPU enters cluster state:  All caches up to topology level are lost  L2, all L1s Module Cluster 0 { _CSX(… CStateX : CACHES_CONTENTS_LOST …) _CLV( L2 ) Processor CPU0 { CSX(…) _CLV( L1) } Processor CPU0 { CSX(…) _CLV( L1) }} L1 CPU1 L1 CPU0 Cluster 0 L2
  • 19. 19 PSCI  Two flags in FADT Flags field: PSCI_PRESENT: 1 if PSCI is implemented USE_HVC: 1 if HVC is should be used in preference to SMC as PSCI conduit  Note no override or function IDs
  • 20. 20 PSCI  CStateX uses Register to denote how to enter a C-state  Registers represented GAS: Generic Address Structure  GAS is very flexible and allows encapsulating “Software as Hardware” in very specific cirmcunstance. This is called Function Fixed Hardware  Power State Parameter of CPU_SUSPEND is the Registers Address  Equivalent to method used for Intel today
  • 21. 21 PSCI  GAS Register format for a C-State Field Description Address Space ID 0x7f (FFH identifier) Register Bit Width 32 Register Bit Offset 0 Access Size 3 (DWORD) Address Upper DWORD must be zero Lower DWORD must denote the PSCI power_state parameter for the CPU_SUSPEND call Address: 0xF000000_00000000 is reserved for WFI this would not result in a PSCI call