lkml.org 
[lkml]   [2014]   [Aug]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] drm: Do not use BUG_ON(!spin_is_locked())
On Mon, 11 Aug 2014, Rob Clark wrote:

> > 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.
>

Unless there's a bug, assert_spin_locked() is just going to incur an
unnecessary cost every time it is called at runtime. My suggestion was to
limit that check only to debugging kernels that include enabling lockdep
when tracking down problems rather than needlessly evaluating the
conditional every time when there are no bugs.


\
 
 \ /
  Last update: 2014-08-12 01:41    [W:0.092 / U:2.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site