[PATCH RFC v7 11/23] dept: Apply sdt_might_sleep_weak() to hashed-waitqueue wait

From
Byungchul Park <hidden>
Date
2023-01-09 04:06:33
Also in
dri-devel, linux-block, linux-fsdevel, linux-ide, linux-mm, lkml
Reply to
Byungchul Park, 2023-01-09
Makes Dept able to track dependencies by hashed-waitqueue waits, but
weakly.

Signed-off-by: Byungchul Park <redacted>
---
 include/linux/wait_bit.h | 3 +++
 1 file changed, 3 insertions(+)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index 7725b75..bad30ba 100644
--- a/include/linux/wait_bit.h
+++ b/include/linux/wait_bit.h
@@ -6,6 +6,7 @@
  * Linux wait-bit related types and methods:
  */
 #include <linux/wait.h>
+#include <linux/dept_sdt.h>
 
 struct wait_bit_key {
 	void			*flags;
@@ -246,6 +247,7 @@ struct wait_bit_queue_entry {
 	struct wait_bit_queue_entry __wbq_entry;			\
 	long __ret = ret; /* explicit shadow */				\
 									\
+	sdt_might_sleep_weak(NULL);					\
 	init_wait_var_entry(&__wbq_entry, var,				\
 			    exclusive ? WQ_FLAG_EXCLUSIVE : 0);		\
 	for (;;) {							\
@@ -263,6 +265,7 @@ struct wait_bit_queue_entry {
 		cmd;							\
 	}								\
 	finish_wait(__wq_head, &__wbq_entry.wq_entry);			\
+	sdt_might_sleep_finish();					\
 __out:	__ret;								\
 })
 
-- 
1.9.1
Thread (47 messages) 47 messages, 7 authors, last reply 2023-01-21
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help