linux/include
Jan Kara d7d0098f24 FROMGIT: blk-mq: Improve performance of non-mq IO schedulers with multiple HW queues
Currently when non-mq aware IO scheduler (BFQ, mq-deadline) is used for
a queue with multiple HW queues, the performance it rather bad. The
problem is that these IO schedulers use queue-wide locking and their
dispatch function does not respect the hctx it is passed in and returns
any request it finds appropriate. Thus locality of request access is
broken and dispatch from multiple CPUs just contends on IO scheduler
locks. For these IO schedulers there's little point in dispatching from
multiple CPUs. Instead dispatch always only from a single CPU to limit
contention.

Below is a comparison of dbench runs on XFS filesystem where the storage
is a raid card with 64 HW queues and to it attached a single rotating
disk. BFQ is used as IO scheduler:

      clients           MQ                     SQ             MQ-Patched
Amean 1      39.12 (0.00%)       43.29 * -10.67%*       36.09 *   7.74%*
Amean 2     128.58 (0.00%)      101.30 *  21.22%*       96.14 *  25.23%*
Amean 4     577.42 (0.00%)      494.47 *  14.37%*      508.49 *  11.94%*
Amean 8     610.95 (0.00%)      363.86 *  40.44%*      362.12 *  40.73%*
Amean 16    391.78 (0.00%)      261.49 *  33.25%*      282.94 *  27.78%*
Amean 32    324.64 (0.00%)      267.71 *  17.54%*      233.00 *  28.23%*
Amean 64    295.04 (0.00%)      253.02 *  14.24%*      242.37 *  17.85%*
Amean 512 10281.61 (0.00%)    10211.16 *   0.69%*    10447.53 *  -1.61%*

Numbers are times so lower is better. MQ is stock 5.10-rc6 kernel. SQ is
the same kernel with megaraid_sas.host_tagset_enable=0 so that the card
advertises just a single HW queue. MQ-Patched is a kernel with this
patch applied.

You can see multiple hardware queues heavily hurt performance in
combination with BFQ. The patch restores the performance.

Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
BUG: 187357408
Change-Id: I53645eb48cb308cd3af81a1c5e718a6abec6a1f9
(cherry picked from commit fa56cac78af68bd93734c290a0ffd0716e871dba git://git.kernel.dk/linux-block/ for-5.14/block)
Signed-off-by: Bart Van Assche <bvanassche@google.com>
2021-07-01 22:31:49 -07:00
..
acpi ACPI: scan: Use unique number for instance_no 2021-03-30 14:32:06 +02:00
asm-generic ANDROID: vmlinux.lds.h: Keep .eh_frame with CFI 2021-06-02 21:54:54 +00:00
clocksource
crypto FROMLIST: crypto: shash - stop comparing function pointers to avoid breaking CFI 2021-06-11 07:49:58 +00:00
drm UPSTREAM: drm/drm_vblank: set the dma-fence timestamp during send_vblank_event 2021-04-07 14:20:07 +00:00
dt-bindings FROMGIT: dt-bindings: connector: Replace BIT macro with generic bit ops 2021-06-07 06:15:29 +00:00
keys security: keys: trusted: fix TPM2 authorizations 2021-05-14 09:50:20 +02:00
kunit
kvm
linux FROMGIT: blk-mq: Improve performance of non-mq IO schedulers with multiple HW queues 2021-07-01 22:31:49 -07:00
math-emu
media ANDROID: media: v4l2-core: extend the v4l2 format to support request 2021-06-04 11:15:20 -07:00
memory
misc
net Merge 5.10.43 into android12-5.10 2021-06-12 14:48:14 +02:00
pcmcia
ras
rdma
scsi Fix misc new gcc warnings 2021-05-11 14:47:36 +02:00
soc
sound FROMGIT: ASoC: soc-component: Add snd_soc_pcm_component_ack 2021-04-23 18:42:37 -07:00
target
trace ANDROID: sched: Add trace for __setscheduler_uclamp 2021-07-01 12:31:33 +00:00
uapi ANDROID: start to re-add xt_IDLETIMER send_nl_msg support 2021-06-11 14:54:06 +00:00
vdso
video
xen
OWNERS ANDROID: Add OWNERS files referring to the respective android-mainline OWNERS 2021-04-03 14:11:30 +00:00