Fork us on GitHub Follow us on Facebook Follow us on Twitter

Opened 8 years ago

Closed 7 years ago

#384 closed defect (fixed)

Synchronize device tree transitions

Reported by: Jiri Svoboda Owned by:
Priority: major Milestone: 0.6.0
Component: helenos/unspecified Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also: #389

Description

Operations on the device tree (in Devman) requite fine-grained synchronization. Simple mutex or rw-locking is too cumbersome, some operations can be performed while others are in progress.

Currently there is one global RW lock for the entire three which is held for a short time when actual modifications of tree topology take place.

When we are onlining or offlining (or removing) a node in one fibril, we don't want another fibril to attempt to online/offline/remove the same node concurrently. Currently there is no mechanism to prevent it. These transitions are currently not tracked via states.

The proposed solution: add appropriate transitional states and a method to wait for the (function/device?) node to enter a stable (non-transitional) state. This can be achieved by introducing a CV for each node. Since CVs operate in conjunction with mutexes, not RW-locks, the global tree RW lock needs to be replaced with global mutex. This should be acceptable - since the lock is always held for a short time and not on performance-sensitive code paths, not much contention is expected.

Change History (3)

comment:1 Changed 8 years ago by Jakub Jermář

Milestone: 0.5.00.5.1

Based on the 0.5.0 release bug court ruling, retargetting to 0.5.1.

comment:2 Changed 7 years ago by Jakub Jermář

See also: #389

comment:3 Changed 7 years ago by Jiri Svoboda

Resolution: fixed
Status: newclosed

Fixed in mainline,1597.

Note: See TracTickets for help on using tickets.