Linux Power Management Overview and Hands-on

Slides:



Advertisements
Similar presentations
What we do Larotecs Web2M is an off-the shelf, end-to-end, web-based solution designed to manage multiple widely distributed devices.
Advertisements

Operating System Structures
PowerEdge M-Series CMC Management
Introduction to Linux Init Scripts In this session we will cover the Linux initialization process, run levels, how to change the run level and how to initialize.
U-Boot and Linux Kernel Debug using CCSv5
Hands-on with the Sitara Linux SDK This presentation provides a hands-on overview of the Sitara Linux SDK. It focuses on the software and tools found in.
Panoptes: A Scalable Architecture for Video Sensor Networking Applications Wu-chi Feng, Brian Code, Ed Kaiser, Mike Shea, Wu-chang Feng (OGI: The Oregon.
Lecture 1: History of Operating System
1 Soft Timers: Efficient Microsecond Software Timer Support For Network Processing Mohit Aron and Peter Druschel Rice University Presented By Jonathan.
Chapter 13 Embedded Systems
Chapter 1 and 2 Computer System and Operating System Overview
MCDST : Supporting Users and Troubleshooting a Microsoft Windows XP Operating System Chapter 9: Troubleshooting Power Management and I/O Devices.
A. Frank - P. Weisberg Operating Systems Functional View of Operating System.
Timers and Interrupts Shivendu Bhushan Summer Camp ‘13.
Processor Frequency Setting for Energy Minimization of Streaming Multimedia Application by A. Acquaviva, L. Benini, and B. Riccò, in Proc. 9th Internation.
Page 1 TI Internal Use Only Wireless Terminals Software Devt. Page 1 OMAP3430 Linux Power Management 16 Apr 2008 Version 1.
Linux Qt Graphical User Interface (GUI) Development In this session, we will cover Qt GUI development tools including: Qt Creator for remote debug and.
Linux Cryptography overview and How-to’s using OpenSSL
1 EE 587 SoC Design & Test Partha Pande School of EECS Washington State University
3-1 System peripherals & Bus Structure Memory map of the LPC2300 device is one contiguous 32-bit address range. However, the device itself is made up of.
Introduction to the Orbit Edu Board Ahmad Rahmati Teaching Assistant, ELEC424 Rice Efficient Computing Group Sep 12, 2007.
CS 423 – Operating Systems Design Lecture 22 – Power Management Klara Nahrstedt and Raoul Rivas Spring 2013 CS Spring 2013.
U-Boot Debug using CCSv5 In this session we will cover fundamentals necessary to use CCSv5 and a JTAG to debug a TI SDK-based U-Boot on an EVM platform.
Renesas Electronics Europe GmbH A © 2010 Renesas Electronics Corporation. All rights reserved. RL78 Clock Generator.
1 Computer System Overview Chapter 1. 2 n An Operating System makes the computing power available to users by controlling the hardware n Let us review.
Operating Systems  A collection of programs that  Coordinates computer usage among users  Manages computer resources  Handle Common Tasks.
Lecture 03: Fundamentals of Computer Design - Trends and Performance Kai Bu
Low-Power Wireless Sensor Networks
Integrating Fine-Grained Application Adaptation with Global Adaptation for Saving Energy Vibhore Vardhan, Daniel G. Sachs, Wanghong Yuan, Albert F. Harris,
Clock Options and Sleep Modes. Clock Sources Flash Fuse bits can be programmed to choose one of the following Clock sources: 1. External RC Osc. f = 1/(3RC).
Sasken Confidential © 2009 Sasken Communication Technologies Future of TTCN-3 Power Management and Testing Infrastructure 3 May 2012.
1 Overview 1.Motivation (Kevin) 1.5 hrs 2.Thermal issues (Kevin) 3.Power modeling (David) Thermal management (David) hrs 5.Optimal DTM (Lev).5 hrs.
October 10, USB Power Management Brad Hosler USB Engineering Manager Intel Corporation.
Typical Microcontroller Purposes
Gauge Operation and Software by Scott A. Ager. Computer Recommendations 750 MHz Pentium III 64 Meg SRAM 40 Gig Hard Drive 1024 x 768 graphics CD Writer.
Guide to Linux Installation and Administration, 2e1 Chapter 2 Planning Your System.
Power Management of iPAQ Sukjae Cho
1 RTOS Design Some of the content of this set of slides is taken from the documentation existing on the FreeRTOS website
Architectural Approaches (Part 1) Power Aware Distributed Systems Kickoff August 23, 2000.
Embedded System Lab. 김해천 The TURBO Diaries: Application-controlled Frequency Scaling Explained.
ATtiny23131 A SEMINAR ON AVR MICROCONTROLLER ATtiny2313.
1 Review of Process Mechanisms. 2 Scheduling: Policy and Mechanism Scheduling policy answers the question: Which process/thread, among all those ready.
Lev Finkelstein ISCA/Thermal Workshop 6/ Overview 1.Motivation (Kevin) 2.Thermal issues (Kevin) 3.Power modeling (David) 4.Thermal management (David)
Freescale Semiconductor Confidential and Proprietary Information. Freescale™ and the Freescale logo are trademarks of Freescale Semiconductor, Inc. All.
FPGA-Based System Design: Chapter 6 Copyright  2004 Prentice Hall PTR Topics n Low power design. n Pipelining.
GAN: remote operation of accelerator diagnosis systems Matthias Werner, DESY MDI.
Lecture 4 General-Purpose Input/Output NCHUEE 720A Lab Prof. Jichiang Tsai.
E-MOS: Efficient Energy Management Policies in Operating Systems
Operating Systems Unit 2: – Process Context switch Interrupt Interprocess communication – Thread Thread models Operating Systems.
1 Device Controller I/O units typically consist of A mechanical component: the device itself An electronic component: the device controller or adapter.
FaridehShiran Department of Electronics Carleton University, Ottawa, ON, Canada SmartReflex Power and Performance Management Technologies.
Final Presentation Smart-Home Smart-Switch using Arduino
Components of a typical full-featured microcontroller.
CS203 – Advanced Computer Architecture
1 Chapter 2: Operating-System Structures Services Interface provided to users & programmers –System calls (programmer access) –User level access to system.
Matthew Locke November 2007 A Linux Power Management Architecture.
Real-Time Operating Systems RTOS For Embedded systems.
Evaluation of Advanced Power Management for ClassCloud based on DRBL Rider Grid Technology Division National Center for High-Performance Computing Research.
1 Free Electrons. Kernel, drivers and embedded Linux development, consulting, training and support. http//free-electrons.com TI OMAP 3530 power management.
Power Management. Outline Why manage power? Power management in CPU cores Power management system wide Ways for embedded programmers to be power conscious.
Overview Motivation (Kevin) Thermal issues (Kevin)
Operating System Overview
Power Management in Embedded Systems
Temperature and Power Management
Chapter Objectives In this chapter, you will learn:
Power Management and Sleep Modes
Power Management and Sleep Modes
Ultra-Low-Power Sensor Nodes Featuring a Virtual Runtime Environment
MSP432™ MCUs Training Part 6: Analog Peripherals
Chapter 13: I/O Systems “The two main jobs of a computer are I/O and [CPU] processing. In many cases, the main job is I/O, and the [CPU] processing is.
Presentation transcript:

Linux Power Management Overview and Hands-on In this session you will learn how to improve product power performance by minimizing power consumption and guaranteeing system performance. In addition, power management techniques enabled via the Linux SDK will be discussed. LAB: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training July 2012

Agenda What You Will Learn Motivation for PM Overview of Power Management Techniques Understanding PM Features in the AMSDK Hands-on Labs Throughout to Reinforce Learning All of the above focused on AM335x.

Pre-work Check List Installed and configured VMWare Player v4 or later Installed Ubuntu 10.04 Installed the latest Sitara Linux SDK and CCSv5 Within the Sitara Linux SDK, ran the setup.sh (to install required host packages) Using a Sitara EVM, followed the QSG to connect ethernet, serial cables, SD card and 5V power Booted the EVM and noticed the Matrix GUI application launcher on the LCD Pulled the ipaddr of your EVM and ran remote Matrix using a web browser Brought the USB to Serial cable you confirmed on your setup (preferable)

What you will learn GOAL: Improve product power performance Minimize power consumption Guarantee system performance Motivation for power management techniques Understand power management techniques of AM335x system DVFS: Dynamic Voltage and Frequency Scaling SmartReflex (aka AVS: Adaptive Voltage Scaling) Dynamic Power Switching (DPS) Implemented by Linux’s Runtime PM Framework Static Leakage Management (SLM) Device Idle and Standby modes Basic PM hardware architecture: Voltage domains, Power domains, Clock domains (Hands on) Gain experience with AMSDK PM Features and Power Measurements Linux kernel configuration Use of PMDC for Power Measurements PM Software Interface (Command line and Matrix tools) Frequency selection (CPUFreq) Suspend/Resume CPU Idle

Why power management? TI Customers End Users Competitive differentiator Less heat dissipation Smaller, sleeker products with smaller battery Longer battery life Better Features + Increased Usage = Increased Revenue Quicker time-to-marked with advanced features End Users Smaller, sleeker products Cooler device More exciting, power hungry features like multimedia, streaming video, etc. Improved experience (longer battery life) Lower cost 6

Power Management Principles Power consumed is proportional to frequency and square of voltage. Small reductions in voltage can be very significant Applicable PM Techniques: Dynamic Voltage and Frequency Scaling (DVFS) SmartReflex (aka Adaptive Voltage Scaling or AVS) Keeping devices powered on consumes a lot of power. Cut or reduce power to entire device or idle device portions. Dynamic Power Switching (DPS) Turn off what you’re not using! At a granular, per-module level Called “Runtime PM” in Linux Static Leakage Management (SLM) System level idle and/or suspend

Power Management Principles (cont.) 3) For proper operation, you should run at one of the recommended operating voltage and frequency combinations (OPPs) Too low voltages can result in data propagation errors and system failure Too high voltages result in excessive power consumption Hardware timing closure results in a few PROVEN operating performance points (OPPs) which guarantee the system to work properly.

