public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware.com>
To: Waiman Long <Waiman.Long@hpe.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	linux-kernel@vger.kernel.org, Davidlohr Bueso <dave@stgolabs.net>,
	Jason Low <jason.low2@hp.com>, Dave Chinner <david@fromorbit.com>,
	Scott J Norton <scott.norton@hpe.com>,
	Douglas Hatch <doug.hatch@hpe.com>
Subject: Re: [PATCH v3 2/4] locking/rwsem: Don't wake up one's own task
Date: Tue, 17 May 2016 10:45:56 -0700	[thread overview]
Message-ID: <573B58D4.4090406@hurleysoftware.com> (raw)
In-Reply-To: <1463093811-10684-3-git-send-email-Waiman.Long@hpe.com>

On 05/12/2016 03:56 PM, 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.

Although there's no particular harm in the current code, this at
least spells out this condition is normal (ie., when a failed reader
wakes itself while waking the other waiting readers).

Reviewed-by: Peter Hurley <peter@hurleysoftware.com>

  reply	other threads:[~2016-05-17 17:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-12 22:56 [PATCH v3 0/4] locking/rwsem: Add reader-owned state to the owner field Waiman Long
2016-05-12 22:56 ` [PATCH v3 1/4] " Waiman Long
2016-05-12 22:56 ` [PATCH v3 2/4] locking/rwsem: Don't wake up one's own task Waiman Long
2016-05-17 17:45   ` Peter Hurley [this message]
2016-05-12 22:56 ` [PATCH v3 3/4] locking/rwsem: Improve reader wakeup code Waiman Long
2016-05-17 17:30   ` Peter Hurley
2016-05-12 22:56 ` [PATCH v3 4/4] locking/rwsem: Streamline the rwsem_optimistic_spin() code Waiman Long
2016-05-17 17:47   ` Peter Hurley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=573B58D4.4090406@hurleysoftware.com \
    --to=peter@hurleysoftware.com \
    --cc=Waiman.Long@hpe.com \
    --cc=dave@stgolabs.net \
    --cc=david@fromorbit.com \
    --cc=doug.hatch@hpe.com \
    --cc=jason.low2@hp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=peterz@infradead.org \
    --cc=scott.norton@hpe.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox