lkml.org 
[lkml]   [2013]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus
* 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


\
 
 \ /
  Last update: 2013-01-10 22:21    [W:0.099 / U:0.136 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site