[LITMUS^RT] proposing liblitmus API additions and changes

Glenn Elliott gelliott at cs.unc.edu
Tue Mar 5 03:06:40 CET 2013


On Mar 1, 2013, at 6:04 PM, Glenn Elliott <gelliott at cs.unc.edu> wrote:

> On Mar 1, 2013, at 5:35 PM, Björn Brandenburg <bbb at mpi-sws.org> wrote:
> 
>> Hi Glenn,
>> 
>> thanks a lot for your patches! I'm very glad to see more "infrastructure improvements" patches that make the system easier to use or more robust. Comments inline.
> 
> <snip>
> 
>> These changes look ok to me (though I liked the be_ in be_migrate_to() to indicate that only best-effort tasks may call it). I left a few low-level comments in Github.
> 
> Why is this restriction necessary?  Perhaps I was running into a bug earlier, but I ran into the situation where non-be tasks not on a CPU in the proper cluster could not transition to real-time.  I had to use be_migrate_to() to make things work.  I assumed that "be_" was a relic and that the proper affinity masks always had to be setup for all task categories.

The cleaned up migration APIs for liblitmus are done, excepting proper function names.  Following up on whether the 'be_' prefix to the migration API  should be carried forward...

Take a look at any of the plugin *_admit_task() functions (except for GSN-EDF), and you'll see that the task must already be executing on the CPU of its assigned partition/cluster in order to be admitted.  Does the 'be_' prefix denote that the callee must be a best-effort task (i.e., regular linux task)?  If so, then keeping the 'be_' makes sense.  Otherwise, I think it should go.  What was your original intent, Björn?

In any case, I see that there is a bug in cedf_admit_task(): The function checks to see if the task to be admitted is running on a singular CPU.  Instead, it should look up the C-EDF domain for the CPU on which the task to be admitted is running and compare that to the C-EDF domain for the CPU denoted in task_params.cpu.  That is:

return (remote_cluster(task_cpu(task)) == task_cpu_cluster(task)) ? 0 : -EINVAL;  // correct behavior

instead of this:

return task_cpu(tsk) == tsk->rt_param.task_params.cpu ? 0 : -EINVAL;  // incorrect behavior

I'll submit a patch.

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


More information about the litmus-dev mailing list