All of lore.kernel.org
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus
Date: Thu, 10 Jan 2013 12:38:33 -0800	[thread overview]
Message-ID: <20130110203833.GE14149@atomide.com> (raw)
In-Reply-To: <1357783059-13923-1-git-send-email-ccross@android.com>

* Colin Cross <ccross@android.com> [130109 18:05]:
> +static void watchdog_check_hardlockup_other_cpu(void)
> +{
> +	int cpu;
> +	cpumask_t cpus = watchdog_cpus;
> +
> +	/*
> +	 * Test for hardlockups every 3 samples.  The sample period is
> +	 *  watchdog_thresh * 2 / 5, so 3 samples gets us back to slightly over
> +	 *  watchdog_thresh (over by 20%).
> +	 */
> +	if (__this_cpu_read(hrtimer_interrupts) % 3 != 0)
> +		return;
> +
> +	/* check for a hardlockup on the next cpu */
> +	cpu = cpumask_next(smp_processor_id(), &cpus);

Hmm don't you want to check cpu_oneline_mask here and
return if the other CPU is offline?

> +	if (cpu >= nr_cpu_ids)
> +		cpu = cpumask_first(&cpus);
> +	if (cpu == smp_processor_id())
> +		return;

Regards,

Tony

WARNING: multiple messages have this Message-ID (diff)
From: Tony Lindgren <tony@atomide.com>
To: Colin Cross <ccross@android.com>
Cc: linux-kernel@vger.kernel.org, Don Zickus <dzickus@redhat.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	liu chuansheng <chuansheng.liu@intel.com>,
	Thomas Gleixner <tglx@linutronix.de>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus
Date: Thu, 10 Jan 2013 12:38:33 -0800	[thread overview]
Message-ID: <20130110203833.GE14149@atomide.com> (raw)
In-Reply-To: <1357783059-13923-1-git-send-email-ccross@android.com>

* Colin Cross <ccross@android.com> [130109 18:05]:
> +static void watchdog_check_hardlockup_other_cpu(void)
> +{
> +	int cpu;
> +	cpumask_t cpus = watchdog_cpus;
> +
> +	/*
> +	 * Test for hardlockups every 3 samples.  The sample period is
> +	 *  watchdog_thresh * 2 / 5, so 3 samples gets us back to slightly over
> +	 *  watchdog_thresh (over by 20%).
> +	 */
> +	if (__this_cpu_read(hrtimer_interrupts) % 3 != 0)
> +		return;
> +
> +	/* check for a hardlockup on the next cpu */
> +	cpu = cpumask_next(smp_processor_id(), &cpus);

Hmm don't you want to check cpu_oneline_mask here and
return if the other CPU is offline?

> +	if (cpu >= nr_cpu_ids)
> +		cpu = cpumask_first(&cpus);
> +	if (cpu == smp_processor_id())
> +		return;

Regards,

Tony

  parent reply	other threads:[~2013-01-10 20:38 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-10  1:57 [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus Colin Cross
2013-01-10  1:57 ` Colin Cross
2013-01-10 14:02 ` Don Zickus
2013-01-10 14:02   ` Don Zickus
2013-01-10 14:22   ` Russell King - ARM Linux
2013-01-10 14:22     ` Russell King - ARM Linux
2013-01-10 16:18     ` Frederic Weisbecker
2013-01-10 16:18       ` Frederic Weisbecker
2013-01-10 17:00       ` Russell King - ARM Linux
2013-01-10 17:00         ` Russell King - ARM Linux
2013-01-10 17:27   ` Colin Cross
2013-01-10 17:27     ` Colin Cross
2013-01-10 18:17     ` Don Zickus
2013-01-10 18:17       ` Don Zickus
2013-01-10 20:38 ` Tony Lindgren [this message]
2013-01-10 20:38   ` Tony Lindgren
2013-01-10 22:34   ` Colin Cross
2013-01-10 22:34     ` Colin Cross
2013-01-10 23:42     ` Tony Lindgren
2013-01-10 23:42       ` Tony Lindgren
2013-01-11  1:39 ` Liu, Chuansheng
2013-01-11  1:39   ` Liu, Chuansheng
2013-01-11  5:34   ` Colin Cross
2013-01-11  5:34     ` Colin Cross
2013-01-11  5:57     ` Liu, Chuansheng
2013-01-11  5:57       ` Liu, Chuansheng
2013-01-11  6:17       ` Colin Cross
2013-01-11  6:17         ` Colin Cross
2013-01-11  6:27         ` Liu, Chuansheng
2013-01-11  6:27           ` Liu, Chuansheng

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=20130110203833.GE14149@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.