stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Peter Zijlstra <a.p.zijlstra@chello.nl>
To: Thomas Gleixner <tglx@linutronix.de>
Cc: Prarit Bhargava <prarit@redhat.com>,
	John Stultz <johnstul@us.ibm.com>,
	Linux Kernel <linux-kernel@vger.kernel.org>,
	Ingo Molnar <mingo@kernel.org>,
	stable@vger.kernel.org
Subject: Re: [PATCH 1/6] hrtimer: Provide clock_was_set_delayed()
Date: Wed, 11 Jul 2012 17:56:25 +0200	[thread overview]
Message-ID: <1342022185.3462.176.camel@twins> (raw)
In-Reply-To: <alpine.LFD.2.02.1207111539060.32033@ionos>

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 the IPI is pointless. The already armed
> clockevent device will fire too early, hrtimer_interrupt will update
> and just rearm it. That's one "spurious" event.
> 
> So we only need it in the case of time going forward. 
> 
> Though with the leap second the maximum observable delay is 1 second
> on a completely idle core. Surely nothing to worry about for an event
> which happens rarely. So we could safely avoid the whole delayed
> business and just do the timerfd notification, though I wonder if even
> that is necessary in the leap second case.
> 
> On NOHZ=n systems the IPI is pointless as well. The maximum lateness
> will be 10ms for HZ=100. Nothing we should worry about.
> 
> 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, which will run the
> hrtimer interrupt code and take care of everything.
> 
> Thoughts?


static void nohz_hrtimer_softirq(void *unused)
{
	raise_softirq(HRTIMER_SOFTIRQ);
}

static void kick_nohz_cpus(void)
{
	smp_call_function_many(nohz.idle_cpus_mask, nohz_hrtimer_softirq, NULL, 0);
}

Same problem as before though, can't be sending IPIs while in hardirq
context.. 

And you cannot do the same trick with a CFD as with the CSD, some CPUs
might need it again while others are still pending.


  reply	other threads:[~2012-07-11 15:56 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-10 22:43 [PATCH 0/6] Fix for leapsecond caused hrtimer/futex issue (updated) John Stultz
2012-07-10 22:43 ` [PATCH 1/6] hrtimer: Provide clock_was_set_delayed() John Stultz
2012-07-11 12:15   ` Prarit Bhargava
2012-07-11 12:45     ` Thomas Gleixner
2012-07-11 13:05       ` Peter Zijlstra
2012-07-11 15:18         ` Thomas Gleixner
2012-07-11 15:56           ` Peter Zijlstra [this message]
2012-07-11 16:47           ` John Stultz
2012-07-12  7:44             ` Jan Ceuleers
2012-07-11 13:05       ` Prarit Bhargava
2012-07-11 13:38         ` Peter Zijlstra
2012-07-10 22:43 ` [PATCH 2/6] timekeeping: Fix leapsecond triggered load spike issue John Stultz
2012-07-10 22:43 ` [PATCH 3/6] timekeeping: Maintain ktime_t based offsets for hrtimers John Stultz
2012-07-10 22:43 ` [PATCH 4/6] hrtimer: Move lock held region in hrtimer_interrupt() John Stultz
2012-07-10 22:43 ` [PATCH 4/6] hrtimers: " John Stultz
2012-07-10 22:43 ` [PATCH 5/6] timekeeping: Provide hrtimer update function John Stultz
2012-07-10 22:43 ` [PATCH 6/6] hrtimer: Update hrtimer base offsets each hrtimer_interrupt John Stultz
2012-07-10 22:53 ` [PATCH 0/6] Fix for leapsecond caused hrtimer/futex issue (updated) John Stultz
2012-07-10 23:00 ` John Stultz
2012-07-11 10:59 ` Peter Zijlstra
2012-07-11 11:17 ` Ingo Molnar
2012-07-11 12:16 ` Prarit Bhargava

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1342022185.3462.176.camel@twins \
    --to=a.p.zijlstra@chello.nl \
    --cc=johnstul@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=prarit@redhat.com \
    --cc=stable@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).