lustre: RFC patch to restore watchdog functionality
Lustre in drivers/staging lost the watchdog functionality some time ago
Commit: 5d4450c41fe3 ("staging/lustre: fix build error on non-x86 platforms")
This is an attempt to provide the same core functionality in a simpler way. It compiles, but I haven't tested it.
I don't plan to pursue this further at the moment, but as watchdogs have been under discussion lately I thought it might be interesting to some.
NeilBrown
From: NeilBrown <[email protected]>
Date: Mon, 6 Aug 2018 13:37:40 +1000
Subject: [PATCH] lustre: add watchdog for ptlrpc service threads.
If a ptlrpc thread takes longer than expected, it
can be used to get a stack trace to see where the
problem is.
This patch restores this functionality by using
a delayed work struct to report a back trace of
the thread if it ever fires.
--- drivers/staging/lustre/lustre/include/lustre_net.h | 10 +-- drivers/staging/lustre/lustre/ptlrpc/service.c | 87 ++++++++++++++++++---- 2 files changed, 76 insertions(+), 21 deletions(-)
drivers/staging/lustre/lustre/include/lustre_net.h +3 -7
@@ -1283,18 +1283,14 @@ struct ptlrpc_thread {*/ unsigned int t_id;/** -* service thread pid +* service thread */ +struct task_struct *t_task;pid_t t_pid;/** * put watchdog in the structure per thread b=14840 -* -* Lustre watchdog is removed for client in the hope -* of a generic watchdog can be merged in kernel. -* When that happens, we should add below back. -* -* struct lc_watchdog *t_watchdog; */ +struct delayed_work t_watchdog;/** * the svc this thread belonged to b=18582 */
drivers/staging/lustre/lustre/ptlrpc/service.c +73 -14
124 lines not on this page · raw message
Signature · 9 lines
2.14.0.rc0.dirty -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 832 bytes Desc: not available URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20180806/23f62175/attachment.sig>