![](/img/trans.png)
[英]Is it possible to find the corresponding task_struct from sched_entity?
[英]In CFS group schedule, how can I know a sched_entity is a leaf one ( associated with a real task)?
因此,如果sched_entity是cfs_rq樹中的葉子,則它將與實際任務相關聯。 否則,它將是不直接與任何實際任務關聯的組調度實體(對嗎?這意味着task_of(se)是沒有意義的?)。
我的問題是:給定一個sched_entity,我們如何才能知道它是一片葉子並且與真實的task_struct相關聯? 謝謝
每個非葉實體擁有的“容器”(這是一個RB樹其實),其中包含sched_entity(s)
的下一級任務組(它sched_entity.my_q完全一致),除了sched_entity(s)
其與關聯真正的線程。 這就是entity_is_task()
工作方式。
我找到了宏:entity_is_task(se)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.