Whamcloud - gitweb
b=18787
authorzhanghc <zhanghc>
Mon, 8 Jun 2009 16:00:37 +0000 (16:00 +0000)
committerzhanghc <zhanghc>
Mon, 8 Jun 2009 16:00:37 +0000 (16:00 +0000)
disable per-CPU stats data structures for clients stats
to shrink memory usage

i=oleg.drokin@sun.com
i=hongchao.zhang@sun.com

lustre/mdt/mdt_fs.c
lustre/mgs/mgs_fs.c
lustre/obdfilter/filter.c

index 5ce28b4..7c6a489 100644 (file)
@@ -66,7 +66,8 @@ int mdt_export_stats_init(struct obd_device *obd,
         if (newnid) {
                 /* Always add in ldlm_stats */
                 exp->exp_nid_stats->nid_ldlm_stats =
-                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC, 0);
+                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC,
+                                            LPROCFS_STATS_FLAG_NOPERCPU);
                 if (exp->exp_nid_stats->nid_ldlm_stats == NULL)
                         return -ENOMEM;
                 lprocfs_init_ldlm_stats(exp->exp_nid_stats->nid_ldlm_stats);
index 2812f84..586487f 100644 (file)
@@ -79,7 +79,8 @@ static int mgs_export_stats_init(struct obd_device *obd, struct obd_export *exp,
         if (newnid) {
                 /* Always add in ldlm_stats */
                 exp->exp_nid_stats->nid_ldlm_stats =
-                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC, 0);
+                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC, 
+                                            LPROCFS_STATS_FLAG_NOPERCPU);
                 if (exp->exp_nid_stats->nid_ldlm_stats == NULL)
                         return -ENOMEM;
                 lprocfs_init_ldlm_stats(exp->exp_nid_stats->nid_ldlm_stats);
index 8e4d34c..1fdd3b4 100644 (file)
@@ -216,7 +216,7 @@ static int lprocfs_init_rw_stats(struct obd_device *obd,
 
         num_stats = (sizeof(*obd->obd_type->typ_dt_ops) / sizeof(void *)) +
                                                         LPROC_FILTER_LAST - 1;
-        *stats = lprocfs_alloc_stats(num_stats, 0);
+        *stats = lprocfs_alloc_stats(num_stats, LPROCFS_STATS_FLAG_NOPERCPU);
         if (*stats == NULL)
                 return -ENOMEM;
 
@@ -275,8 +275,9 @@ static int filter_export_stats_init(struct obd_device *obd,
                 if (rc)
                         RETURN(rc);
                 /* Always add in ldlm_stats */
-                tmp->nid_ldlm_stats = lprocfs_alloc_stats(LDLM_LAST_OPC -
-                                                          LDLM_FIRST_OPC, 0);
+                tmp->nid_ldlm_stats = 
+                        lprocfs_alloc_stats(LDLM_LAST_OPC - LDLM_FIRST_OPC,
+                                            LPROCFS_STATS_FLAG_NOPERCPU);
                 if (tmp->nid_ldlm_stats == NULL)
                         return -ENOMEM;