On Wed, May 08, 2019 at 07:36:54AM -0700, Richard Cochran wrote: > No the alarm functionality has been removed. It will not be coming > back, unless there are really strong arguments to support it.
Here is some more background: commit 3a06c7ac24f9f24ec059cd77c2dbdf7fbfd0aaaf Author: Thomas Gleixner <t...@linutronix.de> Date: Tue May 30 23:15:38 2017 +0200 posix-clocks: Remove interval timer facility and mmap/fasync callbacks The only user of this facility is ptp_clock, which does not implement any of those functions. Remove them to prevent accidental users. Especially the interval timer interfaces are now more or less impossible to implement because the necessary infrastructure has been confined to the core code. Aside of that it's really complex to make these callbacks implemented according to spec as the alarm timer implementation demonstrates. If at all then a nanosleep callback might be a reasonable extension. For now keep just what ptp_clock needs. > Here is the result of a study of a prototype alarm method. It shows > why the hrtimer method is better. > > https://sourceforge.net/p/linuxptp/mailman/message/35535965/ That test was with a PCIe card. With a SoC that has a PHC as a built in peripheral, the hardware solution might outperform hrtimers. So you might consider adding clock_nanosleep() for dynamic posix clocks. But your code will have to support multiple users at the same time. Thanks, Richard