-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
It is sometimes helpful to have a way for the subsystem causing the stall to dump its state when an RCU CPU stall occurs. This commit therefore bases rcu_stall_chain_notifier_register() and rcu_stall_chain_notifier_unregister() on atomic notifiers in order to provide this functionality. Signed-off-by: Paul E. McKenney <paulmck@kernel.org> Cc: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Frederic Weisbecker <frederic@kernel.org>
- Loading branch information
Paul E. McKenney
authored and
Frederic Weisbecker
committed
Sep 11, 2023
1 parent
243d5ab
commit 5b404fd
Showing
4 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
/* SPDX-License-Identifier: GPL-2.0+ */ | ||
/* | ||
* Read-Copy Update notifiers, initially RCU CPU stall notifier. | ||
* Separate from rcupdate.h to avoid #include loops. | ||
* | ||
* Copyright (C) 2023 Paul E. McKenney. | ||
*/ | ||
|
||
#ifndef __LINUX_RCU_NOTIFIER_H | ||
#define __LINUX_RCU_NOTIFIER_H | ||
|
||
// Actions for RCU CPU stall notifier calls. | ||
#define RCU_STALL_NOTIFY_NORM 1 | ||
#define RCU_STALL_NOTIFY_EXP 2 | ||
|
||
#ifdef CONFIG_RCU_STALL_COMMON | ||
|
||
#include <linux/notifier.h> | ||
#include <linux/types.h> | ||
|
||
int rcu_stall_chain_notifier_register(struct notifier_block *n); | ||
int rcu_stall_chain_notifier_unregister(struct notifier_block *n); | ||
|
||
#else // #ifdef CONFIG_RCU_STALL_COMMON | ||
|
||
// No RCU CPU stall warnings in Tiny RCU. | ||
static inline int rcu_stall_chain_notifier_register(struct notifier_block *n) { return -EEXIST; } | ||
static inline int rcu_stall_chain_notifier_unregister(struct notifier_block *n) { return -ENOENT; } | ||
|
||
#endif // #else // #ifdef CONFIG_RCU_STALL_COMMON | ||
|
||
#endif /* __LINUX_RCU_NOTIFIER_H */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters