Added comments to explain watchdog_disabled variable
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
@@ -519,6 +519,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,return ret;set_sample_period (); +/* +* We shouldn't enable watchdog threads if it is not +* disabled.This is done by watchdog_disabled +* variable check in watchdog_*_all_cpus function. +*/ if (watchdog_enabled && watchdog_thresh)watchdog_enable_all_cpus ();else
Signature · 1 line
1.7.1
Quoted 19 lines · anish kumar
From: anish kumar <[email protected]>
This
watchdog_disabledflag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check ifsmpboot_register_percpu_threadfunction passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enablewatchdog->disablewatchdog->enablewatchdog
Unlike enablewatchdog->enablewatchdog which is wrong.Signed-off-by anish kumar <[email protected]>--- kernel/watchdog.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)kernel/watchdog.c +0
-0
kernel/watchdog.c int proc_dowatchdog(struct ctl_table *table, int write, · line 523
Quoted 5 lines
kernel/watchdog.c +2
-0@@ -519,6 +519,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,return ret;set_sample_period (); +/* +* We shouldn't enable watchdog threads if it is not
^^^
the 'not' is not needed I believe. Other than that, if it helps to understand the code better. I am fine with it.
Quoted 9 lines
kernel/watchdog.c +3
-0+* disabled.This is done by watchdog_disabled +* variable check in watchdog_*_all_cpus function. +*/ if (watchdog_enabled && watchdog_thresh)watchdog_enable_all_cpus ();else Signature · 1 line
1.7.1
Quoted 22 lines · Don Zickus
Quoted 21 lines · anish kumar
From: anish kumar <[email protected]>
This
watchdog_disabledflag is bit of cryptic.Howerver it's usefullnes is multifold. Uses are:
1. Check ifsmpboot_register_percpu_threadfunction passed.
2. Makes sure that user enables and disables the watchdog in sequence i.e. enablewatchdog->disablewatchdog->enablewatchdog
Unlike enablewatchdog->enablewatchdog which is wrong.Signed-off-by anish kumar <[email protected]>--- kernel/watchdog.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)kernel/watchdog.c +0
-0@@ -519,6 +519,11 @@ int proc_dowatchdog(struct ctl_table *table, int write,return ret;
Quoted 8 lines
kernel/watchdog.c int proc_dowatchdog(struct ctl_table *table, int write, · line 523
Quoted 3 lines
kernel/watchdog.c +2
-0set_sample_period (); +/* +* We shouldn't enable watchdog threads if it is not ^^^the 'not' is not needed I believe. Other than that, if it helps to understand the code better. I am fine with it.
Acked-by Don Zickus <[email protected]>
Should I wait for some more acked-by's?
Quoted 10 lines
Quoted 10 lines
kernel/watchdog.c +3
-0+* disabled.This is done by watchdog_disabled +* variable check in watchdog_*_all_cpus function. +*/ if (watchdog_enabled && watchdog_thresh)watchdog_enable_all_cpus ();else Signature · 1 line
1.7.1