Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/813030/?format=api
{ "id": 813030, "url": "http://patchwork.ozlabs.org/api/patches/813030/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170912194147.862865570@linutronix.de/", "project": { "id": 2, "url": "http://patchwork.ozlabs.org/api/projects/2/?format=api", "name": "Linux PPC development", "link_name": "linuxppc-dev", "list_id": "linuxppc-dev.lists.ozlabs.org", "list_email": "linuxppc-dev@lists.ozlabs.org", "web_url": "https://github.com/linuxppc/wiki/wiki", "scm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git", "webscm_url": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/", "list_archive_url_format": "https://lore.kernel.org/linuxppc-dev/{}/", "commit_url_format": "https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git/commit/?id={}" }, "msgid": "<20170912194147.862865570@linutronix.de>", "list_archive_url": "https://lore.kernel.org/linuxppc-dev/20170912194147.862865570@linutronix.de/", "date": "2017-09-12T19:37:16", "name": "[V2,22/29] lockup_detector: Make watchdog_nmi_reconfigure() two stage", "commit_ref": null, "pull_url": null, "state": "not-applicable", "archived": false, "hash": "c9c1a782bea692528faa01583d0cfb3302f2deac", "submitter": { "id": 180, "url": "http://patchwork.ozlabs.org/api/people/180/?format=api", "name": "Thomas Gleixner", "email": "tglx@linutronix.de" }, "delegate": null, "mbox": "http://patchwork.ozlabs.org/project/linuxppc-dev/patch/20170912194147.862865570@linutronix.de/mbox/", "series": [ { "id": 2761, "url": "http://patchwork.ozlabs.org/api/series/2761/?format=api", "web_url": "http://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=2761", "date": "2017-09-12T19:37:16", "name": null, "version": 2, "mbox": "http://patchwork.ozlabs.org/series/2761/mbox/" } ], "comments": "http://patchwork.ozlabs.org/api/patches/813030/comments/", "check": "pending", "checks": "http://patchwork.ozlabs.org/api/patches/813030/checks/", "tags": {}, "related": [], "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 3xsFmB0vYhz9s7M\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 05:51:22 +1000 (AEST)", "from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xsFmB02LtzDrVv\n\tfor <patchwork-incoming@ozlabs.org>;\n\tWed, 13 Sep 2017 05:51:22 +1000 (AEST)", "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 3xsFkX5MfLzDrFt\n\tfor <linuxppc-dev@lists.ozlabs.org>;\n\tWed, 13 Sep 2017 05:49:56 +1000 (AEST)", "from localhost ([127.0.0.1] helo=[127.0.1.1])\n\tby Galois.linutronix.de with esmtp (Exim 4.80)\n\t(envelope-from <tglx@linutronix.de>)\n\tid 1drr9s-0002HI-GC; Tue, 12 Sep 2017 21:47:44 +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>)", "Message-Id": "<20170912194147.862865570@linutronix.de>", "User-Agent": "quilt/0.63-1", "Date": "Tue, 12 Sep 2017 21:37:16 +0200", "From": "Thomas Gleixner <tglx@linutronix.de>", "To": "LKML <linux-kernel@vger.kernel.org>", "Subject": "[patch V2 22/29] lockup_detector: Make watchdog_nmi_reconfigure()\n\ttwo stage", "References": "<20170912193654.321505854@linutronix.de>", "MIME-Version": "1.0", "Content-Type": "text/plain; charset=ISO-8859-15", "Content-Disposition": "inline;\n\tfilename=lockup_detector_Make_watchdog_nmi_reconfigure()_two_stage.patch", "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>" }, "content": "Both the perf reconfiguration and the powerpc watchdog_nmi_reconfigure()\nneed to be done in two steps.\n\n 1) Stop all NMIs\n 2) Read the new parameters and start NMIs\n\nRight now watchdog_nmi_reconfigure() is a combination of both. To allow a\nclean reconfiguration add a 'run' argument and split the functionality in\npowerpc.\n\nSigned-off-by: Thomas Gleixner <tglx@linutronix.de>\nCc: Don Zickus <dzickus@redhat.com>\nCc: Chris Metcalf <cmetcalf@mellanox.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Benjamin Herrenschmidt <benh@kernel.crashing.org>\nCc: Sebastian Siewior <bigeasy@linutronix.de>\nCc: Nicholas Piggin <npiggin@gmail.com>\nCc: Ulrich Obergfell <uobergfe@redhat.com>\nCc: Borislav Petkov <bp@alien8.de>\nCc: Michael Ellerman <mpe@ellerman.id.au>\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: linuxppc-dev@lists.ozlabs.org\nLink: 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(-)", "diff": "--- 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 /*\n", "prefixes": [ "V2", "22/29" ] }