Lines Matching +full:wait +full:- +full:state
2 IN-KERNEL CACHE OBJECT REPRESENTATION AND MANAGEMENT
11 (*) Object management state machine.
13 - Provision of cpu time.
14 - Locking simplification.
25 FS-Cache maintains an in-kernel representation of each object that a netfs is
29 FS-Cache also maintains a separate in-kernel representation of the objects that
36 represented by multiple objects - an index may exist in more than one cache -
45 : +-----------+ :
46 +----------->| IObject | :
47 +-----------+ | : +-----------+ :
48 | ICookie |-------+ : | :
49 +-----------+ | : | : +-----------+
50 | +------------------------------>| IObject |
51 | : | : +-----------+
53 | : +-----------+ : |
54 V +----------->| IObject | : |
55 +-----------+ | : +-----------+ : |
56 | ICookie |-------+ : | : V
57 +-----------+ | : | : +-----------+
58 | +------------------------------>| IObject |
59 +-----+-----+ : | : +-----------+
62 +-----------+ | : +-----------+ : |
63 | ICookie |------------------------->| IObject | : |
64 +-----------+ | : +-----------+ : |
66 | +-----------+ : | : +-----------+
67 | | ICookie |-------------------------------->| IObject |
68 | +-----------+ : | : +-----------+
70 +-----------+ | : +-----------+ : |
71 | DCookie |------------------------->| DObject | : |
72 +-----------+ | : +-----------+ : |
74 +-------+-------+ : : |
77 +-----------+ +-----------+ : : +-----------+
78 | DCookie | | DCookie |------------------------>| DObject |
79 +-----------+ +-----------+ : : +-----------+
84 multiple caches, but currently, non-index objects may not. Objects of any type
93 OBJECT MANAGEMENT STATE MACHINE
96 Within FS-Cache, each active object is managed by its own individual state
97 machine. The state for an object is kept in the fscache_object struct, in
98 object->state. A cookie may point to a set of objects that are in different
101 Each state has an action associated with it that is invoked when the machine
102 wakes up in that state. There are four logical sets of states:
104 (1) Preparation: states that wait for the parent objects to become ready. The
112 and that update the state of objects.
116 up in-memory resources.
120 When a state has finished processing, it will usually set the mask of events in
121 which it is interested (object->event_mask) and relinquish the worker thread.
128 ---------------------
135 particular work item. These state actions may be doing sequences of
140 sleeping on I/O. This means that single-threaded and 1-per-CPU-threaded
145 ----------------------
148 state machine at once, this simplifies the locking, particularly with respect
150 from the cache backend's representation (fscache_object) - which may be
158 The object state machine has a set of states that it can be in. There are
160 object to transit to a state that allows access to its children:
162 (1) State FSCACHE_OBJECT_INIT.
164 Initialise the object and wait for the parent object to become active. In
172 (2) State FSCACHE_OBJECT_LOOKING_UP.
175 FS-Cache expects the cache backend to probe the cache to see whether this
183 At the completion of lookup, FS-Cache will let the netfs go ahead with
186 the first known page is uncached - as to that point there can be no data
190 (3) State FSCACHE_OBJECT_CREATING.
194 coherency data indicated what's on disk is out of date. In this state,
195 FS-Cache expects the cache to create
200 At the completion of creation, FS-Cache will start processing write
208 (4) State FSCACHE_OBJECT_AVAILABLE.
210 A transient state in which pending operations are started, child objects
211 are permitted to advance from FSCACHE_OBJECT_INIT state, and temporary
214 (5) State FSCACHE_OBJECT_ACTIVE.
216 The normal running state. In this state, requests the netfs makes will be
219 (6) State FSCACHE_OBJECT_INVALIDATING.
221 The object is undergoing invalidation. When the state comes here, it
224 continue to the FSCACHE_OBJECT_UPDATING state.
226 (7) State FSCACHE_OBJECT_UPDATING.
228 The state machine comes here to update the object in the cache from the
235 (8) State FSCACHE_OBJECT_LC_DYING.
241 (9) State FSCACHE_OBJECT_DYING.
249 before advancing to the next state.
251 (10) State FSCACHE_OBJECT_ABORT_INIT.
253 The object comes to this state if it was waiting on its parent in
255 so that the parent may proceed from the FSCACHE_OBJECT_DYING state.
257 (11) State FSCACHE_OBJECT_RELEASING.
258 (12) State FSCACHE_OBJECT_RECYCLING.
262 cookie. In the first state, the cached data is expected to persist, and
265 (13) State FSCACHE_OBJECT_WITHDRAWING.
267 The object transits to this state if the cache decides it wants to
271 (14) State FSCACHE_OBJECT_DEAD.
273 The object transits to this state when the in-memory object record is
275 this state.
279 -----------------
281 There are a number of events that can be raised to an object state machine:
285 The netfs requested that an object be updated. The state machine will ask
297 This is used to proceed from the dying state.
318 state machine, it doesn't matter if there's a collision with both ends trying
319 to sever the connection at the same time. The state machine can just pick