From a2fc8ade10577cd35a6000fdb6e7dd7c570852d6 Mon Sep 17 00:00:00 2001 From: Andrew Gallatin Date: Thu, 7 Jan 2021 12:45:46 -0500 Subject: [PATCH] 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