Whamcloud - gitweb
LU-10664 dom: non-blocking enqueue for DOM locks 03/36903/25
authorMikhail Pershin <mpershin@whamcloud.com>
Sun, 1 Dec 2019 06:41:37 +0000 (09:41 +0300)
committerOleg Drokin <green@whamcloud.com>
Mon, 14 Dec 2020 02:46:29 +0000 (02:46 +0000)
commit3c75d2522786a2a86db450a44da4e764d5ea8f30
tree53dfde532ee5c70f0b241f0e43a9dceb36c6e42b
parente39d6451efb1d05ce7bb62eb0a91aebe7af302d9
LU-10664 dom: non-blocking enqueue for DOM locks

DOM lock enqueue waits for blocking locks on MDT due to
ATOMIC flag, so MDT thread is blocked until lock is granted.
When many clients attempt to write to shared file that may
cause server thread starvation and lock contention. Switch
to non-atomic lock enqueue for DOM locks.

- switch IO lock to non-intent enqueue, so it doesn't consume
  server thread for a long time being blocked
- on client take LVB from l_lvb_data updated by completion AST and
  update l_ost_lvb used by DoM
- make glimpse performing similarly on MDT and OST, it uses one
  format with no intent buffer and return data in LVB buffer
- introduce new connect flag 'dom_lvb' for compatibility reasons
- on server handle glimpse for both old and new clients by filling
  either LVB reply buffer or mdt_body buffer
- don't take RPC slot for a DOM enqueue like it is done for EXTENT
  locks, update ldlm_cli_enqueue_fini() to accept ldlm_enqueue_info
  as parameter
- check that there is no atomic local lock issued with mandatory DOM
  bit, trybits should be used

Test-Parameters: mdssizegb=20 testlist=dom-performance
Test-Parameters: testlist=sanity-dom clientversion=2.12
Test-Parameters: testlist=sanity-dom serverversion=2.12
Signed-off-by: Mikhail Pershin <mpershin@whamcloud.com>
Change-Id: I06573018126f0663a8f76dce07e126a1879cfba5
Reviewed-on: https://review.whamcloud.com/36903
Reviewed-by: Vitaly Fertman <vitaly.fertman@hpe.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
19 files changed:
lustre/include/lustre_dlm.h
lustre/include/lustre_export.h
lustre/include/uapi/linux/lustre/lustre_idl.h
lustre/ldlm/ldlm_inodebits.c
lustre/ldlm/ldlm_request.c
lustre/llite/llite_lib.c
lustre/mdc/mdc_dev.c
lustre/mdc/mdc_internal.h
lustre/mdc/mdc_locks.c
lustre/mdt/mdt_handler.c
lustre/mdt/mdt_io.c
lustre/mdt/mdt_lvb.c
lustre/obdclass/lprocfs_status.c
lustre/osc/osc_request.c
lustre/ptlrpc/wiretest.c
lustre/quota/qsd_request.c
lustre/tests/sanity-dom.sh
lustre/utils/wirecheck.c
lustre/utils/wiretest.c