Commit 5421681
blk-ioc: don't hold queue_lock for ioc_lookup_icq()
Currently issue io can grab queue_lock three times from bfq_bio_merge(),
bfq_limit_depth() and bfq_prepare_request(), the queue_lock is not
necessary if icq is already created because both queue and ioc can't be
freed before io issuing is done, hence remove the unnecessary queue_lock
and use rcu to protect radix tree lookup.
Noted this is also a prep patch to support request batch dispatching[1].
[1] https://lore.kernel.org/all/[email protected]/
Signed-off-by: Yu Kuai <[email protected]>
Reviewed-by: Damien Le Moal <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 1da67b5 commit 5421681
2 files changed
+8
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
458 | | - | |
459 | | - | |
460 | 457 | | |
461 | 458 | | |
462 | 459 | | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
467 | | - | |
| 460 | + | |
468 | 461 | | |
469 | 462 | | |
470 | 463 | | |
| |||
2457 | 2450 | | |
2458 | 2451 | | |
2459 | 2452 | | |
2460 | | - | |
2461 | | - | |
2462 | | - | |
2463 | | - | |
2464 | | - | |
2465 | | - | |
2466 | | - | |
2467 | | - | |
2468 | 2453 | | |
| 2454 | + | |
2469 | 2455 | | |
2470 | 2456 | | |
2471 | 2457 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
308 | 308 | | |
309 | 309 | | |
310 | 310 | | |
311 | | - | |
| 311 | + | |
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
| 315 | + | |
| 316 | + | |
316 | 317 | | |
317 | 318 | | |
318 | 319 | | |
319 | 320 | | |
320 | 321 | | |
321 | 322 | | |
322 | | - | |
323 | | - | |
324 | 323 | | |
325 | 324 | | |
326 | | - | |
327 | | - | |
328 | | - | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
329 | 328 | | |
330 | 329 | | |
331 | 330 | | |
| |||
419 | 418 | | |
420 | 419 | | |
421 | 420 | | |
422 | | - | |
423 | | - | |
424 | 421 | | |
425 | | - | |
426 | 422 | | |
427 | 423 | | |
428 | 424 | | |
| |||
0 commit comments