[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1624352816-26450-3-git-send-email-wangqing@vivo.com>
Date: Tue, 22 Jun 2021 17:06:47 +0800
From: Wang Qing <wangqing@...o.com>
To: Thomas Gleixner <tglx@...utronix.de>,
Frederic Weisbecker <fweisbec@...il.com>,
Ingo Molnar <mingo@...nel.org>,
Andrew Morton <akpm@...ux-foundation.org>,
Petr Mladek <pmladek@...e.com>, Wang Qing <wangqing@...o.com>,
Santosh Sivaraj <santosh@...six.org>,
"Peter Zijlstra (Intel)" <peterz@...radead.org>,
linux-kernel@...r.kernel.org
Subject: [PATCH RFC 2/2] watchdog: support watchdog hrtimer suspend when CPU suspend
the watchdog hrtimer doesn’t have to work while CPU is suspend. Otherwise
the maximum suspend time of the CPU is 4s if enable lockup detector,
which is unacceptable on some products.
Signed-off-by: Wang Qing <wangqing@...o.com>
---
kernel/watchdog.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/kernel/watchdog.c b/kernel/watchdog.c
index 7c39790..f68591f
--- a/kernel/watchdog.c
+++ b/kernel/watchdog.c
@@ -455,7 +455,8 @@ static void watchdog_enable(unsigned int cpu)
* Start the timer first to prevent the NMI watchdog triggering
* before the timer has a chance to fire.
*/
- hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD);
+ hrtimer_init(hrtimer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD
+ | HRTIMER_MODE_SUSPEND);
hrtimer->function = watchdog_timer_fn;
hrtimer_start(hrtimer, ns_to_ktime(sample_period),
HRTIMER_MODE_REL_PINNED_HARD);
--
2.7.4
Powered by blists - more mailing lists