[<prev] [next>] [day] [month] [year] [list]
Message-ID: <160788607099.3364.5643051816742676927.tip-bot2@tip-bot2>
Date: Sun, 13 Dec 2020 19:01:10 -0000
From: "tip-bot2 for Paul E. McKenney" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Davidlohr Bueso <dbueso@...e.de>,
"Paul E. McKenney" <paulmck@...nel.org>, x86@...nel.org,
linux-kernel@...r.kernel.org
Subject: [tip: core/rcu] locktorture: Track time of last ->writeunlock()
The following commit has been merged into the core/rcu branch of tip:
Commit-ID: 3480d6774f07341e3e1cf3114f58bef98ea58ae0
Gitweb: https://git.kernel.org/tip/3480d6774f07341e3e1cf3114f58bef98ea58ae0
Author: Paul E. McKenney <paulmck@...nel.org>
AuthorDate: Sun, 30 Aug 2020 21:48:23 -07:00
Committer: Paul E. McKenney <paulmck@...nel.org>
CommitterDate: Fri, 06 Nov 2020 17:13:29 -08:00
locktorture: Track time of last ->writeunlock()
This commit adds a last_lock_release variable that tracks the time of
the last ->writeunlock() call, which allows easier diagnosing of lock
hangs when using a kernel debugger.
Acked-by: Davidlohr Bueso <dbueso@...e.de>
Signed-off-by: Paul E. McKenney <paulmck@...nel.org>
---
kernel/locking/locktorture.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/kernel/locking/locktorture.c b/kernel/locking/locktorture.c
index 62d215b..316531d 100644
--- a/kernel/locking/locktorture.c
+++ b/kernel/locking/locktorture.c
@@ -60,6 +60,7 @@ static struct task_struct **reader_tasks;
static bool lock_is_write_held;
static bool lock_is_read_held;
+static unsigned long last_lock_release;
struct lock_stress_stats {
long n_lock_fail;
@@ -632,6 +633,7 @@ static int lock_torture_writer(void *arg)
lwsp->n_lock_acquired++;
cxt.cur_ops->write_delay(&rand);
lock_is_write_held = false;
+ WRITE_ONCE(last_lock_release, jiffies);
cxt.cur_ops->writeunlock();
stutter_wait("lock_torture_writer");
Powered by blists - more mailing lists