From owner-dev-commits-src-main@freebsd.org Thu Jan 7 17:46:56 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D7234D715F; Thu, 7 Jan 2021 17:46:56 +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 "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4DBYZm0p00z3MG9; Thu, 7 Jan 2021 17:46:56 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 0EB7B15311; Thu, 7 Jan 2021 17:46:56 +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 107Hkts4027209; Thu, 7 Jan 2021 17:46:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 107Hkt7s027208; Thu, 7 Jan 2021 17:46:55 GMT (envelope-from git) Date: Thu, 7 Jan 2021 17:46:55 GMT Message-Id: <202101071746.107Hkt7s027208@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: a2fc8ade1057 - main - isci: use maxphys rather than 128KB to size s/g list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a2fc8ade10577cd35a6000fdb6e7dd7c570852d6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Jan 2021 17:46:56 -0000 The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=a2fc8ade10577cd35a6000fdb6e7dd7c570852d6 commit a2fc8ade10577cd35a6000fdb6e7dd7c570852d6 Author: Andrew Gallatin AuthorDate: 2021-01-07 17:45:46 +0000 Commit: Andrew Gallatin CommitDate: 2021-01-07 17:45:46 +0000 isci: use maxphys rather than 128KB to size s/g list In the conversion into a tunable, we converted the size of the s/g list used by the driver to be based off of a hardcoded size of 128k rather than maxphys, this caused performance problems for us. Revert this to use the maxphys tunable. Note that this constant is used to size dynamically allocated things, and not static data structs, so this is safe. Reviewed By: imp, kib, mav Tested By:i dhw Differential Revision: https://reviews.freebsd.org/D28023 Sponsored by: Netflix --- sys/dev/isci/scil/sci_controller_constants.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/isci/scil/sci_controller_constants.h b/sys/dev/isci/scil/sci_controller_constants.h index 40f6b983601d..47712c531986 100644 --- a/sys/dev/isci/scil/sci_controller_constants.h +++ b/sys/dev/isci/scil/sci_controller_constants.h @@ -157,7 +157,7 @@ extern "C" { * posted to hardware always contain pairs of elements (with second * element set to zeroes if not needed). */ -#define __MAXPHYS_ELEMENTS ((128 * 1024 / PAGE_SIZE) + 1) +#define __MAXPHYS_ELEMENTS ((maxphys / PAGE_SIZE) + 1) #define SCI_MAX_SCATTER_GATHER_ELEMENTS ((__MAXPHYS_ELEMENTS + 1) & ~0x1) #endif