[LITMUS^RT] RFC: remove custom system calls from LITMUS^RT

Björn Brandenburg bbb at mpi-sws.org
Thu Nov 19 00:03:50 CET 2015


> 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, &params, 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





More information about the litmus-dev mailing list