From nobody Wed Oct 19 18:05:59 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MszDm21zCz4gYL1; Wed, 19 Oct 2022 18:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MszDm1YF9z3xfH; Wed, 19 Oct 2022 18:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666202760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7cIDLvCkR7JDAqS7V+LHqyO9fF+pGwJNo6Qyh/IeYY=; b=hwSY+mjYCcBYNdNk2/8s7M/8hkOw/sul4Vgqke7FvYSlTejRZmvpl5GYFInVi6lVFBy4mO aYc/XNHDiIuIkhFiPiN+8C7gzJZpn4tlJCQCYO8W0Zr5fVUmW5JjJ/thjOTX9JVQmainl4 5WRiQx8l+dJCB4zACFQS2B3yk7yvKujnuMCeVgv8OW26hUhtlpQE7etv5lods7nTGk6KsX rAb2vvUk9fiw5tcLNz11dvrDXd3gPQ7TefkhWIFlGBZfkWfSzd6dIpSz3WkT0UbsiXhZKh BR7NJuoszF8X81nltAld74qgUF0vboXyou8w30lsQkDDI7N5Xw10Xj8SWv5ugg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MszDm0cYKzcHM; Wed, 19 Oct 2022 18:06:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29JI5xJv023759; Wed, 19 Oct 2022 18:05:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29JI5x5m023758; Wed, 19 Oct 2022 18:05:59 GMT (envelope-from git) Date: Wed, 19 Oct 2022 18:05:59 GMT Message-Id: <202210191805.29JI5x5m023758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Alexander Motin Subject: git: f51c1d1dd595 - stable/13 - pvscsi: Advertise maxio of 256k. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f51c1d1dd595ce51059489d7e1248ff6ba39664a Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666202760; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K7cIDLvCkR7JDAqS7V+LHqyO9fF+pGwJNo6Qyh/IeYY=; b=PJFP3Nmv8nvU7DQxsFECKPYCbQM8zabjDXGdEgr7S1p0/uu0UieMue1a4weV6p05bo7tXG lb5Xs9KktldCyhK3uxb8sJdWlaUMat104HBoophtFhAsayiSICFN0gLC3/UN2Ad/pGBoFg 0I8q4EnmSfj7ycfVRM5/pyRGBAWt3wPM5yOMkcgENBc6uudSEvcqKLuL8ccDXuAEQ0xI7Y vH3mjK7Bpa/6a5umfug9eGV/U5UiFfSFJIwW4tEIfxfFl117rOhPwfWN8pNgqfCZaoE9jH AH7ganwGQ6vKKWWcFdEUgQ3aD7LFQyGicGdjJUqA4Jw7i7zcB7coM3vQZFHFlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666202760; a=rsa-sha256; cv=none; b=OQH1/9B9pqJAF3gcNCaEK7aFDQlQ5+dngPzNIsCA+Qz4mhV+weGlnKQmkndPWl8mPeiRIU sS4NNQwlDjAZM0NUn0WlIPWkeOJme/HBeUtZTH3sIQMAb002dCZ5DmnpLV2Wl94WZWCekn 1auxF72wxEpja5OoLPQFmR2xL931UiJ4FBv/GCd8ZrfATe9Bd8xUlHnkBVreZSQWD7GCEu dO4DbIcXpINTUgUE3sLIghk+4AEp0gjTje47FbVTLvvH/kbqDR3fA+R65FbSqhCQabmZk3 uhpySbBAHlEYwfOoOosjM6FoduE98m83obwJ3ECcC5PZ3X07OYRXybQ0ftKxNw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=f51c1d1dd595ce51059489d7e1248ff6ba39664a commit f51c1d1dd595ce51059489d7e1248ff6ba39664a Author: Warner Losh AuthorDate: 2021-04-21 18:10:42 +0000 Commit: Alexander Motin CommitDate: 2022-10-19 17:47:45 +0000 pvscsi: Advertise maxio of 256k. While the PV SCSI SG list can handle 512k of SG entries, it can only do so for I/O that's aligned to 4k or better. newfs_msdos does unaligned I/O, so triggers too long for host errors in cam when a 512k I/O is attempted. Prefer power of 2 256k to the absolute maximum 508k, though that can be revisited should the latter show to give significant performance improvement. MFC After: 3 days Tested by: darius on discord (508k version of patch) Sponsored by: Netflix (cherry picked from commit 9a5a5c1576b4ce308a97e0bce887261701ae3edc) --- sys/dev/vmware/pvscsi/pvscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index 3ca905313897..ad32d2ab4959 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1423,7 +1423,8 @@ finish_ccb: strlcpy(cpi->sim_vid, "VMware", SIM_IDLEN); strlcpy(cpi->hba_vid, "VMware", HBA_IDLEN); strlcpy(cpi->dev_name, cam_sim_name(sim), DEV_IDLEN); - cpi->maxio = PVSCSI_MAX_SG_ENTRIES_PER_SEGMENT * PAGE_SIZE; + /* Limit I/O to 256k since we can't do 512k unaligned I/O */ + cpi->maxio = (PVSCSI_MAX_SG_ENTRIES_PER_SEGMENT / 2) * PAGE_SIZE; cpi->protocol = PROTO_SCSI; cpi->protocol_version = SCSI_REV_SPC2; cpi->transport = XPORT_SAS;