Whamcloud - gitweb
LU-1282 lprocfs: reduce lprocfs stats memory use
authorBobi Jam <bobijam.xu@intel.com>
Fri, 18 Jan 2013 16:54:32 +0000 (00:54 +0800)
committerOleg Drokin <green@whamcloud.com>
Thu, 31 Jan 2013 06:37:43 +0000 (01:37 -0500)
commitca461f0f7aa3e7db4639e7d67824eeccde13ca96
treeedd255bedf3176ae41613b21fa12766e772c2df1
parent5084bc64c685c6584afd055fab0347f52040cfc2
LU-1282 lprocfs: reduce lprocfs stats memory use

* Move percpu counter common data out, do not need to store them
  redundantly in percpu counter.
* LPROCFS_STATS_FLAG_IRQ_SAFE flag implies three things:
  1. lprocfs_counter needs lc_sum_irq.
  2. when a stats is a percpu counter stat, all its percpu counter
     gets allocated along with the stats itself.
  3. when a stats is a non-percpu stat, lprocfs_stats_lock() needs
     disable irq.
* change lprocfs_counter to make non-irq-safe stats counter do not
  use lc_sum_irq counter, which can save memory.
* Right now, only obd_memory stats use LPROCFS_STATS_FLAG_IRQ_SAFE
  flag.

Signed-off-by: Bobi Jam <bobijam.xu@intel.com>
Change-Id: I2eb037f9dcda983844857fc068c428c4fa387e7a
Reviewed-on: http://review.whamcloud.com/3246
Reviewed-by: Jinshan Xiong <jinshan.xiong@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
lustre/include/lprocfs_status.h
lustre/lvfs/lvfs_lib.c
lustre/lvfs/lvfs_linux.c
lustre/obdclass/lprocfs_jobstats.c
lustre/obdclass/lprocfs_status.c