Whamcloud - gitweb
LU-10948 llite: Introduce inode open heat counter 58/32158/40
authorOleg Drokin <green@whamcloud.com>
Tue, 13 Apr 2021 07:46:41 +0000 (03:46 -0400)
committerOleg Drokin <green@whamcloud.com>
Wed, 12 May 2021 16:36:15 +0000 (16:36 +0000)
commit41d99c4902836b7265db946dfa49cf99381f0db4
tree57acc0c1606e68693ce6359610b9c36ab5935b67
parent32304d863ae98c641f541362f54e7b1f24b350a6
LU-10948 llite: Introduce inode open heat counter

Initial framework to support detection of naive apps that
assume open-closes are "free" and proceed to open/close
same files between minute operations.

We will track number of file opens per inode and last time inode
was closed.

Initially we'll expose these controls:
llite/opencache_threshold_count - enables functionality and controls after how
                                  many opens open lock is requested
llite/opencache_threshold_ms    - if any reopen happens within this time (in
                                  ms), the open would trigger open lock request
llite/opencache_max_ms          - If last close was longer than this many ms
                                  ago - start counting opens from zero again

Once enough useful data is collected we can look into adding a heatmap
or another similar mechanism to better manage it and enable it
by default with sensible settings.

Change-Id: I1aa5455b458840acad651f651c883a7a7a67ab4c
Signed-off-by: Oleg Drokin <green@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/32158
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Yingjin Qian <qian@ddn.com>
lustre/llite/file.c
lustre/llite/llite_internal.h
lustre/llite/llite_lib.c
lustre/llite/lproc_llite.c
lustre/llite/namei.c
lustre/tests/sanity-hsm.sh
lustre/tests/sanity-selinux.sh
lustre/tests/sanity.sh
lustre/tests/test-framework.sh