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

Andrea Bastoni bastoni at sprg.uniroma2.it
Tue Nov 17 22:47:16 CET 2015


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




More information about the litmus-dev mailing list