All of lore.kernel.org
 help / color / mirror / Atom feed
From: Waiman Long <Waiman.Long@hp.com>
To: Ingo Molnar <mingo@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Maarten Lankhorst <maarten.lankhorst@canonical.com>,
	Rik van Riel <riel@redhat.com>
Cc: linux-kernel@vger.kernel.org,
	Scott J Norton <scott.norton@hp.com>,
	Fengguang Wu <fengguang.wu@intel.com>,
	Waiman Long <Waiman.Long@hp.com>
Subject: [PATCH v7 0/2] lockdep: add support for queued rwlock
Date: Wed,  6 Aug 2014 13:22:00 -0400	[thread overview]
Message-ID: <1407345722-61615-1-git-send-email-Waiman.Long@hp.com> (raw)

v6->v7:
 - Add recursive read-lock with interrupt test in locking-selftest.c.

v5->v6:
 - Unconditionally disallow the use of recursive read-lock in process
   context.
 - Promote read state 3 to 2 when in interrupt context instead of
   doing additional check in check_deadlock().
 - Fix some comments in locking-selftest.c.

v4->v5:
 - Add patch 2 to update the locking selftest code to handle recursive
   read_lock correctly. Patch 1 has no change.

v3->v4:
 - Document the new read state and move the conditional compilation code
   to lockdep.h.

v2->v3:
 - Add a new read mode (3) for rwlock (used in
   lock_acquire_shared_cond_recursive()) to avoid conflict with other
   use cases of lock_acquire_shared_recursive().

v1->v2:
 - Use less conditional & make it easier to read

With the merging of qrwlock into 3.16, it was found that the btrfs
filesystem hanged readily. A fix was devised and merged into rc2 and
the use of recursive read_lock call was part of the problem.

This patch series addes code to the lockdep subsystem to catch this
kind of recursive read_lock calls in kernel code. It also updates
the locking selftest to handle recursive read_lock correctly so that
it won't complain about test failures.

Waiman Long (2):
  locking/lockdep: Restrict the use of recursive read_lock() with
    qrwlock
  locking/selftest: Support queued rwlock

 include/linux/lockdep.h  |   10 +++++++-
 kernel/locking/lockdep.c |    6 +++++
 lib/locking-selftest.c   |   56 ++++++++++++++++++++++++++++++++++++++++-----
 3 files changed, 64 insertions(+), 8 deletions(-)


             reply	other threads:[~2014-08-06 17:22 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-06 17:22 Waiman Long [this message]
2014-08-06 17:22 ` [PATCH v7 1/2] locking/lockdep: Restrict the use of recursive read_lock() with qrwlock Waiman Long
2014-08-13 10:56   ` [tip:locking/core] " tip-bot for Waiman Long
2014-08-06 17:22 ` [PATCH v7 2/2] locking/selftest: Support queued rwlock Waiman Long
2014-08-07  9:58   ` Peter Zijlstra
2014-08-13 10:57   ` [tip:locking/core] " tip-bot for Waiman Long

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=1407345722-61615-1-git-send-email-Waiman.Long@hp.com \
    --to=waiman.long@hp.com \
    --cc=fengguang.wu@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@canonical.com \
    --cc=mingo@kernel.org \
    --cc=peterz@infradead.org \
    --cc=riel@redhat.com \
    --cc=scott.norton@hp.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.