mbox series

[v2,0/2] target: Remove atomics from main IO path

Message ID 20250424032741.16216-1-michael.christie@oracle.com
Headers show
Series target: Remove atomics from main IO path | expand

Message

Mike Christie April 24, 2025, 3:26 a.m. UTC
The following patches made over Linus's tree remove the atomic use from
the main IO path. There was a handful of atomic_longs used just used
for stats and a couple atomics used for handling ordered commands. These
patches move the stats to per cpu, and moves the ordered tracking to a
per cpu counter.

With the patches 8K IOPS increases by up to 33% when running fio
with numjobs >= 4 and using the vhost-scsi target with virtio-scsi
and virtio num_queues >= 4 (jobs and queues match, and virtqueue_size
and cmd_per_lun are increased to match the total iodepth of all
jobs).

v2:
- Fix variable initialization used to add per cpu values.

Comments

Martin K. Petersen April 29, 2025, 1:49 a.m. UTC | #1
Mike,

> The following patches made over Linus's tree remove the atomic use from
> the main IO path. There was a handful of atomic_longs used just used
> for stats and a couple atomics used for handling ordered commands. These
> patches move the stats to per cpu, and moves the ordered tracking to a
> per cpu counter.
>
> With the patches 8K IOPS increases by up to 33% when running fio
> with numjobs >= 4 and using the vhost-scsi target with virtio-scsi
> and virtio num_queues >= 4 (jobs and queues match, and virtqueue_size
> and cmd_per_lun are increased to match the total iodepth of all
> jobs).

Applied to 6.16/scsi-staging, thanks!
Martin K. Petersen May 6, 2025, 4:25 a.m. UTC | #2
On Wed, 23 Apr 2025 22:26:31 -0500, Mike Christie wrote:

> The following patches made over Linus's tree remove the atomic use from
> the main IO path. There was a handful of atomic_longs used just used
> for stats and a couple atomics used for handling ordered commands. These
> patches move the stats to per cpu, and moves the ordered tracking to a
> per cpu counter.
> 
> With the patches 8K IOPS increases by up to 33% when running fio
> with numjobs >= 4 and using the vhost-scsi target with virtio-scsi
> and virtio num_queues >= 4 (jobs and queues match, and virtqueue_size
> and cmd_per_lun are increased to match the total iodepth of all
> jobs).
> 
> [...]

Applied to 6.16/scsi-queue, thanks!

[1/2] target: Move IO path stats to per cpu
      https://git.kernel.org/mkp/scsi/c/9cf2317b795d
[2/2] target: Move delayed/ordered tracking to per cpu
      https://git.kernel.org/mkp/scsi/c/268975a87c7b