Re: [PATCH v2 0/2] make POSIX timers optional

From: Nicolas Pitre
Date: Tue Sep 20 2016 - 18:47:10 EST


On Tue, 20 Sep 2016, Thomas Gleixner wrote:

> I think the whole approach is wrong because it makes the PTP split at the
> wrong level.
>
> Currently we have:
>
> DRIVER_X
> tristate "Driver X"
> select PTP
>
> In order to make POSIX_CLOCK configurable we should have
>
> PTP
> tristate "PTP"
> select POSIX_CLOCK
>
> Now if you want to distangle PTP from a driver then you split it at the
> driver level and not at the PTP level:
>
> DRIVER_X
> tristate "Driver X"
>
> DRIVER_X_PTP
> bool "Enable PTP support"
> default y if !MAKE_IT_TINY
> depends on DRIVER_X
> select PTP
>
> We have already drivers following that scheme. That way you make the PTP
> support in the driver conditional on DRIVER_X_PTP and have no hassle with
> modules and dependencies.

I beg to disagree.

There are way more drivers than subsystems and if you had to go around
unselecting all NIC drivers for CONFIG_ETHERNET to be turned off, and
with CONFIG_ETHERNET=n you'd finally be able to turn networking off,
then this would be a nightmare.

IMHO it is much nicer for the poor user configuring the kernel to have a
single configuration prompt for PTP support, and then have whatever
driver that can provide a PTP clock just do it (or omit it) based on
that single prompt. Prompting for PTP support for each individual
ethernet driver is silly.


Nicolas