Whamcloud - gitweb
LU-7756 oss: allow larger number of OSS service threads 50/18350/2
authorGregoire Pichon <gregoire.pichon@bull.net>
Mon, 8 Feb 2016 16:07:24 +0000 (17:07 +0100)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 14 Mar 2016 02:42:17 +0000 (02:42 +0000)
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 <gregoire.pichon@bull.net>
Change-Id: I182d1dc0a35b42b85b9c0e2a5413e3a852a4e5c3
Reviewed-on: http://review.whamcloud.com/18350
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Bob Glossman <bob.glossman@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/include/lustre_net.h
lustre/ost/ost_handler.c

index 1a66ff1..b74307f 100644 (file)
                                NUM_CACHEPAGES >> (28 - PAGE_CACHE_SHIFT))
 #define OSS_NTHRS_INIT         (PTLRPC_NTHRS_INIT + 1)
 #define OSS_NTHRS_BASE         64
                                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
 
 /* threads for handling "create" request */
 #define OSS_CR_THR_FACTOR      1
index 4878bf2..a7283c9 100644 (file)
 #include <obd_class.h>
 #include "ost_internal.h"
 
 #include <obd_class.h>
 #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");
 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_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,
                        .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_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,
                        .tc_nthrs_user          = oss_num_threads,
                        .tc_cpu_affinity        = 1,
                        .tc_ctx_tags            = LCT_DT_THREAD,