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


Groups > linux.kernel > #1402874

Re: [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task

From Peter Zijlstra <peterz@infradead.org>
Newsgroups linux.kernel
Subject Re: [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task
Date 2016-05-18 12:40 +0200
Message-ID <rA73r-SY-15@gated-at.bofh.it> (permalink)
References <rzYtc-3J2-3@gated-at.bofh.it> <rzYtc-3J2-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Tue, May 17, 2016 at 09:26:21PM -0400, Waiman Long wrote:
> As rwsem_down_read_failed() will queue itself and potentially call
> __rwsem_do_wake(sem, RWSEM_WAKE_ANY), it is possible that a reader
> will try to wake up its own task. This patch adds a check to make
> sure that this won't happen.
> 

Yes, this is 'weird', but why are we fixing it at the cost of an extra
branch?

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


Thread

[PATCH v4 0/5] [PATCH v3 0/4] locking/rwsem: Add reader-owned state to the owner field Waiman Long <Waiman.Long@hpe.com> - 2016-05-18 03:30 +0200
  [PATCH v4 1/5] locking/rwsem: Add reader-owned state to the owner field Waiman Long <Waiman.Long@hpe.com> - 2016-05-18 03:30 +0200
  [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task Waiman Long <Waiman.Long@hpe.com> - 2016-05-18 03:30 +0200
    Re: [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task Peter Zijlstra <peterz@infradead.org> - 2016-05-18 12:40 +0200
      Re: [PATCH v4 3/5] locking/rwsem: Don't wake up one's own task Waiman Long <waiman.long@hpe.com> - 2016-05-18 18:10 +0200
  Re: [PATCH v4 0/5] [PATCH v3 0/4] locking/rwsem: Add reader-owned  state to the owner field Peter Zijlstra <peterz@infradead.org> - 2016-05-18 13:00 +0200

csiph-web