sched_class next value points to different scheduler class like stop_sched_class->next points to rt_sched_class , rt_sched_class->next points to fair_sched_class , fair_sched_class->next points to idle_sched_class , idle_sched_class->next points to NULL;
sched_class下一个值指向不同的调度程序类,如stop_sched_class-> next指向rt_sched_class,rt_sched_class-> next指向fair_sched_class,fair_sched_class-> next指向idle_sched_class,idle_sched_class-> next指向NULL;
I am getting confused whether all scheduling algorithms are working at the same time or not. If they work at the same time then it would be unfair.
我对所有调度算法是否同时工作感到困惑。如果他们同时工作,那将是不公平的。
What is the use of next field? (kernel version 3.12)
下一个领域有什么用? (内核版本3.12)
1 个解决方案
#1
1
The "next" pointer is to implement an intrusive singly-listed list. It's intrusive in that the "next" pointer is right alongside the regular data, rather than in some separate "node" structure like some textbook SLL implementations would do (and like the C++ STL does). Intrusive is efficient, and fairly common in C.
“下一个”指针是实现一个侵入性的单列表列表。它的入侵是因为“下一个”指针与常规数据并排,而不是像某些教科书SLL实现那样在某些单独的“节点”结构中(和C ++ STL一样)。侵入是有效的,在C中相当普遍。
As for why there is a linked list of schedulers, see here: http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/
至于为什么有一个调度程序的链接列表,请参见此处:http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/
#1
1
The "next" pointer is to implement an intrusive singly-listed list. It's intrusive in that the "next" pointer is right alongside the regular data, rather than in some separate "node" structure like some textbook SLL implementations would do (and like the C++ STL does). Intrusive is efficient, and fairly common in C.
“下一个”指针是实现一个侵入性的单列表列表。它的入侵是因为“下一个”指针与常规数据并排,而不是像某些教科书SLL实现那样在某些单独的“节点”结构中(和C ++ STL一样)。侵入是有效的,在C中相当普遍。
As for why there is a linked list of schedulers, see here: http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/
至于为什么有一个调度程序的链接列表,请参见此处:http://www.ibm.com/developerworks/library/l-completely-fair-scheduler/