Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1562480
| From | Chris Wilson <chris@chris-wilson.co.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: __mutex_lock_common() unlikely very likely |
| Date | 2017-01-19 10:00 +0100 |
| Message-ID | <t1gJA-7Hu-3@gated-at.bofh.it> (permalink) |
| References | <t15Et-O4-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
__mutex_lock_common() unlikely very likely Steven Rostedt <rostedt@goodmis.org> - 2017-01-18 22:10 +0100
Re: __mutex_lock_common() unlikely very likely Chris Wilson <chris@chris-wilson.co.uk> - 2017-01-19 10:00 +0100
Re: __mutex_lock_common() unlikely very likely Steven Rostedt <rostedt@goodmis.org> - 2017-01-19 14:40 +0100
[PATCH] mutex: Remove ww_ctx unlikely() from __mutex_lock_common() "Steven Rostedt (VMware)" <rostedt@goodmis.org> - 2017-01-19 15:10 +0100
Re: [PATCH] mutex: Remove ww_ctx unlikely() from __mutex_lock_common() Steven Rostedt <rostedt@goodmis.org> - 2017-01-19 18:00 +0100
Re: [PATCH] mutex: Remove ww_ctx unlikely() from __mutex_lock_common() Peter Zijlstra <peterz@infradead.org> - 2017-01-19 22:00 +0100
csiph-web