• Home
  • Raw
  • Download

Lines Matching +full:lock +full:- +full:state

1 .. SPDX-License-Identifier: GPL-2.0
7 This documents the basic principles of the glock state machine
11 1. A spinlock (gl_lockref.lock) which protects the internal state such
13 2. A non-blocking bit lock, GLF_LOCK, which is used to prevent other
15 thread takes this lock, it must then call run_queue (usually via the
19 The gl_holders list contains all the queued lock requests (not
25 There are three lock states that users of the glock layer can request,
27 to the following DLM lock modes:
30 Glock mode DLM lock mode
32 UN IV/NL Unlocked (no DLM lock associated with glock) or NL
39 shared lock mode, SH. In GFS2 the DF mode is used exclusively for direct I/O
40 operations. The glocks are basically a lock plus some routines which deal
61 go_sync Called before remote state change (e.g. to sync dirty data)
62 go_xmote_bh Called after remote state change (e.g. to refill cache)
63 go_inval Called if remote state change requires invalidating the cache
68 go_callback Called if the DLM sends a callback to drop this lock
75 The minimum hold time for each lock is the time after a remote lock
91 Operation GLF_LOCK bit lock held gl_lockref.lock spinlock held
105 Operations must not drop either the bit lock or the spinlock
107 Note that go_dump will only be called if the glock's state
116 lock number order)
118 5. Transaction glock (via gfs2_trans_begin) for non-read operations
120 7. Page lock (always last, very important!)
126 is on a per-inode basis. Locking of rgrps is on a per rgrp basis.
127 In general we prefer to lock local locks prior to cluster locks.
130 ----------------
143 The per-glock counters are initialised to zero when the
144 glock is created. The per-glock statistics are lost when
152 Volume 1", W. Richard Stevens, sect 21.3, "Round-Trip Time Measurement",
160 1. DLM lock time (non-blocking requests)
161 2. DLM lock time (blocking requests)
162 3. Inter-request time (again to the DLM)
164 A non-blocking request is one which will complete right
165 away, whatever the state of the DLM lock in question. That
166 currently means any requests when (a) the current state of
167 the lock is exclusive, i.e. a lock demotion (b) the requested
168 state is either null or unlocked (again, a demotion) or (c) the
169 "try lock" flag is set. A blocking request covers all the other
170 lock requests.
173 how many lock requests have been made, and thus how much data
177 of dlm lock requests issued.
185 allocation (to base it on lock wait time, rather than blindly
186 using a "try lock")
194 Knowing both the time it takes a lock request to complete and
195 the average time between lock requests for a glock means we
199 the lock min hold time.