# Why is PPS_SYNC disabled in GENERIC kernel?



## SamsonovAnton (Jan 2, 2019)

Several years into compiling custom kernel to let GPS provide precise time-keeping signals, I still wonder why is that not enabled in stock kernel? With tons of modules for hardware bundled by default, many of which are obsolete, expensive or otherwise rare, it is surprising that such a long-affordable thing as a GNSS receiver cannot be used with original FreeBSD base system. Funny enough, pps.ko module is present even in GENERIC bundle, despite being useless per se. I bothered to count all lines of source code in kern/kern_tc.c and kern/kern_ntptime.c affected by `PPS_SYNC`: there are just 218 lines, excluding empty and comments, 121 of which constitute a single function — `hardpps()`. So I can hardly imagine that not enabling PPS support by default may be attributed to compilation time reduction, especially taking into account that pps.ko is built from more than 4760 lines (8595 raw). And as for additional CPU load, as far as I understand, the majority of PPS discipline only takes time when an actual signal comes from communication port, while overhead during regular clock ticks is small. But may I be mistaken? Did someone profile the time-keeping routines to obtain statistical evidence on how much impact does PPS processing put on a non-PPS supplied system? There ought to be some reasoning behind it rather than „Who needs that?‟, I suppose.


----------



## ralphbsz (Jan 3, 2019)

This question is probably better for the developer mailing list.


----------



## SirDice (Jan 3, 2019)

This is mostly a user support forum. There are very few (kernel) developers here. I agree with ralphbsz your question is probably better asked on the mailing lists (freebsd-hardware or freebsd-drivers are probably a good place to start).


----------



## SamsonovAnton (Jan 4, 2019)

There is also Development section on this forum, however I do not consider my question a matter of development, but rather a matter of configuration, including compile-time configuration. I am using FreeBSD as is, with binary packages, so just curious about reasoning behind default configuration choices: taking into account that NTPd _package_ supports PPS out of the box, and there is PPS.ko kernel module, it seems counter-intuitive that the kernel itself is built without PPS routines and needs to be compiled manually just because of a single option not enabled by default.


----------

