Whamcloud - gitweb
LU-13326 mds: remove MDS_SETATTR_PORTAL and service 98/37798/7
authorAndreas Dilger <adilger@whamcloud.com>
Wed, 4 Mar 2020 20:28:26 +0000 (12:28 -0800)
committerOleg Drokin <green@whamcloud.com>
Tue, 27 Jul 2021 21:36:13 +0000 (21:36 +0000)
Remove the MDS_SETATTR_PORTAL and the service threads listening on
this portal since they are unused since Lustre 2.1 and are no longer
needed.

Remove module tunables related to the mds_attr service threads:
- mds_attr_num_threads
- mds_attr_cpu_bind
- mds_attr_num_cpts

Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I64f4f3f0004e1895ef7b49b31a4ad687a1abcca2
Reviewed-on: https://review.whamcloud.com/37798
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/mdt/mdt_mds.c

index d9e0f66..0dc8cea 100644 (file)
@@ -88,15 +88,11 @@ extern "C" {
 
 #define CONNMGR_REQUEST_PORTAL          1
 #define CONNMGR_REPLY_PORTAL            2
-/* #define OSC_REQUEST_PORTAL           3*/
 #define OSC_REPLY_PORTAL                4
-/*#define OSC_BULK_PORTAL               5*/
 #define OST_IO_PORTAL                   6
 #define OST_CREATE_PORTAL               7
 #define OST_BULK_PORTAL                 8
-/*#define MDC_REQUEST_PORTAL            9*/
 #define MDC_REPLY_PORTAL               10
-/*#define MDC_BULK_PORTAL              11*/
 #define MDS_REQUEST_PORTAL             12
 #define MDS_IO_PORTAL                  13
 #define MDS_BULK_PORTAL                14
@@ -104,10 +100,7 @@ extern "C" {
 #define LDLM_CB_REPLY_PORTAL           16
 #define LDLM_CANCEL_REQUEST_PORTAL     17
 #define LDLM_CANCEL_REPLY_PORTAL       18
-/*#define PTLBD_REQUEST_PORTAL         19*/
-/*#define PTLBD_REPLY_PORTAL           20*/
-/*#define PTLBD_BULK_PORTAL            21*/
-#define MDS_SETATTR_PORTAL             22
+/* #define MDS_SETATTR_PORTAL             22 obsolete after 2.13 */
 #define MDS_READPAGE_PORTAL            23
 #define OUT_PORTAL                     24
 #define MGC_REPLY_PORTAL               25
index 9311d72..85b5b13 100644 (file)
@@ -60,7 +60,6 @@ struct mds_device {
        struct ptlrpc_service   *mds_regular_service;
        struct ptlrpc_service   *mds_readpage_service;
        struct ptlrpc_service   *mds_out_service;
-       struct ptlrpc_service   *mds_setattr_service;
        struct ptlrpc_service   *mds_mdsc_service;
        struct ptlrpc_service   *mds_mdss_service;
        struct ptlrpc_service   *mds_fld_service;
@@ -116,22 +115,6 @@ module_param(mds_rdpg_num_cpts, charp, 0444);
 MODULE_PARM_DESC(mds_rdpg_num_cpts,
                 "CPU partitions MDS readpage threads should run on");
 
-/* NB: these two should be removed along with setattr service in the future */
-static unsigned long mds_attr_num_threads;
-module_param(mds_attr_num_threads, ulong, 0444);
-MODULE_PARM_DESC(mds_attr_num_threads,
-                "number of MDS setattr service threads to start");
-
-static unsigned int mds_attr_cpu_bind = 1;
-module_param(mds_attr_cpu_bind, uint, 0444);
-MODULE_PARM_DESC(mds_attr_cpu_bind,
-                "bind MDS setattr threads to particular CPU partitions");
-
-static char *mds_attr_num_cpts;
-module_param(mds_attr_num_cpts, charp, 0444);
-MODULE_PARM_DESC(mds_attr_num_cpts,
-                "CPU partitions MDS setattr threads should run on");
-
 /* device init/fini methods */
 static void mds_stop_ptlrpc_service(struct mds_device *m)
 {
@@ -150,10 +133,6 @@ static void mds_stop_ptlrpc_service(struct mds_device *m)
                ptlrpc_unregister_service(m->mds_out_service);
                m->mds_out_service = NULL;
        }
-       if (m->mds_setattr_service != NULL) {
-               ptlrpc_unregister_service(m->mds_setattr_service);
-               m->mds_setattr_service = NULL;
-       }
        if (m->mds_mdsc_service != NULL) {
                ptlrpc_unregister_service(m->mds_mdsc_service);
                m->mds_mdsc_service = NULL;
@@ -282,55 +261,6 @@ static int mds_start_ptlrpc_service(struct mds_device *m)
                GOTO(err_mds_svc, rc);
        }
 
-       /*
-        * setattr service configuration.
-        *
-        * XXX To keep the compatibility with old client(< 2.2), we need to
-        * preserve this portal for a certain time, it should be removed
-        * eventually. LU-617.
-        */
-       memset(&conf, 0, sizeof(conf));
-       conf = (typeof(conf)) {
-               .psc_name               = LUSTRE_MDT_NAME "_setattr",
-               .psc_watchdog_factor    = MDT_SERVICE_WATCHDOG_FACTOR,
-               .psc_buf                = {
-                       .bc_nbufs               = MDS_NBUFS,
-                       .bc_buf_size            = MDS_BUFSIZE,
-                       .bc_req_max_size        = MDS_MAXREQSIZE,
-                       .bc_rep_max_size        = MDS_LOV_MAXREPSIZE,
-                       .bc_req_portal          = MDS_SETATTR_PORTAL,
-                       .bc_rep_portal          = MDC_REPLY_PORTAL,
-               },
-               .psc_thr                = {
-                       .tc_thr_name            = LUSTRE_MDT_NAME "_attr",
-                       .tc_thr_factor          = MDS_SETA_THR_FACTOR,
-                       .tc_nthrs_init          = MDS_SETA_NTHRS_INIT,
-                       .tc_nthrs_base          = MDS_SETA_NTHRS_BASE,
-                       .tc_nthrs_max           = MDS_SETA_NTHRS_MAX,
-                       .tc_nthrs_user          = mds_attr_num_threads,
-                       .tc_cpu_bind            = mds_attr_cpu_bind,
-                       .tc_ctx_tags            = LCT_MD_THREAD,
-               },
-               .psc_cpt                = {
-                       .cc_pattern             = mds_attr_num_cpts,
-                       .cc_affinity            = true,
-               },
-               .psc_ops                = {
-                       .so_req_handler         = tgt_request_handle,
-                       .so_req_printer         = target_print_req,
-                       .so_hpreq_handler       = NULL,
-               },
-       };
-       m->mds_setattr_service = ptlrpc_register_service(&conf, &obd->obd_kset,
-                                                        obd->obd_debugfs_entry);
-       if (IS_ERR(m->mds_setattr_service)) {
-               rc = PTR_ERR(m->mds_setattr_service);
-               CERROR("failed to start setattr service: %d\n", rc);
-               m->mds_setattr_service = NULL;
-
-               GOTO(err_mds_svc, rc);
-       }
-
        /* Object update service */
        conf = (typeof(conf)) {
                .psc_name               = LUSTRE_MDT_NAME "_out",
@@ -667,7 +597,6 @@ static int mds_health_check(const struct lu_env *env, struct obd_device *obd)
        rc |= ptlrpc_service_health_check(mds->mds_regular_service);
        rc |= ptlrpc_service_health_check(mds->mds_readpage_service);
        rc |= ptlrpc_service_health_check(mds->mds_out_service);
-       rc |= ptlrpc_service_health_check(mds->mds_setattr_service);
        rc |= ptlrpc_service_health_check(mds->mds_mdsc_service);
        rc |= ptlrpc_service_health_check(mds->mds_mdss_service);
        rc |= ptlrpc_service_health_check(mds->mds_fld_service);