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.

Merge tag 'io_uring-6.5-2023-07-14' of git://git.kernel.dk/linux

Pull io_uring fix from Jens Axboe:
"Just a single tweak for the wait logic in io_uring"

* tag 'io_uring-6.5-2023-07-14' of git://git.kernel.dk/linux:
io_uring: Use io_schedule* in cqring wait

+13 -2
+13 -2
io_uring/io_uring.c
··· 2489 2489 static inline int io_cqring_wait_schedule(struct io_ring_ctx *ctx, 2490 2490 struct io_wait_queue *iowq) 2491 2491 { 2492 + int token, ret; 2493 + 2492 2494 if (unlikely(READ_ONCE(ctx->check_cq))) 2493 2495 return 1; 2494 2496 if (unlikely(!llist_empty(&ctx->work_llist))) ··· 2501 2499 return -EINTR; 2502 2500 if (unlikely(io_should_wake(iowq))) 2503 2501 return 0; 2502 + 2503 + /* 2504 + * Use io_schedule_prepare/finish, so cpufreq can take into account 2505 + * that the task is waiting for IO - turns out to be important for low 2506 + * QD IO. 2507 + */ 2508 + token = io_schedule_prepare(); 2509 + ret = 0; 2504 2510 if (iowq->timeout == KTIME_MAX) 2505 2511 schedule(); 2506 2512 else if (!schedule_hrtimeout(&iowq->timeout, HRTIMER_MODE_ABS)) 2507 - return -ETIME; 2508 - return 0; 2513 + ret = -ETIME; 2514 + io_schedule_finish(token); 2515 + return ret; 2509 2516 } 2510 2517 2511 2518 /*