[LITMUS^RT] Budget Consumed By Jobs In Ready Queue
Jeremy Erickson
jerickso at cs.unc.edu
Sat Aug 25 00:02:02 CEST 2012
On Fri, Aug 24, 2012 at 4:24 AM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
> No, GSN-EDF implements link-based scheduling to support non-preemptive
> sections. A job is in the ready queue if it is not _linked_. A linked job
> may still be scheduled, either while it is non-preemptive or when the
> actual system is still catching up to the ideal system (e.g., if the
> rescheduling IPI is still in flight).
>
> Thus, queued jobs may consume budget since they could still be scheduled
> (for some short time).
>
> - Björn
>
So what's been happening to me is that I've been getting unlucky and having
jobs get unlinked right before they run out of budget. Apparently
something about my scheduler and/or tests makes that more likely than it
usually is, but it should have a nonzero probability even with the normal
scheduler and tests. When that happens, it triggers the BUG_ON in
arm_enforcement_timer in budget.c as soon as the (now-exhausted) job is
taken off the ready queue and scheduled.
I think this is a minor bug that should be fixed in mainline LITMUS^RT. I
have attached two possible fixes: the first triggers a reschedule when
trying to set the enforcement timer for an expired job (without setting the
timer), and the second simply removes the BUG_ON (as there's a reasonable
situation where a timer can be set for a task that just ran out of budget,
even though the task is preemptible.) A more complicated fix would be to
check for exhausted jobs when pulling off the ready queue, but that would
require a change in each scheduler.
These patches do appear to solve the particular issue I was having.
-Jeremy Erickson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120824/daabdfc8/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt1.patch
Type: application/octet-stream
Size: 588 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120824/daabdfc8/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alt2.patch
Type: application/octet-stream
Size: 562 bytes
Desc: not available
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20120824/daabdfc8/attachment-0001.obj>
More information about the litmus-dev
mailing list