Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Q2.12: Emulation of Asymmetrically Performing CPUs


Published on

Resource: Q2.12
Name: Emulation of Asymmetrically Performing CPUs
Date: 30-05-2012
Speaker: Rob Lee

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Q2.12: Emulation of Asymmetrically Performing CPUs

  1. 1. Emulation of Asymmetrically Performing CPUs Linaro Connect Q2.2012
  2. 2. Asymmetric CPU Performance? ● ARM's new big.LITTLE architecture is an asymmetric multiprocessor system in which two types of cores (which use the same instruction set). ○ Higher Performance cores (Cortex A15) Best performance ○ More Power Efficient cores (Cortex A7) ■ Best power efficiency, lower performance ● Similar asymmetric systems are also possible by varying the manufacturing processes of identical cores.
  3. 3. Emulation of Asymmetric CPU Performance? ● Linux scheduler is work is underway to allow intelligent scheduling for these type of asymmetrical CPU systems and so testing of these changes is needed. ● Actual hardware with this cpu configuration isn't (readily) available. ● The performance differences that exists on these asymmetric cpu systems can be emulated which can hopefully provide a test platform for some the scheduler work.
  4. 4. Host System Types for Running Emulation 1. Multicore systems whose cpu frequencies are coupled. a. Cortex-A9 2. Multicore systems whose cpu frequencies are independent from each other a. modern X86, etc. b. If in doubt, check /sys/devices/system/cpu/cpu0/cpufreq/affected_cpus .
  5. 5. Emulation Methods 1. Cycle Stealer - Steal the user programmed percentage of cpu processing cycles in order to degrade performance. 2. Frequency limiting- For systems whose cpu frequencies are not couples, limit the frequency of chosen cpus to degrade performance.
  6. 6. Cycle Stealer Pros and Cons Pros: ● Can be run on any multicore system Cons: ● Subject to the overhead and accuracy of the implementation. ● Current Implementation Cons: ○ Slices of time will be eaten. The smaller the slices the more overhead. Only large slices of 10s of milliseconds don't overly impact the overhead ○ Currently implemented userspace system doesn't account for interrupt execution time
  7. 7. Frequency Limiter Pros and Cons Pro: ● Simple, low overhead system. Cons: ● Requires a system that supports independent clock frequency changes. ● Most platforms only offer a few discrete operating points. To achieve a very precise level of performance degradation, you may need to add additional CPUFreq operating points.
  8. 8. CODE git:// External Dependencies: ● schedtool ○ needed by cycle stealer to setting task priority
  9. 9. DEMO ● Cycle Stealer a. In one terminal, run as root b. In another terminal, run 'mpstat 2 -P ALL' to monitor amount of cpu idle time. ● Frequency Limiter a. In one terminal, run '' b. In another terminal run ■ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq c. test ■ taskset 2 ./ ■ cat /sys/devices/system/cpu/cpu1/cpufreq/scaling_cur_freq ● veryify frequency is limited.