sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget+/translations/zh_CN/filesystems/gfs2-glocksmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/zh_TW/filesystems/gfs2-glocksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/it_IT/filesystems/gfs2-glocksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ja_JP/filesystems/gfs2-glocksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/ko_KR/filesystems/gfs2-glocksmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget+/translations/sp_SP/filesystems/gfs2-glocksmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhhE/var/lib/git/docbuild/linux/Documentation/filesystems/gfs2-glocks.rsthKubhsection)}(hhh](htitle)}(hGlock internal locking rulesh]hGlock internal locking rules}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThis documents the basic principles of the glock state machine internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h) has two main (internal) locks:h]hThis documents the basic principles of the glock state machine internals. Each glock (struct gfs2_glock in fs/gfs2/incore.h) has two main (internal) locks:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh block_quote)}(hX1. A spinlock (gl_lockref.lock) which protects the internal state such as gl_state, gl_target and the list of holders (gl_holders) 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other threads from making calls to the DLM, etc. at the same time. If a thread takes this lock, it must then call run_queue (usually via the workqueue) when it releases it in order to ensure any pending tasks are completed. h]henumerated_list)}(hhh](h list_item)}(hA spinlock (gl_lockref.lock) which protects the internal state such as gl_state, gl_target and the list of holders (gl_holders)h]h)}(hA spinlock (gl_lockref.lock) which protects the internal state such as gl_state, gl_target and the list of holders (gl_holders)h]hA spinlock (gl_lockref.lock) which protects the internal state such as gl_state, gl_target and the list of holders (gl_holders)}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubh)}(hXA non-blocking bit lock, GLF_LOCK, which is used to prevent other threads from making calls to the DLM, etc. at the same time. If a thread takes this lock, it must then call run_queue (usually via the workqueue) when it releases it in order to ensure any pending tasks are completed. h]h)}(hXA non-blocking bit lock, GLF_LOCK, which is used to prevent other threads from making calls to the DLM, etc. at the same time. If a thread takes this lock, it must then call run_queue (usually via the workqueue) when it releases it in order to ensure any pending tasks are completed.h]hXA non-blocking bit lock, GLF_LOCK, which is used to prevent other threads from making calls to the DLM, etc. at the same time. If a thread takes this lock, it must then call run_queue (usually via the workqueue) when it releases it in order to ensure any pending tasks are completed.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhubah}(h]h ]h"]h$]h&]uh1hhhubeh}(h]h ]h"]h$]h&]enumtypearabicprefixhsuffix.uh1hhhubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubh)}(hXThe gl_holders list contains all the queued lock requests (not just the holders) associated with the glock. If there are any held locks, then they will be contiguous entries at the head of the list. Locks are granted in strictly the order that they are queued.h]hXThe gl_holders list contains all the queued lock requests (not just the holders) associated with the glock. If there are any held locks, then they will be contiguous entries at the head of the list. Locks are granted in strictly the order that they are queued.}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hThere are three lock states that users of the glock layer can request, namely shared (SH), deferred (DF) and exclusive (EX). Those translate to the following DLM lock modes:h]hThere are three lock states that users of the glock layer can request, namely shared (SH), deferred (DF) and exclusive (EX). Those translate to the following DLM lock modes:}(hj5hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jMhjJubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhjJubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK5uh1jMhjJubhthead)}(hhh]hrow)}(hhh](hentry)}(hhh]h)}(h Glock modeh]h Glock mode}(hj|hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjyubah}(h]h ]h"]h$]h&]uh1jwhjtubjx)}(hhh]h)}(hDLMh]hDLM}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjtubjx)}(hhh]h)}(h lock modeh]h lock mode}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjtubeh}(h]h ]h"]h$]h&]uh1jrhjoubah}(h]h ]h"]h$]h&]uh1jmhjJubhtbody)}(hhh](js)}(hhh](jx)}(hhh]h)}(hUNh]hUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hIV/NLh]hIV/NL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h2Unlocked (no DLM lock associated with glock) or NLh]h2Unlocked (no DLM lock associated with glock) or NL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hSHh]hSH}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hj ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hPRh]hPR}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hj7ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h(Protected read)h]h(Protected read)}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK!hjNubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hDFh]hDF}(hjqhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjnubah}(h]h ]h"]h$]h&]uh1jwhjkubjx)}(hhh]h)}(hCWh]hCW}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jwhjkubjx)}(hhh]h)}(h(Concurrent write)h]h(Concurrent write)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK"hjubah}(h]h ]h"]h$]h&]uh1jwhjkubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hEXh]hEX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hEXh]hEX}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h (Exclusive)h]h (Exclusive)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK#hjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubeh}(h]h ]h"]h$]h&]uh1jhjJubeh}(h]h ]h"]h$]h&]colsKuh1jHhjEubah}(h]h ]h"]h$]h&]uh1jChhhhhhhNubh)}(hX!Thus DF is basically a shared mode which is incompatible with the "normal" shared lock mode, SH. In GFS2 the DF mode is used exclusively for direct I/O operations. The glocks are basically a lock plus some routines which deal with cache management. The following rules apply for the cache:h]hX%Thus DF is basically a shared mode which is incompatible with the “normal” shared lock mode, SH. In GFS2 the DF mode is used exclusively for direct I/O operations. The glocks are basically a lock plus some routines which deal with cache management. The following rules apply for the cache:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK&hhhhubjD)}(hhh]jI)}(hhh](jN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jMhj+ubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhj+ubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jMhj+ubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jMhj+ubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhj+ubjn)}(hhh]js)}(hhh](jx)}(hhh]h)}(h Glock modeh]h Glock mode}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjfubah}(h]h ]h"]h$]h&]uh1jwhjcubjx)}(hhh]h)}(hCache Metadatah]hCache Metadata}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hj}ubah}(h]h ]h"]h$]h&]uh1jwhjcubjx)}(hhh]h)}(h Cache datah]h Cache data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jwhjcubjx)}(hhh]h)}(h Dirty Datah]h Dirty Data}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jwhjcubjx)}(hhh]h)}(hDirty Metadatah]hDirty Metadata}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjubah}(h]h ]h"]h$]h&]uh1jwhjcubeh}(h]h ]h"]h$]h&]uh1jrhj`ubah}(h]h ]h"]h$]h&]uh1jmhj+ubj)}(hhh](js)}(hhh](jx)}(hhh]h)}(hUNh]hUN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hj0ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjGubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hDFh]hDF}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjgubah}(h]h ]h"]h$]h&]uh1jwhjdubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hj~ubah}(h]h ]h"]h$]h&]uh1jwhjdubjx)}(hhh]h)}(hNoh]hNo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jwhjdubjx)}(hhh]h)}(hNoh]hNo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jwhjdubjx)}(hhh]h)}(hNoh]hNo}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jwhjdubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hSHh]hSH}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hj(ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hNoh]hNo}(hjBhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK0hj?ubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubjs)}(hhh](jx)}(hhh]h)}(hEXh]hEX}(hjbhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hj_ubah}(h]h ]h"]h$]h&]uh1jwhj\ubjx)}(hhh]h)}(hYesh]hYes}(hjyhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjvubah}(h]h ]h"]h$]h&]uh1jwhj\ubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jwhj\ubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jwhj\ubjx)}(hhh]h)}(hYesh]hYes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jwhj\ubeh}(h]h ]h"]h$]h&]uh1jrhjubeh}(h]h ]h"]h$]h&]uh1jhj+ubeh}(h]h ]h"]h$]h&]colsKuh1jHhj(ubah}(h]h ]h"]h$]h&]uh1jChhhhhhhNubh)}(hThese rules are implemented using the various glock operations which are defined for each type of glock. Not all types of glocks use all the modes. Only inode glocks use the DF mode for example.h]hThese rules are implemented using the various glock operations which are defined for each type of glock. Not all types of glocks use all the modes. Only inode glocks use the DF mode for example.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK4hhhhubh)}(h1Table of glock operations and per type constants:h]h1Table of glock operations and per type constants:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK8hhhhubjD)}(hhh]jI)}(hhh](jN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhj ubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK=uh1jMhj ubjn)}(hhh]js)}(hhh](jx)}(hhh]h)}(hFieldh]hField}(hj*hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hj'ubah}(h]h ]h"]h$]h&]uh1jwhj$ubjx)}(hhh]h)}(hPurposeh]hPurpose}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK;hj>ubah}(h]h ]h"]h$]h&]uh1jwhj$ubeh}(h]h ]h"]h$]h&]uh1jrhj!ubah}(h]h ]h"]h$]h&]uh1jmhj ubj)}(hhh](js)}(hhh](jx)}(hhh]h)}(hgo_synch]hgo_sync}(hjjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjgubah}(h]h ]h"]h$]h&]uh1jwhjdubjx)}(hhh]h)}(h;Called before remote state change (e.g. to sync dirty data)h]h;Called before remote state change (e.g. to sync dirty data)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hj~ubah}(h]h ]h"]h$]h&]uh1jwhjdubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(h go_xmote_bhh]h go_xmote_bh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h7Called after remote state change (e.g. to refill cache)h]h7Called after remote state change (e.g. to refill cache)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK>hjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_invalh]hgo_inval}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h=Called if remote state change requires invalidating the cacheh]h=Called if remote state change requires invalidating the cache}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK?hjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_instantiateh]hgo_instantiate}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(h%Called when a glock has been acquiredh]h%Called when a glock has been acquired}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK@hj#ubah}(h]h ]h"]h$]h&]uh1jwhj ubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_heldh]hgo_held}(hjFhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjCubah}(h]h ]h"]h$]h&]uh1jwhj@ubjx)}(hhh]h)}(h,Called every time a glock holder is acquiredh]h,Called every time a glock holder is acquired}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKAhjZubah}(h]h ]h"]h$]h&]uh1jwhj@ubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_dumph]hgo_dump}(hj}hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjzubah}(h]h ]h"]h$]h&]uh1jwhjwubjx)}(hhh]h)}(hYCalled to print content of object for debugfs file, or on error to dump glock to the log.h]hYCalled to print content of object for debugfs file, or on error to dump glock to the log.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKBhjubah}(h]h ]h"]h$]h&]uh1jwhjwubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(h go_callbackh]h go_callback}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h4Called if the DLM sends a callback to drop this lockh]h4Called if the DLM sends a callback to drop this lock}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKDhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(h go_unlockedh]h go_unlocked}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h.Called when a glock is unlocked (dlm_unlock())h]h.Called when a glock is unlocked (dlm_unlock())}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_typeh]hgo_type}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h$The type of the glock, ``LM_TYPE_*``h](hThe type of the glock, }(hj9hhhNhNubhliteral)}(h ``LM_TYPE_*``h]h LM_TYPE_*}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1jAhj9ubeh}(h]h ]h"]h$]h&]uh1hhhhKFhj6ubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjaubjs)}(hhh](jx)}(hhh]h)}(hgo_flagsh]hgo_flags}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjfubah}(h]h ]h"]h$]h&]uh1jwhjcubjx)}(hhh]h)}(hHGLOF_ASPACE is set, if the glock has an address space associated with ith]hHGLOF_ASPACE is set, if the glock has an address space associated with it}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj}ubah}(h]h ]h"]h$]h&]uh1jwhjcubeh}(h]h ]h"]h$]h&]uh1jrhjaubeh}(h]h ]h"]h$]h&]uh1jhj ubeh}(h]h ]h"]h$]h&]colsKuh1jHhjubah}(h]h ]h"]h$]h&]uh1jChhhhhhhNubh)}(hXThe minimum hold time for each lock is the time after a remote lock grant for which we ignore remote demote requests. This is in order to prevent a situation where locks are being bounced around the cluster from node to node with none of the nodes making any progress. This tends to show up most with shared mmapped files which are being written to by multiple nodes. By delaying the demotion in response to a remote callback, that gives the userspace program time to make some progress before the pages are unmapped.h]hXThe minimum hold time for each lock is the time after a remote lock grant for which we ignore remote demote requests. This is in order to prevent a situation where locks are being bounced around the cluster from node to node with none of the nodes making any progress. This tends to show up most with shared mmapped files which are being written to by multiple nodes. By delaying the demotion in response to a remote callback, that gives the userspace program time to make some progress before the pages are unmapped.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKKhhhhubh)}(hEventually, we hope to make the glock "EX" mode locally shared such that any local locking will be done with the i_mutex as required rather than via the glock.h]hEventually, we hope to make the glock “EX” mode locally shared such that any local locking will be done with the i_mutex as required rather than via the glock.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThhhhubh)}(h#Locking rules for glock operations:h]h#Locking rules for glock operations:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhhhhubjD)}(hhh]jI)}(hhh](jN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhjubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhjubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhjubjn)}(hhh]js)}(hhh](jx)}(hhh]h)}(h Operationh]h Operation}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hGLF_LOCK bit lock heldh]hGLF_LOCK bit lock held}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj ubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hgl_lockref.lock spinlock heldh]hgl_lockref.lock spinlock held}(hj2 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK[hj/ ubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjubah}(h]h ]h"]h$]h&]uh1jmhjubj)}(hhh](js)}(hhh](jx)}(hhh]h)}(hgo_synch]hgo_sync}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjX ubah}(h]h ]h"]h$]h&]uh1jwhjU ubjx)}(hhh]h)}(hYesh]hYes}(hjr hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hjo ubah}(h]h ]h"]h$]h&]uh1jwhjU ubjx)}(hhh]h)}(hNoh]hNo}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj ubah}(h]h ]h"]h$]h&]uh1jwhjU ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(h go_xmote_bhh]h go_xmote_bh}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hYesh]hYes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hNoh]hNo}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK^hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(hgo_invalh]hgo_inval}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hYesh]hYes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hNoh]hNo}(hj% hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK_hj" ubah}(h]h ]h"]h$]h&]uh1jwhj ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(hgo_instantiateh]hgo_instantiate}(hjE hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjB ubah}(h]h ]h"]h$]h&]uh1jwhj? ubjx)}(hhh]h)}(hNoh]hNo}(hj\ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjY ubah}(h]h ]h"]h$]h&]uh1jwhj? ubjx)}(hhh]h)}(hNoh]hNo}(hjs hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK`hjp ubah}(h]h ]h"]h$]h&]uh1jwhj? ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(hgo_heldh]hgo_held}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hNoh]hNo}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hNoh]hNo}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKahj ubah}(h]h ]h"]h$]h&]uh1jwhj ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(hgo_dumph]hgo_dump}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(h Sometimesh]h Sometimes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj ubah}(h]h ]h"]h$]h&]uh1jwhj ubjx)}(hhh]h)}(hYesh]hYes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKbhj ubah}(h]h ]h"]h$]h&]uh1jwhj ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(h go_callbackh]h go_callback}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchj, ubah}(h]h ]h"]h$]h&]uh1jwhj) ubjx)}(hhh]h)}(hSometimes (N/A)h]hSometimes (N/A)}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjC ubah}(h]h ]h"]h$]h&]uh1jwhj) ubjx)}(hhh]h)}(hYesh]hYes}(hj] hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjZ ubah}(h]h ]h"]h$]h&]uh1jwhj) ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubjs)}(hhh](jx)}(hhh]h)}(h go_unlockedh]h go_unlocked}(hj} hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhjz ubah}(h]h ]h"]h$]h&]uh1jwhjw ubjx)}(hhh]h)}(hYesh]hYes}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhj ubah}(h]h ]h"]h$]h&]uh1jwhjw ubjx)}(hhh]h)}(hNoh]hNo}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKdhj ubah}(h]h ]h"]h$]h&]uh1jwhjw ubeh}(h]h ]h"]h$]h&]uh1jrhjR ubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1jHhjubah}(h]h ]h"]h$]h&]uh1jChhhhhhhNubhnote)}(hOperations must not drop either the bit lock or the spinlock if its held on entry. go_dump and do_demote_ok must never block. Note that go_dump will only be called if the glock's state indicates that it is caching uptodate data.h]h)}(hOperations must not drop either the bit lock or the spinlock if its held on entry. go_dump and do_demote_ok must never block. Note that go_dump will only be called if the glock's state indicates that it is caching uptodate data.h]hOperations must not drop either the bit lock or the spinlock if its held on entry. go_dump and do_demote_ok must never block. Note that go_dump will only be called if the glock’s state indicates that it is caching uptodate data.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihj ubah}(h]h ]h"]h$]h&]uh1j hhhhhhhNubh)}(h Glock locking order within GFS2:h]h Glock locking order within GFS2:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhhhhubh)}(hXi1. i_rwsem (if required) 2. Rename glock (for rename only) 3. Inode glock(s) (Parents before children, inodes at "same level" with same parent in lock number order) 4. Rgrp glock(s) (for (de)allocation operations) 5. Transaction glock (via gfs2_trans_begin) for non-read operations 6. i_rw_mutex (if required) 7. Page lock (always last, very important!) h]h)}(hhh](h)}(hi_rwsem (if required)h]h)}(hj h]hi_rwsem (if required)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKphj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hRename glock (for rename only)h]h)}(hj h]hRename glock (for rename only)}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKqhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hfInode glock(s) (Parents before children, inodes at "same level" with same parent in lock number order)h]h)}(hfInode glock(s) (Parents before children, inodes at "same level" with same parent in lock number order)h]hjInode glock(s) (Parents before children, inodes at “same level” with same parent in lock number order)}(hj9 hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhj5 ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h-Rgrp glock(s) (for (de)allocation operations)h]h)}(hjO h]h-Rgrp glock(s) (for (de)allocation operations)}(hjQ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKuhjM ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h@Transaction glock (via gfs2_trans_begin) for non-read operationsh]h)}(hjf h]h@Transaction glock (via gfs2_trans_begin) for non-read operations}(hjh hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKvhjd ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(hi_rw_mutex (if required)h]h)}(hj} h]hi_rw_mutex (if required)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKwhj{ ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h*Page lock (always last, very important!) h]h)}(h)Page lock (always last, very important!)h]h)Page lock (always last, very important!)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhj ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]jjjhjj uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKphhhhubh)}(hXThere are two glocks per inode. One deals with access to the inode itself (locking order as above), and the other, known as the iopen glock is used in conjunction with the i_nlink field in the inode to determine the lifetime of the inode in question. Locking of inodes is on a per-inode basis. Locking of rgrps is on a per rgrp basis. In general we prefer to lock local locks prior to cluster locks.h]hXThere are two glocks per inode. One deals with access to the inode itself (locking order as above), and the other, known as the iopen glock is used in conjunction with the i_nlink field in the inode to determine the lifetime of the inode in question. Locking of inodes is on a per-inode basis. Locking of rgrps is on a per rgrp basis. In general we prefer to lock local locks prior to cluster locks.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKzhhhhubh)}(hhh](h)}(hGlock Statisticsh]hGlock Statistics}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hhhhhKubh)}(hX+The stats are divided into two sets: those relating to the super block and those relating to an individual glock. The super block stats are done on a per cpu basis in order to try and reduce the overhead of gathering them. They are also further divided by glock type. All timings are in nanoseconds.h]hX+The stats are divided into two sets: those relating to the super block and those relating to an individual glock. The super block stats are done on a per cpu basis in order to try and reduce the overhead of gathering them. They are also further divided by glock type. All timings are in nanoseconds.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXIn the case of both the super block and glock statistics, the same information is gathered in each case. The super block timing statistics are used to provide default values for the glock timing statistics, so that newly created glocks should have, as far as possible, a sensible starting point. The per-glock counters are initialised to zero when the glock is created. The per-glock statistics are lost when the glock is ejected from memory.h]hXIn the case of both the super block and glock statistics, the same information is gathered in each case. The super block timing statistics are used to provide default values for the glock timing statistics, so that newly created glocks should have, as far as possible, a sensible starting point. The per-glock counters are initialised to zero when the glock is created. The per-glock statistics are lost when the glock is ejected from memory.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hX%The statistics are divided into three pairs of mean and variance, plus two counters. The mean/variance pairs are smoothed exponential estimates and the algorithm used is one which will be very familiar to those used to calculation of round trip times in network code. See "TCP/IP Illustrated, Volume 1", W. Richard Stevens, sect 21.3, "Round-Trip Time Measurement", p. 299 and onwards. Also, Volume 2, Sect. 25.10, p. 838 and onwards. Unlike the TCP/IP Illustrated case, the mean and variance are not scaled, but are in units of integer nanoseconds.h]hX-The statistics are divided into three pairs of mean and variance, plus two counters. The mean/variance pairs are smoothed exponential estimates and the algorithm used is one which will be very familiar to those used to calculation of round trip times in network code. See “TCP/IP Illustrated, Volume 1”, W. Richard Stevens, sect 21.3, “Round-Trip Time Measurement”, p. 299 and onwards. Also, Volume 2, Sect. 25.10, p. 838 and onwards. Unlike the TCP/IP Illustrated case, the mean and variance are not scaled, but are in units of integer nanoseconds.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h>The three pairs of mean/variance measure the following things:h]h>The three pairs of mean/variance measure the following things:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hw1. DLM lock time (non-blocking requests) 2. DLM lock time (blocking requests) 3. Inter-request time (again to the DLM) h]h)}(hhh](h)}(h%DLM lock time (non-blocking requests)h]h)}(hj h]h%DLM lock time (non-blocking requests)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h!DLM lock time (blocking requests)h]h)}(hj- h]h!DLM lock time (blocking requests)}(hj/ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj+ ubah}(h]h ]h"]h$]h&]uh1hhj ubh)}(h&Inter-request time (again to the DLM) h]h)}(h%Inter-request time (again to the DLM)h]h%Inter-request time (again to the DLM)}(hjF hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjB ubah}(h]h ]h"]h$]h&]uh1hhj ubeh}(h]h ]h"]h$]h&]jjjhjj uh1hhj ubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXzA non-blocking request is one which will complete right away, whatever the state of the DLM lock in question. That currently means any requests when (a) the current state of the lock is exclusive, i.e. a lock demotion (b) the requested state is either null or unlocked (again, a demotion) or (c) the "try lock" flag is set. A blocking request covers all the other lock requests.h]hX~A non-blocking request is one which will complete right away, whatever the state of the DLM lock in question. That currently means any requests when (a) the current state of the lock is exclusive, i.e. a lock demotion (b) the requested state is either null or unlocked (again, a demotion) or (c) the “try lock” flag is set. A blocking request covers all the other lock requests.}(hjf hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXUThere are two counters. The first is there primarily to show how many lock requests have been made, and thus how much data has gone into the mean/variance calculations. The other counter is counting queuing of holders at the top layer of the glock code. Hopefully that number will be a lot larger than the number of dlm lock requests issued.h]hXUThere are two counters. The first is there primarily to show how many lock requests have been made, and thus how much data has gone into the mean/variance calculations. The other counter is counting queuing of holders at the top layer of the glock code. Hopefully that number will be a lot larger than the number of dlm lock requests issued.}(hjt hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hjSo why gather these statistics? There are several reasons we'd like to get a better idea of these timings:h]hlSo why gather these statistics? There are several reasons we’d like to get a better idea of these timings:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hhh](h)}(h2To be able to better set the glock "min hold time"h]h)}(hj h]h6To be able to better set the glock “min hold time”}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(h&To spot performance issues more easilyh]h)}(hj h]h&To spot performance issues more easily}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubh)}(hTo improve the algorithm for selecting resource groups for allocation (to base it on lock wait time, rather than blindly using a "try lock") h]h)}(hTo improve the algorithm for selecting resource groups for allocation (to base it on lock wait time, rather than blindly using a "try lock")h]hTo improve the algorithm for selecting resource groups for allocation (to base it on lock wait time, rather than blindly using a “try lock”)}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1hhj hhhhhNubeh}(h]h ]h"]h$]h&]jjjhjj uh1hhj hhhhhKubh)}(hDue to the smoothing action of the updates, a step change in some input quantity being sampled will only fully be taken into account after 8 samples (or 4 for the variance) and this needs to be carefully considered when interpreting the results.h]hDue to the smoothing action of the updates, a step change in some input quantity being sampled will only fully be taken into account after 8 samples (or 4 for the variance) and this needs to be carefully considered when interpreting the results.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hXCKnowing both the time it takes a lock request to complete and the average time between lock requests for a glock means we can compute the total percentage of the time for which the node is able to use a glock vs. time that the rest of the cluster has its share. That will be very useful when setting the lock min hold time.h]hXCKnowing both the time it takes a lock request to complete and the average time between lock requests for a glock means we can compute the total percentage of the time for which the node is able to use a glock vs. time that the rest of the cluster has its share. That will be very useful when setting the lock min hold time.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hGreat care has been taken to ensure that we measure exactly the quantities that we want, as accurately as possible. There are always inaccuracies in any measuring system, but I hope this is as accurate as we can reasonably make it.h]hGreat care has been taken to ensure that we measure exactly the quantities that we want, as accurately as possible. There are always inaccuracies in any measuring system, but I hope this is as accurate as we can reasonably make it.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h Per sb stats can be found here::h]hPer sb stats can be found here:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh literal_block)}(h'/sys/kernel/debug/gfs2//sbstatsh]h'/sys/kernel/debug/gfs2//sbstats}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj hhubh)}(h#Per glock stats can be found here::h]h"Per glock stats can be found here:}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubj)}(h'/sys/kernel/debug/gfs2//glstatsh]h'/sys/kernel/debug/gfs2//glstats}hj5sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhj hhubh)}(hAssuming that debugfs is mounted on /sys/kernel/debug and also that is replaced with the name of the gfs2 filesystem in question.h]hAssuming that debugfs is mounted on /sys/kernel/debug and also that is replaced with the name of the gfs2 filesystem in question.}(hjChhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(h4The abbreviations used in the output as are follows:h]h4The abbreviations used in the output as are follows:}(hjQhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjD)}(hhh]jI)}(hhh](jN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jMhjbubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK@uh1jMhjbubj)}(hhh](js)}(hhh](jx)}(hhh]h)}(hsrtth]hsrtt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhj|ubjx)}(hhh]h)}(h6Smoothed round trip time for non blocking dlm requestsh]h6Smoothed round trip time for non blocking dlm requests}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhj|ubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hsrttvarh]hsrttvar}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hVariance estimate for srtth]hVariance estimate for srtt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hsrttbh]hsrttb}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h@Smoothed round trip time for (potentially) blocking dlm requestsh]h@Smoothed round trip time for (potentially) blocking dlm requests}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hsrttvarbh]hsrttvarb}(hj'hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj$ubah}(h]h ]h"]h$]h&]uh1jwhj!ubjx)}(hhh]h)}(hVariance estimate for srttbh]hVariance estimate for srttb}(hj>hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj;ubah}(h]h ]h"]h$]h&]uh1jwhj!ubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hsirth]hsirt}(hj^hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj[ubah}(h]h ]h"]h$]h&]uh1jwhjXubjx)}(hhh]h)}(h.Smoothed inter request time (for dlm requests)h]h.Smoothed inter request time (for dlm requests)}(hjuhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjrubah}(h]h ]h"]h$]h&]uh1jwhjXubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hsirtvarh]hsirtvar}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hVariance estimate for sirth]hVariance estimate for sirt}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hdlmh]hdlm}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h2Number of dlm requests made (dcnt in glstats file)h]h2Number of dlm requests made (dcnt in glstats file)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjyubjs)}(hhh](jx)}(hhh]h)}(hqueueh]hqueue}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h6Number of glock requests queued (qcnt in glstats file)h]h6Number of glock requests queued (qcnt in glstats file)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhjyubeh}(h]h ]h"]h$]h&]uh1jhjbubeh}(h]h ]h"]h$]h&]colsKuh1jHhj_ubah}(h]h ]h"]h$]h&]uh1jChj hhhhhNubh)}(hX+The sbstats file contains a set of these stats for each glock type (so 8 lines for each type) and for each cpu (one column per cpu). The glstats file contains a set of these stats for each glock in a similar format to the glocks file, but using the format mean/variance for each of the timing stats.h]hX+The sbstats file contains a set of these stats for each glock type (so 8 lines for each type) and for each cpu (one column per cpu). The glstats file contains a set of these stats for each glock in a similar format to the glocks file, but using the format mean/variance for each of the timing stats.}(hjGhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubh)}(hThe gfs2_glock_lock_time tracepoint prints out the current values of the stats for the glock in question, along with some addition information on each dlm reply that is received:h]hThe gfs2_glock_lock_time tracepoint prints out the current values of the stats for the glock in question, along with some addition information on each dlm reply that is received:}(hjUhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubjD)}(hhh]jI)}(hhh](jN)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jMhjfubjN)}(hhh]h}(h]h ]h"]h$]h&]colwidthK'uh1jMhjfubj)}(hhh](js)}(hhh](jx)}(hhh]h)}(hstatush]hstatus}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hThe status of the dlm requesth]hThe status of the dlm request}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhj}ubjs)}(hhh](jx)}(hhh]h)}(hflagsh]hflags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(hThe dlm request flagsh]hThe dlm request flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhj}ubjs)}(hhh](jx)}(hhh]h)}(htdiffh]htdiff}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubjx)}(hhh]h)}(h'The time taken by this specific requesth]h'The time taken by this specific request}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1jwhjubeh}(h]h ]h"]h$]h&]uh1jrhj}ubeh}(h]h ]h"]h$]h&]uh1jhjfubeh}(h]h ]h"]h$]h&]colsKuh1jHhjcubah}(h]h ]h"]h$]h&]uh1jChj hhhhhNubh)}(h$(remaining fields as per above list)h]h$(remaining fields as per above list)}(hj8hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj hhubeh}(h]glock-statisticsah ]h"]glock statisticsah$]h&]uh1hhhhhhhhKubeh}(h]glock-internal-locking-rulesah ]h"]glock internal locking rulesah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjwfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjxerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(jSjPjKjHu nametypes}(jSjKuh}(jPhjHj u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.