lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Message-ID: <CAMbhsRR5azGw1-VhC4+9y7NfBPnZkBKnK34AqXdMFBsXPqdjCQ@mail.gmail.com> Date: Thu, 10 Jan 2013 14:34:46 -0800 From: Colin Cross <ccross@...roid.com> To: Tony Lindgren <tony@...mide.com> Cc: lkml <linux-kernel@...r.kernel.org>, Don Zickus <dzickus@...hat.com>, Ingo Molnar <mingo@...nel.org>, Andrew Morton <akpm@...ux-foundation.org>, liu chuansheng <chuansheng.liu@...el.com>, Thomas Gleixner <tglx@...utronix.de>, "linux-arm-kernel@...ts.infradead.org" <linux-arm-kernel@...ts.infradead.org> Subject: Re: [PATCH] hardlockup: detect hard lockups without NMIs using secondary cpus On Thu, Jan 10, 2013 at 12:38 PM, Tony Lindgren <tony@...mide.com> wrote: > > * Colin Cross <ccross@...roid.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? watchdog_cpus is effectively a local copy of cpu_online_mask, but updated after the watchdog_nmi_touch in watchdog_nmi_enable. This avoids a false positive after hotplugging in a cpu when cpu_online_mask is true but that cpu hasn't yet run it's first hrtimer. > > + if (cpu >= nr_cpu_ids) > > + cpu = cpumask_first(&cpus); > > + if (cpu == smp_processor_id()) > > + return; > > Regards, > > Tony -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists