[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170906161405.yliexpi6sry3ldx4@pd.tnic>
Date: Wed, 6 Sep 2017 18:14:06 +0200
From: Borislav Petkov <bp@...en8.de>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: LKML <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Sebastian Siewior <bigeasy@...utronix.de>,
Nicholas Piggin <npiggin@...il.com>,
Don Zickus <dzickus@...hat.com>,
Chris Metcalf <cmetcalf@...lanox.com>,
Ulrich Obergfell <uobergfe@...hat.com>
Subject: Re: [patch 01/29] hardlockup_detector: Provide interface to
stop/restart perf events
On Thu, Aug 31, 2017 at 09:15:59AM +0200, Thomas Gleixner wrote:
> From: Peter Zijlstra <peterz@...radead.org>
>
> Provide a interface to stop and restart perf NMI watchdog events on all
"an interface"
> CPUs. This is only useable during init and especially for handling the perf
"usable"
> HT bug on Intel machines. It's safe to use it this way as nothing can
> start/stop the NMI watchdog in parallel.
>
> Signed-off-by: Peter Zijlstra <peterz@...radead.org>
> Signed-off-by: Thomas Gleixner <tglx@...utronix.de>
> ---
> include/linux/nmi.h | 4 ++++
> kernel/watchdog_hld.c | 41 +++++++++++++++++++++++++++++++++++++++++
> 2 files changed, 45 insertions(+)
>
> --- a/include/linux/nmi.h
> +++ b/include/linux/nmi.h
> @@ -75,7 +75,11 @@ static inline void hardlockup_detector_d
>
> #if defined(CONFIG_HARDLOCKUP_DETECTOR_PERF)
> extern void arch_touch_nmi_watchdog(void);
> +extern void hardlockup_detector_perf_stop(void);
> +extern void hardlockup_detector_perf_restart(void);
> #else
> +static inline void hardlockup_detector_perf_stop(void) { }
> +static inline void hardlockup_detector_perf_restart(void) { }
> #if !defined(CONFIG_HAVE_NMI_WATCHDOG)
> static inline void arch_touch_nmi_watchdog(void) {}
> #endif
> --- a/kernel/watchdog_hld.c
> +++ b/kernel/watchdog_hld.c
> @@ -261,3 +261,44 @@ void watchdog_nmi_disable(unsigned int c
> firstcpu_err = 0;
> }
> }
> +
> +/**
> + * hardlockup_detector_perf_stop - Globally stop watchdog events
> + *
> + * Special interface for x86 to handle the perf HT bug.
> + */
> +void __init hardlockup_detector_perf_stop(void)
Right, can we make those naming prefixes shorter? Something like
hld_perf_stop() and hld_perf_restart()?
File has already "hld" in the name so ...
--
Regards/Gruss,
Boris.
Good mailing practices for 400: avoid top-posting and trim the reply.
Powered by blists - more mailing lists