[PATCH 19/25] dept: Apply timeout consideration to swait
Gwan-gyeong Mun
gwan-gyeong.mun at intel.com
Tue Jan 3 11:16:09 UTC 2023
From: Byungchul Park <byungchul.park at lge.com>
Now that CONFIG_DEPT_AGGRESSIVE_TIMEOUT_WAIT was introduced, apply the
consideration to swait, assuming an input 'ret' in ___swait_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/swait.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/include/linux/swait.h b/include/linux/swait.h
index 13042094fb33..339e5f2fff0d 100644
--- a/include/linux/swait.h
+++ b/include/linux/swait.h
@@ -162,7 +162,10 @@ extern void finish_swait(struct swait_queue_head *q, struct swait_queue *wait);
struct swait_queue __wait; \
long __ret = ret; \
\
- sdt_might_sleep_weak(NULL); \
+ if (!__ret || __ret == MAX_SCHEDULE_TIMEOUT) \
+ sdt_might_sleep_weak(NULL); \
+ else \
+ sdt_might_sleep_weak_timeout(NULL); \
INIT_LIST_HEAD(&__wait.task_list); \
for (;;) { \
long __int = prepare_to_swait_event(&wq, &__wait, state);\
--
2.37.1
More information about the Intel-gfx-trybot
mailing list