[LITMUS^RT] running a task as its execution time
Jonathan Herman
hermanjl at cs.unc.edu
Thu Feb 21 16:50:14 CET 2013
Yep! Moving this discussion to that thread, my bad.
On Thu, Feb 21, 2013 at 7:31 AM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
> On Feb 20, 2013, at 11:00 PM, Jonathan Herman <hermanjl at cs.unc.edu> wrote:
>
> > I've noticed a very rare bug caused by this patch. A simplified
> explanation of what happens:
> >
> > CPU 1 Job A completes execution in userspace.
> > CPU 2 Job A is preempted, and requeued ON THE RELEASE QUEUE.
> > CPU 1 Job A has complete_job() called in the ensuing call to schedule().
> > CPU 1 Job A is removed() from the ready queue under if(is_queued(t))
> unlink(). Because Job A is in the release queue, and not the ready queue,
> the system crashes.
> >
> > I was only able to create this pattern of execution on the first job
> after a synchronous release with CONFIGS_SCHED_CPU_AFFINITY set. I don't
> know why. I've pushed another patch, prop/budget-bug-fix-fix, to github
> which prevents requeues while a task's completed flag is set.
> >
> > commit eb3ec58872e6ca6074b67d55f1e3ca363499d6af
> > Author: Jonathan Herman <hermanjl at cs.unc.edu>
> > Date: Wed Feb 20 16:58:50 2013 -0500
> >
> > Don't requeue jobs which have their completed flag set.
> >
> > diff --git a/include/litmus/budget.h b/include/litmus/budget.h
> > index 33344ee..59e9869 100644
> > --- a/include/litmus/budget.h
> > +++ b/include/litmus/budget.h
> > @@ -29,7 +29,7 @@ static inline int requeue_preempted_job(struct
> task_struct* t)
> > /* Add task to ready queue only if not subject to budget
> enforcement or
> > * if the job has budget remaining. t may be NULL.
> > */
> > - return t && (!budget_exhausted(t) || !budget_enforced(t));
> > + return t && (!budget_exhausted(t) || !budget_enforced(t)) &&
> !is_completed(t);
> > }
> >
> > #endif
>
>
> Just wondering: is this the same issue that Glenn reported, and for which
> I posted a potential C-EDF-specific patch a couple of weeks ago?
>
> - Björn
>
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
>
--
Jonathan Herman
Department of Computer Science at UNC Chapel Hill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20130221/d75cb014/attachment.html>
More information about the litmus-dev
mailing list