[LITMUS^RT] What does litmus kernel do when a new rt task comes up?
宋泽嶒
392004248 at qq.com
Thu Mar 4 13:13:16 CET 2021
Hello:
Recently I`m reading the scheduling schema of litmus.Now I`m concerned about the time when task_new() function in scheduler plugin is called after running release_ts for releasing a pending process using wait_for_ts_release() in its source code.
As far as I have read, litmus->task_new() is called in two places: 1) litmus-rt/kernel/sched/core.c line 4383 in __sched_setscheduler(); 2) litmus-rt/kernel/sched/core.c line 2611 in wake_up_new_task(). But both of them look weird to me, because 1) I don`t think arrival of a new task has or should have anything to do with switching of scheduler; 2) wake_up_new_task() is called only in litmus-rt/kernel/fork.c line 1971 in __do_fork(),which is also confusing, because the new task should be a process or thread itself and doesn`t have to fork a new process.
Besides, another function related to new task ---- litmus-->admit_task() is called at litmus-rt/litmus/litmus.c line 358 in __litmus_admit_task(), which is called in two places too: 1) the same file line 552 in function litmus_fork(); 2) the same file line 358 in litmus_admit_task(), which is only called at litmus-rt/kernel/sched/core.c line 4257 in __sched_setscheduler(). Similarly, the question is: why submission of new tasks needs to get into the routine of fork new process or change schduler?
I`ll appreciate your reply.
Yours
Song zeceng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20210304/9c288c3d/attachment.html>
More information about the litmus-dev
mailing list