![Page 1: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/1.jpg)
1
Power Efficient Idle Injection
Jacob Pan
Intel Open Source Technology Center
LinuxCon Japan 2015
![Page 2: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/2.jpg)
2
Agenda
• Introduction to idle injection
• Techniques available in Linux
• Experiment results
• Future work
![Page 3: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/3.jpg)
3
Why Injecting Idle?
• Primary: Thermal/Power limiting
• Secondary:
• Performance management
• Pay per use
• Idle power efficiency
![Page 4: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/4.jpg)
4
Understanding Processor Idle States/C-States
![Page 5: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/5.jpg)
5
Motivation For Idle Injection: Increasingly lower
Idle power
Deep idle power is negligible!
*TDP=Thermal Design Power0.32
1.9
14
0
2
4
6
8
10
12
14
16
95% pc7 95% pc2 TDP C0P
ow
er
(watt)
Idle Power vs Running Power On Broadwell
![Page 6: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/6.jpg)
6
When to use idle injection?
Idle injection at LFM
(low frequency mode)
Idle injection at LFM
(low frequency mode)
![Page 7: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/7.jpg)
7
Idle Injection in Linux
• Intel PowerClamp driver
• Scheduler throttling, RT or CFS bandwidth control
![Page 8: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/8.jpg)
8
Intel Power Clamp V1
(current design in mainline kernel)
The idea: play idle!
![Page 9: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/9.jpg)
9
PowerClamp v1 timeline of idle injection
sched tick
throttled
unthrottled
RT kthread
![Page 10: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/10.jpg)
10
Limitations of Intel PowerClamp V1
• CPU appears busy while playing idle
• Scheduler ticks not stopped in NOHZ idle• Removal of tick_nohz_idle_enter/exit() API
• RCU grace period
• Relies on timely jiffies updates
![Page 11: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/11.jpg)
11
Limitations of Intel PowerClamp V1
CPU appears busy while playing idle
![Page 12: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/12.jpg)
12
Limitations of Intel PowerClamp V1
Scheduler ticks not stopped in NOHZ idle
• Interrupted sleep is less efficient in power
•Removal of tick_nohz_idle_enter/exit() API
•RCU grace period
![Page 13: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/13.jpg)
13
Limitations of Intel PowerClamp V1
Relies on secondary timing source
• timely jiffy updates
• periodic timers
![Page 14: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/14.jpg)
14
Scheduler Based Throttling
Normal tasks under completely fair scheduling (CFS) class› Bandwidth control via CPU control group/container
› Runqueue throttling by enqueue/dequeue tasksRoot CG
CG1
CG1.1 CG1.2
CG2
CG2.1
![Page 15: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/15.jpg)
15
Time chart of CFS Bandwidth Control(two cgroups multithreaded workload)
• Pros: No fake idle task, Finer per cgroup controls
• Cons: No synchronization loss of package C-state opportunities
cgroup1
cgroup2
unthrottlethrottle
throttle unthrottle
![Page 16: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/16.jpg)
16
Power Clamp V2(work in progress)
• Runqueue throttling of CFS class
• Synchronization around rounded Ktime instead of jiffies
![Page 17: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/17.jpg)
17
Time Chart Powerclamp v1 vs. v2
![Page 18: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/18.jpg)
18
Experiment Data
• Goals:
• Comparing Power Efficiency
• Scalability
• CPU HW design trend: old vs. new
• Configurations:
• CPUs: Ivy Bridge/Haswell/Broadwell clients, Haswell EX server
• Workload:fspin by Len Brown. CPU bound, floating
• Test case: Inject idle from 0 to 50% at 5% increment
![Page 19: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/19.jpg)
19
Power and Performance Control V1 vs. V2
![Page 20: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/20.jpg)
20
Power Efficiency Comparison On A Client Platform
![Page 21: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/21.jpg)
21
Scalability Tests V1 vs. V2
(144 core 4 socket Haswell EX)
![Page 22: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/22.jpg)
22
Power Efficiency Comparison On A Server Platform
![Page 23: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/23.jpg)
23
Comparing Deep vs. Shallow Package C-States
(powerclamp v2)
![Page 24: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/24.jpg)
24
Conclusions
• Idle injection can effectively reduce power beyond energy efficient frequency
• With deeper package C-states, can achieve near linear performance and power
reduction
• Scheduler runqueue throttling results in cleaner and more efficient solution
• Align activities results in significant power savings
![Page 25: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/25.jpg)
25
Future plan
• Better handling of interrupts
• Integration with scheduler
• Synchronize with devices with latency tolerance
• Work with hardware duty cycling
![Page 26: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/26.jpg)
26
Backups
![Page 27: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/27.jpg)
27
Time Chart of Redesigned Power Clamp
![Page 28: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/28.jpg)
28
Entering Idle Injection Period
![Page 29: Power Efficient Idle Injection - events.static.linuxfound.org](https://reader033.vdocument.in/reader033/viewer/2022042421/62605cfe7f182201e302c3a6/html5/thumbnails/29.jpg)
29
Exiting Idle Injection