Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-12 Thread Prarit Bhargava
On 07/12/2012 03:44 AM, Jan Ceuleers wrote: > On 07/11/2012 06:47 PM, John Stultz wrote: >> I'll see if my worry is unfounded, but it might be a bit too clever for rare >> events. > > Full ACK. > > There is an unfortunate history of critical-to-moderately-serious bugs in > the leap second hand

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-12 Thread Jan Ceuleers
On 07/11/2012 06:47 PM, John Stultz wrote: > I'll see if my worry is unfounded, but it might be a bit too clever for rare > events. Full ACK. There is an unfortunate history of critical-to-moderately-serious bugs in the leap second handling, so I submit that what is needed is a simple, obviously

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread John Stultz
On 07/11/2012 08:18 AM, Thomas Gleixner wrote: That leaves NOHZ enabled systems and there we might be clever and avoid the IPIs to those cores which are not idle and let the tick interrupt deal with it. And we can make the calls async and just let them raise the hrtimer softirq on those cores, wh

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 17:18 +0200, Thomas Gleixner wrote: > Right. I think with the atomic update of the offset in the timer > interrupt we are on the safe side. The main problem of timers expiring > early forever is covered by this. > > Thinking more about it. > > If time goes backwards, then t

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Thomas Gleixner
On Wed, 11 Jul 2012, Peter Zijlstra wrote: > On Wed, 2012-07-11 at 14:45 +0200, Thomas Gleixner wrote: > > On Wed, 11 Jul 2012, Prarit Bhargava wrote: > > > On 07/10/2012 06:43 PM, John Stultz wrote: > > > > clock_was_set() cannot be called from hard interrupt context because > > > > it calls on_ea

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 09:05 -0400, Prarit Bhargava wrote: > > Both of those options seem like a lot of work for something that happens once > every 3-4 years, and may not happen ever again[1]. Based on that statement, > if > we're going to modify code I would prefer that it be as lightweight as

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Prarit Bhargava
>> I wish there was a nicer way to do this ... but looking at the code I can't >> figure out a better way. (no offense John, it's just the way the code is ;) >> ) > > Yeah, I had the same discussion with Peter earlier today. There is > only a rather limited set of options. > > 1) Retrigger the

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Peter Zijlstra
On Wed, 2012-07-11 at 14:45 +0200, Thomas Gleixner wrote: > On Wed, 11 Jul 2012, Prarit Bhargava wrote: > > On 07/10/2012 06:43 PM, John Stultz wrote: > > > clock_was_set() cannot be called from hard interrupt context because > > > it calls on_each_cpu(). For fixing the widely reported leap seconds

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Thomas Gleixner
On Wed, 11 Jul 2012, Prarit Bhargava wrote: > On 07/10/2012 06:43 PM, John Stultz wrote: > > clock_was_set() cannot be called from hard interrupt context because > > it calls on_each_cpu(). For fixing the widely reported leap seconds > > issue it's necessary to call it from the timer interrupt cont

Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()

2012-07-11 Thread Prarit Bhargava
On 07/10/2012 06:43 PM, John Stultz wrote: > clock_was_set() cannot be called from hard interrupt context because > it calls on_each_cpu(). For fixing the widely reported leap seconds > issue it's necessary to call it from the timer interrupt context. > > Provide a new function which denotes it