Commit f46b9cd
io_uring: limit local tw done
Instead of eagerly running all available local tw, limit the amount of
local tw done to the max of IO_LOCAL_TW_DEFAULT_MAX (20) or wait_nr. The
value of 20 is chosen as a reasonable heuristic to allow enough work
batching but also keep latency down.
Add a retry_llist that maintains a list of local tw that couldn't be
done in time. No synchronisation is needed since it is only modified
within the task context.
Signed-off-by: David Wei <dw@davidwei.uk>
Link: https://lore.kernel.org/r/20241120221452.3762588-3-dw@davidwei.uk
Signed-off-by: Jens Axboe <axboe@kernel.dk>1 parent 40cfe55 commit f46b9cd
File tree
3 files changed
+34
-12
lines changed- include/linux
- io_uring
3 files changed
+34
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
335 | 335 | | |
336 | 336 | | |
337 | 337 | | |
| 338 | + | |
338 | 339 | | |
339 | 340 | | |
340 | 341 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
125 | 126 | | |
126 | 127 | | |
127 | 128 | | |
| |||
1256 | 1257 | | |
1257 | 1258 | | |
1258 | 1259 | | |
| 1260 | + | |
| 1261 | + | |
1259 | 1262 | | |
1260 | 1263 | | |
1261 | 1264 | | |
| |||
1270 | 1273 | | |
1271 | 1274 | | |
1272 | 1275 | | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
| 1280 | + | |
| 1281 | + | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
| 1288 | + | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
| 1294 | + | |
1273 | 1295 | | |
1274 | 1296 | | |
1275 | 1297 | | |
1276 | 1298 | | |
1277 | 1299 | | |
1278 | | - | |
| 1300 | + | |
1279 | 1301 | | |
1280 | 1302 | | |
1281 | 1303 | | |
1282 | 1304 | | |
1283 | 1305 | | |
| 1306 | + | |
1284 | 1307 | | |
| 1308 | + | |
| 1309 | + | |
| 1310 | + | |
| 1311 | + | |
1285 | 1312 | | |
1286 | 1313 | | |
1287 | 1314 | | |
1288 | 1315 | | |
1289 | 1316 | | |
1290 | | - | |
1291 | | - | |
1292 | | - | |
1293 | | - | |
1294 | | - | |
1295 | | - | |
1296 | | - | |
1297 | | - | |
1298 | | - | |
1299 | | - | |
| 1317 | + | |
| 1318 | + | |
1300 | 1319 | | |
1301 | 1320 | | |
| 1321 | + | |
1302 | 1322 | | |
1303 | 1323 | | |
| 1324 | + | |
1304 | 1325 | | |
1305 | 1326 | | |
1306 | 1327 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
349 | 349 | | |
350 | 350 | | |
351 | 351 | | |
352 | | - | |
| 352 | + | |
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| |||
0 commit comments