Skip to content

Commit 992f4fa

Browse files
committed
Revert "io_uring: Use io_schedule* in cqring wait"
See: #5546 This reverts commit f32dfc8.
1 parent b84b8a9 commit 992f4fa

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

io_uring/io_uring.c

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2346,7 +2346,7 @@ static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx,
23462346
struct io_wait_queue *iowq,
23472347
ktime_t *timeout)
23482348
{
2349-
int token, ret;
2349+
int ret;
23502350
unsigned long check_cq;
23512351

23522352
/* make sure we run task_work before checking for signals */
@@ -2362,18 +2362,9 @@ static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx,
23622362
if (check_cq & BIT(IO_CHECK_CQ_DROPPED_BIT))
23632363
return -EBADR;
23642364
}
2365-
2366-
/*
2367-
* Use io_schedule_prepare/finish, so cpufreq can take into account
2368-
* that the task is waiting for IO - turns out to be important for low
2369-
* QD IO.
2370-
*/
2371-
token = io_schedule_prepare();
2372-
ret = 1;
23732365
if (!schedule_hrtimeout(timeout, HRTIMER_MODE_ABS))
2374-
ret = -ETIME;
2375-
io_schedule_finish(token);
2376-
return ret;
2366+
return -ETIME;
2367+
return 1;
23772368
}
23782369

23792370
/*

0 commit comments

Comments
 (0)