[Intel-gfx] [PATCH] drm/i915/pmu: Initialise our dynamic sysfs attributes for use with lockdep

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 11 14:59:29 UTC 2018


Quoting Tvrtko Ursulin (2018-01-11 14:12:38)
> You beat me to it, after I noticed the report on IRC and started 
> digging, just to find sysfs_attr_init, your fix arrived. Thanks!
> 
> It looks like a standard way of silencing lockdep for this case, 
> although I am not sure what exactly is the purpose of lock class keys in 
> sysfs attributes, and what this kind of defeat could also imply.
> 
> I planned to do it another loop, iterating the attr array, but I don't 
> see how it matters. It would be one static key versus the two. :?

It shouldn't as far as I'm aware. I'm conscious that each static attr
has its own lockclass, but dynamic users tend to have a shared
lockclass. It shouldn't matter unless we nest the sysfs operations?
-Chris


More information about the Intel-gfx mailing list