Re: [PATCH V7 4/8] posix clocks: hook dynamic clocks into system calls

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Richard Cochran
Date: Friday, December 17, 2010 - 12:04 am

On Fri, Dec 17, 2010 at 12:20:44AM +0100, Thomas Gleixner wrote:

Sorry, what do you mean?


I'm glad you suggested that.

IMHO, the CLOCK_DISPATCH thing is calling out to be eliminated, but I
didn't dare to take that upon myself.


;^)

...

The code in the patch set is modeled after a USB driver, namely
drivers/usb/class/usbtmc.c. Alan Cox had brought up the example of a
PTP Hardware Clock appearing as a USB device. So the device might
suddenly disappear, and the zombie field is supposed to cover the case
where the hardware no longer exists, but the file pointer is still
valid.

I'll take a closer look at your suggestion...


Yes, and hot pluggable, too.
 

I would summarize the discussion like this:

Alan Cox was strongly in favor of using a regular file descriptor as
the reference to the dynamic clock.

John Stultz thought it wouldn't be too bad to cycle though a number of
static ids, being careful not to every assign the same static id (in
series) to two different clocks.

I implemented Alan's idea, since it seemed like maintaining the
mapping between clocks and static ids would be extra work, but without
any real benefit.

Thanks again for your review,
Richard
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH V7 0/8] ptp: IEEE 1588 hardware clock support, Richard Cochran, (Thu Dec 16, 8:41 am)
[PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Thu Dec 16, 8:41 am)
[PATCH V7 3/8] posix clocks: introduce dynamic clocks, Richard Cochran, (Thu Dec 16, 8:43 am)
[PATCH V7 7/8] ptp: Added a clock driver for the IXP46x., Richard Cochran, (Thu Dec 16, 8:44 am)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Arnd Bergmann, (Thu Dec 16, 9:16 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Thomas Gleixner, (Thu Dec 16, 10:48 am)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Thomas Gleixner, (Thu Dec 16, 1:56 pm)
Re: [PATCH V7 3/8] posix clocks: introduce dynamic clocks, Richard Cochran, (Thu Dec 16, 11:29 pm)
Re: [PATCH V7 4/8] posix clocks: hook dynamic clocks into ..., Richard Cochran, (Fri Dec 17, 12:04 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Fri Dec 17, 1:16 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, john stultz, (Tue Dec 21, 12:37 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Tue Dec 21, 1:57 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Tue Dec 21, 2:13 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 12:11 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 12:13 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Alexander Gordeev, (Wed Dec 22, 2:58 am)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Wed Dec 22, 1:27 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, john stultz, (Wed Dec 22, 5:00 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Richard Cochran, (Wed Dec 22, 11:13 pm)
Re: [PATCH V7 1/8] ntp: add ADJ_SETOFFSET mode bit, Kuwahara,T., (Sat Dec 25, 1:38 pm)
Re: [PATCH V7 7/8] ptp: Added a clock driver for the IXP46x., Richard Cochran, (Mon Jan 3, 10:07 am)