diff options
| author | Kashyap Desai <[email protected]> | 2020-08-19 23:20:28 +0800 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2020-09-03 15:20:47 -0600 |
| commit | b445547ec1bbd3e7bf4b1c142550942f70527d95 (patch) | |
| tree | 452adb8f18969cd32966206e046632f1d7ff9b44 /tools/perf/scripts/python | |
| parent | f1b49fdc1c64db110aa1315831e5fe0f8599fa56 (diff) | |
blk-mq, elevator: Count requests per hctx to improve performance
High CPU utilization on "native_queued_spin_lock_slowpath" due to lock
contention is possible for mq-deadline and bfq IO schedulers
when nr_hw_queues is more than one.
It is because kblockd work queue can submit IO from all online CPUs
(through blk_mq_run_hw_queues()) even though only one hctx has pending
commands.
The elevator callback .has_work for mq-deadline and bfq scheduler considers
pending work if there are any IOs on request queue but it does not account
hctx context.
Add a per-hctx 'elevator_queued' count to the hctx to avoid triggering
the elevator even though there are no requests queued.
[jpg: Relocated atomic_dec() in dd_dispatch_request(), update commit message per Kashyap]
Signed-off-by: Kashyap Desai <[email protected]>
Signed-off-by: Hannes Reinecke <[email protected]>
Signed-off-by: John Garry <[email protected]>
Tested-by: Douglas Gilbert <[email protected]>
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions