[PATCH 21/25] dept: Apply timeout consideration to hashed-waitqueue wait
Gwan-gyeong Mun
gwan-gyeong.mun at intel.com
Tue Jan 3 11:16:11 UTC 2023
From: Byungchul Park <byungchul.park at lge.com>
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to hashed-waitqueue wait, assuming an input 'ret' in
___wait_var_event() macro is used as a timeout value.
Signed-off-by: Byungchul Park <byungchul.park at lge.com>
Signed-off-by: Gwan-gyeong Mun <gwan-gyeong.mun at intel.com>
---
include/linux/wait_bit.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/wait_bit.h b/include/linux/wait_bit.h
index bad30baa5421..b504815937dc 100644
--- a/include/linux/wait_bit.h
+++ b/include/linux/wait_bit.h
@@ -247,7 +247,10 @@ extern wait_queue_head_t *__var_waitqueue(void *p);
struct wait_bit_queue_entry __wbq_entry; \
long __ret = ret; /* explicit shadow */ \
\
- sdt_might_sleep_weak(NULL); \
+ if (!__ret || __ret == MAX_SCHEDULE_TIMEOUT) \
+ sdt_might_sleep_weak(NULL); \
+ else \
+ sdt_might_sleep_weak_timeout(NULL); \
init_wait_var_entry(&__wbq_entry, var, \
exclusive ? WQ_FLAG_EXCLUSIVE : 0); \
for (;;) { \
--
2.37.1
More information about the Intel-gfx-trybot
mailing list