[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20201024225716.2854163-1-xii@google.com>
Date: Sat, 24 Oct 2020 15:57:15 -0700
From: Xi Wang <xii@...gle.com>
To: Ingo Molnar <mingo@...hat.com>,
Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>,
Juri Lelli <juri.lelli@...hat.com>,
Vincent Guittot <vincent.guittot@...aro.org>,
Dietmar Eggemann <dietmar.eggemann@....com>,
Steven Rostedt <rostedt@...dmis.org>,
Josh Don <joshdon@...gle.com>, linux-kernel@...r.kernel.org
Subject: gFrom 9667d5ddbb1dc230653e5f8cedb778e9c562d46c Mon Sep 17 00:00:00 2001
Instead of periodically resetting watchdogs from thread context,
this patch simply forces resched and checks rq->sched_count.
Watchdog is reset if the sched count increases. If the same thread
is picked by pick_next_task during resched, there is no context
switch.
With the new method we lose coverage on: a migration/n thread
actually gets picked and we actually context switch to the
migration/n thread. These steps are unlikely to silently fail.
The change would provide nearly the same level of protection with
less latency / jitter.
v3:
- Removed the old method and boot option
- Still need to check resched
v2:
- Use sched_count instead of having sched calling into watchdog code
- Remove the sysctl and add a boot option, which can be removed later
- Changed the subject line
Xi Wang (1):
sched: watchdog: Touch kernel watchdog with sched count
include/linux/sched.h | 4 ++++
kernel/sched/core.c | 23 +++++++++++++++++++--
kernel/sched/sched.h | 6 +++++-
kernel/watchdog.c | 47 +++++++++++++------------------------------
4 files changed, 44 insertions(+), 36 deletions(-)
--
2.29.0.rc2.309.g374f81d7ae-goog
Powered by blists - more mailing lists