[lustre-devel] [PATCH 17/20] lnet: Router test interop check and aarch fix

James Simmons jsimmons at infradead.org
Fri Oct 14 14:38:08 PDT 2022


From: Chris Horn <chris.horn at hpe.com>

Enabling routing may fail on nodes with small amount of memory (like
aarch config). Define small number of router buffers to work around
this issue. Modify the functions which calculate the number of buffers
to allow small sizes to be specified via parameters.

WC-bug-id: https://jira.whamcloud.com/browse/LU-15595
Lustre-commit: 1aba6b0d9b661d369 ("LU-15595 tests: Router test interop check and aarch fix")
Signed-off-by: Chris Horn <chris.horn at hpe.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/48578
Reviewed-by: Frank Sehr <fsehr at whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff at hpe.com>
Reviewed-by: Oleg Drokin <green at whamcloud.com>
Signed-off-by: James Simmons <jsimmons at infradead.org>
---
 net/lnet/lnet/router.c | 24 ++++++++++++++++++------
 1 file changed, 18 insertions(+), 6 deletions(-)

diff --git a/net/lnet/lnet/router.c b/net/lnet/lnet/router.c
index 5d1e5a05a9fb..ee4f1d84dc9f 100644
--- a/net/lnet/lnet/router.c
+++ b/net/lnet/lnet/router.c
@@ -1405,11 +1405,15 @@ lnet_nrb_tiny_calculate(void)
 		return -EINVAL;
 	}
 
-	if (tiny_router_buffers > 0)
+	if (tiny_router_buffers > 0) {
+		if (tiny_router_buffers < LNET_NRB_TINY_MIN)
+			CWARN("tiny_router_buffers=%d less than recommended minimum %d\n",
+			      tiny_router_buffers, LNET_NRB_TINY_MIN);
 		nrbs = tiny_router_buffers;
+	}
 
 	nrbs /= LNET_CPT_NUMBER;
-	return max(nrbs, LNET_NRB_TINY_MIN);
+	return max(nrbs, 1);
 }
 
 static int
@@ -1424,11 +1428,15 @@ lnet_nrb_small_calculate(void)
 		return -EINVAL;
 	}
 
-	if (small_router_buffers > 0)
+	if (small_router_buffers > 0) {
+		if (small_router_buffers < LNET_NRB_SMALL_MIN)
+			CWARN("small_router_buffers=%d less than recommended minimum %d\n",
+			      small_router_buffers, LNET_NRB_SMALL_MIN);
 		nrbs = small_router_buffers;
+	}
 
 	nrbs /= LNET_CPT_NUMBER;
-	return max(nrbs, LNET_NRB_SMALL_MIN);
+	return max(nrbs, 1);
 }
 
 static int
@@ -1443,11 +1451,15 @@ lnet_nrb_large_calculate(void)
 		return -EINVAL;
 	}
 
-	if (large_router_buffers > 0)
+	if (large_router_buffers > 0) {
+		if (large_router_buffers < LNET_NRB_LARGE_MIN)
+			CWARN("large_router_buffers=%d less than recommended minimum %d\n",
+			      large_router_buffers, LNET_NRB_LARGE_MIN);
 		nrbs = large_router_buffers;
+	}
 
 	nrbs /= LNET_CPT_NUMBER;
-	return max(nrbs, LNET_NRB_LARGE_MIN);
+	return max(nrbs, 1);
 }
 
 int
-- 
2.27.0



More information about the lustre-devel mailing list