免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 5190 | 回复: 14
打印 上一主题 下一主题

[内存管理] 一起討論big-Little scheduler [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2014-06-09 16:51 |只看该作者 |倒序浏览
各位先進好,

這邊有人有在看big-Little scheduler嗎?

要不要一起討論

看的方式就是以Linaro的 v3.10/topic/big.LITTLE這個branch為主

將會一步一步去看比較重要的patch

有什麼心得可以互相分享

论坛徽章:
0
2 [报告]
发表于 2014-06-10 13:15 |只看该作者
如果對這有興趣的人,建議先去聊解UP scheduler 再去聊解SMP scheduler

先去聊解Loading這東西在scheduler所要表示的意義

在HMP那邊這個會是個關鍵

论坛徽章:
0
3 [报告]
发表于 2014-06-15 19:48 |只看该作者
Cool, 沒有詳細看過code,但之前有大概研究過架構,像是P.J.T的per-entity loading。還有Vincent Guittot & Morten Rasmussen他們改進的power aware scheduler部份。最後追到Ingo Molnar的Line in the sand,不接收新的patches。 不知道現在frequency的問題解決了沒。

论坛徽章:
15
射手座
日期:2014-02-26 13:45:082015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15羊年新春福章
日期:2015-02-26 08:47:552015年亚洲杯之卡塔尔
日期:2015-02-03 08:33:45射手座
日期:2014-12-31 08:36:51水瓶座
日期:2014-06-04 08:33:52天蝎座
日期:2014-05-14 14:30:41天秤座
日期:2014-04-21 08:37:08处女座
日期:2014-04-18 16:57:05戌狗
日期:2014-04-04 12:21:33技术图书徽章
日期:2014-03-25 09:00:29
4 [报告]
发表于 2014-06-16 08:43 |只看该作者
貌似arm中amp架构中的特殊调度算法,linaro维护,x86中估计么有了,arm不熟,兄台可以给我们普及一下~

论坛徽章:
0
5 [报告]
发表于 2014-06-16 10:24 |只看该作者
回复 3# bboytaiwan


目前我是已經看完這幾個commit
http://lists.linaro.org/pipermail/linaro-dev/2013-May/015984.html

sched: entity load-tracking load_avg_ratio
sched: Task placement for heterogeneous systems based on task load-tracking
sched: Forced task migration on heterogeneous systems
sched: Introduce priority-based task migration filter
ARM: Add HMP scheduling support for ARM architecture
ARM: sched: Use device-tree to provide fast/slow CPU list for HMP
ARM: sched: Setup SCHED_HMP domains

上面幾本上都是在講hmp scheduler
至於你在提的power部分,我目前先還沒看
如果有興趣的話,我可以分享看完每個commit的心得

论坛徽章:
15
射手座
日期:2014-02-26 13:45:082015年迎新春徽章
日期:2015-03-04 09:54:452015年辞旧岁徽章
日期:2015-03-03 16:54:15羊年新春福章
日期:2015-02-26 08:47:552015年亚洲杯之卡塔尔
日期:2015-02-03 08:33:45射手座
日期:2014-12-31 08:36:51水瓶座
日期:2014-06-04 08:33:52天蝎座
日期:2014-05-14 14:30:41天秤座
日期:2014-04-21 08:37:08处女座
日期:2014-04-18 16:57:05戌狗
日期:2014-04-04 12:21:33技术图书徽章
日期:2014-03-25 09:00:29
6 [报告]
发表于 2014-06-16 10:49 |只看该作者
呵呵,当然欢迎分享~,一起学习下

论坛徽章:
0
7 [报告]
发表于 2014-06-16 10:54 |只看该作者
回复 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上

以上如果有錯請告知
感謝

论坛徽章:
0
8 [报告]
发表于 2014-06-16 10:59 |只看该作者
這個commit也不錯,分享給大家

sched: Forced task migration on heterogeneous systems  

run_rebalance_domains() will execute hmp_force_up_migration()

hmp_force_up_migration() : Migrate task from slow cpu to fast cpu
下面是我在code上面的註解
Walk online cpu
get the most heaviest loading sched_entity
Check if task should migrate to a faster cpu
-it will be migrate to fast cpu
Set the migration target cpu
target->push_cpu = target_cpu;
Set the task which will be migrated
target->migrate_task = p;
hmp_migrate_runnable_task(target)
Migrate the target->migrate_task to target->push_cpu  cpu.

這邊比較特別的是要把target cpu跟要準備migration task先選好
至於如何選就是這hmp_force_up_migration()精華所在

论坛徽章:
0
9 [报告]
发表于 2014-06-16 15:39 |只看该作者
下面這commit也可討論

sched: SCHED_HMP multi-domain task migration control  

此commit主要就是在up/down migrate時,增加一個判斷是否要去migrate

此判斷就是設定一個delay time,超過就做成立

至於為什麼要多此判斷方式

log上面是說prevents the task from doing another migration in the same direction until the delay has expired.

论坛徽章:
0
10 [报告]
发表于 2014-06-16 15:43 |只看该作者
ARM: sched: Setup SCHED_HMP domains

此commit主要就是去初始化 fast cpumask and slow cpumask

它的實做函示在arch_get_hmp_domains()

在hmp scheduler初始化時,需要利用到此函示
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP