[LITMUS^RT] non preemption and unlink()ing

Glenn Elliott gelliott at cs.unc.edu
Wed Feb 5 14:32:05 CET 2014


On Feb 5, 2014, at 3:03 AM, Björn Brandenburg <bbb at mpi-sws.org> wrote:

> 
> On 17 Jan 2014, at 09:02, Björn Brandenburg <bbb at mpi-sws.org> wrote:
> 
>> On 17 Jan 2014, at 03:09, Glenn Elliott <gelliott at cs.unc.edu> wrote:
>> 
>>> Why do we unlink() even if the scheduled task (entry->scheduled) will remain running?  I have tasks that, upon exiting a non-preemptive section, are descheduled and are never rescheduled.  I think they fell off a queue some where.
>> 
>> A task that is unlinked should be put back into the ready queue (assuming it is still runnable). Since preempt=1 in your example, the scheduled task is no longer linked and hence should already be in the ready queue. But it is then removed from the ready queue because of the call to unlink() from schedule.
>> 
>> Calling unlinked on entry->scheduled again seems wrong, at least in this case. It still seems appropriate for the sleep=1 and out_of_time=1 cases. I'm surprised this didn't cause problems before. I guess you actually need a lot of non-preemptable sections within a certain length range to hit this case reliably. If the NP task is relinked before the core schedules or if the core never schedules, it won't cause a problem.
>> 
>>> Do we need to call job_arrival() on the job exiting the non-preemption section?
>> 
>> No, I think that would be the wrong workaround. Not calling unlink() should do the trick.
>> 
>> Could you please add a simple test case for this to the liblitmus test suite? I'd like to reproduce this locally.
> 
> Hi Glenn,
> 
> has this been resolved? If not, I would still appreciate a test case so that I can investigate the problem here as well.
> 
> Thanks,
> Björn

Hi Björn,

We haven’t found a fix for it yet.  Do you mind if the test case uses Jonathan’s experiment-scripts?  If not, use gen_exps.py to create a large high-utilization task set and schedule it under G-EDF.  Run it with run_exps.py (it will launch lots of rtspin tasks) and wait for a few hours.  Once I get in the office, I’ll send you some exact commands so we can be on the same page.

-Glenn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20140205/9173ed87/attachment.html>


More information about the litmus-dev mailing list