Re: I.1 - System calls - ioctl
From: Ingo Molnar
Date: Mon Jun 22 2009 - 07:49:58 EST
> I/ General API comments
>
> 1/ System calls
>
> * ioctl()
>
> You have defined 5 ioctls() so far to operate on an existing
> event. I was under the impression that ioctl() should not be
> used except for drivers.
>
> How do you justify your usage of ioctl() in this context?
We can certainly do a separate sys_perf_counter_ctrl() syscall - and
we will do that if people think the extra syscall slot is worth it
in this case.
The (mild) counter-argument so far was that the current ioctls are
very simple over "IO" attributes of counters:
- enable
- disable
- reset
- refresh
- set-period
So they could be considered 'IO controls' in the classic sense and
act as a (mild) exception to the 'dont use ioctls' rule.
They are not some weird tacked-on syscall functionality - they
modify the IO properties of counters: on/off, value and rate. If
they go beyond that we'll put it all into a separate syscall and
deprecate the ioctl (which will have a relatively short half-time
due to the tools being hosted in the kernel repo).
This could happen right now in fact, if people think it's worth it.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/