Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1407514

Re: [PATCH] mutex: Do not spin/queue before performing ww_mutex deadlock avoidance

From Chris Wilson <chris@chris-wilson.co.uk>
Newsgroups linux.kernel
Subject Re: [PATCH] mutex: Do not spin/queue before performing ww_mutex deadlock avoidance
Date 2016-05-26 12:50 +0200
Message-ID <rD11w-5kZ-15@gated-at.bofh.it> (permalink)
References <rCYZH-45r-9@gated-at.bofh.it> <rD0RP-5hu-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, May 26, 2016 at 12:37:30PM +0200, Maarten Lankhorst wrote:
> The check should also not be for NULL, but for use_ww_ctx.
> This way the if check is optimized out for the ww_ctx path, where
> ww_ctx is always non-null.

The compiler can see use_ww_ctx == false => ww_ctx == NULL just as well
to do dead-code elimination, i.e. use_ww_ctx is superflouus and does not
reduce the code size. (gcc 4.7.2, 4.9.1, 5.3.1)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] mutex: Do not spin/queue before performing ww_mutex deadlock avoidance Chris Wilson <chris@chris-wilson.co.uk> - 2016-05-26 10:40 +0200
  Re: [PATCH] mutex: Do not spin/queue before performing ww_mutex  deadlock avoidance Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-05-26 12:40 +0200
    Re: [PATCH] mutex: Do not spin/queue before performing ww_mutex  deadlock avoidance Chris Wilson <chris@chris-wilson.co.uk> - 2016-05-26 12:50 +0200
      Re: [PATCH] mutex: Do not spin/queue before performing ww_mutex  deadlock avoidance Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-05-26 13:10 +0200
  [PATCH] mutex: Report recursive ww_mutex locking early Chris Wilson <chris@chris-wilson.co.uk> - 2016-05-26 22:10 +0200
    Re: [PATCH] mutex: Report recursive ww_mutex locking early Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-05-30 09:50 +0200
      Re: [PATCH] mutex: Report recursive ww_mutex locking early Peter Zijlstra <peterz@infradead.org> - 2016-05-30 11:20 +0200
        Re: [PATCH] mutex: Report recursive ww_mutex locking early Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-05-30 11:50 +0200
          Re: [PATCH] mutex: Report recursive ww_mutex locking early Peter Zijlstra <peterz@infradead.org> - 2016-05-30 12:30 +0200
            Re: [PATCH] mutex: Report recursive ww_mutex locking early Chris Wilson <chris@chris-wilson.co.uk> - 2016-05-30 12:50 +0200
              Re: [PATCH] mutex: Report recursive ww_mutex locking early Maarten Lankhorst <maarten.lankhorst@linux.intel.com> - 2016-05-30 13:20 +0200

csiph-web