Commit 7b72d66
committed
io_uring: gate iowait schedule on having pending requests
A previous commit made all cqring waits marked as iowait, as a way to
improve performance for short schedules with pending IO. However, for
use cases that have a special reaper thread that does nothing but
wait on events on the ring, this causes a cosmetic issue where we
know have one core marked as being "busy" with 100% iowait.
While this isn't a grave issue, it is confusing to users. Rather than
always mark us as being in iowait, gate setting of current->in_iowait
to 1 by whether or not the waiting task has pending requests.
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/io-uring/CAMEGJJ2RxopfNQ7GNLhr7X9=bHXKo+G5OOe0LUq=+UgLXsv1Xg@mail.gmail.com/
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217699
Link: https://bugzilla.kernel.org/show_bug.cgi?id=217700
Reported-by: Oleksandr Natalenko <oleksandr@natalenko.name>
Reported-by: Phil Elwell <phil@raspberrypi.com>
Tested-by: Andres Freund <andres@anarazel.de>
Fixes: 8a79656 ("io_uring: Use io_schedule* in cqring wait")
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 07e9811 commit 7b72d66
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2493 | 2493 | | |
2494 | 2494 | | |
2495 | 2495 | | |
| 2496 | + | |
| 2497 | + | |
| 2498 | + | |
| 2499 | + | |
| 2500 | + | |
| 2501 | + | |
| 2502 | + | |
| 2503 | + | |
| 2504 | + | |
2496 | 2505 | | |
2497 | 2506 | | |
2498 | 2507 | | |
2499 | 2508 | | |
2500 | | - | |
| 2509 | + | |
2501 | 2510 | | |
2502 | 2511 | | |
2503 | 2512 | | |
| |||
2511 | 2520 | | |
2512 | 2521 | | |
2513 | 2522 | | |
2514 | | - | |
2515 | | - | |
2516 | | - | |
| 2523 | + | |
| 2524 | + | |
| 2525 | + | |
2517 | 2526 | | |
2518 | | - | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
2519 | 2530 | | |
2520 | 2531 | | |
2521 | 2532 | | |
2522 | 2533 | | |
2523 | 2534 | | |
2524 | | - | |
| 2535 | + | |
2525 | 2536 | | |
2526 | 2537 | | |
2527 | 2538 | | |
| |||
0 commit comments