lkml.org 
[lkml]   [2017]   [May]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [patch 05/26] posix-clocks: Remove interval timer facility and mmap/fasync callbacks
On Tue, May 30, 2017 at 11:15:38PM +0200, Thomas Gleixner wrote:
> 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.
>
> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>

Acked-by: Richard Cochran <richardcochran@gmail.com>

For the record, recently someone did try to implement this interface
for the i210 card. Although there were issues in the implementation,
still I was curious enough to test the performance.

https://www.mail-archive.com/linuxptp-devel@lists.sourceforge.net/msg01738.html

The result confirmed my expectation that using the normal system clock
sychronized to the PHC using the phc2sys utility yields better
performance than the direct timer_settime() implementation.

The nanosleep() idea might be worthwhile, but only for devices with
directly mapped registers (like in some SoCs) and not for the common
PCIe devices. In any case, I am happy to see the timer interface
removed, as it is basically useless and gives people false
impressions.

Could you please include this documentation fix, too?

Thanks,
Richard

---8<---
diff --git a/Documentation/ptp/ptp.txt b/Documentation/ptp/ptp.txt
index ae8fef8..11e904e 100644
--- a/Documentation/ptp/ptp.txt
+++ b/Documentation/ptp/ptp.txt
@@ -18,7 +18,6 @@
- Adjust clock frequency

+ Ancillary clock features
- - One short or periodic alarms, with signal delivery to user program
- Time stamp external events
- Period output signals configurable from user space
- Synchronization of the Linux system time via the PPS subsystem
@@ -48,9 +47,7 @@
User space programs may control the clock using standardized
ioctls. A program may query, enable, configure, and disable the
ancillary clock features. User space can receive time stamped
- events via blocking read() and poll(). One shot and periodic
- signals may be configured via the POSIX timer_settime() system
- call.
+ events via blocking read() and poll().

** Writing clock drivers



\
 
 \ /
  Last update: 2017-05-31 11:00    [W:0.452 / U:0.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site