[PATCH] drm: Do not use BUG_ON(!spin_is_locked())
Rob Clark
robdclark at gmail.com
Mon Aug 11 16:09:03 PDT 2014
On Mon, Aug 11, 2014 at 4:53 PM, David Rientjes <rientjes at google.com> wrote:
> On Mon, 11 Aug 2014, sanjeev sharma wrote:
>
>> Hello David,
>>
>> Here is the old discussion carried out on this.
>>
>> http://linux-kernel.2935.n7.nabble.com/Is-spin-is-locked-safe-to-use-with-BUG-ON-WARN-ON-td654800.html#a921802
>>
>
> I'm suggesting that if you don't want to incur the cost of the conditional
> everytime you call a certain function with assert_spin_locked() that you
> could covert these to lockdep_assert_held() so the check is only done when
> lockdep is enabled for debugging.
not sure about the nouveau parts, but for the omap and msm hunks, this
code getting called at potentially vblank rate (so maybe once or twice
per ~16ms).. and lockdep has considerable overhead (for a gpu driver)
so I don't always have it enabled. So it sounds like for those two at
least assert_spin_locked() is a better option.
BR,
-R
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
More information about the dri-devel
mailing list