From: Sumit Saxena <sumit.saxena@broadcom.com>
To: martin.petersen@oracle.com, axboe@kernel.dk
Cc: linux-scsi@vger.kernel.org, linux-block@vger.kernel.org,
mpi3mr-linuxdrv.pdl@broadcom.com,
Sumit Saxena <sumit.saxena@broadcom.com>
Subject: [PATCH 0/3] scsi/block: NUMA-local allocations and false-sharing fixes
Date: Thu, 2 Apr 2026 13:16:34 +0530 [thread overview]
Message-ID: <20260402074637.92417-1-sumit.saxena@broadcom.com> (raw)
This series contains three performance improvements targeting the SCSI
and block layers on multi-socket NUMA systems.
On multi-socket NUMA systems we observed extreme I/O throughput variance
of 50-60% between runs. This series identifies and fixes two root causes:
cross-node memory accesses due to NUMA-unaware allocations in the scan
path, and false sharing between hot atomic counters in
struct request_queue and struct scsi_device.
The first patch makes the SCSI scan path allocate scsi_device and
scsi_target on the NUMA node of the host adapter.
The second patch addresses false sharing in struct request_queue.
This patch touches include/linux/blkdev.h, so needs review from
linux-block, an Acked-by from the block maintainer is requested before
merging via the SCSI tree.
The third patch addresses a false-sharing problem in struct
scsi_device.
Performance notes:
Tested on a dual-socket NUMA system with an mpi3mr HBA, running fio
(random read, 4K, QD 64, 16 jobs, 60s, direct I/O).
IOPS figures are in KIOPS (thousands of IOPS):
Configuration Avg KIOPS Range (KIOPS) Spread
Baseline 6,255 4,200 - 6,700 ~37%
Baseline + patches 2-3 (align) 6,653 6,000 - 7,000 ~15%
Baseline + all patches (1-3) 6,649 6,400 - 7,000 ~9%
Key findings:
- Cacheline alignment patches (2-3) raise average IOPS by ~6% and
cut throughput spread from ~37% to ~15%.
- Adding the NUMA allocation patch (1) further tightens the spread
to ~9% with negligible impact on average throughput.
- The combined effect reduces the observed 50-60% run-to-run variance
to under 10%, significantly improving workload predictability.
No functional regressions observed.
This patch series is based on Martin's for-next tree.
James Rizzo (3):
scsi: use NUMA-local allocation for sdev and starget
block: align nr_active_requests_shared_tags to avoid cache line
contention
scsi: align scsi_device iodone_cnt to avoid cache line contention
drivers/scsi/scsi_scan.c | 9 ++++++---
include/linux/blkdev.h | 4 +++-
include/scsi/scsi_device.h | 4 +++-
3 files changed, 12 insertions(+), 5 deletions(-)
--
2.43.7
next reply other threads:[~2026-04-02 7:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-02 7:46 Sumit Saxena [this message]
2026-04-02 7:46 ` [PATCH 1/3] scsi: use NUMA-local allocation for sdev and starget Sumit Saxena
2026-04-02 7:46 ` [PATCH 2/3] block: align nr_active_requests_shared_tags to avoid cache line contention Sumit Saxena
2026-04-02 15:54 ` Bart Van Assche
2026-04-09 6:13 ` Sumit Saxena
2026-04-02 7:46 ` [PATCH 3/3] scsi: align scsi_device iodone_cnt " Sumit Saxena
2026-04-02 15:58 ` Bart Van Assche
2026-04-09 6:17 ` Sumit Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260402074637.92417-1-sumit.saxena@broadcom.com \
--to=sumit.saxena@broadcom.com \
--cc=axboe@kernel.dk \
--cc=linux-block@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mpi3mr-linuxdrv.pdl@broadcom.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox