[LITMUS^RT] linked but never scheduled
Glenn Elliott
gelliott at cs.unc.edu
Sat Sep 15 01:57:00 CEST 2012
Well, I am stuck in a strange case where a task is linked but never scheduled (G-EDF):
3903 P0 [check_for_preemptions at litmus/sched_gsn_edf.c:365]: check_for_preemptions: attempting to link task 1795 to 0
3904 P0 [gsnedf_get_nearest_available_cpu at litmus/sched_gsn_edf.c:347]: Could not find an available CPU close to P0
3905 P0 [__add_ready at litmus/rt_domain.c:312]: rt: adding aux_threads/1799 (0, 4611686018427387903, 4611686018427387903) [inh_task: (nil)/0 (0, 0 0)] rel=59812157846 to ready queue at 60312058176
3907 P0 [link_task_to_cpu at litmus/sched_gsn_edf.c:218]: (aux_threads/1799:1) linked = aux_threads/1795
3908 P0 [link_task_to_cpu at litmus/sched_gsn_edf.c:219]: (aux_threads/1799:1) entry->linked = aux_threads/1799
3909 P0 [link_task_to_cpu at litmus/sched_gsn_edf.c:261]: (aux_threads/1795:2) linked to 0.
3914 P1 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1796:1) tick
3915 P2 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1797:1) tick
3916 P3 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1798:1) tick
3917 P0 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1799:1) tick
3918 P1 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1796:1) tick
3919 P2 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1797:1) tick
3920 P3 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1798:1) tick
3921 P0 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1799:1) tick
3922 P1 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1796:1) tick
3923 P2 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1797:1) tick
3924 P3 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1798:1) tick
3925 P0 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1799:1) tick
3926 P1 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1796:1) tick
3927 P2 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1797:1) tick
3928 P3 [gsnedf_tick at litmus/sched_gsn_edf.c:472]: (aux_threads/1798:1) tick
I updated gsnedf_tick to print the currently scheduled real-time task. Task 1795 should be running on P0 instead of 1799.
Has anyone ever seen something like this before?
Thanks,
Glenn
p.s. Ignore the crazy period/relative_deadline for 1799. Those are just place holders. 1799 is really just a worker thread that has a statically low priority and should only run when the system is idle (or according to an inherited priority).
p.p.s. I think there is a bug in litmus.c::litmus_fork(). is_realtime() is returning false for forked children of a real-time task (expected), so the fork-copied rt_param state is not reset. Thus, the child gets the same rt_params as the parent. This is probably harmless if we're sure to re-init any children that transition to real-time. However, for the sake of completeness, I wonder if we should execute "reinit_litmus_state(p,0);" for all children. I am doing some where tasks are forced to become real-time from within the kernel (worker threads), and this possible bug bit me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120914/e8761fdf/attachment.html>
More information about the litmus-dev
mailing list