mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>,
	linux-kernel@vger.kernel.org,
	Linus Torvalds <torvalds@linux-foundation.org>,
	stable@kernel.org, Greg KH <greg@kroah.com>,
	Chris Wright <chrisw@sous-sol.org>
Subject: Re: [patch] fix the softlockup watchdog to actually work
Date: Wed, 25 Jul 2007 02:17:30 -0700	[thread overview]
Message-ID: <20070725021730.a9a624b3.akpm@linux-foundation.org> (raw)
In-Reply-To: <20070725090439.GA26286@elte.hu>

On Wed, 25 Jul 2007 11:04:39 +0200 Ingo Molnar <mingo@elte.hu> wrote:

> > fix-the-softlockup-watchdog-to-actually-work.patch
> > softlockup-make-asm-irq_regsh-available-on-every-platform.patch
> > softlockup-improve-debug-output.patch
> > softlockup-watchdog-style-cleanups.patch
> > softlockup-add-a-proc-tuning-parameter.patch
> > softlockup-add-a-proc-tuning-parameter-fix.patch
> 
> you have the key one missing i think - attached below.
> 
> 	Ingo
> 
> ------------------------------------>
> Subject: softlockup: use cpu_clock() instead of sched_clock()
> From: Ingo Molnar <mingo@elte.hu>
> 
> sched_clock() is not a reliable time-source, use cpu_clock() instead.
> 
> Signed-off-by: Ingo Molnar <mingo@elte.hu>
> ---
>  kernel/softlockup.c |   10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> Index: linux/kernel/softlockup.c
> ===================================================================
> --- linux.orig/kernel/softlockup.c
> +++ linux/kernel/softlockup.c
> @@ -42,14 +42,16 @@ static struct notifier_block panic_block
>   * resolution, and we don't need to waste time with a big divide when
>   * 2^30ns == 1.074s.
>   */
> -static unsigned long get_timestamp(void)
> +static unsigned long get_timestamp(int this_cpu)
>  {
> -	return sched_clock() >> 30;  /* 2^30 ~= 10^9 */
> +	return cpu_clock(this_cpu) >> 30;  /* 2^30 ~= 10^9 */
>  }
>  
>  void touch_softlockup_watchdog(void)
>  {
> -	__raw_get_cpu_var(touch_timestamp) = get_timestamp();
> +	int this_cpu = raw_smp_processor_id();
> +
> +	per_cpu(touch_timestamp, this_cpu) = get_timestamp(this_cpu);
>  }
>  EXPORT_SYMBOL(touch_softlockup_watchdog);
>  
> @@ -95,7 +97,7 @@ void softlockup_tick(void)
>  		return;

argh.  afacit this was never sent, except as part of some jumbopatch called
"sched: implement cpu_clock(cpu) high-speed time source".

That patch helped.

It's all a plot.


  reply	other threads:[~2007-07-25  9:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-17 11:44 [patch] softlockup watchdog: fix Xen bogosity Ingo Molnar
2007-07-17 14:17 ` Jeremy Fitzhardinge
2007-07-17 15:49   ` [patch] fix the softlockup watchdog to actually work Ingo Molnar
2007-07-17 17:03     ` Randy Dunlap
2007-07-17 17:25       ` Ingo Molnar
2007-07-17 18:14       ` Linus Torvalds
2007-07-17 21:38         ` Randy Dunlap
2007-07-19  7:22     ` Andrew Morton
2007-07-19  7:46       ` Ingo Molnar
2007-07-19  7:51       ` Ingo Molnar
2007-07-19 14:31         ` Jeremy Fitzhardinge
2007-07-19 14:35           ` Ingo Molnar
2007-07-19 14:40             ` Jeremy Fitzhardinge
2007-07-19 14:46             ` Jeremy Fitzhardinge
2007-07-19 14:50               ` Ingo Molnar
2007-07-19 15:04                 ` Jeremy Fitzhardinge
2007-07-19 15:09                   ` Ingo Molnar
2007-07-19 15:21                     ` Jeremy Fitzhardinge
2007-07-19 15:42                       ` [patch] sched: implement cpu_clock(cpu) high-speed time source Ingo Molnar
2007-07-19 15:44                         ` [patch] sched: implement cpu_clock(cpu) high-speed time source, take #2 Ingo Molnar
2007-07-19 16:11                           ` Jeremy Fitzhardinge
2007-07-19 16:16                             ` Ingo Molnar
2007-07-19 16:18                               ` Jeremy Fitzhardinge
2007-07-19 16:21                                 ` Ingo Molnar
2007-07-19 16:29                                   ` Jeremy Fitzhardinge
2007-07-19 17:24                             ` Jens Axboe
2007-07-19 18:10                               ` Jeremy Fitzhardinge
2007-07-19 18:20                                 ` Jens Axboe
2007-07-25  8:49     ` [patch] fix the softlockup watchdog to actually work Andrew Morton
2007-07-25  8:52       ` Ingo Molnar
2007-07-25  8:55         ` Ingo Molnar
2007-07-25  9:00         ` Andrew Morton
2007-07-25  9:04           ` Ingo Molnar
2007-07-25  9:17             ` Andrew Morton [this message]
2007-07-25  9:23               ` Ingo Molnar
2007-07-25  9:59                 ` Jens Axboe
2007-07-25 11:04                   ` Ingo Molnar
2007-07-25 11:06                     ` Jens Axboe
2007-07-25 16:34       ` Andi Kleen
2007-10-03 23:49     ` Yinghai Lu

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=20070725021730.a9a624b3.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=chrisw@sous-sol.org \
    --cc=greg@kroah.com \
    --cc=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=stable@kernel.org \
    --cc=torvalds@linux-foundation.org \
    /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

Powered by JetHome