lkml.org 
[lkml]   [2017]   [Jan]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: __mutex_lock_common() unlikely very likely
On Wed, Jan 18, 2017 at 03:58:24PM -0500, Steven Rostedt wrote:
> Chris,
>
> My branch tracer flagged the unlikely in __mutex_lock_common() as
> always hit. That's the:
>
> if (use_ww_ctx) {
> [...]
> if (unlikely(ww_ctx == READ_ONCE(ww->ctx)))
> return -EALREADY;
> }
>
> This is hit 100% of the time, and its coming from the drm logic:

By design this is an exceptional case. In practice, drm modesetting is a
little slapsidasical when it comes to locking. However, it is the
minority use case, just that on intel, the more prevalent users do not
hit this path - though they will with the ww_mutex refactoring work. ttm
drivers (amdgpu, nouveau etc) will be demonstrating that this is the
unlikely branch.
-Chris

--
Chris Wilson, Intel Open Source Technology Centre

\
 
 \ /
  Last update: 2017-01-19 09:56    [W:0.071 / U:0.384 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site