On Wed, 5 Feb 2014, John Stultz wrote:On 02/05/2014 01:41 PM, Thomas Gleixner wrote:Mooo.On Wed, 5 Feb 2014, Alexey Perevalov wrote:So of course, I was actually arguing against having a new clockid (whichOn 02/04/2014 08:10 PM, Thomas Gleixner wrote:In principle, I have no objections, but we need a proper technicalOn Mon, 27 Jan 2014, Alexey Perevalov wrote:And what about "deferrable" possibility for hrtimers, do you consider itOn 01/21/2014 11:12 PM, John Stultz wrote:The timer cancel on set was added only to timerfd because timerfd is aThomas: Any thought here? Should we be trying to unify the timerfd flags
and the posix timer flags (specifically things like TIMER_CANCEL_ON_SET,
which is currently timerfd-only)? Should a deferrable flag be added to
the hrtimer core or left to the timer wheel?
non posix interface and we are halfways free to add stuff to
it. Adding extra flags to the real posix timer interfaces is a
different story.
reasonable?
solution. Just adding a flag and keeping the timers in the same rbtree
like we do for the timer wheel timers is not going to happen.
The only feasible solution is to have separate clock ids,
e.g. CLOCK_*_DEFERRABLE, which would enable the deferrable
functionality for all user space interfaces. No need for magic flags
and complex search for non deferrable timers.
was Alexey's first approach).
My reasoning was that the deferrablity isn't a clock domain, and is moreI can see the point. I have no objections against that approach as
of a modifier. Thus to keep the interfaces somewhat sane (and avoiding
having to add N new clockids for each new modifier), we should utilize
the flag arguments to timers. So instead of just having TIMER_ABSTIME,
we could add TIMER_DEFER, etc, which we could utilize instead.
long as we map that against separate internal bases.
Internally we can still keep separate bases, much as your patch does, toIt's not only more limited, it's bound.
keep the next-event searching overhead more limited.
I mainly wanted to get your thoughts on extending the flags, and doingSo the only interface which does not support that is sys_nanosleep()
so in a consistent manner between the timerfd and other timer interfaces.
but that's not really an issue. sys_nanosleep() should die anyway :)
Of course, all this is after I added the _ALARM clockids... so you canWell, you have a valid point about the clock ids. I did not realize in
decide if its hypocrisy or experience.
(The "old wisdom comes from experience and experience comes from bad
decisions" bit ;).
the first place that we can avoid that business if we use the flags to
select the internal representation.
Either way is preferred over reintroducing the timer wheel mess....
Thanks,
tglx