Whamcloud - gitweb
LU-1282 lprocfs: Use present cpu numbers to save memory
authorBobi Jam <bobijam@whamcloud.com>
Thu, 5 Apr 2012 06:25:40 +0000 (14:25 +0800)
committerOleg Drokin <green@whamcloud.com>
Sat, 18 Aug 2012 18:59:02 +0000 (14:59 -0400)
commit763e3f98e9dc4140f8922709277c501a7d3265c0
tree28560f0df7d8b2b6c5297bfd0bc26f99ddf11f61
parent6590e293ff3bdc4ffae6068e24eeefb8ae2d59c7
LU-1282 lprocfs: Use present cpu numbers to save memory

Port of combined patch from master branch:
Commit 65dc702123f91c4fb2ae25604f98e195fcc15544
Commit 8c831cb8a05f0d6f63b88e9b2dfb85ba4eca217a
Commit 560efa06be97651252caff4ba9bc2c014cf62ff9

* lprocfs stats data should allocated by the number of present cpus in
  stead of by possible cpu number which wastes a lot of memory.
* When new cpus are hot-plugged in, alloc necessary percpu array
  elements on demand.
* Add a LPROCFS_STATS_FLAG_IRQ_SAFE flag, when a stat is non-percpu
  stats with this flag, lprocfs_stats_lock() should disable irq.
* OSS minimum thread number also better be decided by online cpu
  number.

Signed-off-by: Bobi Jam <bobijam@whamcloud.com>
Change-Id: I7e80f27123d2e0a6352dc8d01e6ca70b9f137220
Reviewed-on: http://review.whamcloud.com/3607
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/include/libcfs/linux/kp30.h
libcfs/include/libcfs/user-prim.h
libcfs/include/libcfs/winnt/winnt-prim.h
libcfs/libcfs/linux/linux-tracefile.c
lustre/include/lprocfs_status.h
lustre/lvfs/lvfs_lib.c
lustre/obdclass/class_obd.c
lustre/obdclass/lprocfs_status.c
lustre/ost/ost_handler.c