summaryrefslogtreecommitdiff
path: root/fs/buffer.c
diff options
context:
space:
mode:
authorKashyap Desai <kashyap.desai@broadcom.com>2020-08-19 18:20:28 +0300
committerJens Axboe <axboe@kernel.dk>2020-09-04 00:20:47 +0300
commitb445547ec1bbd3e7bf4b1c142550942f70527d95 (patch)
tree452adb8f18969cd32966206e046632f1d7ff9b44 /fs/buffer.c
parentf1b49fdc1c64db110aa1315831e5fe0f8599fa56 (diff)
downloadlinux-b445547ec1bbd3e7bf4b1c142550942f70527d95.tar.xz
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 <kashyap.desai@broadcom.com> Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: John Garry <john.garry@huawei.com> Tested-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'fs/buffer.c')
0 files changed, 0 insertions, 0 deletions