Commit d3da8e9
committed
io_uring/net: add IORING_ACCEPT_POLL_FIRST flag
Similarly to how polling first is supported for receive, it makes sense
to provide the same for accept. An accept operation does a lot of
expensive setup, like allocating an fd, a socket/inode, etc. If no
connection request is already pending, this is wasted and will just be
cleaned up and freed, only to retry via the usual poll trigger.
Add IORING_ACCEPT_POLL_FIRST, which tells accept to only initiate the
accept request if poll says we have something to accept.
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 7dcc758 commit d3da8e9
2 files changed
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
380 | 380 | | |
381 | 381 | | |
382 | 382 | | |
| 383 | + | |
383 | 384 | | |
384 | 385 | | |
385 | 386 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1487 | 1487 | | |
1488 | 1488 | | |
1489 | 1489 | | |
| 1490 | + | |
| 1491 | + | |
| 1492 | + | |
1490 | 1493 | | |
1491 | 1494 | | |
1492 | 1495 | | |
| |||
1499 | 1502 | | |
1500 | 1503 | | |
1501 | 1504 | | |
1502 | | - | |
| 1505 | + | |
1503 | 1506 | | |
1504 | 1507 | | |
1505 | 1508 | | |
| |||
1530 | 1533 | | |
1531 | 1534 | | |
1532 | 1535 | | |
| 1536 | + | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
1533 | 1540 | | |
1534 | 1541 | | |
1535 | 1542 | | |
| |||
0 commit comments