[Intel-gfx] [PATCH v2] drm: Release filp before global lock

Thomas Hellström (VMware) thomas_os at shipmail.org
Fri Jan 24 12:29:00 UTC 2020


On 1/23/20 11:21 PM, Chris Wilson wrote:
> The file is not part of the global drm resource and can be released
> prior to take the global mutex to drop the open_count (and potentially
> close) the drm device. As the global mutex is indeed global, not only
> within the device but across devices, a slow file release mechanism can
> bottleneck the entire system.
>
> However, inside drm_close_helper() there are a number of dev->driver
> callbacks that take the drm_device as the first parameter... Worryingly
> some of those callbacks may be (implicitly) depending on the global
> mutex.

 From a quick audit, via, sis and vmwgfx are safe, so for those

Acked-by: Thomas Hellstrom <thellstrom at vmware.com>

Savage appears to be unsafe, due to unprotected access in the dma device 
member. Haven't audited i810 or potential other drivers affected. 
Perhaps it makes sense to enable lockfree filp release on a per-driver 
basis to begin with?

/Thomas




More information about the Intel-gfx mailing list