* Initialized in mdt_mod_init().
*/
static unsigned long mdt_num_threads;
+CFS_MODULE_PARM(mdt_num_threads, "ul", ulong, 0444,
+ "number of mdt service threads to start");
+
+static char *mdt_cpts;
+CFS_MODULE_PARM(mdt_cpts, "c", charp, 0444,
+ "CPU partitions MDT threads should run on");
+
+static unsigned long mdt_rdpg_num_threads;
+CFS_MODULE_PARM(mdt_rdpg_num_threads, "ul", ulong, 0444,
+ "number of mdt readpage service threads to start");
+
+static char *mdt_rdpg_cpts;
+CFS_MODULE_PARM(mdt_rdpg_cpts, "c", charp, 0444,
+ "CPU partitions MDT readpage threads should run on");
+
+/* NB: these two should be removed along with setattr service in the future */
+static unsigned long mdt_attr_num_threads;
+CFS_MODULE_PARM(mdt_attr_num_threads, "ul", ulong, 0444,
+ "number of mdt setattr service threads to start");
+
+static char *mdt_attr_cpts;
+CFS_MODULE_PARM(mdt_attr_cpts, "c", charp, 0444,
+ "CPU partitions MDT setattr threads should run on");
/* ptlrpc request handler for MDT. All handlers are
* grouped into several slices - struct mdt_opc_slice,
*/
.psc_thr = {
.tc_thr_name = LUSTRE_MDT_NAME,
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
+ .tc_thr_factor = MDT_THR_FACTOR,
+ .tc_nthrs_init = MDT_NTHRS_INIT,
+ .tc_nthrs_base = MDT_NTHRS_BASE,
+ .tc_nthrs_max = MDT_NTHRS_MAX,
.tc_nthrs_user = mdt_num_threads,
+ .tc_cpu_affinity = 1,
.tc_ctx_tags = LCT_MD_THREAD,
},
+ .psc_cpt = {
+ .cc_pattern = mdt_cpts,
+ },
.psc_ops = {
.so_req_handler = mdt_regular_handle,
.so_req_printer = target_print_req,
},
.psc_thr = {
.tc_thr_name = "mdt_rdpg",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_thr_factor = MDT_RDPG_THR_FACTOR,
+ .tc_nthrs_init = MDT_RDPG_NTHRS_INIT,
+ .tc_nthrs_base = MDT_RDPG_NTHRS_BASE,
+ .tc_nthrs_max = MDT_RDPG_NTHRS_MAX,
+ .tc_nthrs_user = mdt_rdpg_num_threads,
+ .tc_cpu_affinity = 1,
.tc_ctx_tags = LCT_MD_THREAD,
},
+ .psc_cpt = {
+ .cc_pattern = mdt_rdpg_cpts,
+ },
.psc_ops = {
.so_req_handler = mdt_readpage_handle,
.so_req_printer = target_print_req,
},
.psc_thr = {
.tc_thr_name = "mdt_attr",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_thr_factor = MDT_SETA_THR_FACTOR,
+ .tc_nthrs_init = MDT_SETA_NTHRS_INIT,
+ .tc_nthrs_base = MDT_SETA_NTHRS_BASE,
+ .tc_nthrs_max = MDT_SETA_NTHRS_MAX,
+ .tc_nthrs_user = mdt_attr_num_threads,
+ .tc_cpu_affinity = 1,
.tc_ctx_tags = LCT_MD_THREAD,
},
+ .psc_cpt = {
+ .cc_pattern = mdt_attr_cpts,
+ },
.psc_ops = {
.so_req_handler = mdt_regular_handle,
.so_req_printer = target_print_req,
},
.psc_thr = {
.tc_thr_name = "mdt_mdsc",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_nthrs_init = MDT_OTHR_NTHRS_INIT,
+ .tc_nthrs_max = MDT_OTHR_NTHRS_MAX,
.tc_ctx_tags = LCT_MD_THREAD,
},
.psc_ops = {
},
.psc_thr = {
.tc_thr_name = "mdt_mdss",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_nthrs_init = MDT_OTHR_NTHRS_INIT,
+ .tc_nthrs_max = MDT_OTHR_NTHRS_MAX,
.tc_ctx_tags = LCT_MD_THREAD | LCT_DT_THREAD
},
.psc_ops = {
},
.psc_thr = {
.tc_thr_name = "mdt_dtss",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_nthrs_init = MDT_OTHR_NTHRS_INIT,
+ .tc_nthrs_max = MDT_OTHR_NTHRS_MAX,
.tc_ctx_tags = LCT_MD_THREAD | LCT_DT_THREAD
},
.psc_ops = {
},
.psc_thr = {
.tc_thr_name = "mdt_fld",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_nthrs_init = MDT_OTHR_NTHRS_INIT,
+ .tc_nthrs_max = MDT_OTHR_NTHRS_MAX,
.tc_ctx_tags = LCT_DT_THREAD | LCT_MD_THREAD
},
.psc_ops = {
},
.psc_thr = {
.tc_thr_name = "mdt_mds",
- .tc_nthrs_min = MDT_MIN_THREADS,
- .tc_nthrs_max = MDT_MAX_THREADS,
- .tc_nthrs_user = mdt_num_threads,
+ .tc_nthrs_init = MDT_OTHR_NTHRS_INIT,
+ .tc_nthrs_max = MDT_OTHR_NTHRS_MAX,
.tc_ctx_tags = LCT_MD_THREAD,
},
.psc_ops = {
err_free:
lut_client_free(exp);
err:
- CERROR("%s: Error %d while initializing export\n",
+ CERROR("%s: Failed to initialize export: rc = %d\n",
exp->exp_obd->obd_name, rc);
return rc;
}
MODULE_DESCRIPTION("Lustre Meta-data Target ("LUSTRE_MDT_NAME")");
MODULE_LICENSE("GPL");
-CFS_MODULE_PARM(mdt_num_threads, "ul", ulong, 0444,
- "number of mdt service threads to start");
-
cfs_module(mdt, "0.2.0", mdt_mod_init, mdt_mod_exit);