Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 06 Feb 2026 14:55:52 +0000
From:      Ed Maste <emaste@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Cc:        Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Subject:   git: 73ab91aaade5 - main - bhyve/virtio-scsi: Unlimit max_sectors
Message-ID:  <698600f8.3c88c.2967f457@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by emaste:

URL: https://cgit.FreeBSD.org/src/commit/?id=73ab91aaade5f33459fda16d9daf6526ab668c42

commit 73ab91aaade5f33459fda16d9daf6526ab668c42
Author:     Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
AuthorDate: 2025-10-29 14:09:43 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2026-02-06 14:55:41 +0000

    bhyve/virtio-scsi: Unlimit max_sectors
    
    The old default of 2 for max_sectors limits performance significantly
    with guest systems where the virtio-scsi driver actually honors this
    value.
    
    As CTL doesn't seem to have any limit of the maximum size of a single
    transfer, set this to INT32_MAX by default.
    
    Reviewed by:    corvink
    Differential Revision: https://reviews.freebsd.org/D53466
---
 usr.sbin/bhyve/pci_virtio_scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/usr.sbin/bhyve/pci_virtio_scsi.c b/usr.sbin/bhyve/pci_virtio_scsi.c
index c7d930b0f4ee..bb0b18c51571 100644
--- a/usr.sbin/bhyve/pci_virtio_scsi.c
+++ b/usr.sbin/bhyve/pci_virtio_scsi.c
@@ -308,7 +308,8 @@ pci_vtscsi_reset(void *vsc)
 		.num_queues = VTSCSI_REQUESTQ,
 		/* Leave room for the request and the response. */
 		.seg_max = VTSCSI_MAXSEG - 2,
-		.max_sectors = 2,
+		/* CTL apparently doesn't have a limit here */
+		.max_sectors = INT32_MAX,
 		.cmd_per_lun = 1,
 		.event_info_size = sizeof(struct pci_vtscsi_event),
 		.sense_size = 96,


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?698600f8.3c88c.2967f457>