Skip to contentSkip to conversation

: Reset clocksource watchdog after sysrq-t

PATCH In review Prarit Bhargava 2 participants 2 messages Nov 2, 2011 – Dec 1, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Reset clocksource watchdog after sysrq-t

When doing a sysrq-t other processes are starved out because the task_list lock is held. On a large enough system this means that the clocksource watchdog does not fire for a long time and when system operation resumes the watchdog erroneously marks the current clocksource as unstable.

Reset the clocksource watchdog after show_state_filter() has dumped the task states.

---
 kernel/sched.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/sched.c +2 -0
index d87c6e5..b09c053 100644
@@ -71,6 +71,7 @@
 #include <linux/ctype.h>
 #include <linux/ftrace.h>
 #include <linux/slab.h>
+#include <linux/clocksource.h>
 
 #include <asm/tlb.h>
 #include <asm/irq_regs.h>
@@ -6034,6 +6035,7 @@ void show_state_filter(unsigned long state_filter)
 	} while_each_thread(g, p);
 
 	touch_all_softlockup_watchdogs();
+	clocksource_touch_watchdog();
 
 #ifdef CONFIG_SCHED_DEBUG
 	sysrq_sched_debug_show();
Signature · 1 line
1.7.1
#1 lore raw

Hi Prarit,
I'm reading the clocksource watchdog code, in which case I see your patch.
But i cannot understand the patch very well.

Quoted 4 lines · Prarit Bhargava

When doing a sysrq-t other processes are starved out because the task_list lock is held.  On a large enough system this means that the clocksource watchdog does not fire for a long time and when system operation resumes the watchdog erroneously marks the current clocksource as unstable.

Do you mean that a sysrq-t will enlarge the deviation between watchdog and the
watched clocksource(in watchdog_list) ?

Quoted 33 lines

Reset the clocksource watchdog after show_state_filter() has dumped the task states.

---
 kernel/sched.c |    2 ++

 1 files changed, 2 insertions(+), 0 deletions(-)
kernel/sched.c +2 -1
index d87c6e5..b09c053 100644
@@ -71,6 +71,7 @@
  #include <linux/ctype.h>
  #include <linux/ftrace.h>
  #include <linux/slab.h>
+#include <linux/clocksource.h>
 
  #include <asm/tlb.h>
  #include <asm/irq_regs.h>
@@ -6034,6 +6035,7 @@ void show_state_filter(unsigned long state_filter)
        } while_each_thread(g, p);
 
        touch_all_softlockup_watchdogs();
+       clocksource_touch_watchdog();
 
  #ifdef CONFIG_SCHED_DEBUG
        sysrq_sched_debug_show();
--

1.7.1

Quoted 5 lines

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Thanks,
Xiaochen