diff options
| author | Mike Christie <michael.christie@oracle.com> | 2024-12-03 13:15:12 -0600 |
|---|---|---|
| committer | Michael S. Tsirkin <mst@redhat.com> | 2025-02-25 07:10:46 -0500 |
| commit | bca939d5bcd00d6faea99c47eafd60bed573ef03 (patch) | |
| tree | dc982092681e49f3f175cd46e854a036dc90529a /drivers/vhost/Kconfig | |
| parent | 891b99eab0f89dbe08d216f4ab71acbeaf7a3102 (diff) | |
| download | linux-next-bca939d5bcd00d6faea99c47eafd60bed573ef03.tar.gz linux-next-bca939d5bcd00d6faea99c47eafd60bed573ef03.zip | |
vhost-scsi: Dynamically allocate scatterlists
We currently preallocate scatterlists which have 2048 entries for each
command. For a small device with just 1 queue this results in:
8 MB = 32 bytes per sg * 2048 entries * 128 cmd
When mq is turned on and we increase the virtqueue_size so we can handle
commands from multiple queues in parallel, then this can sky rocket.
This patch allows us to dynamically allocate the scatterlist like is done
with drivers like NVMe and SCSI.
For small IO (4-16K) IOPs testing, we didn't see any regressions, but
for throughput testing we sometimes saw a 2-5% regression when the
backend device was very fast (8 NVMe drives in a MD RAID0 config or a
memory backed device). As a result this patch makes the dynamic
allocation feature a modparam so userspace can decide how it wants to
balance mem use and perf.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Message-Id: <20241203191705.19431-6-michael.christie@oracle.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'drivers/vhost/Kconfig')
| -rw-r--r-- | drivers/vhost/Kconfig | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/vhost/Kconfig b/drivers/vhost/Kconfig index b455d9ab6f3d..020d4fbb947c 100644 --- a/drivers/vhost/Kconfig +++ b/drivers/vhost/Kconfig @@ -47,6 +47,7 @@ config VHOST_SCSI tristate "VHOST_SCSI TCM fabric driver" depends on TARGET_CORE && EVENTFD select VHOST + select SG_POOL default n help Say M here to enable the vhost_scsi TCM fabric module |
