lkml.org 
[lkml]   [2012]   [Jul]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()
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 context.
> >
> > Provide a new function which denotes it in the hrtimer cpu base
> > structure of the cpu on which it is called and raising the timer
> > softirq.
> >
> > We then execute the clock_was_set() notificiation in the timer softirq
> > context in hrtimer_run_pending().
>
> 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 timer interrupt vectors on all CPUs - except the one
we are running on, but we have no interface for that at the moment

2) Do the nasty __smp_call_function_single() hack

Preallocate call_single_data for all cpus and do a
__smp_call_function_single() on all online cpus.

This can be called from hard interrupt context or irq disabled
regions.

That would allow to get rid of the whole delay magic all
together.

Thoughts?

tglx



\
 
 \ /
  Last update: 2012-07-11 15:41    [W:1.732 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site