Whamcloud - gitweb
LU-11964 mdc: prevent glimpse lock count grow 61/34261/8
authorMikhail Pershin <mpershin@whamcloud.com>
Thu, 14 Feb 2019 21:51:00 +0000 (00:51 +0300)
committerOleg Drokin <green@whamcloud.com>
Thu, 21 Mar 2019 03:42:03 +0000 (03:42 +0000)
commitb915221b6d0f3457fd9dd202a9d14c5f8385bf47
treefb80bc1325b2d9597e89795204595ad0a7a53ff4
parentb2368774a01eb89981e2ceb92be9673e4b403d62
LU-11964 mdc: prevent glimpse lock count grow

DOM locks matching tries to ignore locks with
LDLM_FL_KMS_IGNORE flag during ldlm_lock_match() but
checks that after ldlm_lock_match() call. Therefore if
there is any lock with such flag in queue then all other
locks after it are ignored and new lock is created causing
big amount of locks on single resource in some access
patterns.
Patch extends lock_matches() function to check flags to
exclude and adds ldlm_lock_match_with_skip()p to use that
when needed.
Corresponding test was added in sanity-dom.sh

Test-Parameters: testlist=sanity-dom
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: Ic45ca10f0e603e79a3a00e4fde13a5fae15ea5fc
Reviewed-on: https://review.whamcloud.com/34261
Tested-by: Jenkins
Reviewed-by: Patrick Farrell <pfarrell@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/include/lustre_dlm.h
lustre/include/obd_support.h
lustre/ldlm/ldlm_lock.c
lustre/mdc/mdc_dev.c
lustre/tests/sanity-dom.sh