SlideShare a Scribd company logo
1 of 29
Download to read offline
In Kernel Switcher: A solution to support
ARM's new big.LITTLE technology
web: www.linaro.org
email: mathieu.poirier@linaro.org
Presenter: Mathieu Poirier
Slide 2
What is big.LITTLE?
● A system that contains two sets of architecturally identical
CPUs.
● CPUs differ in the power and performance they yield.
● Similar architecture allows to:
○ Run the same software transparently on all CPUs.
○ Migrate from one CPU to another transparently.
www.linaro.org email: contactus@linaro.org
Slide 2
TC2 - ARM's big.LITTLE implementation
● Has a cluster of Cortex-A15 processors (big) and a
cluster of Cortex-A7 processors (LITTLE) in the same
system.
● Cortex-A7 and A15 are architecturally similar - ARM v7A.
● Processor caches are kept coherent using a cache
coherent interconnect (CCI-400 on TC2).
● A shared Generic Interrupt Controller(GIC-400 on TC2) is
used to migrate interrupts between any cores in the big or
LITTLE clusters.
www.linaro.org email: contactus@linaro.org
Slide 2
What does big.LITTLE look like?
www.linaro.org email: contactus@linaro.org
GIC-400
CCI-400 (Cache Coherent Interconnect)
Cortex-A15
CORE
Cortex-A15
CORE
L2
Cortex-A7
CORE
Cortex-A7
CORE
L2
IO Coherent
Master
Interrupts
Memory Controller Ports System Ports
* Picture by ARM LTD.
Slide 3
What is the idea behind big.LITTLE?
● Provide a balance between performance and power
efficiency.
● The original idea was to use the A15 cluster for CPU
intensive task and the A7 cluster for low power task.
○ Gaming - A15
○ Web page rendering: A-15
○ Texting - A7
○ Email - A7
● Linaro's approach is to use system load to decide which
core to use.
www.linaro.org email: contactus@linaro.org
Slide 3
What is being done at Linaro
●We currently have 2 big.LITTLE projects:
○Heterogenous Multi Processing (HMP).
○In Kernel Switcher (IKS).
●We can switch between them on the fly !
○IKS can be enabled in the kernel config.
○Or on the kernel command line.
○Or at run time from sysfs.
www.linaro.org email: contactus@linaro.org
Slide 3
Heterogeneous Multi Processing (HMP)
● All cores in the system can be used at the same time.
● Scheduler needs to be aware of different CPU processing
power when scheduling.
● Higher peak performance for some workloads but harder
scheduling problem for the kernel.
● Currently being developed in collaboration with the
community.
www.linaro.org email: contactus@linaro.org
Slide 3
In Kernel Switching(IKS) at Linaro
● A7 and A15 CPU from each cluster are coupled together
to form a "virtual" CPU.
● All virtual CPUs have the same processing capabilities.
● The kernel core doesn't need to know about the
asymmetric nature of the b.L architecture.
● Only one core is active in a given virtual CPU.
● Decision to move from one core to another is taken at the
CPUfreq driver level.
● Released to Linaro partners in December of 2012.
www.linaro.org email: contactus@linaro.org
Slide 2
One possible solution
www.linaro.org email: contactus@linaro.org
CLUSTER 0
CLUSTER 1
CPU0
CPU1
● Inefficient - granularity is too coarse.
● Synchronisation period needed before switching.
Cortex-A15
CORE_0
Cortex-A15
CORE_1
Cortex-A7
CORE_0
Cortex-A7
CORE_1
Slide 2
What Linaro has implemented
www.linaro.org email: contactus@linaro.org
Cortex-A15
CORE_0
Cortex-A15
CORE_1
Cortex-A7
CORE_0
Cortex-A7
CORE_1
CLUSTER 0
CLUSTER 1
CPU0 CPU1
Slide 3
IKS - Creation of the virtual CPUs
●A7 and A15 CPUs are physically numbered in each
cluster:
○A15_0, A15_1
○A7_0, A7_1
● CPUs with a corresponding counterpart are grouped
together:
○{A15_0, A7_0}
○{A15_1, A7_1}
●One CPU in each group is switched off:
○A7_0, A7_1.
●Only the switcher needs to know about the grouping.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - CPUfreq driver initialisation
● The cpufreq driver deals with the physical characteristic of
each CPU core.
● Responsible of presenting the virtual CPUs' operating
frequencies to the kernel.
● Select which core in a virtual CPU will be used.
● Also determines when to switch from one core to another
in the "virtual" CPU.
● Switcher logic needs to be coordinated with cpufreq
driver.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Frequencies exposed to CPUFREQ
www.linaro.org email: contactus@linaro.org
Cortex-A15
CORE
Cortex-A7
CORE
350MHz
400MHz
500MHz
600MHz
700MHz
800MHz
900MHz
1000MHz
500MHz
600MHz
700MHz
800MHz
900MHz
1000MHz
1100MHz
1200MHz
CPU2
CPU3
CPU4
CPU0
CPU1
Virtual
CORE
175MHz
200MHz
250MHz
300MHz
350MHz
400MHz
450MHz
500MHz
500MHz
600MHz
700MHz
800MHz
900MHz
1000MHz
1100MHz
1200MHz
CPU0
CPU1
Before switcher logic init() After switcher logic init()
Slide 3
IKS - Frequencies exposed to CPUFREQ
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - CPUfreq driver enhancement
●The CPUfreq core and the kernel are NOT aware of the b.
L implementation.
●It is up to the CPUfreq driver to deal with the b.L
architecture:
www.linaro.org email: contactus@linaro.org
if (actual_cluster == A15_CLUSTER) AND
(newFrequency < BIG_CLUSTER_MIN) {
new_cluster = A7_CLUSTER;
} else if (actual_cluster == A7_CLUSTER) AND
(newFrequency > SMALL_CLUSTER_MAX) {
new_cluster = A15_CLUSTER;
}
...
...
...
if (actual_cluster != new_cluster)
bL_switch_request(cpu, new_cluster);
Slide 3
IKS - Bridging the Chasm
●Initial situation:
○Virtual CPU0 is running a 200MHz.
○Therefore A7_0 is active, A15_0 is switched off.
○CPUfreq core knows virtual CPU0 can go up to 1.2
GHz.
● A request from the interactive governor comes in to go up
to 1.0GHz.
●The A7 can't accommodate the request but the A15 can.
●What happens ?
●The CPUfreq driver instruct the switcher logic to move
from the A7_0 (outbound) to the A15_0 (inbound).
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Bridging the Chasm
www.linaro.org email: contactus@linaro.org
Power up inbound CPU
Starts fetching at reset
vector
Signals the cpu is alive
Setup the cluster and CCI
if cluster was down
Wait for outbound context
to be saved
Wait for inbound alive
signal
OUTBOUND INBOUND
Tasks are scheduled while
waiting for inbound alive
Slide 3
IKS - Bridging the Chasm
www.linaro.org email: contactus@linaro.org
Inbound alive has been
received
Disable interrupts
Save current CPU context
Signal inbound that
context has been saved
Inbound restores context
Migrate interrupts from
outbound to inbound CPU
OUTBOUND INBOUND
Inbound waits for outbound
context to be saved
Slide 3
IKS - Bridging the Chasm
www.linaro.org email: contactus@linaro.org
Power off
Flush local cache Enable interrupts
Signal inbound that
context has been saved
Inbound restores context
If last man standing:
flush cluster cache
disable CCI
OUTBOUND INBOUND
Normal execution
continues
Slide 3
●Important things we haven't mentioned:
○Mutual exclusion when setting up clusters (vlocks).
○The last man standing algorithm.
○The early poke mechanism.
○CPU and cluster state tracking.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Addition to the Interactive Governor
●Though generic in nature and not tied to a distribution the
IKS solution was tested using Android and the interactive
governor.
●In it's original form the interactive governor algorithm
reacts to the system load:
○When the system is busy, it jumps to higher
frequencies.
○Above a certain threshold, moving from one OPP to
another is further delayed by a timer.
●Since we have two cores in one virtual CPU, we
duplicated the above algorithm to avoid reaching the
overdrive (and costliest) point on the A15.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Addition to the Interactive Governor
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - The Results
●Our metrics:
○Power consumed by each core.
○BBench's "performance" metric, which gives a score for
how fast web pages are loaded.
●Our test:
○Running BBench with audio playing in the background.
●For IKS our goal was to obtain a 60/90 ratio:
○60% of the power used by a 2 x A15 solution.
○90% of the performance used by a 2 x A15 solution.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - The Results
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Tuning and Optimisation
●Basic configuration:
○hispeed_freq = Max OPP on A7 = 500MHz
○hispeed_freq2 = Last OPP on A15 before OD = 1GHz
○hispeed_load = 85
○hispeed2_load = 95
●Processing is done on the A7 cluster for as long as the
CPU load is below 85%.
●When CPU load is between 85% and 95%, A15 core is
used.
●When load goes above 95%, over drive frequencies on
A15 (1.1GHz, 1.2GHz) are reached.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Tuning and Optimisation
●Optimisation was done using interactive governor.
●"above_hispeed_delay": the lower the value, the more
responsive the system is.
● "timer_rate": how often the system is checked for
frequency optimisation.
●Both are tightly coupled. Ex: if timer_rate is bigger than
"above_hispeed_delay", opportunity for frequency
adjustment will be lost.
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Tuning and Optimisation
●IKS_config1:
○above_hispeed_delay: 50ms
○timer_rate: 10ms
○Result: 60/90
●IKS_config2:
○above_hispeed_delay: 0.5ms
○timer_rate: 0.5ms
○result: 65/95
●IKS_config3:
○above_hispeed_delay: 750ms
○timer_rate: 10ms
○result:41/57
www.linaro.org email: contactus@linaro.org
Slide 3
IKS - Upstreaming
● Cluster power management is being reviewed on the
ARM Linux mailing list and getting positive remarks.
● All the source will be made public when one of our
members has a release that utilises this code.
www.linaro.org email: contactus@linaro.org
Slide 3
Question and Comments ?
www.linaro.org email: contactus@linaro.org
Nicolas Pitre
Dave Martin
Viresh Kumar
Mathieu Poirier
Amit Kucheria
David Zinman
Vishal Bhoj
Naresh Kamboju
Ryan Harkin
John (Tixy) Medhurst
Many others from ARM Ltd.
Contributors to this project:

