- 论坛徽章:
- 0
|
回复 4# humjb_1983
有幾個commit是可以分享及討論
sched: Task placement for heterogeneous systems based on task load-tracking
主要描述migrate up/down
hmp_up_migration() :發現是否有idle cpu,有的話將會是target cpu
觸發的時機點為select_task_rq_fair()
(其實還有另一個地方也會觸發,但在此commit並沒有完成)
hmp_down_migration() : Check if task should migrate to a slower cpu
觸發的時機點為select_task_rq_fair
hmp_select_faster_cpu() :Check if cpu is in fastest hmp_domain
---Yes : Get the cpu hmp_domains
---No : Previous (faster) hmp_domain relative to cpu
hmp_select_slower_cpu() : selects a cpu in slower hmp_domain
這邊有一個function可以看,hmp_domain_min_load()
hmp_domain_min_load()目的是Set the 'lowest_cpu' which is lowest-loaded CPU in slower hmp_domain
以上有些我懶得翻成中文,我直接把code上面我寫的註解貼上來
當然也有一些我並未完全看得懂,所以就想找人一起討論,比如說下面
if (se->avg.load_avg_ratio < hmp_up_threshold)
目前的猜測就是hmp scheduler在考慮cpu migration的時候,會檢查32ms內進程位於runnable狀態的時間。
如果runnable狀態的時間超過了50% (換算為閾值為 up_threshold=512),那麼scheduler就把進程切換到更快的cpu上
以上如果有錯請告知
感謝 |
|