diff options
author | Thomas Gleixner <tglx@linutronix.de> | 2021-07-07 22:23:55 +0200 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2021-07-07 22:39:49 +0200 |
commit | c8eff2bb1abeaf5d911fd8a66aed24a549f639c4 (patch) | |
tree | fcd29fe7e619bd1533fd6a3a1fbffc13fbe709f6 /patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch | |
parent | c6725e2f14b523bba0f8fe4472a07aaf8681ad75 (diff) | |
download | linux-rt-c8eff2bb1abeaf5d911fd8a66aed24a549f639c4.tar.gz |
[ANNOUNCE] v5.13-rt1
Dear RT folks!
I'm pleased to announce the v5.13-rt1 patch set.
Changes since v5.12-rc3-rt3:
- Fast forward to v5.13
- Rework of the locking core bits
- Rework of large parts of the mm bits. Thanks to Mel Gorman and
Vlastimil Babka for picking this up and polishing it with -mm
wizardry.
- The latest respin of the printk overhaul from John Ogness
- Patch queue reordered
Known issues
- config dependent build fails on ARM (also in plain v5.13)
- netconsole triggers WARN.
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-rt-devel.git v5.13-rt1
The RT patch against v5.13 can be found here:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.13/patch-5.13-rt1.patch.xz
The split quilt queue is available at:
https://cdn.kernel.org/pub/linux/kernel/projects/rt/5.13/patches-5.13-rt1.tar.xz
Thanks,
tglx
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch')
-rw-r--r-- | patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch b/patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch new file mode 100644 index 000000000000..4a67e4a4b32b --- /dev/null +++ b/patches/net__Properly_annotate_the_try-lock_for_the_seqlock.patch @@ -0,0 +1,70 @@ +Subject: net: Properly annotate the try-lock for the seqlock +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Tue Sep 8 16:57:11 2020 +0200 + +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + +In patch + ("net/Qdisc: use a seqlock instead seqcount") + +the seqcount has been replaced with a seqlock to allow to reader to +boost the preempted writer. +The try_write_seqlock() acquired the lock with a try-lock but the +seqcount annotation was "lock". + +Opencode write_seqcount_t_begin() and use the try-lock annotation for +lockdep. + +Reported-by: Mike Galbraith <efault@gmx.de> +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Signed-off-by: Thomas Gleixner <tglx@linutronix.de> + + +--- + include/net/net_seq_lock.h | 9 --------- + include/net/sch_generic.h | 10 +++++++++- + 2 files changed, 9 insertions(+), 10 deletions(-) +--- +diff --git a/include/net/net_seq_lock.h b/include/net/net_seq_lock.h +index 95a497a72e51..67710bace741 100644 +--- a/include/net/net_seq_lock.h ++++ b/include/net/net_seq_lock.h +@@ -6,15 +6,6 @@ + # define net_seq_begin(__r) read_seqbegin(__r) + # define net_seq_retry(__r, __s) read_seqretry(__r, __s) + +-static inline int try_write_seqlock(seqlock_t *sl) +-{ +- if (spin_trylock(&sl->lock)) { +- write_seqcount_begin(&sl->seqcount); +- return 1; +- } +- return 0; +-} +- + #else + # define net_seqlock_t seqcount_t + # define net_seq_begin(__r) read_seqcount_begin(__r) +diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h +index 28344504adaf..d0b917d7c9a1 100644 +--- a/include/net/sch_generic.h ++++ b/include/net/sch_generic.h +@@ -197,8 +197,16 @@ static inline bool qdisc_run_begin(struct Qdisc *qdisc) + return false; + } + #ifdef CONFIG_PREEMPT_RT +- if (try_write_seqlock(&qdisc->running)) ++ if (spin_trylock(&qdisc->running.lock)) { ++ seqcount_t *s = &qdisc->running.seqcount.seqcount; ++ /* ++ * Variant of write_seqcount_t_begin() telling lockdep that a ++ * trylock was attempted. ++ */ ++ do_raw_write_seqcount_begin(s); ++ seqcount_acquire(&s->dep_map, 0, 1, _RET_IP_); + return true; ++ } + return false; + #else + /* Variant of write_seqcount_begin() telling lockdep a trylock |