From aa84d188641fa95b0e66ada438c2ba79f164c0d0 Mon Sep 17 00:00:00 2001 From: Gregoire Pichon Date: Mon, 8 Feb 2016 17:07:24 +0100 Subject: [PATCH] LU-7756 oss: allow larger number of OSS service threads The current static limit on the maximum number of OSS service threads is sometimes not large enough to have enough requests sent to the OST devices. This patch makes this limit tunable with a new module parameter oss_max_threads, so that it can be adapted to the underlying storage hardware. Signed-off-by: Gregoire Pichon Change-Id: I182d1dc0a35b42b85b9c0e2a5413e3a852a4e5c3 Reviewed-on: http://review.whamcloud.com/18350 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: Bob Glossman Tested-by: Maloo Reviewed-by: Oleg Drokin --- lustre/include/lustre_net.h | 1 - lustre/ost/ost_handler.c | 8 ++++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 1a66ff1..b74307f 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -456,7 +456,6 @@ NUM_CACHEPAGES >> (28 - PAGE_CACHE_SHIFT)) #define OSS_NTHRS_INIT (PTLRPC_NTHRS_INIT + 1) #define OSS_NTHRS_BASE 64 -#define OSS_NTHRS_MAX 512 /* threads for handling "create" request */ #define OSS_CR_THR_FACTOR 1 diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 4878bf2..a7283c9 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -47,6 +47,10 @@ #include #include "ost_internal.h" +int oss_max_threads = 512; +CFS_MODULE_PARM(oss_max_threads, "i", int, 0444, + "maximum number of OSS service threads"); + static int oss_num_threads; CFS_MODULE_PARM(oss_num_threads, "i", int, 0444, "number of OSS service threads to start"); @@ -112,7 +116,7 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg) .tc_thr_factor = OSS_THR_FACTOR, .tc_nthrs_init = OSS_NTHRS_INIT, .tc_nthrs_base = OSS_NTHRS_BASE, - .tc_nthrs_max = OSS_NTHRS_MAX, + .tc_nthrs_max = oss_max_threads, .tc_nthrs_user = oss_num_threads, .tc_cpu_affinity = 1, .tc_ctx_tags = LCT_DT_THREAD, @@ -214,7 +218,7 @@ static int ost_setup(struct obd_device *obd, struct lustre_cfg* lcfg) .tc_thr_factor = OSS_THR_FACTOR, .tc_nthrs_init = OSS_NTHRS_INIT, .tc_nthrs_base = OSS_NTHRS_BASE, - .tc_nthrs_max = OSS_NTHRS_MAX, + .tc_nthrs_max = oss_max_threads, .tc_nthrs_user = oss_num_threads, .tc_cpu_affinity = 1, .tc_ctx_tags = LCT_DT_THREAD, -- 1.8.3.1