Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

wait: Introduce io_wait_event_killable()

Add io_wait_event_killable(), a variant of wait_event_killable() that
uses io_schedule() instead of schedule(). This is to be used in
situation where waiting time is to be accounted as IO wait time.

Signed-off-by: Remi Pommarel <repk@triplefau.lt>
Acked-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Message-ID: <1b2870001ecd34fe6c05be2ddfefb3c798b11701.1769179462.git.repk@triplefau.lt>
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>

authored by

Remi Pommarel and committed by
Dominique Martinet
ca136b25 63804fed

+15
+15
include/linux/wait.h
··· 937 937 __ret; \ 938 938 }) 939 939 940 + #define __io_wait_event_killable(wq, condition) \ 941 + ___wait_event(wq, condition, TASK_KILLABLE, 0, 0, io_schedule()) 942 + 943 + /* 944 + * wait_event_killable() - link wait_event_killable but with io_schedule() 945 + */ 946 + #define io_wait_event_killable(wq_head, condition) \ 947 + ({ \ 948 + int __ret = 0; \ 949 + might_sleep(); \ 950 + if (!(condition)) \ 951 + __ret = __io_wait_event_killable(wq_head, condition); \ 952 + __ret; \ 953 + }) 954 + 940 955 #define __wait_event_state(wq, condition, state) \ 941 956 ___wait_event(wq, condition, state, 0, 0, schedule()) 942 957