Power Efficient Idle Injection
Jacob Pan
Intel Open Source Technology Center
LinuxCon Japan 2015
Why Injecting Idle? /* 為何要注射 idle */
* Primary: Thermal/Power limiting /* 主要: 溫度/能源 限制 */
* Secondary: /* 次要: */
* Performance management /* 性能管理 */
* Pay per use /* 按使用付費 */
* Idle power efficiency /* 閒置功耗效率 */
LFM (low frequency mode)
Idle Injection in Linux /* Linux 上的閒置注入 */
* Intel PowerClamp driver /* Intel PowerClamp 驅動程式 */
* Scheduler throttling, RT or CFS bandwidth control /* scheduler 節流 */
Intel Power Clamp V1
(current design in mainline kernel)
The idea: play idle!
Limitations of Intel PowerClamp V1 /* Intel PowerClamp V1 的限制 */
* CPU appears busy while playing idle /* 演繹 idle 時 CPU 仍呈現忙碌 */
* Scheduler ticks not stopped in NOHZ idle /* scheduler 的滴答在 NOHZ 空閒時仍沒有停止 */
Removal of tick_nohz_idle_enter/exit() API
RCU grace period
* Relies on timely jiffies updates /* 依賴 jiffies 的及時更新 */
Limitations of Intel PowerClamp V1
Relies on secondary timing source
* timely jiffy updates
* periodic timers
Scheduler Based Throttling /* 以 scheduler 為基礎的節流 */
Normal tasks under completely fair scheduling (CFS) class
* Bandwidth control via CPU control group/container /* 頻寬控制是透過 CPU 控制組/容器 */
* Runqueue throttling by enqueue/dequeue tasks /* 對運行中的 queue 節流是通過把 tasks 排入或移出queue */
Time chart of CFS Bandwidth Control /* CFS 頻寬控制 */
* Pros: No fake idle task, Finer per cgroup controls /* 優點: 沒有假性閒置任務, 細到逐一cgroup的控制 */
* Cons: No synchronization loss of package C-state opportunities /* 缺點: 對於可能有機會發生的 C-state 封包丟失沒有做同步 */
Power Clamp V2(work in progress) /* Power Clamp V2 版本 */
* Runqueue throttling of CFS class /* 針對 CFS class 作 runqueue 節流控制 */
* Synchronization around rounded Ktime instead of jiffies /* 圍繞著周圍的 Ktime 作同步, 而不是 jiffies */
Experiment Data /* 實驗數據 */
Goals:
Comparing Power Efficiency /* 比較能源效率 */
Scalability /* 可擴展性 */
CPU HW design trend: old vs. new /* CPU 的硬體設計趨勢 */
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 /* 注入閒置, 以 5% 的增量從 0 到 50% */
Power and Performance Control V1 vs. V2
V1: RT kthread play idle
V2: CFS runqueue throttling
Comparing Deep vs. Shallow Package C-States
(powerclamp v2)
Conclusions
* Idle injection can effectively reduce power beyond energy efficient frequency /* 閒置注射可以在節能型頻率以外再有效的降低耗能 */
* With deeper package C-states, can achieve near linear performance and power /* 配合更深的 C-states 封包, 可達成線性效能以及降低功耗 */
reduction
* Scheduler runqueue throttling results in cleaner and more efficient solution /* 排程器 runqueue 節流可導至更清楚與有效的解決方法 */
* Align activities results in significant power savings /* 對齊活動導至顯著降低功耗 */
Future plan
* Better handling of interrupts /* 更妥善的處理中斷 */
* Integration with scheduler /* 與排程器整合 */
* Synchronize with devices with latency tolerance /* 依據延遲容忍進行設備間同步 */
* Work with hardware duty cycling /* 與硬體負載循環合作 */
powerclamp_timer_fn
沒有留言:
張貼留言