diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 707136bf59cc0124702175d96f286228b46b9395..8b24fb6c225a87da9898953690acd2cc3eed730b 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -63,6 +63,11 @@ Bugzilla : 13039 Description: RedHat Update kernel for RHEL5 Details : Kernel config file for RHEL5. +Severity : minor +Bugzilla : 12446 +Description: OSS needs mutliple precreate threads +Details : Add ability to start more than one create thread per OSS. + -------------------------------------------------------------------------------- 2007-08-27 Cluster File Systems, Inc. <info@clusterfs.com> diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 1bcd3d4e16ada5aefd5c5b3fb76a7fca475ad1e1..803bddcd6b1e12c7584afbd17f8b45b366e7bf5f 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -59,6 +59,10 @@ static int ost_num_threads; CFS_MODULE_PARM(ost_num_threads, "i", int, 0444, "number of OST service threads to start (deprecated)"); +static int oss_num_create_threads; +CFS_MODULE_PARM(oss_num_create_threads, "i", int, 0444, + "number of OSS create threads to start"); + void oti_to_request(struct obd_trans_info *oti, struct ptlrpc_request *req) { struct oti_req_ack_lock *ack_lock; @@ -1663,6 +1667,8 @@ static int ost_setup(struct obd_device *obd, obd_count len, void *buf) struct lprocfs_static_vars lvars; int oss_min_threads; int oss_max_threads; + int oss_min_create_threads; + int oss_max_create_threads; int rc; ENTRY; @@ -1709,13 +1715,27 @@ static int ost_setup(struct obd_device *obd, obd_count len, void *buf) if (rc) GOTO(out_service, rc = -EINVAL); + if (oss_num_create_threads) { + if (oss_num_create_threads > OSS_MAX_CREATE_THREADS) + oss_num_create_threads = OSS_MAX_CREATE_THREADS; + if (oss_num_create_threads < OSS_DEF_CREATE_THREADS) + oss_num_create_threads = OSS_DEF_CREATE_THREADS; + oss_min_create_threads = oss_max_create_threads = + oss_num_create_threads; + } else { + oss_min_create_threads = OSS_DEF_CREATE_THREADS; + oss_max_create_threads = OSS_MAX_CREATE_THREADS; + } + ost->ost_create_service = ptlrpc_init_svc(OST_NBUFS, OST_BUFSIZE, OST_MAXREQSIZE, OST_MAXREPSIZE, OST_CREATE_PORTAL, OSC_REPLY_PORTAL, obd_timeout * 1000, ost_handle, "ost_create", obd->obd_proc_entry, ost_print_req, - 1, 1, "ll_ost_creat"); + oss_min_create_threads, + oss_max_create_threads, + "ll_ost_creat"); if (ost->ost_create_service == NULL) { CERROR("failed to start OST create service\n"); GOTO(out_service, rc = -ENOMEM); diff --git a/lustre/ost/ost_internal.h b/lustre/ost/ost_internal.h index ecc977aec3eb2d2ab32021f703fcc80446fd860c..82a40b90b458420a25d7a8afe0e4189cd1c58b29 100644 --- a/lustre/ost/ost_internal.h +++ b/lustre/ost/ost_internal.h @@ -37,6 +37,9 @@ struct ost_thread_local_cache { struct ost_thread_local_cache *ost_tls(struct ptlrpc_request *r); +#define OSS_DEF_CREATE_THREADS 1UL +#define OSS_MAX_CREATE_THREADS 16UL + /* Quota stuff */ extern quota_interface_t *quota_interface;