Skip to contentSkip to conversation

Added comments to explain watchdog_disabled variable

PATCH In review anish kumar 2 participants 4 messages Feb 16, 2013 – Mar 7, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Added comments to explain watchdog_disabled variable

From: anish kumar <[email protected]>

This watchdog_disabled flag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check if smpboot_register_percpu_thread function passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enable watchdog->disable watchdog->enable watchdog
Unlike enable watchdog->enable watchdog which is wrong.

---
 kernel/watchdog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
kernel/watchdog.c +5 -0
index 75a2ab3..8a20ebe 100644
@@ -518,6 +518,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,
 		return ret;
 
 	set_sample_period();
+	/*
+	 * Watchdog threads shouldn't be enabled if they are
+	 * disabled.'watchdog_disabled' variable check in
+	 * watchdog_*_all_cpus() function takes care of this.
+	 */
 	if (watchdog_enabled && watchdog_thresh)
 		watchdog_enable_all_cpus();
 	else
Signature · 1 line
1.7.1
Acked-by on v1 1/1
#1 lore raw
Quoted 19 lines · anish kumar

From: anish kumar <[email protected]>

This watchdog_disabled flag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check if smpboot_register_percpu_thread function passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enable watchdog->disable watchdog->enable watchdog
Unlike enable watchdog->enable watchdog which is wrong.

---
 kernel/watchdog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
kernel/watchdog.c +0 -0
index 75a2ab3..8a20ebe 100644

kernel/watchdog.c int proc_dowatchdog(struct ctl_table *table, int write, · line 523

Quoted 6 lines
kernel/watchdog.c +3 -0
@@ -518,6 +518,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,
 		return ret;
 
 	set_sample_period();
+	/*
+	 * Watchdog threads shouldn't be enabled if they are
+	 * disabled.'watchdog_disabled' variable check in

Missing a 'The' ^^^

Other than that,

#2 lore raw
Quoted 29 lines · Don Zickus
Quoted 19 lines · anish kumar

From: anish kumar <[email protected]>

This watchdog_disabled flag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check if smpboot_register_percpu_thread function passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enable watchdog->disable watchdog->enable watchdog
Unlike enable watchdog->enable watchdog which is wrong.

---
 kernel/watchdog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
kernel/watchdog.c +0 -0
index 75a2ab3..8a20ebe 100644

kernel/watchdog.c int proc_dowatchdog(struct ctl_table *table, int write, · line 523

Quoted 6 lines
kernel/watchdog.c +3 -0
@@ -518,6 +518,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,
              return ret;
 
      set_sample_period();
+     /*
+      * Watchdog threads shouldn't be enabled if they are
+      * disabled.'watchdog_disabled' variable check in

Missing a 'The' ^^^

Quoted 3 lines

Other than that,

Is this patch picked up?

#3 lore raw
Quoted 30 lines · anish singh
Quoted 29 lines · Don Zickus
Quoted 19 lines · anish kumar

From: anish kumar <[email protected]>

This watchdog_disabled flag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check if smpboot_register_percpu_thread function passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enable watchdog->disable watchdog->enable watchdog
Unlike enable watchdog->enable watchdog which is wrong.

---
 kernel/watchdog.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
kernel/watchdog.c +0 -0
index 75a2ab3..8a20ebe 100644

kernel/watchdog.c int proc_dowatchdog(struct ctl_table *table, int write, · line 523

Quoted 6 lines
kernel/watchdog.c +3 -0
@@ -518,6 +518,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,
              return ret;
 
      set_sample_period();
+     /*
+      * Watchdog threads shouldn't be enabled if they are
+      * disabled.'watchdog_disabled' variable check in

Missing a 'The' ^^^

Quoted 4 lines
Quoted 3 lines

Other than that,

Is this patch picked up?

Andrew,

Do you want me to respin the patch with that change? Or how should I move this patch forward?

Cheers,
Don