Whamcloud - gitweb
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>