Skip to content

target: fixes and perf improvements

Mike Christie linux-scsi target-devel 1 version Applied

Status from this message: Applied to 5.16/scsi-staging, thanks!

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest5 patches 3 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/5target: fix ordered CMD_T_SENT handlingdrivers/target/target_core_transport.c+5 -51 reply
2/5target: fix ordered tag handlingdrivers/target/target_core_device.c drivers/target/target_core_internal.h drivers/target/target_core_transport.c +1 more+61 -240 replies
3/5target: fix alua_tg_pt_gps_count trackingdrivers/target/target_core_alua.c+0 -10 replies
4/5target: replace lun_tg_pt_gp_lock with rcu in IO pathdrivers/target/target_core_alua.c include/target/target_core_base.h+35 -280 replies
5/5target: perform alua group changes in one stepdrivers/target/target_core_alua.c+16 -70 replies

Reviews trailers per patch

1 of 5 patches has a Reviewed-by or Acked-by.

PatchLee Duncan
1/5R-b
2/5
3/5
4/5
5/5

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/5] target: fixes and perf improvements

The following patches apply to Martin's staging tree or Linus's tree. The patches main goal is to take the locks out of the main IO path but for the case of ordered cmds they also fix a handfull of bugs.

For the locks we currently have:

1. lun_tg_pt_gp_lock
2. delayed_cmd_lock
3. dev_reservation_lock

and this set takes out 1 and 2. With them removed a simple fio:

fio --filename=/dev/sdb --direct=1 --rw=randrw --bs=4k \
--ioengine=libaio --iodepth=64 --numjobs=$NUM_QUEUES

can increase IOPs by up to 30% (from a max of 1.4M to 2M) when using multiple queues and vhost-scsi with the multiple vhost thread patches or tcm loop with nr_hw_queues set.

Note: I normally hit a ceiling of 1.4M IOPs with around 8 queues but with the patches I hit a ceiling at around 16 queues and 2M IOPs.

If I cheat and set emulate_pr=0 so the reservation lock is removed then it scales nicely and you can continue to add a job and queue per CPU (at least up to 20 CPUs which is when I run out of CPUs).