Power Management Techniques: Basics PM Techniques can be categorized as “Active” or “Idle”: AVS DPS DVFS SLM Active PM Technique Adaptive Voltage Scaling Dynamic Power Switching Performed while device is on and in use. Involves all systems components: HW modules, device drivers, OS & apps. Techniques: AVS (SmartReflex), DPS & DVFS. Entire device is idled. Various idle states selected based on trade-off of power consumption and wakeup latency. Techniques: SLM Idle PM Technique Dynamic Voltage & Frequency Scaling Static Leakage Management  Power Management is centralized and is handled by the PRCM (Power, Reset and Clock Management) module.

PM Architecture Basics Devices are partitioned into the following architectural blocks: Clock Domain: One or more modules fed with the same clock Clock has independent gating control Power Domain: One or more modules fed with the same power rail Power rail controlled by independent power switches Voltage Domain Group of modules supplied by the same voltage regulator (embedded or external) “VDDn” sometimes referred to in documentation as a “power rail” Domains hierarchy is generally: Voltage domains contain one or more Power Domain Power domains contain one or more Clock Domain Control of this infrastructure is done by the Power Reset and Clock Manager (PRCM), which is split in two entities: PRM: Handles voltage, power, reset, wake-up management, system clock source control and clock generation CM: Handles the clock generation, distribution and management Clock Domain 1 Power Domain CLK Domain 2 VDD Voltage Control Voltage Domain VDD Regulator

