Messages in this thread | | | Date | Fri, 03 Jan 2014 21:45:06 +0400 | From | Alexey Perevalov <> | Subject | Re: [PATCH 0/3] Deferrable timers support for timerfd API |
| |
On 01/03/2014 03:17 AM, John Stultz wrote: > On 01/02/2014 10:30 AM, Alexey Perevalov wrote: >> This version introduces new clockid (CLOCK_DEFERRABLE) , for timerfd_create, instead of >> new flag (TFD_TIMER_DEFERRABLE) for timerfd_settime introduced in previous version. > So why did you make this change? > > thanks > -john > >
I looked at alarm timers and found approach of making timer behavior persistent per file descriptor is better than changeable by timerfd_settime. I think "end user wake up from suspend" and "don't wake up in idle" is the same thing on the same abstraction level.
Yes Anton's previous patches worked with CLOCK_MONOTONIC only and I didn't intend to use it with CLOCK_REALTIME, cause it's hard to me to find such use case. Another way - it's stay as was Anton's patch, I mean as flag for the timerfd_settime, but in original patch set both hrtimer and deferrable timers initialized in timerfd_create, I think it's not needed. Also ability to change timer behavior looks not good if you couldn't change alarm timer behavior, not unified API.
If I'm right, only high resolution timer could be REALTIME, and there is no deferrable behavior for hrtimer only for timer_list.
-- Best regards, Alexey Perevalov
| |