public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Waiman Long <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, hpa@zytor.com, mingo@kernel.org,
	torvalds@linux-foundation.org, peterz@infradead.org,
	riel@redhat.com, Waiman.Long@hp.com, tglx@linutronix.de,
	scott.norton@hp.com, fengguang.wu@intel.com,
	maarten.lankhorst@canonical.com
Subject: [tip:locking/core] locking/selftest: Support queued rwlock
Date: Thu, 17 Jul 2014 04:00:16 -0700	[thread overview]
Message-ID: <tip-586fefe5bbdc931fb0725b850f7002f6d71a1aa3@git.kernel.org> (raw)
In-Reply-To: <1403804351-405-3-git-send-email-Waiman.Long@hp.com>

Commit-ID:  586fefe5bbdc931fb0725b850f7002f6d71a1aa3
Gitweb:     http://git.kernel.org/tip/586fefe5bbdc931fb0725b850f7002f6d71a1aa3
Author:     Waiman Long <Waiman.Long@hp.com>
AuthorDate: Thu, 26 Jun 2014 13:39:11 -0400
Committer:  Ingo Molnar <mingo@kernel.org>
CommitDate: Thu, 17 Jul 2014 12:32:53 +0200

locking/selftest: Support queued rwlock

The queued rwlock does not support the use of recursive read-lock in
the process context. With changes in the lockdep code to check and
disallow recursive read-lock when queued rwlock is configured, it
is also necessary for the locking selftest to be updated to change
the process context recursive read locking results from SUCCESS to
FAILURE for queued rwlock.

Cc: Scott J Norton <scott.norton@hp.com>
Cc: Fengguang Wu <fengguang.wu@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Rik van Riel <riel@redhat.com>
Signed-off-by: Waiman Long <Waiman.Long@hp.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1403804351-405-3-git-send-email-Waiman.Long@hp.com
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
 lib/locking-selftest.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/locking-selftest.c b/lib/locking-selftest.c
index 872a15a..596934d 100644
--- a/lib/locking-selftest.c
+++ b/lib/locking-selftest.c
@@ -1069,7 +1069,7 @@ static inline void print_testname(const char *testname)
 	print_testname(desc);					\
 	dotest(name##_spin, FAILURE, LOCKTYPE_SPIN);		\
 	dotest(name##_wlock, FAILURE, LOCKTYPE_RWLOCK);		\
-	dotest(name##_rlock, SUCCESS, LOCKTYPE_RWLOCK);		\
+	dotest(name##_rlock, FAILURE, LOCKTYPE_RWLOCK);		\
 	dotest(name##_mutex, FAILURE, LOCKTYPE_MUTEX);		\
 	dotest(name##_wsem, FAILURE, LOCKTYPE_RWSEM);		\
 	dotest(name##_rsem, FAILURE, LOCKTYPE_RWSEM);		\
@@ -1830,14 +1830,14 @@ void locking_selftest(void)
 	printk("  --------------------------------------------------------------------------\n");
 	print_testname("recursive read-lock");
 	printk("             |");
-	dotest(rlock_AA1, SUCCESS, LOCKTYPE_RWLOCK);
+	dotest(rlock_AA1, FAILURE, LOCKTYPE_RWLOCK);
 	printk("             |");
 	dotest(rsem_AA1, FAILURE, LOCKTYPE_RWSEM);
 	printk("\n");
 
 	print_testname("recursive read-lock #2");
 	printk("             |");
-	dotest(rlock_AA1B, SUCCESS, LOCKTYPE_RWLOCK);
+	dotest(rlock_AA1B, FAILURE, LOCKTYPE_RWLOCK);
 	printk("             |");
 	dotest(rsem_AA1B, FAILURE, LOCKTYPE_RWSEM);
 	printk("\n");

  reply	other threads:[~2014-07-17 11:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-26 17:39 [PATCH v5 0/2] lockdep: add support for queued rwlock Waiman Long
2014-06-26 17:39 ` [PATCH v5 1/2] lockdep: restrict the use of recursive read_lock with qrwlock Waiman Long
2014-07-17 11:00   ` [tip:locking/core] locking/lockdep: Restrict the use of recursive read_lock() " tip-bot for Waiman Long
2014-06-26 17:39 ` [PATCH v5 2/2] locking-selftest: Support queue rwlock Waiman Long
2014-07-17 11:00   ` tip-bot for Waiman Long [this message]
2014-07-07 12:50 ` [PATCH v5 0/2] lockdep: add support for queued rwlock Peter Zijlstra
2014-07-15 19:19   ` Waiman Long
  -- strict thread matches above, loose matches on Subject: below --
2014-08-06 17:22 [PATCH v7 2/2] locking/selftest: Support " Waiman Long
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=tip-586fefe5bbdc931fb0725b850f7002f6d71a1aa3@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=Waiman.Long@hp.com \
    --cc=fengguang.wu@intel.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@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 \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /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