AM335x Power Domains Overview Refer to Ch. 8 of the TRM for more information: Power Supply Power Domain Modules VDD_CORE PD_WKUP PRCM, Control Module, GPIO0, DMTIMER0, DMTIMER1, UART0, I2C0, TSC, WDT1, SmartReflex, L4_WKUP, DDR_PHY PD_PER EMIF4, EDMA, GPMC, OCMC, PRUSS, LCD controller, CPSW, USB, MMC0..2, DMTIMER2..7, Uart1..5, SPI0..1, I2C1..2, DCAN0..1, McASP0..1,ePWM0..2, eCAP0..2, eQeP0..1,GPIO1..3,ELM PD_GFX SGX530 VDD_MPU PD_MPU CPU, L1, L2 of MPU VDD_RTC PD_RTC RTC

Lab Break 1 Labs available at: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Power_ Management Lab 1: Kernel Configuration Learn the PM related kernel config options. Lab 2: Using the PMDC Learn to make power measurements using the PMDC.

Dynamic Voltage and Frequency Scaling (DVFS) Active PM Technique Technique used to scale operating frequency and voltage of hardware Well-characterized Operating Performance Points (OPPs) defined for each device OPP specified as pair: (MPU FREQUENCY, VOLTAGE (for weak silicon)) Indicates minimum voltage at which ALL devices can meet that frequency requirement For each OPP, software sends control signals to external regulators (DC/DC converters) to set the minimum voltage required. The OS monitors the workload and can dynamically adapt voltage/frequency when using certain governor policies (“ondemand”). DVFS applicability: AM335x: VDD_MPU and VDD_CORE Software Support: OPP can be statically selected by the user via Matrix, or at the Linux command line. Only if governor is “userspace”! The CPUFreq driver in Linux supports multiple “governors”. Governors implement different policies for dynamically managing OPP selection. “powersave” governor: selects the lowest possible frequency “performance” governor: selects the highest possible frequency.

Dynamic Voltage and Frequency Scaling (DVFS) These charts show the defined OPP’s for current devices: Active PM Technique

