From: zhanghc Date: Mon, 8 Jun 2009 16:00:37 +0000 (+0000) Subject: b=18787 X-Git-Tag: v1_9_220~169 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=7dcefb8de5aa4299f8c9c2d60ce27a6d2fac2db7;p=fs%2Flustre-release.git b=18787 disable per-CPU stats data structures for clients stats to shrink memory usage i=oleg.drokin@sun.com i=hongchao.zhang@sun.com --- diff --git a/lustre/mdt/mdt_fs.c b/lustre/mdt/mdt_fs.c index 5ce28b4..7c6a489 100644 --- a/lustre/mdt/mdt_fs.c +++ b/lustre/mdt/mdt_fs.c @@ -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); diff --git a/lustre/mgs/mgs_fs.c b/lustre/mgs/mgs_fs.c index 2812f84..586487f 100644 --- a/lustre/mgs/mgs_fs.c +++ b/lustre/mgs/mgs_fs.c @@ -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); diff --git a/lustre/obdfilter/filter.c b/lustre/obdfilter/filter.c index 8e4d34c..1fdd3b4 100644 --- a/lustre/obdfilter/filter.c +++ b/lustre/obdfilter/filter.c @@ -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;