October 2017
Intermediate to advanced
354 pages
9h 28m
English
As discussed in the earlier section, unordered nested locking in the kernel functions could pose a risk of lock-inversion deadlocks, and kernel developers avoid this by defining rules for nested lock ordering and perform runtime checks through the lock validator infrastructure. Yet, there are situations where lock ordering is dynamic, and nested locking calls cannot be hardcoded or imposed as per preconceived rules.
One such use case is to do with GPU buffers; these buffers are to be owned and accessed by various system entities such as GPU hardware, GPU driver, user-mode applications, and other video-related drivers. User mode contexts can submit the dma buffers for processing in an arbitrary order, and the GPU hardware ...