Adaptive Voltage Scaling Active PM Technique SmartReflex (trademark of Texas Instruments) Silicon manufacturing process yields a distribution of performance capability For a given frequency requirement: Hot/strong/fast devices can meet this at a lower voltage Cold/weak/slow devices needs higher voltage Simple system will set the higher voltage for operating all devices Smarter system will adapt operating voltage per device! Green line: “hot” device Blue line: “cold” device

SmartReflex Classes Class-0: Manufacturing Test Calibration At manufacturing test, the device-optimized operating point voltages are permanently fused into each die. A one time optimization to account for process variations. Class-1: Boot-Time Software Calibration At boot-up time, device-optimized operating point voltages of the die are determined during calibration. Optimization also accounts for process variations. Class-2: Continuous Software Calibration (AM335x uses Class-2B) SmartReflex sub-chip does real-time voltage optimization via software loop Optimizes for process, temperature and silicon degradation effects Variants: Class-2A: Timer interrupt or other system event (e.g. frequency change) used to initiate interrogation of SmartReflex sub-chip Class-2B: SmartReflex sub-chip generates a host CPU interrupt when frequency is outside acceptable range Key: Software intervention required Class-3 (AM37x): Continuous Hardware Calibration SmartReflex sub-chip has a dedicated hardware loop to dynamically optimize voltage for process, temperature and silicon degradation effects  MPU intervention not required – SmartReflex sub-chip communicates any required voltage change directly to the PMIC via a hardware interface (e.g. i2c) Key: No Software intervention required Class-4: Fully Integrated Solution Class 3 hardware control loop plus voltage regulator integrated on single die

DVFS vs AVS DVFS: AVS (SmartReflex) Select OPP from available OPPs based on MIPS requirement in scenario Lower frequency requirement -> lower voltage All die treated the same for a particular application scenario 25 50 75 100 125 0.9 1 1.1 1.2 1.3 1.4 OPP1 OPP2 OPP3 SmartReflex Best case Worst case Performance Voltage AVS (SmartReflex) After selection of OPP, scale voltage based on device-specific properties (process capability, temperature) Faster (also stronger/warmer) process -> lower voltage Each die treated differently

Dynamic Power Switching Active PM Technique Allows certain modules to idle when not being used. Example use cases: during MP3 playback, we could idle CPSW (among others) These modules operate in a high performance state to complete its tasks as fast as possible, then dynamically switch to a low-power state (“retention” or “off state”) Context save/restore may be necessary if memory is lost  additional overhead Acceptable wakeup latencies on the order of microseconds Software support: In Linux, handled by the “Runtime PM” framework. This is driver-local suspend/resume, managed entirely by individual device drivers operation independently. Drivers can relinquish clocks, resulting in portions of the device in a “clock stop” state. Execution Time Power 1 2 3 4 0.1 Without DPS 1 2 3 4 Normalized Power Overhead Execution Time With DPS

Static Leakage Management Idle PM Technique Device switches into low-power system modes automatically or under user requests when no application is running Example: Media player shuts off display and enters standby after 10-seconds of on-time with no processing and no user input Typically whole device is in some sort of standby mode Acceptable latencies on the order of milliseconds. Deeper sleep state == longer wakeup latency. Devices have multiple sleep states (or C-states) AM335x supports two C-states C1 – MPU WFI C2 – MPU WFI + DDR Self Refresh (lowest power) Software support: CPUIdle algorithm automatically chooses from available sleep states based upon the inactivity period and current HW state. Useful for power savings during shorter periods of inactivity. Suspend/Resume support available for long inactivity periods (Deep sleep state)

DPS vs. SLM Review DPS SLM Section of the device in low power mode Entire device in low power mode (except WKUP domain) Some parts of system stay active Full system is inactive Smaller transition latencies (us) Larger transition latencies (ms) Use case : Audio/video Playback - Some domains are going into an idle mode when not needed Use case: OS idle: Drop into lower-power C-states Suspend-to-RAM: lowest power case Active PM Technique Idle PM Technique Suggestion: Convert into table format

Lab Break 2 Labs available at: http://processors.wiki.ti.com/index.php/Sitara_Linux_Training:_Power_ Management Lab 3: Dynamic Voltage and Frequency Scaling (cpufreq) Learn about frequency selection and cpufreq governors. Lab 4: Suspend/Resume Learn how to manually suspend and resume the system. Lab 5: CPU Idle Gain familiarity with the sysfs interface to CPU Idle information and the AM335x C-states

For more Sitara Boot Camp sessions visit: www.ti.com/sitarabootcamp Thank you!