On Wed, 9 Mar 2005 16:23:22 -0500 (EST), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote: > Here's the idea: Only one process is allowed to use those lists at a time. > Maintenance of the lists is synchronized by means of a subsystem spinlock. > If a process needs to update or traverse the lists while they are already > in use, it will instead queue a request to be handled later. When a > process finishes using the lists, it will check the queue for outstanding > requests and fulfill them. Why don't ve add a version to list, instead of a queue. Every time list is modified (element is added or removed) version is incremented. If lenghty operation is needed the traversing process drops the lock and after performing the operation compares current version with saved. If they differ traversal is restarted from the beginning. At least for bus' device and driver lists this should work fine and will not require holding a lock/semaphore for extended periods of time. -- Dmitry