Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-09 Thread Ricardo Neri
On Tue, Apr 09, 2019 at 12:59:46PM +0200, Peter Zijlstra wrote: > On Tue, Mar 26, 2019 at 09:49:13PM +0100, Thomas Gleixner wrote: > > So way you should handle this is: > > > > cpumask_set_cpu(cpu, hld_data->cpu_monitored_mask); > > > > if (!hld_data->enabled_cpus++) { > > hld

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-09 Thread Ricardo Neri
On Tue, Apr 09, 2019 at 01:03:40PM +0200, Peter Zijlstra wrote: > On Wed, Feb 27, 2019 at 08:05:15AM -0800, Ricardo Neri wrote: > > diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h > > index 4d559e0c746f..15dc3b576496 100644 > > --- a/arch/x86/include/asm/hpet.h > > +++ b/arch

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-09 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 08:05:15AM -0800, Ricardo Neri wrote: > diff --git a/arch/x86/include/asm/hpet.h b/arch/x86/include/asm/hpet.h > index 4d559e0c746f..15dc3b576496 100644 > --- a/arch/x86/include/asm/hpet.h > +++ b/arch/x86/include/asm/hpet.h > @@ -123,12 +123,24 @@ struct hpet_hld_data { >

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-09 Thread Peter Zijlstra
On Tue, Mar 26, 2019 at 09:49:13PM +0100, Thomas Gleixner wrote: > So way you should handle this is: > > cpumask_set_cpu(cpu, hld_data->cpu_monitored_mask); > > if (!hld_data->enabled_cpus++) { > hld_data->handling_cpu = cpu; > kick_timer(); >

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-08 Thread Ricardo Neri
On Fri, Apr 05, 2019 at 04:12:56PM +, Suthikulpanit, Suravee wrote: > Hi Neri, Hi Suravee, Many thanks for testing the patches! > > While trying out this patch series, I found that it does not work when the > HPET timer > is in periodic mode. I should have tested this better. I'll double c

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-08 Thread Ricardo Neri
On Tue, Mar 26, 2019 at 09:49:13PM +0100, Thomas Gleixner wrote: > On Wed, 27 Feb 2019, Ricardo Neri wrote: > > +/** > > + * get_count() - Get the current count of the HPET timer > > + * > > + * Returns: > > + * > > + * Value of the main counter of the HPET timer > > The extra newline is not requi

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-04-05 Thread Suthikulpanit, Suravee
Hi Neri, While trying out this patch series, I found that it does not work when the HPET timer is in periodic mode. On 2/27/19 11:05 PM, Ricardo Neri wrote: > .. > diff --git a/arch/x86/kernel/watchdog_hld_hpet.c > b/arch/x86/kernel/watchdog_hld_hpet.c > new file mode 100644 > index 000

Re: [RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-03-26 Thread Thomas Gleixner
On Wed, 27 Feb 2019, Ricardo Neri wrote: > +/** > + * get_count() - Get the current count of the HPET timer > + * > + * Returns: > + * > + * Value of the main counter of the HPET timer The extra newline is not required IIRC. Returns: Value .. shoud be sufficient and spares a lot of lines

[RFC PATCH v2 11/14] x86/watchdog/hardlockup: Add an HPET-based hardlockup detector

2019-02-27 Thread Ricardo Neri
This is the initial implementation of a hardlockup detector driven by an HPET timer. This initial implementation includes functions to control the timer via its registers. It also requests such timer, installs an NMI interrupt handler and performs the initial configuration of the timer. The detect