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>
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
#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");
.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,
.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,