原创 [scheduler]九. EAS如何根據能效爲進程選擇目標CPU

##一、概述 之前在講解新創建進程和idle進程被wakeup之後如何被調度器調度的原理,有兩個點沒有分析的很清楚,就是在這個調度的過程中,如何選擇一個cpu來執行調度實體。現在單獨拎出來詳細分析: 如果EAS feature啓

原创 [scheduler]五. cpu拓撲和調度域調度組的建立和初始化

由於task在創建或者task從idle被wakeup的流程中涉及到sched domain和sched group的知識,所以現在提前看下這部分. 根據實際的物理屬性,CPU domain分成下面三種: CPU 分類 Li

原创 [scheduler]七. 被wake_up_process之後的進程是如何被調度的

說明: 對於函數select_task_rq的分析,本章分析的不夠清晰,後面會專門有兩篇文章分析傳統的負載均衡遷移進程和EAS如何根據能效爲進程選擇目標CPU 兩篇文章請參考: 一: 九. EAS如何根據能效爲進程選擇目標CP

原创 [scheduler]二. scheduler初始化

0號進程初始化調度器相關結構體,並將0號進程調度類變換爲idle_sched_class調度類 從arch/arm64/kernel/head.S第一次啓動從彙編代碼執行C語言代碼的函數爲start_kernel: start_k

原创 [scheduler]一. scheduler若干個基礎結構體簡介

###調度器介紹 一個好的調度算法應當考慮以下幾個方面: 公平:保證每個進程得到合理的CPU時間。 高效:使CPU保持忙碌狀態,即總是有進程在CPU上運行。 響應時間:使交互用戶的響應時間儘可能短。 週轉時間:使批處理用戶等待輸

原创 [scheduler] 四. CFS調度算法 bandwidth throttle

1 cfs bandwidth是針對task_group的配置,一個task_group的bandwidth使用一個struct cfs_bandwidth *cfs_b數據結構來控制。 struct cfs_bandwidth

原创 [scheduler]三. CFS調度算法基本思想

CFS的主要思想如下: 根據普通進程的優先級nice值來定一個比重(weight),該比重用來計算進程的實際運行時間到虛擬運行時間(vruntime)的換算;不言而喻優先級高的進程運行更多的時間和優先級低的進程運行更少的時間在v

原创 [power]三. Assembly language power instructions

ARM assembly language includes instructions that can be used to place the core in a low-power state. The architectu

原创 [power]一 Idle management

Many ARM systems are mobile devices and powered by batteries. In such systems, optimization of power use, and total

原创 [power]四. Power State Coordination Interface電源管理通用接口

The Power State Coordination Interface (PSCI) provides an OS agnostic method for implementing power management use

原创 [scheduler]二. CPU priority概念以及原理

什麼是CPU priority 使用場合在rt調度類中 因爲在rt調度類中,只要搶佔開啓,高優先級的rt task會立即搶佔低優先級task,並在當前CPU上運行。所以就有了rt task priority轉化爲CPU prio

原创 [scheduler]一. rt task涉及到的相關結構體

先了解下 rt rq的信息: /* Real-Time classes' related field in a runqueue: */ struct rt_rq { /*所有入隊的rt task都按照優先

原创 [power] Dynamic voltage and frequency scaling(DVFS)簡單概述

Many systems operate under conditions where their workload is variable. Therefore it is useful to have the ability

原创 realtime(rt) scheduler概述

本專欄主要分如下幾部分: rt task涉及到的相關結構體 rt task如何選擇目標CPU運行 rt task如何出入隊列 rt task如何push/pull操作,即做load balance操作 rt task如何thro

原创 [scheduler] 調度時延,調度最小搶佔粒度,調度喚醒搶佔粒度詳解

在看調度器代碼的時候,常常會看到下面的幾個靜態常量: sysctl_sched_min_granularity sysctl_sched_latency sysctl_sched_wakeup_granularity sched