[{"id":1778682,"web_url":"http://patchwork.ozlabs.org/comment/1778682/","msgid":"<87d165dqew.fsf@concordia.ellerman.id.au>","date":"2017-10-03T00:29:59","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Hi Thomas,\n\nThomas Gleixner <tglx@linutronix.de> writes:\n> Both the perf reconfiguration and the powerpc watchdog_nmi_reconfigure()\n> need to be done in two steps.\n>\n>      1) Stop all NMIs\n>      2) Read the new parameters and start NMIs\n>\n> Right now watchdog_nmi_reconfigure() is a combination of both. To allow a\n> clean reconfiguration add a 'run' argument and split the functionality in\n> powerpc.\n>\n> Signed-off-by: Thomas Gleixner <tglx@linutronix.de>\n> Cc: Don Zickus <dzickus@redhat.com>\n> Cc: Chris Metcalf <cmetcalf@mellanox.com>\n> Cc: Peter Zijlstra <peterz@infradead.org>\n> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\n> Cc: Sebastian Siewior <bigeasy@linutronix.de>\n> Cc: Nicholas Piggin <npiggin@gmail.com>\n> Cc: Ulrich Obergfell <uobergfe@redhat.com>\n> Cc: Borislav Petkov <bp@alien8.de>\n> Cc: Michael Ellerman <mpe@ellerman.id.au>\n> Cc: Andrew Morton <akpm@linux-foundation.org>\n> Cc: linuxppc-dev@lists.ozlabs.org\n> Link: http://lkml.kernel.org/r/20170831073054.740462115@linutronix.de\n>\n> ---\n>  arch/powerpc/kernel/watchdog.c |   17 +++++++++--------\n>  include/linux/nmi.h            |    2 ++\n>  kernel/watchdog.c              |   31 ++++++++++++++++++++++---------\n>  3 files changed, 33 insertions(+), 17 deletions(-)\n\nUnfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\nbecause we're calling it multiple times for the boot CPU.\n\nThe first call is via:\n\n  start_wd_on_cpu+0x80/0x2f0\n  watchdog_nmi_reconfigure+0x124/0x170\n  softlockup_reconfigure_threads+0x110/0x130\n  lockup_detector_init+0xbc/0xe0\n  kernel_init_freeable+0x18c/0x37c\n  kernel_init+0x2c/0x160\n  ret_from_kernel_thread+0x5c/0xbc\n\nAnd then again via the CPU hotplug registration:\n\n  start_wd_on_cpu+0x80/0x2f0\n  cpuhp_invoke_callback+0x194/0x620\n  cpuhp_thread_fun+0x7c/0x1b0\n  smpboot_thread_fn+0x290/0x2a0\n  kthread+0x168/0x1b0\n  ret_from_kernel_thread+0x5c/0xbc\n\n\nThe first call is new because previously watchdog_nmi_reconfigure()\nwasn't called from softlockup_reconfigure_threads().\n\nI'm not sure what the easiest fix is. One option would be to just drop\nthe WARN_ON, it's just there for paranoia AFAICS.\n\ncheers\n\n>\n> --- a/arch/powerpc/kernel/watchdog.c\n> +++ b/arch/powerpc/kernel/watchdog.c\n> @@ -355,17 +355,18 @@ static void watchdog_calc_timeouts(void)\n>  \twd_timer_period_ms = watchdog_thresh * 1000 * 2 / 5;\n>  }\n>  \n> -void watchdog_nmi_reconfigure(void)\n> +void watchdog_nmi_reconfigure(bool run)\n>  {\n>  \tint cpu;\n>  \n> -\twatchdog_calc_timeouts();\n> -\n> -\tfor_each_cpu(cpu, &wd_cpus_enabled)\n> -\t\tstop_wd_on_cpu(cpu);\n> -\n> -\tfor_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask)\n> -\t\tstart_wd_on_cpu(cpu);\n> +\tif (!run) {\n> +\t\tfor_each_cpu(cpu, &wd_cpus_enabled)\n> +\t\t\tstop_wd_on_cpu(cpu);\n> +\t} else {\n> +\t\twatchdog_calc_timeouts();\n> +\t\tfor_each_cpu_and(cpu, cpu_online_mask, &watchdog_cpumask)\n> +\t\t\tstart_wd_on_cpu(cpu);\n> +\t}\n>  }\n>  \n>  /*\n> --- a/include/linux/nmi.h\n> +++ b/include/linux/nmi.h\n> @@ -103,6 +103,8 @@ static inline void arch_touch_nmi_watchd\n>  #endif\n>  #endif\n>  \n> +void watchdog_nmi_reconfigure(bool run);\n> +\n>  /**\n>   * touch_nmi_watchdog - restart NMI watchdog timeout.\n>   *\n> --- a/kernel/watchdog.c\n> +++ b/kernel/watchdog.c\n> @@ -112,17 +112,25 @@ void __weak watchdog_nmi_disable(unsigne\n>  \thardlockup_detector_perf_disable();\n>  }\n>  \n> -/*\n> - * watchdog_nmi_reconfigure can be implemented to be notified after any\n> - * watchdog configuration change. The arch hardlockup watchdog should\n> - * respond to the following variables:\n> +/**\n> + * watchdog_nmi_reconfigure - Optional function to reconfigure NMI watchdogs\n> + * @run:\tIf false stop the watchdogs on all enabled CPUs\n> + *\t\tIf true start the watchdogs on all enabled CPUs\n> + *\n> + * The core call order is:\n> + * watchdog_nmi_reconfigure(false);\n> + * update_variables();\n> + * watchdog_nmi_reconfigure(true);\n> + *\n> + * The second call which starts the watchdogs again guarantees that the\n> + * following variables are stable across the call.\n>   * - watchdog_enabled\n>   * - watchdog_thresh\n>   * - watchdog_cpumask\n> - * - sysctl_hardlockup_all_cpu_backtrace\n> - * - hardlockup_panic\n> + *\n> + * After the call the variables can be changed again.\n>   */\n> -void __weak watchdog_nmi_reconfigure(void) { }\n> +void __weak watchdog_nmi_reconfigure(bool run) { }\n>  \n>  #ifdef CONFIG_SOFTLOCKUP_DETECTOR\n>  \n> @@ -515,10 +523,12 @@ static void softlockup_unpark_threads(vo\n>  \n>  static void softlockup_reconfigure_threads(bool enabled)\n>  {\n> +\twatchdog_nmi_reconfigure(false);\n>  \tsoftlockup_park_all_threads();\n>  \tset_sample_period();\n>  \tif (enabled)\n>  \t\tsoftlockup_unpark_threads();\n> +\twatchdog_nmi_reconfigure(true);\n>  }\n>  \n>  /*\n> @@ -559,7 +569,11 @@ static inline void watchdog_unpark_threa\n>  static inline int watchdog_enable_all_cpus(void) { return 0; }\n>  static inline void watchdog_disable_all_cpus(void) { }\n>  static inline void softlockup_init_threads(void) { }\n> -static inline void softlockup_reconfigure_threads(bool enabled) { }\n> +static void softlockup_reconfigure_threads(bool enabled)\n> +{\n> +\twatchdog_nmi_reconfigure(false);\n> +\twatchdog_nmi_reconfigure(true);\n> +}\n>  #endif /* !CONFIG_SOFTLOCKUP_DETECTOR */\n>  \n>  static void __lockup_detector_cleanup(void)\n> @@ -599,7 +613,6 @@ static void proc_watchdog_update(void)\n>  \t/* Remove impossible cpus to keep sysctl output clean. */\n>  \tcpumask_and(&watchdog_cpumask, &watchdog_cpumask, cpu_possible_mask);\n>  \tsoftlockup_reconfigure_threads(watchdog_enabled && watchdog_thresh);\n> -\twatchdog_nmi_reconfigure();\n>  }\n>  \n>  /*","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5g1z6FZ0z9t4X\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 11:31:19 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5g1z5T3bzDqmT\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 11:31:19 +1100 (AEDT)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5g0V3sczzDqY1\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 11:30:02 +1100 (AEDT)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3y5g0V26dGz9t4X;\n\tTue,  3 Oct 2017 11:30:02 +1100 (AEDT)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Thomas Gleixner <tglx@linutronix.de>, LKML <linux-kernel@vger.kernel.org>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<20170912194147.862865570@linutronix.de>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>","Date":"Tue, 03 Oct 2017 11:29:59 +1100","Message-ID":"<87d165dqew.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tUlrich Obergfell <uobergfe@redhat.com>,\n\tNicholas Piggin <npiggin@gmail.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778743,"web_url":"http://patchwork.ozlabs.org/comment/1778743/","msgid":"<alpine.DEB.2.20.1710030848210.2281@nanos>","date":"2017-10-03T06:50:59","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> Hi Thomas,\n> Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\n> because we're calling it multiple times for the boot CPU.\n> \n> The first call is via:\n> \n>   start_wd_on_cpu+0x80/0x2f0\n>   watchdog_nmi_reconfigure+0x124/0x170\n>   softlockup_reconfigure_threads+0x110/0x130\n>   lockup_detector_init+0xbc/0xe0\n>   kernel_init_freeable+0x18c/0x37c\n>   kernel_init+0x2c/0x160\n>   ret_from_kernel_thread+0x5c/0xbc\n> \n> And then again via the CPU hotplug registration:\n> \n>   start_wd_on_cpu+0x80/0x2f0\n>   cpuhp_invoke_callback+0x194/0x620\n>   cpuhp_thread_fun+0x7c/0x1b0\n>   smpboot_thread_fn+0x290/0x2a0\n>   kthread+0x168/0x1b0\n>   ret_from_kernel_thread+0x5c/0xbc\n> \n> \n> The first call is new because previously watchdog_nmi_reconfigure()\n> wasn't called from softlockup_reconfigure_threads().\n\nHmm, don't you have the same problem with CPU hotplug or do you just get\nlucky because the hotplug callback in your code is ordered vs. the\nsoftlockup thread hotplug callback in a way that this does not hit?\n\n> I'm not sure what the easiest fix is. One option would be to just drop\n> the WARN_ON, it's just there for paranoia AFAICS.\n\nThe straight forward way is to make use of the new probe function. Patch\nbelow.\n\nThanks,\n\n\ttglx\n\n8<------------------\n--- a/arch/powerpc/kernel/watchdog.c\n+++ b/arch/powerpc/kernel/watchdog.c\n@@ -375,20 +375,18 @@ void watchdog_nmi_start(void)\n /*\n  * This runs after lockup_detector_init() which sets up watchdog_cpumask.\n  */\n-static int __init powerpc_watchdog_init(void)\n+int __init watchdog_nmi_probe(void)\n {\n \tint err;\n \n-\twatchdog_calc_timeouts();\n-\n-\terr = cpuhp_setup_state(CPUHP_AP_ONLINE_DYN, \"powerpc/watchdog:online\",\n-\t\t\t\tstart_wd_on_cpu, stop_wd_on_cpu);\n+\terr = cpuhp_setup_state_nocalls(CPUHP_AP_ONLINE_DYN,\n+\t\t\t\t\t\"powerpc/watchdog:online\",\n+\t\t\t\t\tstart_wd_on_cpu, stop_wd_on_cpu);\n \tif (err < 0)\n \t\tpr_warn(\"Watchdog could not be initialized\");\n \n \treturn 0;\n }\n-arch_initcall(powerpc_watchdog_init);\n \n static void handle_backtrace_ipi(struct pt_regs *regs)\n {\n--- a/kernel/watchdog.c\n+++ b/kernel/watchdog.c\n@@ -608,7 +608,6 @@ static inline int watchdog_park_threads(\n static inline void watchdog_unpark_threads(void) { }\n static inline int watchdog_enable_all_cpus(void) { return 0; }\n static inline void watchdog_disable_all_cpus(void) { }\n-static inline void softlockup_init_threads(void) { }\n static void softlockup_reconfigure_threads(void)\n {\n \tcpus_read_lock();\n@@ -617,6 +616,10 @@ static void softlockup_reconfigure_threa\n \twatchdog_nmi_start();\n \tcpus_read_unlock();\n }\n+static inline void softlockup_init_threads(void)\n+{\n+\tsoftlockup_reconfigure_threads();\n+}\n #endif /* !CONFIG_SOFTLOCKUP_DETECTOR */\n \n static void __lockup_detector_cleanup(void)","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5qV449fJz9t4X\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 17:52:44 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5qV42kRJzDqlt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 17:52:44 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5qSb5KL6zDqhh\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 17:51:27 +1100 (AEDT)","from p5492eed3.dip0.t-ipconnect.de ([84.146.238.211] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzH2k-0001Rc-Jb; Tue, 03 Oct 2017 08:51:02 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 08:50:59 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Michael Ellerman <mpe@ellerman.id.au>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<87d165dqew.fsf@concordia.ellerman.id.au>","Message-ID":"<alpine.DEB.2.20.1710030848210.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778747,"web_url":"http://patchwork.ozlabs.org/comment/1778747/","msgid":"<alpine.DEB.2.20.1710030902310.2281@nanos>","date":"2017-10-03T07:04:03","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> > Hi Thomas,\n> > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\n> > because we're calling it multiple times for the boot CPU.\n> > \n> > The first call is via:\n> > \n> >   start_wd_on_cpu+0x80/0x2f0\n> >   watchdog_nmi_reconfigure+0x124/0x170\n> >   softlockup_reconfigure_threads+0x110/0x130\n> >   lockup_detector_init+0xbc/0xe0\n> >   kernel_init_freeable+0x18c/0x37c\n> >   kernel_init+0x2c/0x160\n> >   ret_from_kernel_thread+0x5c/0xbc\n> > \n> > And then again via the CPU hotplug registration:\n> > \n> >   start_wd_on_cpu+0x80/0x2f0\n> >   cpuhp_invoke_callback+0x194/0x620\n> >   cpuhp_thread_fun+0x7c/0x1b0\n> >   smpboot_thread_fn+0x290/0x2a0\n> >   kthread+0x168/0x1b0\n> >   ret_from_kernel_thread+0x5c/0xbc\n> > \n> > \n> > The first call is new because previously watchdog_nmi_reconfigure()\n> > wasn't called from softlockup_reconfigure_threads().\n> \n> Hmm, don't you have the same problem with CPU hotplug or do you just get\n> lucky because the hotplug callback in your code is ordered vs. the\n> softlockup thread hotplug callback in a way that this does not hit?\n\nWhich leads me to the question why you need the hotplug state at all if the\nsoftlockup detector is enabled. Wouldn't it make more sense to only\nregister the state if softlockup detector is turned off in Kconfig and\nactually move it to the core code?\n\nThanks,\n\n\ttglx","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5qmj6YxRz9s7m\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 18:05:25 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5qmj5cX8zDqsF\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 18:05:25 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5qlX3pPvzDqhh\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 18:04:24 +1100 (AEDT)","from p5492eed3.dip0.t-ipconnect.de ([84.146.238.211] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzHFK-0001Zp-Qf; Tue, 03 Oct 2017 09:04:03 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 09:04:03 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Michael Ellerman <mpe@ellerman.id.au>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<alpine.DEB.2.20.1710030848210.2281@nanos>","Message-ID":"<alpine.DEB.2.20.1710030902310.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778814,"web_url":"http://patchwork.ozlabs.org/comment/1778814/","msgid":"<20171003200126.358155b7@roar.ozlabs.ibm.com>","date":"2017-10-03T10:01:26","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":69518,"url":"http://patchwork.ozlabs.org/api/people/69518/","name":"Nicholas Piggin","email":"npiggin@gmail.com"},"content":"On Tue, 3 Oct 2017 09:04:03 +0200 (CEST)\nThomas Gleixner <tglx@linutronix.de> wrote:\n\n> On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> > On Tue, 3 Oct 2017, Michael Ellerman wrote:  \n> > > Hi Thomas,\n> > > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\n> > > because we're calling it multiple times for the boot CPU.\n> > > \n> > > The first call is via:\n> > > \n> > >   start_wd_on_cpu+0x80/0x2f0\n> > >   watchdog_nmi_reconfigure+0x124/0x170\n> > >   softlockup_reconfigure_threads+0x110/0x130\n> > >   lockup_detector_init+0xbc/0xe0\n> > >   kernel_init_freeable+0x18c/0x37c\n> > >   kernel_init+0x2c/0x160\n> > >   ret_from_kernel_thread+0x5c/0xbc\n> > > \n> > > And then again via the CPU hotplug registration:\n> > > \n> > >   start_wd_on_cpu+0x80/0x2f0\n> > >   cpuhp_invoke_callback+0x194/0x620\n> > >   cpuhp_thread_fun+0x7c/0x1b0\n> > >   smpboot_thread_fn+0x290/0x2a0\n> > >   kthread+0x168/0x1b0\n> > >   ret_from_kernel_thread+0x5c/0xbc\n> > > \n> > > \n> > > The first call is new because previously watchdog_nmi_reconfigure()\n> > > wasn't called from softlockup_reconfigure_threads().  \n> > \n> > Hmm, don't you have the same problem with CPU hotplug or do you just get\n> > lucky because the hotplug callback in your code is ordered vs. the\n> > softlockup thread hotplug callback in a way that this does not hit?\n\nI had the idea that it watchdog_nmi_reconfigure() being only called\nwith get_online_cpus held would prevent hotplug callbacks running.\n  \n> \n> Which leads me to the question why you need the hotplug state at all if the\n> softlockup detector is enabled. Wouldn't it make more sense to only\n> register the state if softlockup detector is turned off in Kconfig and\n> actually move it to the core code?\n\nI don't understand what you mean exactly, but it was done to avoid\nrelying on the softlockup detector at all, because it wasn't needed\nfor anything else (unlike the perf lockup detector).\n\nThanks,\nNick","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5vkQ4C6gz9s7g\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 21:03:42 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5vkQ3CYczDqlF\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 21:03:42 +1100 (AEDT)","from mail-pf0-x241.google.com (mail-pf0-x241.google.com\n\t[IPv6:2607:f8b0:400e:c00::241])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5vhP6QBKzDqks\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 21:01:57 +1100 (AEDT)","by mail-pf0-x241.google.com with SMTP id a7so8603848pfj.5\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue, 03 Oct 2017 03:01:57 -0700 (PDT)","from roar.ozlabs.ibm.com (220-244-152-14.tpgi.com.au.\n\t[220.244.152.14]) by smtp.gmail.com with ESMTPSA id\n\tt17sm20518138pfl.61.2017.10.03.03.01.48\n\t(version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256);\n\tTue, 03 Oct 2017 03:01:54 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"K7L2rrUN\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"K7L2rrUN\"; dkim-atps=neutral","ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=gmail.com\n\t(client-ip=2607:f8b0:400e:c00::241; helo=mail-pf0-x241.google.com;\n\tenvelope-from=npiggin@gmail.com; receiver=<UNKNOWN>)","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"K7L2rrUN\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=date:from:to:cc:subject:message-id:in-reply-to:references\n\t:organization:mime-version:content-transfer-encoding;\n\tbh=iUe+ehFfIwT+hjf6Igct0hh5bWRW+oEtkdiDAwDrVsk=;\n\tb=K7L2rrUNmgGNJ7GIsp/2pmbCvuzjB1XquojOwzIRY048sU2HCMPvuEcUHU21tKewOo\n\th0zROiT8eQxq0rYAN+fbEUESafht05UWD2aiba//cRXs+HGBNCT8beaK9IlX3Lb/iEza\n\tVTur8r71XwjM0GhC+omaHra+7LrJLRwxcmWkFZbWbFc3dYel7pqP4QasO4HHlWst1ovl\n\tCFv04SKHATkSmHJF3M7tq/pmiWr3Q0DVN1dSMFtfGR+PML8R1lRQUW93wTkRBKvli4cL\n\taqZI8xcke/NNO64OP5SEo1TeY1Klt5N0uIuYMVVluKLppbCJld/ViWS4Vx0HaeHGBujy\n\tSC/Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to\n\t:references:organization:mime-version:content-transfer-encoding;\n\tbh=iUe+ehFfIwT+hjf6Igct0hh5bWRW+oEtkdiDAwDrVsk=;\n\tb=BpzyV8t2Olyh0ev4pW/p/Y9g27p/mFwSVpm6tzwebaKJhFjuZp6xttdc1k+asb/lk4\n\tlVS7pMT7FLqvQc2BRjxtsLdjUFcaEwABj+vdpwznEYQL1sI6J9dBjKy/CWHv7KEJyEaC\n\tdpcH2BoQ0atrEKPlc0mU17A4p2aynHf4WfrOe6hAw3e9S8MHHiQeT96511Wj4Nt7LKgW\n\trIxjSxAoJJlEM/ZpuvrESRMCcrhwqJTxqJK+TfcBA0hCB7d4xG+p5maOQ44/Huos0DB3\n\tUPllf3wZNnVNujKGF1ltvZQwT6vbHhInHHgvE64s+SBYT3Sd58SblXTkMvpMfeF3rtsr\n\tF0oA==","X-Gm-Message-State":"AMCzsaWh0oMQhuImru93o3uAl5deBICdrAcutQQTFlMttokdOUvon55b\n\ta6vrHr6tG0VEVrWlAT3OtGg=","X-Google-Smtp-Source":"AOwi7QAqG+3EB2D9mKz2p/TFEEvcYBGAbK6oFURTHssYnuyMmd50PBt0NY9IL6cvMAfgbO8zTmL1lQ==","X-Received":"by 10.84.244.2 with SMTP id g2mr3312052pll.400.1507024915789;\n\tTue, 03 Oct 2017 03:01:55 -0700 (PDT)","Date":"Tue, 3 Oct 2017 20:01:26 +1000","From":"Nicholas Piggin <npiggin@gmail.com>","To":"Thomas Gleixner <tglx@linutronix.de>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","Message-ID":"<20171003200126.358155b7@roar.ozlabs.ibm.com>","In-Reply-To":"<alpine.DEB.2.20.1710030902310.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<alpine.DEB.2.20.1710030902310.2281@nanos>","Organization":"IBM","X-Mailer":"Claws Mail 3.15.0-dirty (GTK+ 2.24.31; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","Content-Transfer-Encoding":"7bit","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>,\n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778839,"web_url":"http://patchwork.ozlabs.org/comment/1778839/","msgid":"<alpine.DEB.2.20.1710031248490.2281@nanos>","date":"2017-10-03T10:56:50","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Nicholas Piggin wrote:\n> On Tue, 3 Oct 2017 09:04:03 +0200 (CEST)\n> Thomas Gleixner <tglx@linutronix.de> wrote:\n> \n> > On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> > > On Tue, 3 Oct 2017, Michael Ellerman wrote:  \n> > > > Hi Thomas,\n> > > > Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\n> > > > because we're calling it multiple times for the boot CPU.\n> > > > \n> > > > The first call is via:\n> > > > \n> > > >   start_wd_on_cpu+0x80/0x2f0\n> > > >   watchdog_nmi_reconfigure+0x124/0x170\n> > > >   softlockup_reconfigure_threads+0x110/0x130\n> > > >   lockup_detector_init+0xbc/0xe0\n> > > >   kernel_init_freeable+0x18c/0x37c\n> > > >   kernel_init+0x2c/0x160\n> > > >   ret_from_kernel_thread+0x5c/0xbc\n> > > > \n> > > > And then again via the CPU hotplug registration:\n> > > > \n> > > >   start_wd_on_cpu+0x80/0x2f0\n> > > >   cpuhp_invoke_callback+0x194/0x620\n> > > >   cpuhp_thread_fun+0x7c/0x1b0\n> > > >   smpboot_thread_fn+0x290/0x2a0\n> > > >   kthread+0x168/0x1b0\n> > > >   ret_from_kernel_thread+0x5c/0xbc\n> > > > \n> > > > \n> > > > The first call is new because previously watchdog_nmi_reconfigure()\n> > > > wasn't called from softlockup_reconfigure_threads().  \n> > > \n> > > Hmm, don't you have the same problem with CPU hotplug or do you just get\n> > > lucky because the hotplug callback in your code is ordered vs. the\n> > > softlockup thread hotplug callback in a way that this does not hit?\n> \n> I had the idea that it watchdog_nmi_reconfigure() being only called\n> with get_online_cpus held would prevent hotplug callbacks running.\n>   \n> > \n> > Which leads me to the question why you need the hotplug state at all if the\n> > softlockup detector is enabled. Wouldn't it make more sense to only\n> > register the state if softlockup detector is turned off in Kconfig and\n> > actually move it to the core code?\n> \n> I don't understand what you mean exactly, but it was done to avoid\n> relying on the softlockup detector at all, because it wasn't needed\n> for anything else (unlike the perf lockup detector).\n\nIf the softlockup detector is enabled along with your hardlockup detector\nthen the current code in mainline invokes watchdog_nmi_enable(cpu), which\nis a weak function and as I just noticed not implemented by powerpc. So\nit's a non issue because it's not implemented.\n\nThanks,\n\n\ttglx","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5x8d0gdcz9ryv\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 22:08:01 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5x8c6zxzzDqrt\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 22:08:00 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5wwB1173zDqy4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 21:57:14 +1100 (AEDT)","from p5492eed3.dip0.t-ipconnect.de ([84.146.238.211] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzKsc-0003Ph-2c; Tue, 03 Oct 2017 12:56:50 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 12:56:50 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Nicholas Piggin <npiggin@gmail.com>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<20171003200126.358155b7@roar.ozlabs.ibm.com>","Message-ID":"<alpine.DEB.2.20.1710031248490.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<alpine.DEB.2.20.1710030902310.2281@nanos>\n\t<20171003200126.358155b7@roar.ozlabs.ibm.com>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>,\n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778853,"web_url":"http://patchwork.ozlabs.org/comment/1778853/","msgid":"<87o9pocvjq.fsf@concordia.ellerman.id.au>","date":"2017-10-03T11:36:41","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Thomas Gleixner <tglx@linutronix.de> writes:\n\n> On Tue, 3 Oct 2017, Michael Ellerman wrote:\n>> Hi Thomas,\n>> Unfortunately this is hitting the WARN_ON in start_wd_cpu() on powerpc\n>> because we're calling it multiple times for the boot CPU.\n>> \n>> The first call is via:\n>> \n>>   start_wd_on_cpu+0x80/0x2f0\n>>   watchdog_nmi_reconfigure+0x124/0x170\n>>   softlockup_reconfigure_threads+0x110/0x130\n>>   lockup_detector_init+0xbc/0xe0\n>>   kernel_init_freeable+0x18c/0x37c\n>>   kernel_init+0x2c/0x160\n>>   ret_from_kernel_thread+0x5c/0xbc\n>> \n>> And then again via the CPU hotplug registration:\n>> \n>>   start_wd_on_cpu+0x80/0x2f0\n>>   cpuhp_invoke_callback+0x194/0x620\n>>   cpuhp_thread_fun+0x7c/0x1b0\n>>   smpboot_thread_fn+0x290/0x2a0\n>>   kthread+0x168/0x1b0\n>>   ret_from_kernel_thread+0x5c/0xbc\n>> \n>> \n>> The first call is new because previously watchdog_nmi_reconfigure()\n>> wasn't called from softlockup_reconfigure_threads().\n>\n> Hmm, don't you have the same problem with CPU hotplug or do you just get\n> lucky because the hotplug callback in your code is ordered vs. the\n> softlockup thread hotplug callback in a way that this does not hit?\n\nI don't see it with CPU hotplug.\n\nAFAICS that's because softlockup_reconfigure_threads() isn't called for\nCPU hotplug. Unless there's a path I'm missing?\n\n>> I'm not sure what the easiest fix is. One option would be to just drop\n>> the WARN_ON, it's just there for paranoia AFAICS.\n>\n> The straight forward way is to make use of the new probe function. Patch\n> below.\n\nThanks.\n\nHmm, I tried that patch, it makes the warning go away. But then I\ntriggered a deliberate hard lockup and got nothing.\n\nThen I went back to the existing code (in linux-next), and I still get\nno warning from a deliberate hard lockup.\n\nSo seems there may be some more gremlins. Will test more in the morning.\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5xq1091Qz9sxR\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 22:37:49 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5xq06SjDzDqvT\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 22:37:48 +1100 (AEDT)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5xnk4Z8qzDql4\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 22:36:42 +1100 (AEDT)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3y5xnk2TD1z9t2Q;\n\tTue,  3 Oct 2017 22:36:42 +1100 (AEDT)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Thomas Gleixner <tglx@linutronix.de>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<alpine.DEB.2.20.1710030848210.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>","Date":"Tue, 03 Oct 2017 22:36:41 +1100","Message-ID":"<87o9pocvjq.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778877,"web_url":"http://patchwork.ozlabs.org/comment/1778877/","msgid":"<alpine.DEB.2.20.1710031411440.2281@nanos>","date":"2017-10-03T12:13:54","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> Thomas Gleixner <tglx@linutronix.de> writes:\n> >> The first call is new because previously watchdog_nmi_reconfigure()\n> >> wasn't called from softlockup_reconfigure_threads().\n> >\n> > Hmm, don't you have the same problem with CPU hotplug or do you just get\n> > lucky because the hotplug callback in your code is ordered vs. the\n> > softlockup thread hotplug callback in a way that this does not hit?\n> \n> I don't see it with CPU hotplug.\n> \n> AFAICS that's because softlockup_reconfigure_threads() isn't called for\n> CPU hotplug. Unless there's a path I'm missing?\n\nAs I said in the other reply, I assumed that its called via\nwatchdog_nmi_enable(cpu), but that's a weak function which is not\nimplemented on power. So no issue.\n\n> >> I'm not sure what the easiest fix is. One option would be to just drop\n> >> the WARN_ON, it's just there for paranoia AFAICS.\n> >\n> > The straight forward way is to make use of the new probe function. Patch\n> > below.\n> \n> Hmm, I tried that patch, it makes the warning go away. But then I\n> triggered a deliberate hard lockup and got nothing.\n> \n> Then I went back to the existing code (in linux-next), and I still get\n> no warning from a deliberate hard lockup.\n> \n> So seems there may be some more gremlins. Will test more in the morning.\n\nHrm. That's weird. I'll have a look and send a proper patch series on top\nof next.\n\nThanks,\n\n\ttglx","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y5yfN61s4z9sRW\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 23:15:24 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y5yfN58NQzDqw7\n\tfor <patchwork-incoming@ozlabs.org>;\n\tTue,  3 Oct 2017 23:15:24 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y5yd93qYWzDqJ7\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tTue,  3 Oct 2017 23:14:21 +1100 (AEDT)","from p5492eed3.dip0.t-ipconnect.de ([84.146.238.211] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzM5B-00041R-9C; Tue, 03 Oct 2017 14:13:53 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 14:13:54 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Michael Ellerman <mpe@ellerman.id.au>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<87o9pocvjq.fsf@concordia.ellerman.id.au>","Message-ID":"<alpine.DEB.2.20.1710031411440.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<87o9pocvjq.fsf@concordia.ellerman.id.au>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1778965,"web_url":"http://patchwork.ozlabs.org/comment/1778965/","msgid":"<alpine.DEB.2.20.1710031451590.2281@nanos>","date":"2017-10-03T13:20:21","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> > Hmm, I tried that patch, it makes the warning go away. But then I\n> > triggered a deliberate hard lockup and got nothing.\n> > \n> > Then I went back to the existing code (in linux-next), and I still get\n> > no warning from a deliberate hard lockup.\n> > \n> > So seems there may be some more gremlins. Will test more in the morning.\n> \n> Hrm. That's weird. I'll have a look and send a proper patch series on top\n> of next.\n\nThe major difference is that the reworked code utilizes\nwatchdog_nmi_reconfigure() for both init and the sysctl updates, but I\ncan't for my life figure out why that doesn't work.\n\nThanks,\n\n\ttglx","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y607x5FvDz9t2M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 00:22:37 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y607x3t09zDqqZ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 00:22:37 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y605k09pfzDqlp\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  4 Oct 2017 00:20:41 +1100 (AEDT)","from p5492eed3.dip0.t-ipconnect.de ([84.146.238.211] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzN7U-0005vM-Vs; Tue, 03 Oct 2017 15:20:21 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 15:20:21 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Michael Ellerman <mpe@ellerman.id.au>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<alpine.DEB.2.20.1710031411440.2281@nanos>","Message-ID":"<alpine.DEB.2.20.1710031451590.2281@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<87o9pocvjq.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710031411440.2281@nanos>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1779215,"web_url":"http://patchwork.ozlabs.org/comment/1779215/","msgid":"<alpine.DEB.2.20.1710032124320.2278@nanos>","date":"2017-10-03T19:27:01","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":180,"url":"http://patchwork.ozlabs.org/api/people/180/","name":"Thomas Gleixner","email":"tglx@linutronix.de"},"content":"On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> > On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> > > Hmm, I tried that patch, it makes the warning go away. But then I\n> > > triggered a deliberate hard lockup and got nothing.\n> > > \n> > > Then I went back to the existing code (in linux-next), and I still get\n> > > no warning from a deliberate hard lockup.\n> > > \n> > > So seems there may be some more gremlins. Will test more in the morning.\n> > \n> > Hrm. That's weird. I'll have a look and send a proper patch series on top\n> > of next.\n> \n> The major difference is that the reworked code utilizes\n> watchdog_nmi_reconfigure() for both init and the sysctl updates, but I\n> can't for my life figure out why that doesn't work.\n\nI collected the changes which Linus requested along with the nmi_probe()\none and pushed them into:\n\n git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.core/urgent\n\nThat's based on 4.13 final so it neither contains 4.14 nor -next material.\n\nThanks,\n\n\ttglx","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y68G63CPvz9t5C\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 06:28:30 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y68G61N8vzDqlC\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 06:28:30 +1100 (AEDT)","from Galois.linutronix.de (Galois.linutronix.de\n\t[IPv6:2a01:7a0:2:106d:700::1])\n\t(using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y68Dw32r5zDql7\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  4 Oct 2017 06:27:28 +1100 (AEDT)","from p4fea5b32.dip0.t-ipconnect.de ([79.234.91.50] helo=nanos)\n\tby Galois.linutronix.de with esmtpsa\n\t(TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256)\n\t(Exim 4.80) (envelope-from <tglx@linutronix.de>)\n\tid 1dzSqK-0001Yf-AJ; Tue, 03 Oct 2017 21:27:00 +0200"],"Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=linutronix.de\n\t(client-ip=2a01:7a0:2:106d:700::1; helo=galois.linutronix.de;\n\tenvelope-from=tglx@linutronix.de; receiver=<UNKNOWN>)","Date":"Tue, 3 Oct 2017 21:27:01 +0200 (CEST)","From":"Thomas Gleixner <tglx@linutronix.de>","To":"Michael Ellerman <mpe@ellerman.id.au>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<alpine.DEB.2.20.1710031451590.2281@nanos>","Message-ID":"<alpine.DEB.2.20.1710032124320.2278@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<87o9pocvjq.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710031411440.2281@nanos>\n\t<alpine.DEB.2.20.1710031451590.2281@nanos>","User-Agent":"Alpine 2.20 (DEB 67 2015-01-07)","MIME-Version":"1.0","Content-Type":"text/plain; charset=US-ASCII","X-Linutronix-Spam-Score":"-1.0","X-Linutronix-Spam-Level":"-","X-Linutronix-Spam-Status":"No , -1.0 points, 5.0 required, ALL_TRUSTED=-1,\n\tSHORTCIRCUIT=-0.0001","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1779451,"web_url":"http://patchwork.ozlabs.org/comment/1779451/","msgid":"<877ewbqx0q.fsf@concordia.ellerman.id.au>","date":"2017-10-04T05:53:25","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":46580,"url":"http://patchwork.ozlabs.org/api/people/46580/","name":"Michael Ellerman","email":"mpe@ellerman.id.au"},"content":"Thomas Gleixner <tglx@linutronix.de> writes:\n\n> On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n>> On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n>> > On Tue, 3 Oct 2017, Michael Ellerman wrote:\n>> > > Hmm, I tried that patch, it makes the warning go away. But then I\n>> > > triggered a deliberate hard lockup and got nothing.\n>> > > \n>> > > Then I went back to the existing code (in linux-next), and I still get\n>> > > no warning from a deliberate hard lockup.\n>> > > \n>> > > So seems there may be some more gremlins. Will test more in the morning.\n>> > \n>> > Hrm. That's weird. I'll have a look and send a proper patch series on top\n>> > of next.\n>> \n>> The major difference is that the reworked code utilizes\n>> watchdog_nmi_reconfigure() for both init and the sysctl updates, but I\n>> can't for my life figure out why that doesn't work.\n>\n> I collected the changes which Linus requested along with the nmi_probe()\n> one and pushed them into:\n>\n>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.core/urgent\n>\n> That's based on 4.13 final so it neither contains 4.14 nor -next material.\n\nThanks. I tested that here and it seems fine. The warning at boot is\ngone and it is correctly catching a hard lockup triggered via LKDTM, eg:\n\n  # mount -t debugfs none /sys/kernel/debug\n  # echo HARDLOCKUP > /sys/kernel/debug/provoke-crash/DIRECT\n  lkdtm: Performing direct entry HARDLOCKUP\n  Watchdog CPU:0 Hard LOCKUP\n  Modules linked in:\n  CPU: 0 PID: 1215 Comm: sh Not tainted 4.13.0-gcc6-11846-g86be5ee #162\n  task: c0000000f1fc4c00 task.stack: c0000000ee3ac000\n  NIP:  c0000000007205a4 LR: c00000000071f950 CTR: c000000000720570\n  REGS: c00000003ffffd80 TRAP: 0900   Not tainted  (4.13.0-gcc6-11846-g86be5ee)\n  MSR:  9000000000009033 <SF,HV,EE,ME,IR,DR,RI,LE>  CR: 28002228  XER: 00000000\n  CFAR: c0000000007205a8 SOFTE: 0 \n  GPR00: c00000000071f950 c0000000ee3afbb0 c00000000107cf00 c0000000010604f0 \n  GPR04: c0000000ffa05d90 c0000000ffa1c968 0000000000000000 0000000000000000 \n  GPR08: 0000000000000007 0000000000000001 0000000000000000 9000000030001003 \n  GPR12: c000000000720570 c00000000fd40000 0000000000000000 0000000000000000 \n  GPR16: 0000000000000000 0000000000000000 0000000000000000 00000000100b8fd0 \n  GPR20: 000001002f5a3485 00000000100b8f90 0000000000000000 0000000000000000 \n  GPR24: c000000001060778 c0000000ee3afe00 c0000000ee3afe00 c0000000010603b0 \n  GPR28: 000000000000000b c0000000f1fe0000 0000000000000140 c0000000010604f0 \n  NIP [c0000000007205a4] lkdtm_HARDLOCKUP+0x34/0x40\n  LR [c00000000071f950] lkdtm_do_action+0x50/0x70\n  Call Trace:\n  [c0000000ee3afbb0] [0000000000000140] 0x140 (unreliable)\n  [c0000000ee3afbd0] [c00000000071f950] lkdtm_do_action+0x50/0x70\n  [c0000000ee3afc00] [c00000000071fdc0] direct_entry+0x110/0x1b0\n  [c0000000ee3afc90] [c00000000050141c] full_proxy_write+0x9c/0x110\n  [c0000000ee3afcf0] [c000000000336a3c] __vfs_write+0x6c/0x210\n  [c0000000ee3afd90] [c000000000338960] vfs_write+0xd0/0x270\n  [c0000000ee3afde0] [c00000000033a93c] SyS_write+0x6c/0x110\n  [c0000000ee3afe30] [c00000000000b220] system_call+0x58/0x6c\n  Instruction dump:\n  3842c990 7c0802a6 f8010010 f821ffe1 60000000 60000000 39400000 892d027a \n  994d027a 60000000 60420000 7c210b78 <7c421378> 4bfffff8 60420000 3c4c0096 \n  Kernel panic - not syncing: Hard LOCKUP\n\nAcked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)\n\ncheers","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y6Q930f7kz9sxR\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 16:55:03 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y6Q912qnqzDqnQ\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed,  4 Oct 2017 16:55:01 +1100 (AEDT)","from ozlabs.org (ozlabs.org [IPv6:2401:3900:2:1::2])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y6Q7D4M8XzDqls\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed,  4 Oct 2017 16:53:28 +1100 (AEDT)","from authenticated.ozlabs.org (localhost [127.0.0.1])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPSA id 3y6Q7D2hKtz9sxR;\n\tWed,  4 Oct 2017 16:53:28 +1100 (AEDT)"],"From":"Michael Ellerman <mpe@ellerman.id.au>","To":"Thomas Gleixner <tglx@linutronix.de>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","In-Reply-To":"<alpine.DEB.2.20.1710032124320.2278@nanos>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<87o9pocvjq.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710031411440.2281@nanos>\n\t<alpine.DEB.2.20.1710031451590.2281@nanos>\n\t<alpine.DEB.2.20.1710032124320.2278@nanos>","Date":"Wed, 04 Oct 2017 16:53:25 +1100","Message-ID":"<877ewbqx0q.fsf@concordia.ellerman.id.au>","MIME-Version":"1.0","Content-Type":"text/plain","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Don Zickus <dzickus@redhat.com>, Chris Metcalf <cmetcalf@mellanox.com>, \n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}},{"id":1780785,"web_url":"http://patchwork.ozlabs.org/comment/1780785/","msgid":"<20171005161714.nlmmqhrqkqzc3gst@redhat.com>","date":"2017-10-05T16:17:14","subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","submitter":{"id":4295,"url":"http://patchwork.ozlabs.org/api/people/4295/","name":"Don Zickus","email":"dzickus@redhat.com"},"content":"On Tue, Oct 03, 2017 at 07:27:01PM +0000, Thomas Gleixner wrote:\n> On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> > On Tue, 3 Oct 2017, Thomas Gleixner wrote:\n> > > On Tue, 3 Oct 2017, Michael Ellerman wrote:\n> > > > Hmm, I tried that patch, it makes the warning go away. But then I\n> > > > triggered a deliberate hard lockup and got nothing.\n> > > > \n> > > > Then I went back to the existing code (in linux-next), and I still get\n> > > > no warning from a deliberate hard lockup.\n> > > > \n> > > > So seems there may be some more gremlins. Will test more in the morning.\n> > > \n> > > Hrm. That's weird. I'll have a look and send a proper patch series on top\n> > > of next.\n> > \n> > The major difference is that the reworked code utilizes\n> > watchdog_nmi_reconfigure() for both init and the sysctl updates, but I\n> > can't for my life figure out why that doesn't work.\n> \n> I collected the changes which Linus requested along with the nmi_probe()\n> one and pushed them into:\n> \n>  git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git WIP.core/urgent\n> \n> That's based on 4.13 final so it neither contains 4.14 nor -next material.\n\nTested your changes on 4.14-rc3 and it passes my tests.  Thanks!\n\nTested-and-Reviewed-by: Don Zickus <dzickus@redhat.com>","headers":{"Return-Path":"<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>","X-Original-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@ozlabs.org","linuxppc-dev@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3y7Hzr6RySz9sRm\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  6 Oct 2017 03:20:08 +1100 (AEDT)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3y7Hzr3n7rzDqks\n\tfor <patchwork-incoming@ozlabs.org>;\n\tFri,  6 Oct 2017 03:20:08 +1100 (AEDT)","from mx1.redhat.com (mx1.redhat.com [209.132.183.28])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3y7Hwd39nrzDr9F\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tFri,  6 Oct 2017 03:17:19 +1100 (AEDT)","from smtp.corp.redhat.com\n\t(int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mx1.redhat.com (Postfix) with ESMTPS id 2C30D7AE97;\n\tThu,  5 Oct 2017 16:17:17 +0000 (UTC)","from redhat.com (dhcp-17-140.bos.redhat.com [10.18.17.140])\n\tby smtp.corp.redhat.com (Postfix) with SMTP id 5D9C0600C8;\n\tThu,  5 Oct 2017 16:17:15 +0000 (UTC)"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=redhat.com\n\t(client-ip=209.132.183.28; helo=mx1.redhat.com;\n\tenvelope-from=dzickus@redhat.com; receiver=<UNKNOWN>)","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tdmarc=none (p=none dis=none) header.from=redhat.com","ext-mx01.extmail.prod.ext.phx2.redhat.com;\n\tspf=fail smtp.mailfrom=dzickus@redhat.com"],"DMARC-Filter":"OpenDMARC Filter v1.3.2 mx1.redhat.com 2C30D7AE97","Date":"Thu, 5 Oct 2017 12:17:14 -0400","From":"Don Zickus <dzickus@redhat.com>","To":"Thomas Gleixner <tglx@linutronix.de>","Subject":"Re: [patch V2 22/29] lockup_detector: Make\n\twatchdog_nmi_reconfigure() two stage","Message-ID":"<20171005161714.nlmmqhrqkqzc3gst@redhat.com>","References":"<20170912193654.321505854@linutronix.de>\n\t<20170912194147.862865570@linutronix.de>\n\t<87d165dqew.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710030848210.2281@nanos>\n\t<87o9pocvjq.fsf@concordia.ellerman.id.au>\n\t<alpine.DEB.2.20.1710031411440.2281@nanos>\n\t<alpine.DEB.2.20.1710031451590.2281@nanos>\n\t<alpine.DEB.2.20.1710032124320.2278@nanos>","MIME-Version":"1.0","Content-Type":"text/plain; charset=us-ascii","Content-Disposition":"inline","In-Reply-To":"<alpine.DEB.2.20.1710032124320.2278@nanos>","User-Agent":"NeoMutt/20170914 (1.9.0)","X-Scanned-By":"MIMEDefang 2.79 on 10.5.11.11","X-Greylist":"Sender IP whitelisted, not delayed by milter-greylist-4.5.16\n\t(mx1.redhat.com [10.5.110.25]); Thu, 05 Oct 2017 16:17:17 +0000 (UTC)","X-BeenThere":"linuxppc-dev@lists.ozlabs.org","X-Mailman-Version":"2.1.24","Precedence":"list","List-Id":"Linux on PowerPC Developers Mail List\n\t<linuxppc-dev.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/linuxppc-dev/>","List-Post":"<mailto:linuxppc-dev@lists.ozlabs.org>","List-Help":"<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/linuxppc-dev>,\n\t<mailto:linuxppc-dev-request@lists.ozlabs.org?subject=subscribe>","Cc":"Chris Metcalf <cmetcalf@mellanox.com>,\n\tPeter Zijlstra <peterz@infradead.org>,\n\tSebastian Siewior <bigeasy@linutronix.de>,\n\tLKML <linux-kernel@vger.kernel.org>, \n\tNicholas Piggin <npiggin@gmail.com>,\n\tUlrich Obergfell <uobergfe@redhat.com>, Borislav Petkov <bp@alien8.de>,\n\tAndrew Morton <akpm@linux-foundation.org>, \n\tlinuxppc-dev@lists.ozlabs.org, Ingo Molnar <mingo@kernel.org>","Errors-To":"linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org","Sender":"\"Linuxppc-dev\"\n\t<linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org>"}}]