Repository navigation
Commit 55c022b
block: avoid building too big plug list
When I test fio script with big I/O depth, I found the total throughput drops
compared to some relative small I/O depth. The reason is the thread accumulates
big requests in its plug list and causes some delays (surely this depends
on CPU speed).
I thought we'd better have a threshold for requests. When a threshold reaches,
this means there is no request merge and queue lock contention isn't severe
when pushing per-task requests to queue, so the main advantages of blk plug
don't exist. We can force a plug list flush in this case.
With this, my test throughput actually increases and almost equals to small
I/O depth. Another side effect is irq off time decreases in blk_flush_plug_list()
for big I/O depth.
The BLK_MAX_REQUEST_COUNT is choosen arbitarily, but 16 is efficiently to
reduce lock contention to me. But I'm open here, 32 is ok in my test too.
Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>1 parent 719c0c5 commit 55c022b
2 files changed
Lines changed: 8 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1302 | 1302 | | |
1303 | 1303 | | |
1304 | 1304 | | |
| 1305 | + | |
1305 | 1306 | | |
| 1307 | + | |
| 1308 | + | |
1306 | 1309 | | |
1307 | 1310 | | |
1308 | 1311 | | |
| |||
2626 | 2629 | | |
2627 | 2630 | | |
2628 | 2631 | | |
| 2632 | + | |
2629 | 2633 | | |
2630 | 2634 | | |
2631 | 2635 | | |
| |||
2709 | 2713 | | |
2710 | 2714 | | |
2711 | 2715 | | |
| 2716 | + | |
2712 | 2717 | | |
2713 | 2718 | | |
2714 | 2719 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
862 | 862 | | |
863 | 863 | | |
864 | 864 | | |
| 865 | + | |
865 | 866 | | |
| 867 | + | |
| 868 | + | |
866 | 869 | | |
867 | 870 | | |
868 | 871 | | |
| |||
0 commit comments