linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread
@ 2021-04-29  9:04 Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 2/4] doc: watchdog: Delete the explanation about "watchdog/%u" Wang Qing
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Wang Qing @ 2021-04-29  9:04 UTC (permalink / raw)
  To: Jonathan Corbet, Wang Qing, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Andrew Morton, Kees Cook, Randy Dunlap,
	Guilherme G. Piccoli, Qais Yousef, Petr Mladek, Santosh Sivaraj,
	Vlastimil Babka, linux-doc, linux-kernel

The watchdog thread has been replaced by cpu_stop_work, modify the 
explanation related.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 kernel/watchdog.c | 12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 7110906..d7fb4fb
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -92,7 +92,7 @@ __setup("nmi_watchdog=", hardlockup_panic_setup);
  * own hardlockup detector.
  *
  * watchdog_nmi_enable/disable can be implemented to start and stop when
- * softlockup watchdog threads start and stop. The arch must select the
+ * softlockup watchdog start and stop. The arch must select the
  * SOFTLOCKUP_DETECTOR Kconfig.
  */
 int __weak watchdog_nmi_enable(unsigned int cpu)
@@ -322,7 +322,7 @@ static DEFINE_PER_CPU(struct completion, softlockup_completion);
 static DEFINE_PER_CPU(struct cpu_stop_work, softlockup_stop_work);
 
 /*
- * The watchdog thread function - touches the timestamp.
+ * The watchdog feed function - touches the timestamp.
  *
  * It only runs once every sample_period seconds (4 seconds by
  * default) to reset the softlockup timestamp. If this gets delayed
@@ -551,11 +551,7 @@ static void lockup_detector_reconfigure(void)
 }
 
 /*
- * Create the watchdog thread infrastructure and configure the detector(s).
- *
- * The threads are not unparked as watchdog_allowed_mask is empty.  When
- * the threads are successfully initialized, take the proper locks and
- * unpark the threads in the watchdog_cpumask if the watchdog is enabled.
+ * Create the watchdog infrastructure and configure the detector(s).
  */
 static __init void lockup_detector_setup(void)
 {
@@ -621,7 +617,7 @@ void lockup_detector_soft_poweroff(void)
 
 #ifdef CONFIG_SYSCTL
 
-/* Propagate any changes to the watchdog threads */
+/* Propagate any changes to the watchdog infrastructure */
 static void proc_watchdog_update(void)
 {
 	/* Remove impossible cpus to keep sysctl output clean. */
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V2,RESEND 2/4] doc: watchdog: Delete the explanation about "watchdog/%u".
  2021-04-29  9:04 [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Wang Qing
@ 2021-04-29  9:04 ` Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 3/4] doc: watchdog: Modify the explanation related to watchdog thread Wang Qing
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Wang Qing @ 2021-04-29  9:04 UTC (permalink / raw)
  To: Jonathan Corbet, Wang Qing, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Andrew Morton, Kees Cook, Randy Dunlap,
	Guilherme G. Piccoli, Qais Yousef, Petr Mladek, Santosh Sivaraj,
	Vlastimil Babka, linux-doc, linux-kernel,
	Mathieu Chouquet-Stringer

"watchdog/%u" threads has be replaced by cpu_stop_work. The current description
is extremely misleading, so delete the explanation about "watchdog/%u".

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 .../admin-guide/kernel-per-CPU-kthreads.rst          | 20 --------------------
 1 file changed, 20 deletions(-)

diff --git a/Documentation/admin-guide/kernel-per-CPU-kthreads.rst b/Documentation/admin-guide/kernel-per-CPU-kthreads.rst
index 531f689..5e51ee5
--- a/Documentation/admin-guide/kernel-per-CPU-kthreads.rst
+++ b/Documentation/admin-guide/kernel-per-CPU-kthreads.rst
@@ -332,23 +332,3 @@ To reduce its OS jitter, do at least one of the following:
 	kthreads from being created in the first place.  However, please
 	note that this will not eliminate OS jitter, but will instead
 	shift it to RCU_SOFTIRQ.
-
-Name:
-  watchdog/%u
-
-Purpose:
-  Detect software lockups on each CPU.
-
-To reduce its OS jitter, do at least one of the following:
-
-1.	Build with CONFIG_LOCKUP_DETECTOR=n, which will prevent these
-	kthreads from being created in the first place.
-2.	Boot with "nosoftlockup=0", which will also prevent these kthreads
-	from being created.  Other related watchdog and softlockup boot
-	parameters may be found in Documentation/admin-guide/kernel-parameters.rst
-	and Documentation/watchdog/watchdog-parameters.rst.
-3.	Echo a zero to /proc/sys/kernel/watchdog to disable the
-	watchdog timer.
-4.	Echo a large number of /proc/sys/kernel/watchdog_thresh in
-	order to reduce the frequency of OS jitter due to the watchdog
-	timer down to a level that is acceptable for your workload.
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V2,RESEND 3/4] doc: watchdog: Modify the explanation related to watchdog thread
  2021-04-29  9:04 [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 2/4] doc: watchdog: Delete the explanation about "watchdog/%u" Wang Qing
@ 2021-04-29  9:04 ` Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 4/4] doc: watchdog: Modify the doc related to "watchdog/%u" Wang Qing
  2021-04-29  9:29 ` [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Petr Mladek
  3 siblings, 0 replies; 6+ messages in thread
From: Wang Qing @ 2021-04-29  9:04 UTC (permalink / raw)
  To: Jonathan Corbet, Wang Qing, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Andrew Morton, Kees Cook, Randy Dunlap,
	Guilherme G. Piccoli, Qais Yousef, Petr Mladek, Santosh Sivaraj,
	Vlastimil Babka, linux-doc, linux-kernel, Lepton Wu

"watchdog/%u" threads has be replaced by cpu_stop_work. The current 
description is extremely misleading.

Signed-off-by: Wang Qing <wangqing@vivo.com>
---
 Documentation/admin-guide/lockup-watchdogs.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/Documentation/admin-guide/lockup-watchdogs.rst b/Documentation/admin-guide/lockup-watchdogs.rst
index 290840c..3e09284
--- a/Documentation/admin-guide/lockup-watchdogs.rst
+++ b/Documentation/admin-guide/lockup-watchdogs.rst
@@ -39,7 +39,7 @@ in principle, they should work in any architecture where these
 subsystems are present.
 
 A periodic hrtimer runs to generate interrupts and kick the watchdog
-task. An NMI perf event is generated every "watchdog_thresh"
+job. An NMI perf event is generated every "watchdog_thresh"
 (compile-time initialized to 10 and configurable through sysctl of the
 same name) seconds to check for hardlockups. If any CPU in the system
 does not receive any hrtimer interrupt during that time the
@@ -47,7 +47,7 @@ does not receive any hrtimer interrupt during that time the
 generate a kernel warning or call panic, depending on the
 configuration.
 
-The watchdog task is a high priority kernel thread that updates a
+The watchdog job runs in a stop scheduling thread that updates a
 timestamp every time it is scheduled. If that timestamp is not updated
 for 2*watchdog_thresh seconds (the softlockup threshold) the
 'softlockup detector' (coded inside the hrtimer callback function)
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH V2,RESEND 4/4] doc: watchdog: Modify the doc related to "watchdog/%u"
  2021-04-29  9:04 [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 2/4] doc: watchdog: Delete the explanation about "watchdog/%u" Wang Qing
  2021-04-29  9:04 ` [PATCH V2,RESEND 3/4] doc: watchdog: Modify the explanation related to watchdog thread Wang Qing
@ 2021-04-29  9:04 ` Wang Qing
  2021-04-29  9:29 ` [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Petr Mladek
  3 siblings, 0 replies; 6+ messages in thread
From: Wang Qing @ 2021-04-29  9:04 UTC (permalink / raw)
  To: Jonathan Corbet, Wang Qing, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Andrew Morton, Kees Cook, Randy Dunlap,
	Guilherme G. Piccoli, Qais Yousef, Petr Mladek, Santosh Sivaraj,
	Vlastimil Babka, linux-doc, linux-kernel

"watchdog/%u" threads has be replaced by cpu_stop_work. The current
description is extremely misleading.
---
 Documentation/admin-guide/sysctl/kernel.rst | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/Documentation/admin-guide/sysctl/kernel.rst b/Documentation/admin-guide/sysctl/kernel.rst
index 1d56a6b..32b0791
--- a/Documentation/admin-guide/sysctl/kernel.rst
+++ b/Documentation/admin-guide/sysctl/kernel.rst
@@ -1282,11 +1282,11 @@ This parameter can be used to control the soft lockup detector.
 = =================================
 
 The soft lockup detector monitors CPUs for threads that are hogging the CPUs
-without rescheduling voluntarily, and thus prevent the 'watchdog/N' threads
-from running. The mechanism depends on the CPUs ability to respond to timer
-interrupts which are needed for the 'watchdog/N' threads to be woken up by
-the watchdog timer function, otherwise the NMI watchdog — if enabled — can
-detect a hard lockup condition.
+without rescheduling voluntarily, and thus prevent the 'migration/N' threads
+from running, causing the watchdog work fail to execute. The mechanism depends
+on the CPUs ability to respond to timer interrupts which are needed for the
+watchdog work to be queued by the watchdog timer function, otherwise the NMI
+watchdog — if enabled — can detect a hard lockup condition.
 
 
 stack_erasing
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread
  2021-04-29  9:04 [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Wang Qing
                   ` (2 preceding siblings ...)
  2021-04-29  9:04 ` [PATCH V2,RESEND 4/4] doc: watchdog: Modify the doc related to "watchdog/%u" Wang Qing
@ 2021-04-29  9:29 ` Petr Mladek
  2021-05-09 23:29   ` Andrew Morton
  3 siblings, 1 reply; 6+ messages in thread
From: Petr Mladek @ 2021-04-29  9:29 UTC (permalink / raw)
  To: Wang Qing, Andrew Morton
  Cc: Jonathan Corbet, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Kees Cook, Randy Dunlap, Guilherme G. Piccoli,
	Qais Yousef, Santosh Sivaraj, Vlastimil Babka, linux-doc,
	linux-kernel

On Thu 2021-04-29 17:04:25, Wang Qing wrote:
> The watchdog thread has been replaced by cpu_stop_work, modify the 
> explanation related.
> 
> Signed-off-by: Wang Qing <wangqing@vivo.com>

You should have added my Reviewed-by when resending the patchset.
Anyway, for all four patches:

Reviewed-by: Petr Mladek <pmladek@suse.com>

Andrew, would you take it via -mm tree?

Best Regards,
Petr

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread
  2021-04-29  9:29 ` [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Petr Mladek
@ 2021-05-09 23:29   ` Andrew Morton
  0 siblings, 0 replies; 6+ messages in thread
From: Andrew Morton @ 2021-05-09 23:29 UTC (permalink / raw)
  To: Petr Mladek
  Cc: Wang Qing, Jonathan Corbet, Mauro Carvalho Chehab, Joe Perches,
	Stephen Kitt, Kees Cook, Randy Dunlap, Guilherme G. Piccoli,
	Qais Yousef, Santosh Sivaraj, Vlastimil Babka, linux-doc,
	linux-kernel

On Thu, 29 Apr 2021 11:29:31 +0200 Petr Mladek <pmladek@suse.com> wrote:

> On Thu 2021-04-29 17:04:25, Wang Qing wrote:
> > The watchdog thread has been replaced by cpu_stop_work, modify the 
> > explanation related.
> > 
> > Signed-off-by: Wang Qing <wangqing@vivo.com>
> 
> You should have added my Reviewed-by when resending the patchset.
> Anyway, for all four patches:
> 
> Reviewed-by: Petr Mladek <pmladek@suse.com>
> 
> Andrew, would you take it via -mm tree?

Sure.  I dropped "[2/4] doc: watchdog: Delete the explanation about
"watchdog/%u"" because someone already did that.


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-09 23:29 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-29  9:04 [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Wang Qing
2021-04-29  9:04 ` [PATCH V2,RESEND 2/4] doc: watchdog: Delete the explanation about "watchdog/%u" Wang Qing
2021-04-29  9:04 ` [PATCH V2,RESEND 3/4] doc: watchdog: Modify the explanation related to watchdog thread Wang Qing
2021-04-29  9:04 ` [PATCH V2,RESEND 4/4] doc: watchdog: Modify the doc related to "watchdog/%u" Wang Qing
2021-04-29  9:29 ` [PATCH V2,RESEND 1/4] kernel: watchdog: Modify the explanation related to watchdog thread Petr Mladek
2021-05-09 23:29   ` Andrew Morton

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).