Whamcloud - gitweb
LU-9235 libcfs: don't dump stack if just touched 62/23162/10
authorHongchao Zhang <hongchao.zhang@intel.com>
Wed, 10 May 2017 03:45:19 +0000 (11:45 +0800)
committerOleg Drokin <oleg.drokin@intel.com>
Sun, 13 Aug 2017 17:18:00 +0000 (17:18 +0000)
If some lc_watchdog was touched before lcw_dump_stack dumped
the stack of the thread, it should not dump it anymore for
the thread is verified to be active and no need to dump.

Change-Id: I8e4acc1793bb8458ee3b6dc73f2953670ed22896
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-on: https://review.whamcloud.com/23162
Tested-by: Jenkins
Reviewed-by: James Simmons <uja.ornl@yahoo.com>
Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>

index 401210c..359ca94 100644 (file)
@@ -160,6 +160,11 @@ static void lcw_dump_stack(struct lc_watchdog *lcw)
        timediff = ktime_to_timespec64(ktime_sub(ktime_get(),
+       /* LU-9235: Don't dump stack if the thread is just touched. */
+       if (timediff.tv_sec == 0)
+               return;
         * Check to see if we should throttle the watchdog timer to avoid
         * too many dumps going to the console thus triggering an NMI.