Revert "io_uring: don't save/restore iowait state"
This reverts commit aa97b89f43
.
This commit is contained in:
parent
809ca90c02
commit
7612e520f0
1 changed files with 3 additions and 2 deletions
|
@ -7663,7 +7663,7 @@ static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx,
|
|||
struct io_wait_queue *iowq,
|
||||
ktime_t *timeout)
|
||||
{
|
||||
int ret;
|
||||
int io_wait, ret;
|
||||
|
||||
/* make sure we run task_work before checking for signals */
|
||||
ret = io_run_task_work_sig();
|
||||
|
@ -7678,12 +7678,13 @@ static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx,
|
|||
* can take into account that the task is waiting for IO - turns out
|
||||
* to be important for low QD IO.
|
||||
*/
|
||||
io_wait = current->in_iowait;
|
||||
if (current_pending_io())
|
||||
current->in_iowait = 1;
|
||||
ret = 1;
|
||||
if (!schedule_hrtimeout(timeout, HRTIMER_MODE_ABS))
|
||||
ret = -ETIME;
|
||||
current->in_iowait = 0;
|
||||
current->in_iowait = io_wait;
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue