Yesterday, Linaro announced the released of the IKS (In-kernel switcher) implementation for big.LITTLE processor which allows the SoC to switch between individual Cortex A7 or Cortex A15 cores to optimize power consumption. Currently, the only consumer device using supporting big.LITTLE the Samsung Galaxy S4 thanks to Samsung Exynos 5 Octa featuring 4 ARM Cortex A7 and 4 ARM Cortex A15 cores. IKS implementation can only make use of 4 cores at a time in this processor, since it must choose between A7 or A15 depending on the load. HMP (Heteregenous Multi-Processing) implementation is currently worked on in order to be able to use all 8 cores, and distributes tasks to the right core for the job. You can read my previous post for differences between IKS and HMP.
Linaro explains the current source still needs a few more modifications before being upstream to mainline. The code was developed for and tested on the VExpress TC2 development platform, so if you want to try it on another big.LITTLE processor, an MCPM backend (Multi-cluster Power Management) and possibly a special cpufreq clock driver are required.
The switcher is comprised of 4 parts:
- Low-level power management – Responsible for powering up and down individual CPUs, enabling and disabling caches, power planes, etc.
- Switcher core – Handles the switching process itself, including the saving of the execution context for the outbound CPU, migration of interrupts from the outbound CPU to the inbound CPU, and restoration of the execution state on the inbound CPU.
- The core cpufreq layer – Standard Linux cpufreq subsystem augmented with a special driver that provides an adaptation layer between that subsystem and the switcher core code described above.
- The cpufreq policy governors – Those are made of kernel modules or user space daemons monitoring the system activity and requesting CPU frequency changes to the cpufreq core.
You can get the IKS kernel with git:
git clone git://git.linaro.org/landing-teams/working/arm/kernel.git
It seems the most important part of the source code can be found in drivers/cpufreq/arm_big_little.c, arch/arm/common/bL_switcher.c, arch/arm/common/bL_entry.c, and arch/arm/common/bL_head.S.
b.L Code specific to TC2, more exactly Dual Cluster System Control Block (DCSCB), can be found in arch/arm/mach-vexpress/dcscb.c and arch/arm/mach-vexpress/dcscb_setup.S. [Update: Based on the comment below, TC2 code is actually located in arch/arm/mach-vexpress/tc2_pm.c, and arch/arm/mach-vexpress/tc2_pm_setup.S.]
You may want to refer to the following resources for further details about the implementation:
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
|Support CNX Software - Donate via PayPal or become a Patron on Patreon|