From: tip-bot for Trond Myklebust <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, trond.myklebust@primarydata.com,
peterz@infradead.org, sboyd@codeaurora.org,
viro@zeniv.linux.org.uk, davem@davemloft.net,
john.stultz@linaro.org, Waiman.Long@hp.com, tglx@linutronix.de
Subject: [tip:locking/core] lockdep: Revert lockdep check in raw_seqcount_begin()
Date: Thu, 19 Jun 2014 05:36:52 -0700 [thread overview]
Message-ID: <tip-22fdcf02f6e80d64a927f702dd9d631a927d87d4@git.kernel.org> (raw)
In-Reply-To: <CAHQdGtRR6SvEhXiqWo24hoUh9AU9cL82Z8Z-d8-7u951F_d+5g@mail.gmail.com>
Commit-ID: 22fdcf02f6e80d64a927f702dd9d631a927d87d4
Gitweb: http://git.kernel.org/tip/22fdcf02f6e80d64a927f702dd9d631a927d87d4
Author: Trond Myklebust <trond.myklebust@primarydata.com>
AuthorDate: Thu, 5 Jun 2014 11:31:01 -0400
Committer: Ingo Molnar <mingo@kernel.org>
CommitDate: Wed, 18 Jun 2014 18:41:23 +0200
lockdep: Revert lockdep check in raw_seqcount_begin()
This commit reverts the addition of lockdep checking to raw_seqcount_begin
for the following reasons:
1) It violates the naming convention that raw_* functions should not
do lockdep checks (a convention that is also followed by the other
raw_*_seqcount_begin functions).
2) raw_seqcount_begin does not spin, so it can only be part of an ABBA
deadlock in very special circumstances (for instance if a lock
is held across the entire raw_seqcount_begin()+read_seqcount_retry()
loop while also being taken inside the write_seqcount protected area).
3) It is causing false positives with some existing callers, and there
is no non-lockdep alternative for those callers to use.
None of the three existing callers (__d_lookup_rcu, netdev_get_name, and
the NFS state code) appear to use the function in a manner that is ABBA
deadlock prone.
Fixes: 1ca7d67cf5d5: seqcount: Add lockdep functionality to seqcount/seqlock
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Peter Zijlstra <peterz@infradead.org>
Cc: John Stultz <john.stultz@linaro.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Waiman Long <Waiman.Long@hp.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Link: http://lkml.kernel.org/r/CAHQdGtRR6SvEhXiqWo24hoUh9AU9cL82Z8Z-d8-7u951F_d+5g@mail.gmail.com
Signed-off-by: Ingo Molnar <mingo@kernel.org>
---
include/linux/seqlock.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index 535f158..8cf3503 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -164,8 +164,6 @@ static inline unsigned read_seqcount_begin(const seqcount_t *s)
static inline unsigned raw_seqcount_begin(const seqcount_t *s)
{
unsigned ret = ACCESS_ONCE(s->sequence);
-
- seqcount_lockdep_reader_access(s);
smp_rmb();
return ret & ~1;
}
prev parent reply other threads:[~2014-06-19 12:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140602104948.4faf0bc2@tlielax.poochiereds.net>
2014-06-02 16:02 ` nfs4_do_reclaim lockdep pop in v3.15.0-rc1 Trond Myklebust
2014-06-02 22:12 ` John Stultz
2014-06-02 22:42 ` Trond Myklebust
2014-06-02 22:49 ` John Stultz
2014-06-03 0:59 ` Trond Myklebust
2014-06-03 3:19 ` John Stultz
2014-06-03 10:55 ` Peter Zijlstra
2014-06-03 14:25 ` Trond Myklebust
2014-06-03 10:48 ` Peter Zijlstra
2014-06-19 12:36 ` tip-bot for Trond Myklebust [this message]
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-22fdcf02f6e80d64a927f702dd9d631a927d87d4@git.kernel.org \
--to=tipbot@zytor.com \
--cc=Waiman.Long@hp.com \
--cc=davem@davemloft.net \
--cc=hpa@zytor.com \
--cc=john.stultz@linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tip-commits@vger.kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=sboyd@codeaurora.org \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=trond.myklebust@primarydata.com \
--cc=viro@zeniv.linux.org.uk \
/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