Whamcloud - gitweb
LU-1872 ptlrpc: cleanup jobstats in thread context
authorNiu Yawei <niu@whamcloud.com>
Wed, 12 Sep 2012 03:21:31 +0000 (23:21 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 13 Sep 2012 04:19:46 +0000 (00:19 -0400)
commitb5a97934a9f56f5fbe237cbaa9d379df00252687
tree5b02492cd889655cf2f0953d9584af4e6bb70790
parent11c1c55cec2a089a88fd01c052559dcd3c9421db
LU-1872 ptlrpc: cleanup jobstats in thread context

Since cfs_hash function isn't safe in interrupt context, we should
move the jobstats cleanup work into each stats logging function.

If there are any activities, cleanup will be triggerred on logging
time, and the hash table will be shrinked automatically; If there
isn't any activity, the hash table will stop growing, and it can
be cleared manually.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: I1c60e123f67c0ad3b959bbb330282cd07c63a28c
Reviewed-on: http://review.whamcloud.com/3945
Tested-by: Hudson
Reviewed-by: Liang Zhen <liang@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
lustre/include/lprocfs_status.h
lustre/obdclass/lprocfs_jobstats.c