mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wang Qing <wangqing@vivo.com>
To: Thomas Gleixner <tglx@linutronix.de>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Petr Mladek <pmladek@suse.com>, Wang Qing <wangqing@vivo.com>,
	Santosh Sivaraj <santosh@fossix.org>,
	"Peter Zijlstra (Intel)" <peterz@infradead.org>,
	linux-kernel@vger.kernel.org
Subject: [PATCH RFC 2/2] watchdog: support watchdog hrtimer suspend when CPU suspend
Date: Tue, 22 Jun 2021 17:06:47 +0800	[thread overview]
Message-ID: <1624352816-26450-3-git-send-email-wangqing@vivo.com> (raw)
In-Reply-To: <1624352816-26450-1-git-send-email-wangqing@vivo.com>

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@vivo.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


      parent reply	other threads:[~2021-06-22  9:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-22  9:06 [PATCH RFC 0/2] hrtimer: watchdog: support " Wang Qing
2021-06-22  9:06 ` [PATCH RFC 1/2] hrtimer: " Wang Qing
2021-08-10 14:58   ` Thomas Gleixner
2021-06-22  9:06 ` Wang Qing [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1624352816-26450-3-git-send-email-wangqing@vivo.com \
    --to=wangqing@vivo.com \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=pmladek@suse.com \
    --cc=santosh@fossix.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®