[LITMUS^RT] RFC: remove custom system calls from LITMUS^RT
Björn Brandenburg
bbb at mpi-sws.org
Wed Dec 16 13:48:47 CET 2015
> On 19 Nov 2015, at 00:03, Björn Brandenburg <bbb at mpi-sws.org> wrote:
>
>>
>> On 17 Nov 2015, at 22:47, Andrea Bastoni <bastoni at sprg.uniroma2.it> wrote:
>>
>> Hi Björn,
>>
>> On 11/17/2015 02:24 PM, Björn Brandenburg wrote:
>>> Hi everyone,
>>>
>>> maintaining LITMUS^RT is quite a bit of a timesink, so I’m looking for ways
>>> to remove friction from the process. One major source of conflicts when
>>> rebasing LITMUS^RT is the need to re-integrate our custom system calls every
>>> time the underlying Linux version changes. It also makes the patch more
>>> platform-specific than it needs to be.
>>>
>>> An alternative design would be to expose the same functionality as a bunch of
>>> ioctl() operations of the control page device. A similar approach is used by
>>> the KVM subsystem. From what I can tell, the only downside is that there’s
>>> some minor overhead due to the extra level of indirection through the VFS
>>> layer. In my view, this is negligible compared to the benefits.
>>>
>>> Any concerns or objections to moving LITMUS^RT in a future version to an
>>> all-ioctl() model?
>>
>> No concerns or objections (I haven't implemented for LITMUS in quite a while),
>> it's just that ioctls always sound strange to me, as if there were no better
>> ways to actually have a device or a component doing something.
>>
>> What about implementing proper read/write file abstraction (in the
>> sysfs/procfs?) for operations like set, get (rt_task_param, current_budget),
>> query_job etc.? It should have the same complexity of ioctls, but could allow a
>> better semantics from the path already e.g.:
>>
>> struct rt_task params;
>> //init(params);
>> params.pid = target_pid;
>> fd = open("/sys/kernel/litmus/set_param", O_WRONLY);
>> write(fd, ¶ms, sizeof(params));
>>
>> Just my two cents,
>> best regards,
>> Andrea
>
> Hi Andrea,
>
> thanks for your comments. I agree that a proper sysfs-based interface would be more elegant, but I’d need a volunteer to code this up. Retooling the existing syscall backends to be called from the ioctl() handler should be relatively easy to accomplish.
>
> - Björn
There is now a branch wip-ioctl that implements this proposal.
Changes in liblitmus: https://github.com/LITMUS-RT/liblitmus/commit/a0c1dad65994b4f9158cf458c21b19e8621b5f48
Changes in LITMUS^RT: https://github.com/LITMUS-RT/litmus-rt/commit/fcb243daebab16aeb5dbcc74c844fb60f234fefa
If there are no objections, I’m going to merge these patches for the next release.
Thanks,
Björn
More information about the litmus-dev
mailing list