[LITMUS^RT] Job Quantity Issue
Geoffrey Tran
gtran at isi.edu
Mon Aug 31 18:27:33 CEST 2015
Hi Björn,
Thank you for your reply.
So if I understand this correctly, from the kernel perspective, deadlines only occur when
a kernel job does not consume it's budget totally. If that is the case, the actual job
being executed shouldn't affect the deadlines being missed, besides factors such as
causing cache misses and context switches?
I can think of four cases (period=deadline>execution time):
short computation: task-view job() takes less than execution time
long computation: task-view job() takes much longer than execution time
With budget enforcement
Long computation:
The task would run out of budget, so it would be suspended
until the next period.
Short computation:
The task would sleep_next_period() and therefore throw away the
remaining budget.
Without enforcement:
Long computation:
The task keeps running even though the budget has run out?
Short computation:
The task would sleep_next_period() and therefore throw away the
remaining budget.
What happens in the case with no budget enforcement? Does each job just keep running
even after the budget is exhausted? Furthermore, does that mean that the job number
is not incremented until sleep_next_period() is called? Stated another way, if budget
enforcement is not enabled, when is a job completed?
Therefore, in these following cases, I do not see how a deadline could be missed.
I ran some quick tests and came up with the following:
execution period Deadlines missed?
1 100
With enforcement
Long computation No
Short computation No
Without enforcement
Long computation No
Short computation No
90 100
With enforcement
Long computation Yes
Short computation No
Without enforcement
Long computation Yes
Short computation No
These results seem strange, as this is the only task, so it should be able to get all
the budget that is required. On the other hand, at least with budget enforcement off,
the number of jobs is nearer to expected.
Thank you again for explaining this,
Geoffrey
----- Original Message -----
> From: "Björn Brandenburg" <bbb at mpi-sws.org>
> To: "Geoffrey Tran" <gtran at isi.edu>
> Sent: Saturday, August 29, 2015 1:58:54 AM
> Subject: Re: [LITMUS^RT] Job Quantity Issue
>
>
> > On 28 Aug 2015, at 21:40, Geoffrey Tran <gtran at isi.edu> wrote:
> >
> > Hi Björn,
> >
> > Thanks for your reply. I've answered your questions below.
> >
> > 1) LITMUS-RT 2014.2, with Xen patch
> >
> > 2) GSN-EDF with no modifications to the plugin
> >
> > 3) KVM
> >
> > 4) Each call to the job() function results in the count being
> > decremented, so the task terminates when count == 0
> >
> > 5) I guess I was confusing myself between what LITMUS sees as
> > a job vs the "job" calls in the task.
> >
> > Thanks for this explanation. It is helpful. However, I then
> > have a few more questions please.
> >
> > - Shouldn't a forced job completion be counted as a missed deadline?
> > If this is what's happening in the second case, it looks like
> > st_job_stats isn't reporting it, possibly due to how it determines
> > a missed job.
>
> A deadline miss is reported if the full budget could not be consumed by the
> deadline. For instance, this can happen under GSN-EDF since it’s not an
> optimal multiprocessor scheduler. This is different from a task overrunning
> its assigned budget.
>
> If you want to evaluate budget enforcement events, you can look at the
> ‘forced’ field in st_completion_data:
>
> https://github.com/LITMUS-RT/litmus-rt/blob/master/include/litmus/sched_trace.h#L55
> <https://github.com/LITMUS-RT/litmus-rt/blob/master/include/litmus/sched_trace.h#L55>
>
> You are right that st_job_stats currently does not report this field in its
> output, but it should be easy to add, and I’d be happy to merge such a
> patch.
>
> > - Would you be able to recommend a way to have the userspace jobs
> > line up with the kernel jobs? My goal is to have a way to generate
> > a number of jobs in the task, have that match up with the jobs in the
> > trace, and be able to detect the missed deadlines in the benchmark
> > at runtime.
> >
> > For instance, using this example, the task determines that it needs
> > to call job() 10 times and iterations 3 and 8 miss their deadlines, then
> > it would be able to know that at runtime, and the trace logs would also
> > show 10 jobs with the third and eighth jobs missing deadlines.
>
> You could write a simple log in userspace, recording for each invocation the
> starting and finish kernel-view job ID. This allows you to reconstruct how
> many budget enforcement events you were subject to.
>
> Best regards,
> Björn
>
>
More information about the litmus-dev
mailing list