The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Joe Korty <joe.korty@ccur.com>
Cc: Ingo Molnar <mingo@elte.hu>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] hres_timers_resume must block interrupts
Date: Tue, 14 Aug 2007 07:36:30 +0200	[thread overview]
Message-ID: <1187069790.12828.131.camel@chaos> (raw)
In-Reply-To: <20070813232626.GA24938@tsunami.ccur.com>

On Mon, 2007-08-13 at 19:26 -0400, Joe Korty wrote:
> Retrigger_next_event() must be called with interrupts disabled.
> 
> All internal (to hrtimer.c) uses of retrigger_next_event() are correct.
> But the version exported to other files, hres_timers_resume(), does not
> do the IRQ blocking, nor does the (single) external caller of it.
> 
> Rather than require that users of hres_timers_resume() do the IRQ blocking,
> this patch makes the blocking part of the hres_timers_resume() functionality.

Ack.

> (Also remove the meaningless WARN_ON_ONCE() call in hres_timers_resume)

It's not that meaningless. It catched a resume order problem some time
ago.

	tglx

> Signed-off-by: Joe Korty (joe.korty@ccur.com)
> 
> Index: 2.6.23-rc3/kernel/hrtimer.c
> ===================================================================
> --- 2.6.23-rc3.orig/kernel/hrtimer.c	2007-08-13 18:30:09.000000000 -0400
> +++ 2.6.23-rc3/kernel/hrtimer.c	2007-08-13 18:38:48.000000000 -0400
> @@ -463,10 +463,11 @@
>   */
>  void hres_timers_resume(void)
>  {
> -	WARN_ON_ONCE(num_online_cpus() > 1);
> +	unsigned long flags;
>  
> -	/* Retrigger the CPU local events: */
> +	local_irq_save(flags);
>  	retrigger_next_event(NULL);
> +	local_irq_restore(flags);
>  }
>  
>  /*
> 


  reply	other threads:[~2007-08-14  5:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-13 23:26 [PATCH] hres_timers_resume must block interrupts Joe Korty
2007-08-14  5:36 ` Thomas Gleixner [this message]
2007-08-14  6:27   ` Thomas Gleixner

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=1187069790.12828.131.camel@chaos \
    --to=tglx@linutronix.de \
    --cc=joe.korty@ccur.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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