From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org,
linux-rt-users <linux-rt-users@vger.kernel.org>
Cc: Thomas Gleixner <tglx@linutronix.de>,
Carsten Emde <C.Emde@osadl.org>,
Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
John Kacur <jkacur@redhat.com>, Daniel Wagner <wagi@monom.org>,
Tom Zanussi <zanussi@kernel.org>,
"Srivatsa S. Bhat" <srivatsa@csail.mit.edu>
Subject: [PATCH RT 1/4] Revert "net: Properly annotate the try-lock for the seqlock"
Date: Fri, 11 Dec 2020 16:41:04 -0500 [thread overview]
Message-ID: <20201211214130.210869665@goodmis.org> (raw)
In-Reply-To: 20201211214103.954245915@goodmis.org
5.4.82-rt46-rc1 stable review patch.
If anyone has any objections, please let me know.
------------------
From: "Steven Rostedt (VMware)" <rostedt@goodmis.org>
This reverts commit 3971227b5af04e6c34ef7b47b2ebe941727563a0.
Link: https://lore.kernel.org/r/20201116171958.2opbksmgbznrjxu2@linutronix.de
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
---
include/linux/seqlock.h | 9 +++++++++
include/net/sch_generic.h | 10 +---------
2 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/include/linux/seqlock.h b/include/linux/seqlock.h
index f390293974ea..e5207897c33e 100644
--- a/include/linux/seqlock.h
+++ b/include/linux/seqlock.h
@@ -489,6 +489,15 @@ static inline void write_seqlock(seqlock_t *sl)
__raw_write_seqcount_begin(&sl->seqcount);
}
+static inline int try_write_seqlock(seqlock_t *sl)
+{
+ if (spin_trylock(&sl->lock)) {
+ __raw_write_seqcount_begin(&sl->seqcount);
+ return 1;
+ }
+ return 0;
+}
+
static inline void write_sequnlock(seqlock_t *sl)
{
__raw_write_seqcount_end(&sl->seqcount);
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 112d2dca8b08..e6afb4b9cede 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -168,16 +168,8 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc)
return false;
}
#ifdef CONFIG_PREEMPT_RT
- if (spin_trylock(&qdisc->running.lock)) {
- seqcount_t *s = &qdisc->running.seqcount;
- /*
- * Variant of write_seqcount_t_begin() telling lockdep that a
- * trylock was attempted.
- */
- __raw_write_seqcount_begin(s);
- seqcount_acquire(&s->dep_map, 0, 1, _RET_IP_);
+ if (try_write_seqlock(&qdisc->running))
return true;
- }
return false;
#else
/* Variant of write_seqcount_begin() telling lockdep a trylock
--
2.29.2
next prev parent reply other threads:[~2020-12-11 22:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-12-11 21:41 [PATCH RT 0/4] Linux 5.4.82-rt46-rc1 Steven Rostedt
2020-12-11 21:41 ` Steven Rostedt [this message]
2020-12-11 21:41 ` [PATCH RT 2/4] Revert "hrtimer: Allow raw wakeups during boot" Steven Rostedt
2020-12-14 8:33 ` Sebastian Andrzej Siewior
2020-12-11 21:41 ` [PATCH RT 3/4] timers: Move clearing of base::timer_running under base::lock Steven Rostedt
2020-12-11 21:41 ` [PATCH RT 4/4] Linux 5.4.82-rt46-rc1 Steven Rostedt
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=20201211214130.210869665@goodmis.org \
--to=rostedt@goodmis.org \
--cc=C.Emde@osadl.org \
--cc=bigeasy@linutronix.de \
--cc=jkacur@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rt-users@vger.kernel.org \
--cc=srivatsa@csail.mit.edu \
--cc=tglx@linutronix.de \
--cc=wagi@monom.org \
--cc=zanussi@kernel.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;
as well as URLs for NNTP newsgroup(s).