More Related Content

More from 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
 
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...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 mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
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 mainlineLinaro
 
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 allLinaro
 
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 HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
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.MX8MLinaro
 
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 bootLinaro
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...Linaro
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramLinaro
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNLinaro
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...Linaro
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...Linaro
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionLinaro
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersLinaro
 

More from Linaro (20)

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
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NN
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: Introduction
 
HKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 ServersHKG18-116 - RAS Solutions for Arm64 Servers
HKG18-116 - RAS Solutions for Arm64 Servers
 

Recently uploaded

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
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 MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
[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.pdfhans926745
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
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 MenDelhi Call girls
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
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.pptxHampshireHUG
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 

Recently uploaded (20)

WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
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
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
[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
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
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
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 

LCA13: Technical Overview of big.LITTLE Switcher

  • 1. In Kernel Switcher: A solution to support ARM's new big.LITTLE technology web: www.linaro.org email: mathieu.poirier@linaro.org Presenter: Mathieu Poirier
  • 2. Slide 2 What is big.LITTLE? ● A system that contains two sets of architecturally identical CPUs. ● CPUs differ in the power and performance they yield. ● Similar architecture allows to: ○ Run the same software transparently on all CPUs. ○ Migrate from one CPU to another transparently. www.linaro.org email: contactus@linaro.org
  • 3. Slide 2 TC2 - ARM's big.LITTLE implementation ● Has a cluster of Cortex-A15 processors (big) and a cluster of Cortex-A7 processors (LITTLE) in the same system. ● Cortex-A7 and A15 are architecturally similar - ARM v7A. ● Processor caches are kept coherent using a cache coherent interconnect (CCI-400 on TC2). ● A shared Generic Interrupt Controller(GIC-400 on TC2) is used to migrate interrupts between any cores in the big or LITTLE clusters. www.linaro.org email: contactus@linaro.org
  • 4. Slide 2 What does big.LITTLE look like? www.linaro.org email: contactus@linaro.org GIC-400 CCI-400 (Cache Coherent Interconnect) Cortex-A15 CORE Cortex-A15 CORE L2 Cortex-A7 CORE Cortex-A7 CORE L2 IO Coherent Master Interrupts Memory Controller Ports System Ports * Picture by ARM LTD.
  • 5. Slide 3 What is the idea behind big.LITTLE? ● Provide a balance between performance and power efficiency. ● The original idea was to use the A15 cluster for CPU intensive task and the A7 cluster for low power task. ○ Gaming - A15 ○ Web page rendering: A-15 ○ Texting - A7 ○ Email - A7 ● Linaro's approach is to use system load to decide which core to use. www.linaro.org email: contactus@linaro.org
  • 6. Slide 3 What is being done at Linaro ●We currently have 2 big.LITTLE projects: ○Heterogenous Multi Processing (HMP). ○In Kernel Switcher (IKS). ●We can switch between them on the fly ! ○IKS can be enabled in the kernel config. ○Or on the kernel command line. ○Or at run time from sysfs. www.linaro.org email: contactus@linaro.org
  • 7. Slide 3 Heterogeneous Multi Processing (HMP) ● All cores in the system can be used at the same time. ● Scheduler needs to be aware of different CPU processing power when scheduling. ● Higher peak performance for some workloads but harder scheduling problem for the kernel. ● Currently being developed in collaboration with the community. www.linaro.org email: contactus@linaro.org
  • 8. Slide 3 In Kernel Switching(IKS) at Linaro ● A7 and A15 CPU from each cluster are coupled together to form a "virtual" CPU. ● All virtual CPUs have the same processing capabilities. ● The kernel core doesn't need to know about the asymmetric nature of the b.L architecture. ● Only one core is active in a given virtual CPU. ● Decision to move from one core to another is taken at the CPUfreq driver level. ● Released to Linaro partners in December of 2012. www.linaro.org email: contactus@linaro.org
  • 9. Slide 2 One possible solution www.linaro.org email: contactus@linaro.org CLUSTER 0 CLUSTER 1 CPU0 CPU1 ● Inefficient - granularity is too coarse. ● Synchronisation period needed before switching. Cortex-A15 CORE_0 Cortex-A15 CORE_1 Cortex-A7 CORE_0 Cortex-A7 CORE_1
  • 10. Slide 2 What Linaro has implemented www.linaro.org email: contactus@linaro.org Cortex-A15 CORE_0 Cortex-A15 CORE_1 Cortex-A7 CORE_0 Cortex-A7 CORE_1 CLUSTER 0 CLUSTER 1 CPU0 CPU1
  • 11. Slide 3 IKS - Creation of the virtual CPUs ●A7 and A15 CPUs are physically numbered in each cluster: ○A15_0, A15_1 ○A7_0, A7_1 ● CPUs with a corresponding counterpart are grouped together: ○{A15_0, A7_0} ○{A15_1, A7_1} ●One CPU in each group is switched off: ○A7_0, A7_1. ●Only the switcher needs to know about the grouping. www.linaro.org email: contactus@linaro.org
  • 12. Slide 3 IKS - CPUfreq driver initialisation ● The cpufreq driver deals with the physical characteristic of each CPU core. ● Responsible of presenting the virtual CPUs' operating frequencies to the kernel. ● Select which core in a virtual CPU will be used. ● Also determines when to switch from one core to another in the "virtual" CPU. ● Switcher logic needs to be coordinated with cpufreq driver. www.linaro.org email: contactus@linaro.org
  • 13. Slide 3 IKS - Frequencies exposed to CPUFREQ www.linaro.org email: contactus@linaro.org Cortex-A15 CORE Cortex-A7 CORE 350MHz 400MHz 500MHz 600MHz 700MHz 800MHz 900MHz 1000MHz 500MHz 600MHz 700MHz 800MHz 900MHz 1000MHz 1100MHz 1200MHz CPU2 CPU3 CPU4 CPU0 CPU1 Virtual CORE 175MHz 200MHz 250MHz 300MHz 350MHz 400MHz 450MHz 500MHz 500MHz 600MHz 700MHz 800MHz 900MHz 1000MHz 1100MHz 1200MHz CPU0 CPU1 Before switcher logic init() After switcher logic init()
  • 14. Slide 3 IKS - Frequencies exposed to CPUFREQ www.linaro.org email: contactus@linaro.org
  • 15. Slide 3 IKS - CPUfreq driver enhancement ●The CPUfreq core and the kernel are NOT aware of the b. L implementation. ●It is up to the CPUfreq driver to deal with the b.L architecture: www.linaro.org email: contactus@linaro.org if (actual_cluster == A15_CLUSTER) AND (newFrequency < BIG_CLUSTER_MIN) { new_cluster = A7_CLUSTER; } else if (actual_cluster == A7_CLUSTER) AND (newFrequency > SMALL_CLUSTER_MAX) { new_cluster = A15_CLUSTER; } ... ... ... if (actual_cluster != new_cluster) bL_switch_request(cpu, new_cluster);
  • 16. Slide 3 IKS - Bridging the Chasm ●Initial situation: ○Virtual CPU0 is running a 200MHz. ○Therefore A7_0 is active, A15_0 is switched off. ○CPUfreq core knows virtual CPU0 can go up to 1.2 GHz. ● A request from the interactive governor comes in to go up to 1.0GHz. ●The A7 can't accommodate the request but the A15 can. ●What happens ? ●The CPUfreq driver instruct the switcher logic to move from the A7_0 (outbound) to the A15_0 (inbound). www.linaro.org email: contactus@linaro.org
  • 17. Slide 3 IKS - Bridging the Chasm www.linaro.org email: contactus@linaro.org Power up inbound CPU Starts fetching at reset vector Signals the cpu is alive Setup the cluster and CCI if cluster was down Wait for outbound context to be saved Wait for inbound alive signal OUTBOUND INBOUND Tasks are scheduled while waiting for inbound alive
  • 18. Slide 3 IKS - Bridging the Chasm www.linaro.org email: contactus@linaro.org Inbound alive has been received Disable interrupts Save current CPU context Signal inbound that context has been saved Inbound restores context Migrate interrupts from outbound to inbound CPU OUTBOUND INBOUND Inbound waits for outbound context to be saved
  • 19. Slide 3 IKS - Bridging the Chasm www.linaro.org email: contactus@linaro.org Power off Flush local cache Enable interrupts Signal inbound that context has been saved Inbound restores context If last man standing: flush cluster cache disable CCI OUTBOUND INBOUND Normal execution continues
  • 20. Slide 3 ●Important things we haven't mentioned: ○Mutual exclusion when setting up clusters (vlocks). ○The last man standing algorithm. ○The early poke mechanism. ○CPU and cluster state tracking. www.linaro.org email: contactus@linaro.org
  • 21. Slide 3 IKS - Addition to the Interactive Governor ●Though generic in nature and not tied to a distribution the IKS solution was tested using Android and the interactive governor. ●In it's original form the interactive governor algorithm reacts to the system load: ○When the system is busy, it jumps to higher frequencies. ○Above a certain threshold, moving from one OPP to another is further delayed by a timer. ●Since we have two cores in one virtual CPU, we duplicated the above algorithm to avoid reaching the overdrive (and costliest) point on the A15. www.linaro.org email: contactus@linaro.org
  • 22. Slide 3 IKS - Addition to the Interactive Governor www.linaro.org email: contactus@linaro.org
  • 23. Slide 3 IKS - The Results ●Our metrics: ○Power consumed by each core. ○BBench's "performance" metric, which gives a score for how fast web pages are loaded. ●Our test: ○Running BBench with audio playing in the background. ●For IKS our goal was to obtain a 60/90 ratio: ○60% of the power used by a 2 x A15 solution. ○90% of the performance used by a 2 x A15 solution. www.linaro.org email: contactus@linaro.org
  • 24. Slide 3 IKS - The Results www.linaro.org email: contactus@linaro.org
  • 25. Slide 3 IKS - Tuning and Optimisation ●Basic configuration: ○hispeed_freq = Max OPP on A7 = 500MHz ○hispeed_freq2 = Last OPP on A15 before OD = 1GHz ○hispeed_load = 85 ○hispeed2_load = 95 ●Processing is done on the A7 cluster for as long as the CPU load is below 85%. ●When CPU load is between 85% and 95%, A15 core is used. ●When load goes above 95%, over drive frequencies on A15 (1.1GHz, 1.2GHz) are reached. www.linaro.org email: contactus@linaro.org
  • 26. Slide 3 IKS - Tuning and Optimisation ●Optimisation was done using interactive governor. ●"above_hispeed_delay": the lower the value, the more responsive the system is. ● "timer_rate": how often the system is checked for frequency optimisation. ●Both are tightly coupled. Ex: if timer_rate is bigger than "above_hispeed_delay", opportunity for frequency adjustment will be lost. www.linaro.org email: contactus@linaro.org
  • 27. Slide 3 IKS - Tuning and Optimisation ●IKS_config1: ○above_hispeed_delay: 50ms ○timer_rate: 10ms ○Result: 60/90 ●IKS_config2: ○above_hispeed_delay: 0.5ms ○timer_rate: 0.5ms ○result: 65/95 ●IKS_config3: ○above_hispeed_delay: 750ms ○timer_rate: 10ms ○result:41/57 www.linaro.org email: contactus@linaro.org
  • 28. Slide 3 IKS - Upstreaming ● Cluster power management is being reviewed on the ARM Linux mailing list and getting positive remarks. ● All the source will be made public when one of our members has a release that utilises this code. www.linaro.org email: contactus@linaro.org
  • 29. Slide 3 Question and Comments ? www.linaro.org email: contactus@linaro.org Nicolas Pitre Dave Martin Viresh Kumar Mathieu Poirier Amit Kucheria David Zinman Vishal Bhoj Naresh Kamboju Ryan Harkin John (Tixy) Medhurst Many others from ARM Ltd. Contributors to this project: