lkml.org 
[lkml]   [2014]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] drm: Do not use BUG_ON(!spin_is_locked())
From
>ssert_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.
>>
>> My experience with gpu drivers (i915) has been that hw and the software
>> running it is varied enough that almost always it's better to
>> unconditionally enable this stuff. I much prefer assert_spin_locked and
>> friends over the lockdep versions since enabling full lockdep is not
>> something you usually do. Especially not normal users, and we rely upon
>> them for testing the old stuff. Furthermore for the modeset code the
>> overhead is totally irrelevant since we're doing metric piles of register
>> reads and writes in there anyway.


Did anything translate into an R-b here?

Dave.


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