diff options
author | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-20 23:19:34 +0100 |
---|---|---|
committer | Salvatore Bonaccorso <carnil@debian.org> | 2019-12-20 23:22:40 +0100 |
commit | 895ad13be1b83e4618e0dbfb7bfee2ef37dc9d37 (patch) | |
tree | 5fb86034b39e87fe8fc77a04a927dd8491376f04 | |
parent | 11507fa55f3394f7a5e1f2520414f1c592db9d9c (diff) | |
download | kernel_replicant_linux-895ad13be1b83e4618e0dbfb7bfee2ef37dc9d37.tar.gz kernel_replicant_linux-895ad13be1b83e4618e0dbfb7bfee2ef37dc9d37.tar.bz2 kernel_replicant_linux-895ad13be1b83e4618e0dbfb7bfee2ef37dc9d37.zip |
[rt] Update to 5.4.5-rt3
257 files changed, 559 insertions, 758 deletions
diff --git a/debian/changelog b/debian/changelog index 136277ad3c5e..4c842b21ed34 100644 --- a/debian/changelog +++ b/debian/changelog @@ -288,6 +288,7 @@ linux (5.4.5-1~exp1) UNRELEASED; urgency=medium [ Salvatore Bonaccorso ] * [rt] Update to 5.4.3-rt1 and re-enable * [rt] Enable PREEMPT_RT (instead of PREEMPT_RT_FULL) which is part of 5.4 + * [rt] Update to 5.4.5-rt3 [ YunQiang Su ] * [mipsel,mips64el/loongson-3] Enable AMDGPU. diff --git a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index b44757ef6e69..550585ffd233 100644 --- a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 28 May 2018 15:24:20 +0200 Subject: [PATCH 1/4] Split IRQ-off and zone->lock while freeing pages from PCP list #1 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0001-cgroup-Remove-css_rstat_flush.patch b/debian/patches-rt/0001-cgroup-Remove-css_rstat_flush.patch index 915ccbf1012c..f3bfb0bac19d 100644 --- a/debian/patches-rt/0001-cgroup-Remove-css_rstat_flush.patch +++ b/debian/patches-rt/0001-cgroup-Remove-css_rstat_flush.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 15 Aug 2019 18:14:16 +0200 Subject: [PATCH 1/4] cgroup: Remove ->css_rstat_flush() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz I was looking at the lifetime of the the ->css_rstat_flush() to see if cgroup_rstat_cpu_lock should remain a raw_spinlock_t. I didn't find any diff --git a/debian/patches-rt/0001-jbd2-Simplify-journal_unmap_buffer.patch b/debian/patches-rt/0001-jbd2-Simplify-journal_unmap_buffer.patch index e85118178b35..b040cc8e4176 100644 --- a/debian/patches-rt/0001-jbd2-Simplify-journal_unmap_buffer.patch +++ b/debian/patches-rt/0001-jbd2-Simplify-journal_unmap_buffer.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 9 Aug 2019 14:42:27 +0200 Subject: [PATCH 1/7] jbd2: Simplify journal_unmap_buffer() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz journal_unmap_buffer() checks first whether the buffer head is a journal. If so it takes locks and then invokes jbd2_journal_grab_journal_head() diff --git a/debian/patches-rt/0001-mm-page_alloc-Split-drain_local_pages.patch b/debian/patches-rt/0001-mm-page_alloc-Split-drain_local_pages.patch index b2cab4d08c07..9022e67951c9 100644 --- a/debian/patches-rt/0001-mm-page_alloc-Split-drain_local_pages.patch +++ b/debian/patches-rt/0001-mm-page_alloc-Split-drain_local_pages.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner <anna-maria@linutronix.de> Date: Thu, 18 Apr 2019 11:09:04 +0200 Subject: [PATCH 1/4] mm/page_alloc: Split drain_local_pages() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Splitting the functionality of drain_local_pages() into a separate function. This is a preparatory work for introducing the static key diff --git a/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch b/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch index 01b8d2bb2a78..7c5080e7b76c 100644 --- a/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch +++ b/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:39 +0100 Subject: [PATCH 01/25] printk-rb: add printk ring buffer documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The full documentation file for the printk ring buffer. diff --git a/debian/patches-rt/0001-workqueue-Don-t-assume-that-the-callback-has-interru.patch b/debian/patches-rt/0001-workqueue-Don-t-assume-that-the-callback-has-interru.patch index abb18a33fd5c..d2932379ee16 100644 --- a/debian/patches-rt/0001-workqueue-Don-t-assume-that-the-callback-has-interru.patch +++ b/debian/patches-rt/0001-workqueue-Don-t-assume-that-the-callback-has-interru.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 11 Jun 2019 11:21:02 +0200 Subject: [PATCH 1/4] workqueue: Don't assume that the callback has interrupts disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Due to the TIMER_IRQSAFE flag, the timer callback is invoked with disabled interrupts. On -RT the callback is invoked in softirq context diff --git a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 5a8635a7f6fd..461e7f99f69c 100644 --- a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 28 May 2018 15:24:21 +0200 Subject: [PATCH 2/4] Split IRQ-off and zone->lock while freeing pages from PCP list #2 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0002-cgroup-Consolidate-users-of-cgroup_rstat_lock.patch b/debian/patches-rt/0002-cgroup-Consolidate-users-of-cgroup_rstat_lock.patch index 9ca443ca149b..a80e5f343bbe 100644 --- a/debian/patches-rt/0002-cgroup-Consolidate-users-of-cgroup_rstat_lock.patch +++ b/debian/patches-rt/0002-cgroup-Consolidate-users-of-cgroup_rstat_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 16 Aug 2019 12:20:42 +0200 Subject: [PATCH 2/4] cgroup: Consolidate users of cgroup_rstat_lock. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz cgroup_rstat_flush_irqsafe() has no users, remove it. cgroup_rstat_flush_hold() and cgroup_rstat_flush_release() are only used within diff --git a/debian/patches-rt/0002-jbd2-Remove-jbd_trylock_bh_state.patch b/debian/patches-rt/0002-jbd2-Remove-jbd_trylock_bh_state.patch index 273e86f79b79..ce20535768e5 100644 --- a/debian/patches-rt/0002-jbd2-Remove-jbd_trylock_bh_state.patch +++ b/debian/patches-rt/0002-jbd2-Remove-jbd_trylock_bh_state.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 9 Aug 2019 14:42:28 +0200 Subject: [PATCH 2/7] jbd2: Remove jbd_trylock_bh_state() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz No users. diff --git a/debian/patches-rt/0002-mm-swap-Add-static-key-dependent-pagevec-locking.patch b/debian/patches-rt/0002-mm-swap-Add-static-key-dependent-pagevec-locking.patch index c4f2d5a93ad6..d374802e7144 100644 --- a/debian/patches-rt/0002-mm-swap-Add-static-key-dependent-pagevec-locking.patch +++ b/debian/patches-rt/0002-mm-swap-Add-static-key-dependent-pagevec-locking.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 18 Apr 2019 11:09:05 +0200 Subject: [PATCH 2/4] mm/swap: Add static key dependent pagevec locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The locking of struct pagevec is done by disabling preemption. In case the struct has be accessed form interrupt context then interrupts are diff --git a/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch b/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch index 4f4dffe20209..13cadc4e2e7f 100644 --- a/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch +++ b/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:40 +0100 Subject: [PATCH 02/25] printk-rb: add prb locking functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add processor-reentrant spin locking functions. These allow restricting the number of possible contexts to 2, which can simplify diff --git a/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch b/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch index 86110023ddf5..995660b9c6d0 100644 --- a/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch +++ b/debian/patches-rt/0002-sched-swait-Add-swait_event_lock_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 22 May 2019 12:42:26 +0200 Subject: [PATCH 2/4] sched/swait: Add swait_event_lock_irq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The swait_event_lock_irq() is inspired by wait_event_lock_irq(). This is required by the workqueue code once it switches to swait. diff --git a/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch b/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch index 14ea9d2e0674..af7789b5e92f 100644 --- a/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch +++ b/debian/patches-rt/0003-cgroup-Remove-may_sleep-from-cgroup_rstat_flush_lock.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 16 Aug 2019 12:25:35 +0200 Subject: [PATCH 3/4] cgroup: Remove `may_sleep' from cgroup_rstat_flush_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz cgroup_rstat_flush_locked() is always invoked with `may_sleep' set to true so that this case can be made default and the parameter removed. diff --git a/debian/patches-rt/0003-jbd2-Move-dropping-of-jh-reference-out-of-un-re-fili.patch b/debian/patches-rt/0003-jbd2-Move-dropping-of-jh-reference-out-of-un-re-fili.patch index bf61f7d0ae4a..1b49dfe58b6c 100644 --- a/debian/patches-rt/0003-jbd2-Move-dropping-of-jh-reference-out-of-un-re-fili.patch +++ b/debian/patches-rt/0003-jbd2-Move-dropping-of-jh-reference-out-of-un-re-fili.patch @@ -2,7 +2,7 @@ From: Jan Kara <jack@suse.cz> Date: Fri, 9 Aug 2019 14:42:29 +0200 Subject: [PATCH 3/7] jbd2: Move dropping of jh reference out of un/re-filing functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __jbd2_journal_unfile_buffer() and __jbd2_journal_refile_buffer() drop transaction's jh reference when they remove jh from a transaction. This diff --git a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch index 95d3aa93d95c..09fba1e044a2 100644 --- a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 28 May 2018 15:24:22 +0200 Subject: [PATCH 3/4] mm/SLxB: change list_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The list_lock is used with used with IRQs off on RT. Make it a raw_spinlock_t otherwise the interrupts won't be disabled on -RT. The locking rules remain diff --git a/debian/patches-rt/0003-mm-swap-Access-struct-pagevec-remotely.patch b/debian/patches-rt/0003-mm-swap-Access-struct-pagevec-remotely.patch index 5bc3c0f19472..d5ab10978b1b 100644 --- a/debian/patches-rt/0003-mm-swap-Access-struct-pagevec-remotely.patch +++ b/debian/patches-rt/0003-mm-swap-Access-struct-pagevec-remotely.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 18 Apr 2019 11:09:06 +0200 Subject: [PATCH 3/4] mm/swap: Access struct pagevec remotely -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When the newly introduced static key would be enabled, struct pagevec is locked during access. So it is possible to access it from a remote CPU. The diff --git a/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch b/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch index 912fa575dc3a..ffe751abeff4 100644 --- a/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch +++ b/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:41 +0100 Subject: [PATCH 03/25] printk-rb: define ring buffer struct and initializer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz See Documentation/printk-ringbuffer.txt for details about the initializer arguments. diff --git a/debian/patches-rt/0003-workqueue-Use-swait-for-wq_manager_wait.patch b/debian/patches-rt/0003-workqueue-Use-swait-for-wq_manager_wait.patch index 1df8ad7b60d9..53f426dc5d99 100644 --- a/debian/patches-rt/0003-workqueue-Use-swait-for-wq_manager_wait.patch +++ b/debian/patches-rt/0003-workqueue-Use-swait-for-wq_manager_wait.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 11 Jun 2019 11:21:09 +0200 Subject: [PATCH 3/4] workqueue: Use swait for wq_manager_wait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In order for the workqueue code use raw_spinlock_t typed locking there must not be a spinlock_t typed lock be acquired. A wait_queue_head uses @@ -43,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> return true; } -@@ -3532,7 +3533,7 @@ static void put_unbound_pool(struct work +@@ -3538,7 +3539,7 @@ static void put_unbound_pool(struct work * manager and @pool gets freed with the flag set. */ spin_lock_irq(&pool->lock); diff --git a/debian/patches-rt/0004-cgroup-Acquire-cgroup_rstat_lock-with-enabled-interr.patch b/debian/patches-rt/0004-cgroup-Acquire-cgroup_rstat_lock-with-enabled-interr.patch index d75a1b4c5382..dfb7bf71a504 100644 --- a/debian/patches-rt/0004-cgroup-Acquire-cgroup_rstat_lock-with-enabled-interr.patch +++ b/debian/patches-rt/0004-cgroup-Acquire-cgroup_rstat_lock-with-enabled-interr.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 16 Aug 2019 12:49:36 +0200 Subject: [PATCH 4/4] cgroup: Acquire cgroup_rstat_lock with enabled interrupts -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There is no need to disable interrupts while cgroup_rstat_lock is acquired. The lock is never used in-IRQ context so a simple spin_lock() diff --git a/debian/patches-rt/0004-jbd2-Drop-unnecessary-branch-from-jbd2_journal_forge.patch b/debian/patches-rt/0004-jbd2-Drop-unnecessary-branch-from-jbd2_journal_forge.patch index fb5f3bc4a1c6..33071fc630dd 100644 --- a/debian/patches-rt/0004-jbd2-Drop-unnecessary-branch-from-jbd2_journal_forge.patch +++ b/debian/patches-rt/0004-jbd2-Drop-unnecessary-branch-from-jbd2_journal_forge.patch @@ -1,7 +1,7 @@ From: Jan Kara <jack@suse.cz> Date: Fri, 9 Aug 2019 14:42:30 +0200 Subject: [PATCH 4/7] jbd2: Drop unnecessary branch from jbd2_journal_forget() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz We have cleared both dirty & jbddirty bits from the bh. So there's no difference between bforget() and brelse(). Thus there's no point jumping diff --git a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch index fc3ccbde1077..400cbc88a6c8 100644 --- a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch +++ b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 21 Jun 2018 17:29:19 +0200 Subject: [PATCH 4/4] mm/SLUB: delay giving back empty slubs to IRQ enabled regions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __free_slab() is invoked with disabled interrupts which increases the irq-off time while __free_pages() is doing the work. diff --git a/debian/patches-rt/0004-mm-swap-Enable-use_pvec_lock-nohz_full-dependent.patch b/debian/patches-rt/0004-mm-swap-Enable-use_pvec_lock-nohz_full-dependent.patch index ad25271a1d75..46353ce5f4c9 100644 --- a/debian/patches-rt/0004-mm-swap-Enable-use_pvec_lock-nohz_full-dependent.patch +++ b/debian/patches-rt/0004-mm-swap-Enable-use_pvec_lock-nohz_full-dependent.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner <anna-maria@linutronix.de> Date: Thu, 18 Apr 2019 11:09:07 +0200 Subject: [PATCH 4/4] mm/swap: Enable "use_pvec_lock" nohz_full dependent -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When a system runs with CONFIG_NO_HZ_FULL enabled, the tick of CPUs listed in 'nohz_full=' kernel command line parameter should be stopped whenever diff --git a/debian/patches-rt/0004-printk-rb-add-writer-interface.patch b/debian/patches-rt/0004-printk-rb-add-writer-interface.patch index dcc4bfa6cdfa..9a7c275e4ccc 100644 --- a/debian/patches-rt/0004-printk-rb-add-writer-interface.patch +++ b/debian/patches-rt/0004-printk-rb-add-writer-interface.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:42 +0100 Subject: [PATCH 04/25] printk-rb: add writer interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add the writer functions prb_reserve() and prb_commit(). These make use of processor-reentrant spin locks to limit the number of possible diff --git a/debian/patches-rt/0004-workqueue-Convert-the-locks-to-raw-type.patch b/debian/patches-rt/0004-workqueue-Convert-the-locks-to-raw-type.patch index 7fc27cb4b13c..67257666bd89 100644 --- a/debian/patches-rt/0004-workqueue-Convert-the-locks-to-raw-type.patch +++ b/debian/patches-rt/0004-workqueue-Convert-the-locks-to-raw-type.patch @@ -1,24 +1,20 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 22 May 2019 12:43:56 +0200 Subject: [PATCH 4/4] workqueue: Convert the locks to raw type -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz After all the workqueue and the timer rework, we can finally make the worker_pool lock raw. The lock is not held over an unbounded period of time/iterations. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -[Salvatore Bonaccorso: Adjust for context changes due to backport of -e66b39af00f4 ("workqueue: Fix pwq ref leak in rescuer_thread()") and -def98c84b6cd ("workqueue: Fix spurious sanity check failures in -destroy_workqueue()") in 5.4.4.] --- - kernel/workqueue.c | 164 ++++++++++++++++++++++++++--------------------------- - 1 file changed, 82 insertions(+), 82 deletions(-) + kernel/workqueue.c | 168 ++++++++++++++++++++++++++--------------------------- + 1 file changed, 84 insertions(+), 84 deletions(-) --- a/kernel/workqueue.c +++ b/kernel/workqueue.c -@@ -146,7 +146,7 @@ +@@ -146,7 +146,7 @@ enum { /* struct worker is defined in workqueue_internal.h */ struct worker_pool { @@ -27,7 +23,7 @@ destroy_workqueue()") in 5.4.4.] int cpu; /* I: the associated cpu */ int node; /* I: the associated node ID */ int id; /* I: pool ID */ -@@ -301,7 +301,7 @@ +@@ -301,7 +301,7 @@ static struct workqueue_attrs *wq_update static DEFINE_MUTEX(wq_pool_mutex); /* protects pools and workqueues list */ static DEFINE_MUTEX(wq_pool_attach_mutex); /* protects worker attach/detach */ @@ -36,7 +32,7 @@ destroy_workqueue()") in 5.4.4.] static DECLARE_SWAIT_QUEUE_HEAD(wq_manager_wait); /* wait for manager to go away */ static LIST_HEAD(workqueues); /* PR: list of all workqueues */ -@@ -826,7 +826,7 @@ +@@ -826,7 +826,7 @@ static struct worker *first_idle_worker( * Wake up the first idle worker of @pool. * * CONTEXT: @@ -45,7 +41,7 @@ destroy_workqueue()") in 5.4.4.] */ static void wake_up_worker(struct worker_pool *pool) { -@@ -879,7 +879,7 @@ +@@ -879,7 +879,7 @@ void wq_worker_sleeping(struct task_stru return; worker->sleeping = 1; @@ -54,7 +50,7 @@ destroy_workqueue()") in 5.4.4.] /* * The counterpart of the following dec_and_test, implied mb, -@@ -898,7 +898,7 @@ +@@ -898,7 +898,7 @@ void wq_worker_sleeping(struct task_stru if (next) wake_up_process(next->task); } @@ -63,7 +59,7 @@ destroy_workqueue()") in 5.4.4.] } /** -@@ -909,7 +909,7 @@ +@@ -909,7 +909,7 @@ void wq_worker_sleeping(struct task_stru * the scheduler to get a worker's last known identity. * * CONTEXT: @@ -72,7 +68,7 @@ destroy_workqueue()") in 5.4.4.] * * This function is called during schedule() when a kworker is going * to sleep. It's used by psi to identify aggregation workers during -@@ -940,7 +940,7 @@ +@@ -940,7 +940,7 @@ work_func_t wq_worker_last_func(struct t * Set @flags in @worker->flags and adjust nr_running accordingly. * * CONTEXT: @@ -81,7 +77,7 @@ destroy_workqueue()") in 5.4.4.] */ static inline void worker_set_flags(struct worker *worker, unsigned int flags) { -@@ -965,7 +965,7 @@ +@@ -965,7 +965,7 @@ static inline void worker_set_flags(stru * Clear @flags in @worker->flags and adjust nr_running accordingly. * * CONTEXT: @@ -90,7 +86,7 @@ destroy_workqueue()") in 5.4.4.] */ static inline void worker_clr_flags(struct worker *worker, unsigned int flags) { -@@ -1013,7 +1013,7 @@ +@@ -1013,7 +1013,7 @@ static inline void worker_clr_flags(stru * actually occurs, it should be easy to locate the culprit work function. * * CONTEXT: @@ -99,7 +95,7 @@ destroy_workqueue()") in 5.4.4.] * * Return: * Pointer to worker which is executing @work if found, %NULL -@@ -1048,7 +1048,7 @@ +@@ -1048,7 +1048,7 @@ static struct worker *find_worker_execut * nested inside outer list_for_each_entry_safe(). * * CONTEXT: @@ -108,7 +104,7 @@ destroy_workqueue()") in 5.4.4.] */ static void move_linked_works(struct work_struct *work, struct list_head *head, struct work_struct **nextp) -@@ -1126,9 +1126,9 @@ +@@ -1126,9 +1126,9 @@ static void put_pwq_unlocked(struct pool * As both pwqs and pools are RCU protected, the * following lock operations are safe. */ @@ -120,7 +116,7 @@ destroy_workqueue()") in 5.4.4.] } } -@@ -1161,7 +1161,7 @@ +@@ -1161,7 +1161,7 @@ static void pwq_activate_first_delayed(s * decrement nr_in_flight of its pwq and handle workqueue flushing. * * CONTEXT: @@ -129,7 +125,7 @@ destroy_workqueue()") in 5.4.4.] */ static void pwq_dec_nr_in_flight(struct pool_workqueue *pwq, int color) { -@@ -1260,7 +1260,7 @@ +@@ -1260,7 +1260,7 @@ static int try_to_grab_pending(struct wo if (!pool) goto fail; @@ -138,7 +134,7 @@ destroy_workqueue()") in 5.4.4.] /* * work->data is guaranteed to point to pwq only while the work * item is queued on pwq->wq, and both updating work->data to point -@@ -1289,11 +1289,11 @@ +@@ -1289,11 +1289,11 @@ static int try_to_grab_pending(struct wo /* work->data points to pwq iff queued, point to pool */ set_work_pool_and_keep_pending(work, pool->id); @@ -152,7 +148,7 @@ destroy_workqueue()") in 5.4.4.] fail: rcu_read_unlock(); local_irq_restore(*flags); -@@ -1314,7 +1314,7 @@ +@@ -1314,7 +1314,7 @@ static int try_to_grab_pending(struct wo * work_struct flags. * * CONTEXT: @@ -161,7 +157,7 @@ destroy_workqueue()") in 5.4.4.] */ static void insert_work(struct pool_workqueue *pwq, struct work_struct *work, struct list_head *head, unsigned int extra_flags) -@@ -1429,7 +1429,7 @@ +@@ -1429,7 +1429,7 @@ static void __queue_work(int cpu, struct if (last_pool && last_pool != pwq->pool) { struct worker *worker; @@ -170,7 +166,7 @@ destroy_workqueue()") in 5.4.4.] worker = find_worker_executing_work(last_pool, work); -@@ -1437,11 +1437,11 @@ +@@ -1437,11 +1437,11 @@ static void __queue_work(int cpu, struct pwq = worker->current_pwq; } else { /* meh... not running there, queue here */ @@ -185,7 +181,7 @@ destroy_workqueue()") in 5.4.4.] } /* -@@ -1454,7 +1454,7 @@ +@@ -1454,7 +1454,7 @@ static void __queue_work(int cpu, struct */ if (unlikely(!pwq->refcnt)) { if (wq->flags & WQ_UNBOUND) { @@ -194,7 +190,7 @@ destroy_workqueue()") in 5.4.4.] cpu_relax(); goto retry; } -@@ -1486,7 +1486,7 @@ +@@ -1486,7 +1486,7 @@ static void __queue_work(int cpu, struct insert_work(pwq, work, worklist, work_flags); out: @@ -203,7 +199,7 @@ destroy_workqueue()") in 5.4.4.] rcu_read_unlock(); } -@@ -1757,7 +1757,7 @@ +@@ -1757,7 +1757,7 @@ EXPORT_SYMBOL(queue_rcu_work); * necessary. * * LOCKING: @@ -212,7 +208,7 @@ destroy_workqueue()") in 5.4.4.] */ static void worker_enter_idle(struct worker *worker) { -@@ -1797,7 +1797,7 @@ +@@ -1797,7 +1797,7 @@ static void worker_enter_idle(struct wor * @worker is leaving idle state. Update stats. * * LOCKING: @@ -221,7 +217,7 @@ destroy_workqueue()") in 5.4.4.] */ static void worker_leave_idle(struct worker *worker) { -@@ -1935,11 +1935,11 @@ +@@ -1935,11 +1935,11 @@ static struct worker *create_worker(stru worker_attach_to_pool(worker, pool); /* start the newly created worker */ @@ -235,7 +231,7 @@ destroy_workqueue()") in 5.4.4.] return worker; -@@ -1958,7 +1958,7 @@ +@@ -1958,7 +1958,7 @@ static struct worker *create_worker(stru * be idle. * * CONTEXT: @@ -244,7 +240,7 @@ destroy_workqueue()") in 5.4.4.] */ static void destroy_worker(struct worker *worker) { -@@ -1984,7 +1984,7 @@ +@@ -1984,7 +1984,7 @@ static void idle_worker_timeout(struct t { struct worker_pool *pool = from_timer(pool, t, idle_timer); @@ -253,7 +249,7 @@ destroy_workqueue()") in 5.4.4.] while (too_many_workers(pool)) { struct worker *worker; -@@ -2002,7 +2002,7 @@ +@@ -2002,7 +2002,7 @@ static void idle_worker_timeout(struct t destroy_worker(worker); } @@ -262,7 +258,7 @@ destroy_workqueue()") in 5.4.4.] } static void send_mayday(struct work_struct *work) -@@ -2033,8 +2033,8 @@ +@@ -2033,8 +2033,8 @@ static void pool_mayday_timeout(struct t struct worker_pool *pool = from_timer(pool, t, mayday_timer); struct work_struct *work; @@ -273,7 +269,7 @@ destroy_workqueue()") in 5.4.4.] if (need_to_create_worker(pool)) { /* -@@ -2047,8 +2047,8 @@ +@@ -2047,8 +2047,8 @@ static void pool_mayday_timeout(struct t send_mayday(work); } @@ -284,7 +280,7 @@ destroy_workqueue()") in 5.4.4.] mod_timer(&pool->mayday_timer, jiffies + MAYDAY_INTERVAL); } -@@ -2067,7 +2067,7 @@ +@@ -2067,7 +2067,7 @@ static void pool_mayday_timeout(struct t * may_start_working() %true. * * LOCKING: @@ -293,7 +289,7 @@ destroy_workqueue()") in 5.4.4.] * multiple times. Does GFP_KERNEL allocations. Called only from * manager. */ -@@ -2076,7 +2076,7 @@ +@@ -2076,7 +2076,7 @@ static void maybe_create_worker(struct w __acquires(&pool->lock) { restart: @@ -302,7 +298,7 @@ destroy_workqueue()") in 5.4.4.] /* if we don't make progress in MAYDAY_INITIAL_TIMEOUT, call for help */ mod_timer(&pool->mayday_timer, jiffies + MAYDAY_INITIAL_TIMEOUT); -@@ -2092,7 +2092,7 @@ +@@ -2092,7 +2092,7 @@ static void maybe_create_worker(struct w } del_timer_sync(&pool->mayday_timer); @@ -311,7 +307,7 @@ destroy_workqueue()") in 5.4.4.] /* * This is necessary even after a new worker was just successfully * created as @pool->lock was dropped and the new worker might have -@@ -2115,7 +2115,7 @@ +@@ -2115,7 +2115,7 @@ static void maybe_create_worker(struct w * and may_start_working() is true. * * CONTEXT: @@ -320,7 +316,7 @@ destroy_workqueue()") in 5.4.4.] * multiple times. Does GFP_KERNEL allocations. * * Return: -@@ -2154,7 +2154,7 @@ +@@ -2154,7 +2154,7 @@ static bool manage_workers(struct worker * call this function to process a work. * * CONTEXT: @@ -329,7 +325,7 @@ destroy_workqueue()") in 5.4.4.] */ static void process_one_work(struct worker *worker, struct work_struct *work) __releases(&pool->lock) -@@ -2236,7 +2236,7 @@ +@@ -2236,7 +2236,7 @@ static void process_one_work(struct work */ set_work_pool_and_clear_pending(work, pool->id); @@ -338,7 +334,7 @@ destroy_workqueue()") in 5.4.4.] lock_map_acquire(&pwq->wq->lockdep_map); lock_map_acquire(&lockdep_map); -@@ -2291,7 +2291,7 @@ +@@ -2291,7 +2291,7 @@ static void process_one_work(struct work */ cond_resched(); @@ -347,7 +343,7 @@ destroy_workqueue()") in 5.4.4.] /* clear cpu intensive status */ if (unlikely(cpu_intensive)) -@@ -2317,7 +2317,7 @@ +@@ -2317,7 +2317,7 @@ static void process_one_work(struct work * fetches a work from the top and executes it. * * CONTEXT: @@ -356,7 +352,7 @@ destroy_workqueue()") in 5.4.4.] * multiple times. */ static void process_scheduled_works(struct worker *worker) -@@ -2359,11 +2359,11 @@ +@@ -2359,11 +2359,11 @@ static int worker_thread(void *__worker) /* tell the scheduler that this is a workqueue worker */ set_pf_worker(true); woke_up: @@ -370,7 +366,7 @@ destroy_workqueue()") in 5.4.4.] WARN_ON_ONCE(!list_empty(&worker->entry)); set_pf_worker(false); -@@ -2429,7 +2429,7 @@ +@@ -2429,7 +2429,7 @@ static int worker_thread(void *__worker) */ worker_enter_idle(worker); __set_current_state(TASK_IDLE); @@ -379,7 +375,7 @@ destroy_workqueue()") in 5.4.4.] schedule(); goto woke_up; } -@@ -2483,7 +2483,7 @@ +@@ -2483,7 +2483,7 @@ static int rescuer_thread(void *__rescue should_stop = kthread_should_stop(); /* see whether any pwq is asking for help */ @@ -388,7 +384,7 @@ destroy_workqueue()") in 5.4.4.] while (!list_empty(&wq->maydays)) { struct pool_workqueue *pwq = list_first_entry(&wq->maydays, -@@ -2495,11 +2495,11 @@ +@@ -2495,11 +2495,11 @@ static int rescuer_thread(void *__rescue __set_current_state(TASK_RUNNING); list_del_init(&pwq->mayday_node); @@ -402,7 +398,7 @@ destroy_workqueue()") in 5.4.4.] /* * Slurp in all works issued via this workqueue and -@@ -2528,7 +2528,7 @@ +@@ -2528,7 +2528,7 @@ static int rescuer_thread(void *__rescue * incur MAYDAY_INTERVAL delay inbetween. */ if (need_to_create_worker(pool)) { @@ -411,7 +407,7 @@ destroy_workqueue()") in 5.4.4.] /* * Queue iff we aren't racing destruction * and somebody else hasn't queued it already. -@@ -2537,7 +2537,7 @@ +@@ -2537,7 +2537,7 @@ static int rescuer_thread(void *__rescue get_pwq(pwq); list_add_tail(&pwq->mayday_node, &wq->maydays); } @@ -420,7 +416,7 @@ destroy_workqueue()") in 5.4.4.] } } -@@ -2555,14 +2555,14 @@ +@@ -2555,14 +2555,14 @@ static int rescuer_thread(void *__rescue if (need_more_worker(pool)) wake_up_worker(pool); @@ -438,7 +434,7 @@ destroy_workqueue()") in 5.4.4.] if (should_stop) { __set_current_state(TASK_RUNNING); -@@ -2642,7 +2642,7 @@ +@@ -2642,7 +2642,7 @@ static void wq_barrier_func(struct work_ * underneath us, so we can't reliably determine pwq from @target. * * CONTEXT: @@ -447,7 +443,7 @@ destroy_workqueue()") in 5.4.4.] */ static void insert_wq_barrier(struct pool_workqueue *pwq, struct wq_barrier *barr, -@@ -2729,7 +2729,7 @@ +@@ -2729,7 +2729,7 @@ static bool flush_workqueue_prep_pwqs(st for_each_pwq(pwq, wq) { struct worker_pool *pool = pwq->pool; @@ -456,7 +452,7 @@ destroy_workqueue()") in 5.4.4.] if (flush_color >= 0) { WARN_ON_ONCE(pwq->flush_color != -1); -@@ -2746,7 +2746,7 @@ +@@ -2746,7 +2746,7 @@ static bool flush_workqueue_prep_pwqs(st pwq->work_color = work_color; } @@ -465,7 +461,7 @@ destroy_workqueue()") in 5.4.4.] } if (flush_color >= 0 && atomic_dec_and_test(&wq->nr_pwqs_to_flush)) -@@ -2946,9 +2946,9 @@ +@@ -2946,9 +2946,9 @@ void drain_workqueue(struct workqueue_st for_each_pwq(pwq, wq) { bool drained; @@ -477,7 +473,7 @@ destroy_workqueue()") in 5.4.4.] if (drained) continue; -@@ -2984,7 +2984,7 @@ +@@ -2984,7 +2984,7 @@ static bool start_flush_work(struct work return false; } @@ -486,7 +482,7 @@ destroy_workqueue()") in 5.4.4.] /* see the comment in try_to_grab_pending() with the same code */ pwq = get_work_pwq(work); if (pwq) { -@@ -3000,7 +3000,7 @@ +@@ -3000,7 +3000,7 @@ static bool start_flush_work(struct work check_flush_dependency(pwq->wq, work); insert_wq_barrier(pwq, barr, work, worker); @@ -495,7 +491,7 @@ destroy_workqueue()") in 5.4.4.] /* * Force a lock recursion deadlock when using flush_work() inside a -@@ -3019,7 +3019,7 @@ +@@ -3019,7 +3019,7 @@ static bool start_flush_work(struct work rcu_read_unlock(); return true; already_gone: @@ -504,7 +500,7 @@ destroy_workqueue()") in 5.4.4.] rcu_read_unlock(); return false; } -@@ -3412,7 +3412,7 @@ +@@ -3412,7 +3412,7 @@ static bool wqattrs_equal(const struct w */ static int init_worker_pool(struct worker_pool *pool) { @@ -513,7 +509,7 @@ destroy_workqueue()") in 5.4.4.] pool->id = -1; pool->cpu = -1; pool->node = NUMA_NO_NODE; -@@ -3538,7 +3538,7 @@ +@@ -3538,7 +3538,7 @@ static void put_unbound_pool(struct work * @pool's workers from blocking on attach_mutex. We're the last * manager and @pool gets freed with the flag set. */ @@ -522,7 +518,7 @@ destroy_workqueue()") in 5.4.4.] swait_event_lock_irq(wq_manager_wait, !(pool->flags & POOL_MANAGER_ACTIVE), pool->lock); pool->flags |= POOL_MANAGER_ACTIVE; -@@ -3546,7 +3546,7 @@ +@@ -3546,7 +3546,7 @@ static void put_unbound_pool(struct work while ((worker = first_idle_worker(pool))) destroy_worker(worker); WARN_ON(pool->nr_workers || pool->nr_idle); @@ -531,7 +527,7 @@ destroy_workqueue()") in 5.4.4.] mutex_lock(&wq_pool_attach_mutex); if (!list_empty(&pool->workers)) -@@ -3702,7 +3702,7 @@ +@@ -3702,7 +3702,7 @@ static void pwq_adjust_max_active(struct return; /* this function can be called during early boot w/ irq disabled */ @@ -540,7 +536,7 @@ destroy_workqueue()") in 5.4.4.] /* * During [un]freezing, the caller is responsible for ensuring that -@@ -3725,7 +3725,7 @@ +@@ -3725,7 +3725,7 @@ static void pwq_adjust_max_active(struct pwq->max_active = 0; } @@ -549,7 +545,7 @@ destroy_workqueue()") in 5.4.4.] } /* initialize newly alloced @pwq which is associated with @wq and @pool */ -@@ -4127,9 +4127,9 @@ +@@ -4127,9 +4127,9 @@ static void wq_update_unbound_numa(struc use_dfl_pwq: mutex_lock(&wq->mutex); @@ -561,7 +557,7 @@ destroy_workqueue()") in 5.4.4.] old_pwq = numa_pwq_tbl_install(wq, node, wq->dfl_pwq); out_unlock: mutex_unlock(&wq->mutex); -@@ -4342,9 +4342,9 @@ +@@ -4342,9 +4342,9 @@ void destroy_workqueue(struct workqueue_ struct worker *rescuer = wq->rescuer; /* this prevents new queueing */ @@ -573,7 +569,7 @@ destroy_workqueue()") in 5.4.4.] /* rescuer will empty maydays list before exiting */ kthread_stop(rescuer->task); -@@ -4540,10 +4540,10 @@ +@@ -4540,10 +4540,10 @@ unsigned int work_busy(struct work_struc rcu_read_lock(); pool = get_work_pool(work); if (pool) { @@ -586,7 +582,7 @@ destroy_workqueue()") in 5.4.4.] } rcu_read_unlock(); -@@ -4750,10 +4750,10 @@ +@@ -4750,10 +4750,10 @@ void show_workqueue_state(void) pr_info("workqueue %s: flags=0x%x\n", wq->name, wq->flags); for_each_pwq(pwq, wq) { @@ -599,7 +595,7 @@ destroy_workqueue()") in 5.4.4.] /* * We could be printing a lot from atomic context, e.g. * sysrq-t -> show_workqueue_state(). Avoid triggering -@@ -4767,7 +4767,7 @@ +@@ -4767,7 +4767,7 @@ void show_workqueue_state(void) struct worker *worker; bool first = true; @@ -608,7 +604,7 @@ destroy_workqueue()") in 5.4.4.] if (pool->nr_workers == pool->nr_idle) goto next_pool; -@@ -4786,7 +4786,7 @@ +@@ -4786,7 +4786,7 @@ void show_workqueue_state(void) } pr_cont("\n"); next_pool: @@ -617,7 +613,7 @@ destroy_workqueue()") in 5.4.4.] /* * We could be printing a lot from atomic context, e.g. * sysrq-t -> show_workqueue_state(). Avoid triggering -@@ -4816,7 +4816,7 @@ +@@ -4816,7 +4816,7 @@ void wq_worker_comm(char *buf, size_t si struct worker_pool *pool = worker->pool; if (pool) { @@ -626,7 +622,7 @@ destroy_workqueue()") in 5.4.4.] /* * ->desc tracks information (wq name or * set_worker_desc()) for the latest execution. If -@@ -4830,7 +4830,7 @@ +@@ -4830,7 +4830,7 @@ void wq_worker_comm(char *buf, size_t si scnprintf(buf + off, size - off, "-%s", worker->desc); } @@ -635,7 +631,7 @@ destroy_workqueue()") in 5.4.4.] } } -@@ -4861,7 +4861,7 @@ +@@ -4861,7 +4861,7 @@ static void unbind_workers(int cpu) for_each_cpu_worker_pool(pool, cpu) { mutex_lock(&wq_pool_attach_mutex); @@ -644,7 +640,7 @@ destroy_workqueue()") in 5.4.4.] /* * We've blocked all attach/detach operations. Make all workers -@@ -4875,7 +4875,7 @@ +@@ -4875,7 +4875,7 @@ static void unbind_workers(int cpu) pool->flags |= POOL_DISASSOCIATED; @@ -653,7 +649,7 @@ destroy_workqueue()") in 5.4.4.] mutex_unlock(&wq_pool_attach_mutex); /* -@@ -4901,9 +4901,9 @@ +@@ -4901,9 +4901,9 @@ static void unbind_workers(int cpu) * worker blocking could lead to lengthy stalls. Kick off * unbound chain execution of currently pending work items. */ @@ -665,7 +661,7 @@ destroy_workqueue()") in 5.4.4.] } } -@@ -4930,7 +4930,7 @@ +@@ -4930,7 +4930,7 @@ static void rebind_workers(struct worker WARN_ON_ONCE(set_cpus_allowed_ptr(worker->task, pool->attrs->cpumask) < 0); @@ -674,7 +670,7 @@ destroy_workqueue()") in 5.4.4.] pool->flags &= ~POOL_DISASSOCIATED; -@@ -4969,7 +4969,7 @@ +@@ -4969,7 +4969,7 @@ static void rebind_workers(struct worker WRITE_ONCE(worker->flags, worker_flags); } diff --git a/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch b/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch index ebd16e2552a7..9f009592eb11 100644 --- a/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch +++ b/debian/patches-rt/0005-jbd2-Don-t-call-__bforget-unnecessarily.patch @@ -1,7 +1,7 @@ From: Jan Kara <jack@suse.cz> Date: Fri, 9 Aug 2019 14:42:31 +0200 Subject: [PATCH 5/7] jbd2: Don't call __bforget() unnecessarily -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz jbd2_journal_forget() jumps to 'not_jbd' branch which calls __bforget() in cases where the buffer is clean which is pointless. In case of failed diff --git a/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch b/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch index 1ca06c8ab884..03a15d7d8a96 100644 --- a/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch +++ b/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:43 +0100 Subject: [PATCH 05/25] printk-rb: add basic non-blocking reading interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add reader iterator static declaration/initializer, dynamic initializer, and functions to iterate and retrieve ring buffer data. diff --git a/debian/patches-rt/0006-jbd2-Make-state-lock-a-spinlock.patch b/debian/patches-rt/0006-jbd2-Make-state-lock-a-spinlock.patch index b4e9d3c84264..7a412e2e5d0a 100644 --- a/debian/patches-rt/0006-jbd2-Make-state-lock-a-spinlock.patch +++ b/debian/patches-rt/0006-jbd2-Make-state-lock-a-spinlock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 9 Aug 2019 14:42:32 +0200 Subject: [PATCH 6/7] jbd2: Make state lock a spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Bit-spinlocks are problematic on PREEMPT_RT if functions which might sleep on RT, e.g. spin_lock(), alloc/free(), are invoked inside the lock held diff --git a/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch b/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch index 43e086ccb083..c430a9e1bf0b 100644 --- a/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch +++ b/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:44 +0100 Subject: [PATCH 06/25] printk-rb: add blocking reader support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add a blocking read function for readers. An irq_work function is used to signal the wait queue so that write notification can diff --git a/debian/patches-rt/0007-jbd2-Free-journal-head-outside-of-locked-region.patch b/debian/patches-rt/0007-jbd2-Free-journal-head-outside-of-locked-region.patch index 17a2978c9946..f964506cb6ad 100644 --- a/debian/patches-rt/0007-jbd2-Free-journal-head-outside-of-locked-region.patch +++ b/debian/patches-rt/0007-jbd2-Free-journal-head-outside-of-locked-region.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 9 Aug 2019 14:42:33 +0200 Subject: [PATCH 7/7] jbd2: Free journal head outside of locked region -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On PREEMPT_RT bit-spinlocks have the same semantics as on PREEMPT_RT=n, i.e. they disable preemption. That means functions which are not safe to be diff --git a/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch b/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch index a78ccb2c8eb3..6d35f5e527a4 100644 --- a/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch +++ b/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:45 +0100 Subject: [PATCH 07/25] printk-rb: add functionality required by printk -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The printk subsystem needs to be able to query the size of the ring buffer, seek to specific entries within the ring buffer, and track diff --git a/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch b/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch index 46a555e41ea8..4dd10d78d723 100644 --- a/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch +++ b/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:46 +0100 Subject: [PATCH 08/25] printk: add ring buffer and kthread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The printk ring buffer provides an NMI-safe interface for writing messages to a ring buffer. Using such a buffer for alleviates printk diff --git a/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch b/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch index 50bd77a81d38..c3ef50f535d6 100644 --- a/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch +++ b/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:47 +0100 Subject: [PATCH 09/25] printk: remove exclusive console hack -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In order to support printing the printk log history when new consoles are registered, a global exclusive_console variable is diff --git a/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch b/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch index 893f69198f85..c6751a5c1119 100644 --- a/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch +++ b/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:48 +0100 Subject: [PATCH 10/25] printk: redirect emit/store to new ringbuffer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz vprintk_emit and vprintk_store are the main functions that all printk variants eventually go through. Change these to store the message in diff --git a/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch b/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch index d62ed2bef2c3..8f18ba464724 100644 --- a/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch +++ b/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:49 +0100 Subject: [PATCH 11/25] printk_safe: remove printk safe code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz vprintk variants are now NMI-safe so there is no longer a need for the "safe" calls. diff --git a/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch b/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch index 3c26c368bbb4..52bdf27d4d69 100644 --- a/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch +++ b/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:50 +0100 Subject: [PATCH 12/25] printk: minimize console locking implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since printing of the printk buffer is now handled by the printk kthread, minimize the console locking functions to just handle diff --git a/debian/patches-rt/0013-printk-track-seq-per-console.patch b/debian/patches-rt/0013-printk-track-seq-per-console.patch index e684ef919d0e..22c7a9cddb79 100644 --- a/debian/patches-rt/0013-printk-track-seq-per-console.patch +++ b/debian/patches-rt/0013-printk-track-seq-per-console.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:51 +0100 Subject: [PATCH 13/25] printk: track seq per console -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Allow each console to track which seq record was last printed. This simplifies identifying dropped records. diff --git a/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch b/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch index a47557e32c3f..f41af1188a0f 100644 --- a/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch +++ b/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:52 +0100 Subject: [PATCH 14/25] printk: do boot_delay_msec inside printk_delay -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Both functions needed to be called one after the other, so just integrate boot_delay_msec into printk_delay for simplification. diff --git a/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch b/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch index 571091b71fcf..2d672ecfefaa 100644 --- a/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch +++ b/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:53 +0100 Subject: [PATCH 15/25] printk: print history for new consoles -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When new consoles register, they currently print how many messages they have missed. However, many (or all) of those messages may still diff --git a/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch b/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch index bef26ad3f4e9..d7243d75491e 100644 --- a/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch +++ b/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:54 +0100 Subject: [PATCH 16/25] printk: implement CON_PRINTBUFFER -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz If the CON_PRINTBUFFER flag is not set, do not replay the history for that console. diff --git a/debian/patches-rt/0017-printk-add-processor-number-to-output.patch b/debian/patches-rt/0017-printk-add-processor-number-to-output.patch index 486c291fce99..18bcdaa77c3b 100644 --- a/debian/patches-rt/0017-printk-add-processor-number-to-output.patch +++ b/debian/patches-rt/0017-printk-add-processor-number-to-output.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:55 +0100 Subject: [PATCH 17/25] printk: add processor number to output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz It can be difficult to sort printk out if multiple processors are printing simultaneously. Add the processor number to the printk diff --git a/debian/patches-rt/0018-console-add-write_atomic-interface.patch b/debian/patches-rt/0018-console-add-write_atomic-interface.patch index 2757688a6ef9..44b160aa9860 100644 --- a/debian/patches-rt/0018-console-add-write_atomic-interface.patch +++ b/debian/patches-rt/0018-console-add-write_atomic-interface.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:56 +0100 Subject: [PATCH 18/25] console: add write_atomic interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add a write_atomic callback to the console. This is an optional function for console drivers. The function must be atomic (including diff --git a/debian/patches-rt/0019-printk-introduce-emergency-messages.patch b/debian/patches-rt/0019-printk-introduce-emergency-messages.patch index 114b7a993ee3..26e192985b60 100644 --- a/debian/patches-rt/0019-printk-introduce-emergency-messages.patch +++ b/debian/patches-rt/0019-printk-introduce-emergency-messages.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:57 +0100 Subject: [PATCH 19/25] printk: introduce emergency messages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Console messages are generally either critical or non-critical. Critical messages are messages such as crashes or sysrq output. diff --git a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch index 1856f3582f35..58687afd9718 100644 --- a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch +++ b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:58 +0100 Subject: [PATCH 20/25] serial: 8250: implement write_atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Implement a non-sleeping NMI-safe write_atomic console function in order to support emergency printk messages. diff --git a/debian/patches-rt/0021-printk-implement-KERN_CONT.patch b/debian/patches-rt/0021-printk-implement-KERN_CONT.patch index d31f99c89f9a..b3789fdf7b7c 100644 --- a/debian/patches-rt/0021-printk-implement-KERN_CONT.patch +++ b/debian/patches-rt/0021-printk-implement-KERN_CONT.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:29:59 +0100 Subject: [PATCH 21/25] printk: implement KERN_CONT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Implement KERN_CONT based on the printing CPU rather than on the printing task. As long as the KERN_CONT messages are coming from the diff --git a/debian/patches-rt/0022-printk-implement-dev-kmsg.patch b/debian/patches-rt/0022-printk-implement-dev-kmsg.patch index afcf1dca07e4..790c7051ed31 100644 --- a/debian/patches-rt/0022-printk-implement-dev-kmsg.patch +++ b/debian/patches-rt/0022-printk-implement-dev-kmsg.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:30:00 +0100 Subject: [PATCH 22/25] printk: implement /dev/kmsg -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since printk messages are now logged to a new ring buffer, update the /dev/kmsg functions to pull the messages from there. diff --git a/debian/patches-rt/0023-printk-implement-syslog.patch b/debian/patches-rt/0023-printk-implement-syslog.patch index c5ee8d712b35..85c86c4dabbd 100644 --- a/debian/patches-rt/0023-printk-implement-syslog.patch +++ b/debian/patches-rt/0023-printk-implement-syslog.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:30:01 +0100 Subject: [PATCH 23/25] printk: implement syslog -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since printk messages are now logged to a new ring buffer, update the syslog functions to pull the messages from there. diff --git a/debian/patches-rt/0024-printk-implement-kmsg_dump.patch b/debian/patches-rt/0024-printk-implement-kmsg_dump.patch index 87a3ba5bfd58..e2eb4ecf53b3 100644 --- a/debian/patches-rt/0024-printk-implement-kmsg_dump.patch +++ b/debian/patches-rt/0024-printk-implement-kmsg_dump.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:30:02 +0100 Subject: [PATCH 24/25] printk: implement kmsg_dump -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since printk messages are now logged to a new ring buffer, update the kmsg_dump functions to pull the messages from there. diff --git a/debian/patches-rt/0025-printk-remove-unused-code.patch b/debian/patches-rt/0025-printk-remove-unused-code.patch index 481fd315ee3f..92340d20d807 100644 --- a/debian/patches-rt/0025-printk-remove-unused-code.patch +++ b/debian/patches-rt/0025-printk-remove-unused-code.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 12 Feb 2019 15:30:03 +0100 Subject: [PATCH 25/25] printk: remove unused code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Code relating to the safe context and anything dealing with the previous log buffer implementation is no longer in use. Remove it. diff --git a/debian/patches-rt/ARM-Allow-to-enable-RT.patch b/debian/patches-rt/ARM-Allow-to-enable-RT.patch index 7b4eedf7fded..5bbf154e9427 100644 --- a/debian/patches-rt/ARM-Allow-to-enable-RT.patch +++ b/debian/patches-rt/ARM-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:29 +0200 Subject: [PATCH] ARM: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Allow to select RT. diff --git a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch index 886150767246..39f42e704484 100644 --- a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch +++ b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,7 +1,7 @@ From: "Yadi.hu" <yadi.hu@windriver.com> Date: Wed, 10 Dec 2014 10:32:09 +0800 Subject: ARM: enable irq in translation/section permission fault handlers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT diff --git a/debian/patches-rt/ARM64-Allow-to-enable-RT.patch b/debian/patches-rt/ARM64-Allow-to-enable-RT.patch index 71a8e0a0ee4b..b6cddbca5eaa 100644 --- a/debian/patches-rt/ARM64-Allow-to-enable-RT.patch +++ b/debian/patches-rt/ARM64-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:35 +0200 Subject: [PATCH] ARM64: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Allow to select RT. diff --git a/debian/patches-rt/BPF-Disable-on-PREEMPT_RT.patch b/debian/patches-rt/BPF-Disable-on-PREEMPT_RT.patch index 8a11d4e78d87..925f619b14b3 100644 --- a/debian/patches-rt/BPF-Disable-on-PREEMPT_RT.patch +++ b/debian/patches-rt/BPF-Disable-on-PREEMPT_RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 10 Oct 2019 16:54:45 +0200 Subject: [PATCH] BPF: Disable on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Disable BPF on PREEMPT_RT because - it allocates and frees memory in atomic context diff --git a/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch b/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch index 25f8468e0b8c..dae186cfdb6d 100644 --- a/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch +++ b/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 13 Aug 2019 14:29:41 +0200 Subject: [PATCH] KVM: arm/arm64: Let the timer expire in hardirq context on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The timers are canceled from an preempt-notifier which is invoked with disabled preemption which is not allowed on PREEMPT_RT. diff --git a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index a0a2d452f209..22eb28a96955 100644 --- a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +++ b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <joshc@ni.com> Date: Thu, 11 Feb 2016 11:54:01 -0600 Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating the vgic and timer states to prevent the calling task from migrating to diff --git a/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch b/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch index e476c36ee743..9eb99c29e75d 100644 --- a/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch +++ b/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch @@ -5,7 +5,7 @@ Cc: Anna Schumaker <anna.schumaker@netapp.com>, linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: NFSv4: replace seqcount_t with a seqlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The raw_write_seqcount_begin() in nfs4_reclaim_open_state() causes a preempt_disable() on -RT. The spin_lock()/spin_unlock() in that section does diff --git a/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch b/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch index 9da485c22ccd..001874dea959 100644 --- a/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch +++ b/debian/patches-rt/POWERPC-Allow-to-enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 11 Oct 2019 13:14:41 +0200 Subject: [PATCH] POWERPC: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Allow to select RT. diff --git a/debian/patches-rt/Use-CONFIG_PREEMPTION.patch b/debian/patches-rt/Use-CONFIG_PREEMPTION.patch index ed9902f0edea..543337c4ad1f 100644 --- a/debian/patches-rt/Use-CONFIG_PREEMPTION.patch +++ b/debian/patches-rt/Use-CONFIG_PREEMPTION.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 26 Jul 2019 11:30:49 +0200 Subject: [PATCH] Use CONFIG_PREEMPTION -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Thisi is an all-in-one patch of the current `PREEMPTION' branch. diff --git a/debian/patches-rt/add_migrate_disable.patch b/debian/patches-rt/add_migrate_disable.patch index 0020fc176a5e..d6eeb2275aba 100644 --- a/debian/patches-rt/add_migrate_disable.patch +++ b/debian/patches-rt/add_migrate_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 27 May 2017 19:02:06 +0200 Subject: kernel/sched/core: add migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz [bristot@redhat.com: rt: Increase/decrease the nr of migratory tasks when enabling/disabling migration Link: https://lkml.kernel.org/r/e981d271cbeca975bca710e2fbcc6078c09741b0.1498482127.git.bristot@redhat.com diff --git a/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch b/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch index 53a69f3f5b6d..155174878e77 100644 --- a/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch +++ b/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 11 Oct 2017 17:43:49 +0200 Subject: apparmor: use a locallock instead preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz get_buffers() disables preemption which acts as a lock for the per-CPU variable. Since we can't disable preemption here on RT, a local_lock is diff --git a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch index 2b2fee304971..927ac532799d 100644 --- a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch +++ b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch @@ -1,7 +1,7 @@ From: Anders Roxell <anders.roxell@linaro.org> Date: Thu, 14 May 2015 17:52:17 +0200 Subject: arch/arm64: Add lazy preempt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, diff --git a/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch b/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch deleted file mode 100644 index 4862eff05600..000000000000 --- a/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch +++ /dev/null @@ -1,148 +0,0 @@ -From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> -Date: Fri, 1 Dec 2017 10:42:03 +0100 -Subject: [PATCH] arm*: disable NEON in kernel mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz - -NEON in kernel mode is used by the crypto algorithms and raid6 code. -While the raid6 code looks okay, the crypto algorithms do not: NEON -is enabled on first invocation and may allocate/free/map memory before -the NEON mode is disabled again. -This needs to be changed until it can be enabled. -On ARM NEON in kernel mode can be simply disabled. on ARM64 it needs to -stay on due to possible EFI callbacks so here I disable each algorithm. - -Cc: stable-rt@vger.kernel.org -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - arch/arm/Kconfig | 2 +- - arch/arm64/crypto/Kconfig | 30 +++++++++++++++--------------- - 2 files changed, 16 insertions(+), 16 deletions(-) - ---- a/arch/arm/Kconfig -+++ b/arch/arm/Kconfig -@@ -2062,7 +2062,7 @@ config NEON - - config KERNEL_MODE_NEON - bool "Support for NEON in kernel mode" -- depends on NEON && AEABI -+ depends on NEON && AEABI && !PREEMPT_RT - help - Say Y to include support for NEON in kernel mode. - ---- a/arch/arm64/crypto/Kconfig -+++ b/arch/arm64/crypto/Kconfig -@@ -19,50 +19,50 @@ config CRYPTO_SHA512_ARM64 - - config CRYPTO_SHA1_ARM64_CE - tristate "SHA-1 digest algorithm (ARMv8 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_SHA1 - - config CRYPTO_SHA2_ARM64_CE - tristate "SHA-224/SHA-256 digest algorithm (ARMv8 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_SHA256_ARM64 - - config CRYPTO_SHA512_ARM64_CE - tristate "SHA-384/SHA-512 digest algorithm (ARMv8 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_SHA512_ARM64 - - config CRYPTO_SHA3_ARM64 - tristate "SHA3 digest algorithm (ARMv8.2 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_SHA3 - - config CRYPTO_SM3_ARM64_CE - tristate "SM3 digest algorithm (ARMv8.2 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_SM3 - - config CRYPTO_SM4_ARM64_CE - tristate "SM4 symmetric cipher (ARMv8.2 Crypto Extensions)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_ALGAPI - select CRYPTO_SM4 - - config CRYPTO_GHASH_ARM64_CE - tristate "GHASH/AES-GCM using ARMv8 Crypto Extensions" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_HASH - select CRYPTO_GF128MUL - select CRYPTO_LIB_AES - - config CRYPTO_CRCT10DIF_ARM64_CE - tristate "CRCT10DIF digest algorithm using PMULL instructions" -- depends on KERNEL_MODE_NEON && CRC_T10DIF -+ depends on KERNEL_MODE_NEON && CRC_T10DIF && !PREEMPT_RT - select CRYPTO_HASH - - config CRYPTO_AES_ARM64 -@@ -71,13 +71,13 @@ config CRYPTO_AES_ARM64 - - config CRYPTO_AES_ARM64_CE - tristate "AES core cipher using ARMv8 Crypto Extensions" -- depends on ARM64 && KERNEL_MODE_NEON -+ depends on ARM64 && KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_ALGAPI - select CRYPTO_LIB_AES - - config CRYPTO_AES_ARM64_CE_CCM - tristate "AES in CCM mode using ARMv8 Crypto Extensions" -- depends on ARM64 && KERNEL_MODE_NEON -+ depends on ARM64 && KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_ALGAPI - select CRYPTO_AES_ARM64_CE - select CRYPTO_AEAD -@@ -85,7 +85,7 @@ config CRYPTO_AES_ARM64_CE_CCM - - config CRYPTO_AES_ARM64_CE_BLK - tristate "AES in ECB/CBC/CTR/XTS modes using ARMv8 Crypto Extensions" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && !PREEMPT_RT - select CRYPTO_BLKCIPHER - select CRYPTO_AES_ARM64_CE - select CRYPTO_AES_ARM64 -@@ -93,7 +93,7 @@ config CRYPTO_AES_ARM64_CE_BLK - - config CRYPTO_AES_ARM64_NEON_BLK - tristate "AES in ECB/CBC/CTR/XTS modes using NEON instructions" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && PREEMPT_RT - select CRYPTO_BLKCIPHER - select CRYPTO_AES_ARM64 - select CRYPTO_LIB_AES -@@ -101,18 +101,18 @@ config CRYPTO_AES_ARM64_NEON_BLK - - config CRYPTO_CHACHA20_NEON - tristate "ChaCha20, XChaCha20, and XChaCha12 stream ciphers using NEON instructions" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && !PREEMPT_RT - select CRYPTO_BLKCIPHER - select CRYPTO_CHACHA20 - - config CRYPTO_NHPOLY1305_NEON - tristate "NHPoly1305 hash function using NEON instructions (for Adiantum)" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && !PREEMPT_RT - select CRYPTO_NHPOLY1305 - - config CRYPTO_AES_ARM64_BS - tristate "AES in ECB/CBC/CTR/XTS modes using bit-sliced NEON algorithm" -- depends on KERNEL_MODE_NEON -+ depends on KERNEL_MODE_NEON && !PREEMPT_RT - select CRYPTO_BLKCIPHER - select CRYPTO_AES_ARM64_NEON_BLK - select CRYPTO_AES_ARM64 diff --git a/debian/patches-rt/arm-enable-highmem-for-rt.patch b/debian/patches-rt/arm-enable-highmem-for-rt.patch index 6f1d25c2b323..0fa814f6c502 100644 --- a/debian/patches-rt/arm-enable-highmem-for-rt.patch +++ b/debian/patches-rt/arm-enable-highmem-for-rt.patch @@ -1,7 +1,7 @@ Subject: arm: Enable highmem for rt From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 13 Feb 2013 11:03:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz fixup highmem for ARM. diff --git a/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch b/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch index 698e25c43ade..982571cd0b81 100644 --- a/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch +++ b/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Mar 2013 21:37:27 +0100 Subject: arm/highmem: Flush tlb on unmap -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The tlb should be flushed on unmap and thus make the mapping entry invalid. This is only done in the non-debug case which does not look diff --git a/debian/patches-rt/arm-include-definition-for-cpumask_t.patch b/debian/patches-rt/arm-include-definition-for-cpumask_t.patch index e92bc38e44a2..572904e3e837 100644 --- a/debian/patches-rt/arm-include-definition-for-cpumask_t.patch +++ b/debian/patches-rt/arm-include-definition-for-cpumask_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 22 Dec 2016 17:28:33 +0100 Subject: [PATCH] arm: include definition for cpumask_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This definition gets pulled in by other files. With the (later) split of RCU and spinlock.h it won't compile anymore. diff --git a/debian/patches-rt/arm-preempt-lazy-support.patch b/debian/patches-rt/arm-preempt-lazy-support.patch index 0824e21a5e2d..ca2df771486c 100644 --- a/debian/patches-rt/arm-preempt-lazy-support.patch +++ b/debian/patches-rt/arm-preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: arm: Add support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 31 Oct 2012 12:04:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Implement the arm pieces for lazy preempt. diff --git a/debian/patches-rt/arm-remove-printk_nmi_.patch b/debian/patches-rt/arm-remove-printk_nmi_.patch index 2a7b94713b52..ac56f970554a 100644 --- a/debian/patches-rt/arm-remove-printk_nmi_.patch +++ b/debian/patches-rt/arm-remove-printk_nmi_.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 15 Feb 2019 14:34:20 +0100 Subject: [PATCH] arm: remove printk_nmi_.*() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz It is no longer provided by the printk core code. diff --git a/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch b/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch index e896f4cad086..d72745d8c78c 100644 --- a/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch +++ b/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 09:13:42 +0200 Subject: [PATCH] arm64: KVM: Invoke compute_layout() before alternatives are applied -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz compute_layout() is invoked as part of an alternative fixup under stop_machine(). This function invokes get_random_long() which acquires a diff --git a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch index bc7ef382b076..a19d6bae01cb 100644 --- a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch +++ b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 25 Jul 2018 14:02:38 +0200 Subject: [PATCH] arm64: fpsimd: Delay freeing memory in fpsimd_flush_thread() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz fpsimd_flush_thread() invokes kfree() via sve_free() within a preempt disabled section which is not working on -RT. diff --git a/debian/patches-rt/at91_dont_enable_disable_clock.patch b/debian/patches-rt/at91_dont_enable_disable_clock.patch index 3cc25f0ccaf3..83d42d33b12e 100644 --- a/debian/patches-rt/at91_dont_enable_disable_clock.patch +++ b/debian/patches-rt/at91_dont_enable_disable_clock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 09 Mar 2016 10:51:06 +0100 Subject: arm: at91: do not disable/enable clocks in a row -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Currently the driver will disable the clock and enable it one line later if it is switching from periodic mode into one shot. diff --git a/debian/patches-rt/block-Don-t-disable-interrupts-in-trigger_softirq.patch b/debian/patches-rt/block-Don-t-disable-interrupts-in-trigger_softirq.patch index 96d516fb1f9b..01fa27950ebb 100644 --- a/debian/patches-rt/block-Don-t-disable-interrupts-in-trigger_softirq.patch +++ b/debian/patches-rt/block-Don-t-disable-interrupts-in-trigger_softirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 15 Nov 2019 21:37:22 +0100 Subject: [PATCH] block: Don't disable interrupts in trigger_softirq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz trigger_softirq() is always invoked as a SMP-function call which is always invoked with disables interrupts. diff --git a/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch b/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch index 93e02438dc4d..bb214b42988d 100644 --- a/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch +++ b/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Jan 2015 15:10:08 +0100 Subject: block/mq: don't complete requests via IPI -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The IPI runs in hardirq context and there are sleeping locks. Assume caches are shared and complete them on the local CPU. diff --git a/debian/patches-rt/block-mq-drop-preempt-disable.patch b/debian/patches-rt/block-mq-drop-preempt-disable.patch index 0930ac9e8047..def826387fae 100644 --- a/debian/patches-rt/block-mq-drop-preempt-disable.patch +++ b/debian/patches-rt/block-mq-drop-preempt-disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: block/mq: do not invoke preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. diff --git a/debian/patches-rt/block-use-cpu-chill.patch b/debian/patches-rt/block-use-cpu-chill.patch index 1413bfefe1ca..cb3cecfbd3a5 100644 --- a/debian/patches-rt/block-use-cpu-chill.patch +++ b/debian/patches-rt/block-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: block: Use cpu_chill() for retry loops From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 20 Dec 2012 18:28:26 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Steven also observed a live lock when there was a diff --git a/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch b/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch index 5b8e21240749..b0018180110d 100644 --- a/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch +++ b/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch @@ -1,7 +1,7 @@ From: Benedikt Spranger <b.spranger@linutronix.de> Date: Mon, 8 Mar 2010 18:57:04 +0100 Subject: clocksource: TCLIB: Allow higher clock rates for clock events -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz As default the TCLIB uses the 32KiHz base clock rate for clock events. Add a compile time selection to allow higher clock resulution. diff --git a/debian/patches-rt/completion-use-simple-wait-queues.patch b/debian/patches-rt/completion-use-simple-wait-queues.patch index 49a7cb2779af..8aa657dd434d 100644 --- a/debian/patches-rt/completion-use-simple-wait-queues.patch +++ b/debian/patches-rt/completion-use-simple-wait-queues.patch @@ -1,7 +1,7 @@ Subject: completion: Use simple wait queues From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 11 Jan 2013 11:23:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the diff --git a/debian/patches-rt/cond-resched-lock-rt-tweak.patch b/debian/patches-rt/cond-resched-lock-rt-tweak.patch index 4d9fd940fffa..dcdd5b338923 100644 --- a/debian/patches-rt/cond-resched-lock-rt-tweak.patch +++ b/debian/patches-rt/cond-resched-lock-rt-tweak.patch @@ -1,7 +1,7 @@ Subject: sched: Use the proper LOCK_OFFSET for cond_resched() From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 22:51:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz RT does not increment preempt count when a 'sleeping' spinlock is locked. Update PREEMPT_LOCK_OFFSET for that case. diff --git a/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch b/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch index cb938b8216f6..b3f25c44b07c 100644 --- a/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch +++ b/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch @@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sun, 16 Oct 2016 05:11:54 +0200 Subject: [PATCH] connector/cn_proc: Protect send_msg() with a local lock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 |in_atomic(): 1, irqs_disabled(): 0, pid: 31807, name: sleep diff --git a/debian/patches-rt/cpumask-disable-offstack-on-rt.patch b/debian/patches-rt/cpumask-disable-offstack-on-rt.patch deleted file mode 100644 index 544ec233fb75..000000000000 --- a/debian/patches-rt/cpumask-disable-offstack-on-rt.patch +++ /dev/null @@ -1,68 +0,0 @@ -Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT -From: Thomas Gleixner <tglx@linutronix.de> -Date: Wed, 14 Dec 2011 01:03:49 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz - -There are "valid" GFP_ATOMIC allocations such as - -|BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 -|in_atomic(): 1, irqs_disabled(): 0, pid: 2130, name: tar -|1 lock held by tar/2130: -| #0: (&mm->mmap_sem){++++++}, at: [<ffffffff811d4e89>] SyS_brk+0x39/0x190 -|Preemption disabled at:[<ffffffff81063048>] flush_tlb_mm_range+0x28/0x350 -| -|CPU: 1 PID: 2130 Comm: tar Tainted: G W 4.8.2-rt2+ #747 -|Call Trace: -| [<ffffffff814d52dc>] dump_stack+0x86/0xca -| [<ffffffff810a26fb>] ___might_sleep+0x14b/0x240 -| [<ffffffff819bc1d4>] rt_spin_lock+0x24/0x60 -| [<ffffffff81194fba>] get_page_from_freelist+0x83a/0x11b0 -| [<ffffffff81195e8b>] __alloc_pages_nodemask+0x15b/0x1190 -| [<ffffffff811f0b81>] alloc_pages_current+0xa1/0x1f0 -| [<ffffffff811f7df5>] new_slab+0x3e5/0x690 -| [<ffffffff811fb0d5>] ___slab_alloc+0x495/0x660 -| [<ffffffff811fb311>] __slab_alloc.isra.79+0x71/0xc0 -| [<ffffffff811fb447>] __kmalloc_node+0xe7/0x240 -| [<ffffffff814d4ee0>] alloc_cpumask_var_node+0x20/0x50 -| [<ffffffff814d4f3e>] alloc_cpumask_var+0xe/0x10 -| [<ffffffff810430c1>] native_send_call_func_ipi+0x21/0x130 -| [<ffffffff8111c13f>] smp_call_function_many+0x22f/0x370 -| [<ffffffff81062b64>] native_flush_tlb_others+0x1a4/0x3a0 -| [<ffffffff8106309b>] flush_tlb_mm_range+0x7b/0x350 -| [<ffffffff811c88e2>] tlb_flush_mmu_tlbonly+0x62/0xd0 -| [<ffffffff811c9af4>] tlb_finish_mmu+0x14/0x50 -| [<ffffffff811d1c84>] unmap_region+0xe4/0x110 -| [<ffffffff811d3db3>] do_munmap+0x293/0x470 -| [<ffffffff811d4f8c>] SyS_brk+0x13c/0x190 -| [<ffffffff810032e2>] do_fast_syscall_32+0xb2/0x2f0 -| [<ffffffff819be181>] entry_SYSENTER_compat+0x51/0x60 - -which forbid allocations at run-time. - -Signed-off-by: Thomas Gleixner <tglx@linutronix.de> ---- - arch/x86/Kconfig | 2 +- - lib/Kconfig | 1 + - 2 files changed, 2 insertions(+), 1 deletion(-) - ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -965,7 +965,7 @@ config CALGARY_IOMMU_ENABLED_BY_DEFAULT - config MAXSMP - bool "Enable Maximum number of SMP Processors and NUMA Nodes" - depends on X86_64 && SMP && DEBUG_KERNEL -- select CPUMASK_OFFSTACK -+ select CPUMASK_OFFSTACK if !PREEMPT_RT - ---help--- - Enable maximum number of CPUS and NUMA Nodes for this architecture. - If unsure, say N. ---- a/lib/Kconfig -+++ b/lib/Kconfig -@@ -468,6 +468,7 @@ config CHECK_SIGNATURE - - config CPUMASK_OFFSTACK - bool "Force CPU masks off stack" if DEBUG_PER_CPU_MAPS -+ depends on !PREEMPT_RT - help - Use dynamic allocation for cpumask_var_t, instead of putting - them on the stack. This is a bit more expensive, but avoids diff --git a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch index 550aa679e3b8..06bec502326c 100644 --- a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <efault@gmx.de> Date: Sun, 8 Jan 2017 09:32:25 +0100 Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The two commits below add up to a cpuset might_sleep() splat for RT: diff --git a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch index 03505afd6bea..649a76d22a37 100644 --- a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() diff --git a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index 9b4fc7f4f973..6f81b785fc5b 100644 --- a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +++ b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 18:52:00 +0200 Subject: [PATCH] crypto: cryptd - add a lock instead preempt_disable/local_bh_disable -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz cryptd has a per-CPU lock which protected with local_bh_disable() and preempt_disable(). diff --git a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch index 247df895a819..0b845f5675c0 100644 --- a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch +++ b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Those crypto drivers use SSE/AVX/… for their crypto work and in order to do so in kernel they need to enable the "FPU" in kernel mode which diff --git a/debian/patches-rt/debugobjects-rt.patch b/debian/patches-rt/debugobjects-rt.patch index 4833d67daee0..2409675536a3 100644 --- a/debian/patches-rt/debugobjects-rt.patch +++ b/debian/patches-rt/debugobjects-rt.patch @@ -1,7 +1,7 @@ Subject: debugobjects: Make RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 21:41:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Avoid filling the pool / allocating memory with irqs off(). diff --git a/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch b/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch index a6f2aa3267ab..c13cbdbe6e10 100644 --- a/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch +++ b/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Aug 2019 16:38:43 +0200 Subject: [PATCH] dma-buf: Use seqlock_t instread disabling preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz "dma reservation" disables preemption while acquiring the write access for "seqcount". diff --git a/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index 2514420d294f..cdc2765d15c6 100644 --- a/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +++ b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Thu, 31 Mar 2016 04:08:28 +0200 Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz They're nondeterministic, and lead to ___might_sleep() splats in -rt. OTOH, they're a lot less wasteful than an rtmutex per page. diff --git a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch index 791eef14a089..6291c5951801 100644 --- a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch +++ b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch @@ -1,7 +1,7 @@ Subject: tty/serial/omap: Make the locking RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 28 Jul 2011 13:32:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and diff --git a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch index c32cfba70e65..ddb5c7588a0e 100644 --- a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch +++ b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch @@ -1,7 +1,7 @@ Subject: tty/serial/pl011: Make the locking work on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 08 Jan 2013 21:36:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. diff --git a/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch b/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch index 9387dccc7bc4..ca6940d95a88 100644 --- a/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch +++ b/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch @@ -2,7 +2,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Thu, 20 Oct 2016 11:15:22 +0200 Subject: [PATCH] drivers/zram: Don't disable preemption in zcomp_stream_get/put() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In v4.7, the driver switched to percpu compression streams, disabling preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We diff --git a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch index 2dd57b8e136a..66604a91b3af 100644 --- a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch +++ b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Sep 2019 12:29:05 +0200 Subject: [PATCH] drm/i915: Don't disable interrupts for intel_engine_breadcrumbs_irq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The function intel_engine_breadcrumbs_irq() is always invoked from an interrupt handler and for that reason it invokes (as an optimisation) only spin_lock() diff --git a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch index c61307a9ff9d..549d016de2e3 100644 --- a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch +++ b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 10 Apr 2019 11:01:37 +0200 Subject: [PATCH] drm/i915: Don't disable interrupts independently of the lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The locks (active.lock and rq->lock) need to be taken with disabled interrupts. This is done in i915_request_retire() by disabling the diff --git a/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch b/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch index 2ce13a4d54f1..09438f092116 100644 --- a/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch +++ b/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Sep 2019 12:30:21 +0200 Subject: [PATCH] drm/i915: Drop the IRQ-off asserts -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The lockdep_assert_irqs_disabled() check is needless. The previous lockdep_assert_held() check ensures that the lock is acquired and while diff --git a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch index f931fc50b303..79ebff44969e 100644 --- a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch +++ b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 6 Dec 2018 09:52:20 +0100 Subject: [PATCH] drm/i915: disable tracing on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 diff --git a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch index d287154d8d03..d95873e4e31a 100644 --- a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +++ b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 19 Dec 2018 10:47:02 +0100 Subject: [PATCH] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The order of the header files is important. If this header file is included after tracepoint.h was included then the NOTRACE here becomes a diff --git a/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch b/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch index 932bc67d59c2..580ca4552e0d 100644 --- a/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch +++ b/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch @@ -1,7 +1,7 @@ Subject: drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end() From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 09:01:42 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz [ 8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918 diff --git a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch index cf35af44c836..cb12b70702ed 100644 --- a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch +++ b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch @@ -1,7 +1,7 @@ Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Sat, 27 Feb 2016 08:09:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz DRM folks identified the spots, so use them. diff --git a/debian/patches-rt/efi-Allow-efi-runtime.patch b/debian/patches-rt/efi-Allow-efi-runtime.patch index 83bb2643e5b7..07ff5c5ce55e 100644 --- a/debian/patches-rt/efi-Allow-efi-runtime.patch +++ b/debian/patches-rt/efi-Allow-efi-runtime.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:06:10 +0200 Subject: [PATCH] efi: Allow efi=runtime -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In case the command line option "efi=noruntime" is default at built-time, the user could overwrite its state by `efi=runtime' and allow it again. diff --git a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch index a01cfbe45bfd..6c1e0354af70 100644 --- a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch +++ b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 26 Jul 2018 15:03:16 +0200 Subject: [PATCH] efi: Disable runtime services on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Based on meassurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. diff --git a/debian/patches-rt/epoll-use-get-cpu-light.patch b/debian/patches-rt/epoll-use-get-cpu-light.patch index d7ef7803c748..2e31f2e56547 100644 --- a/debian/patches-rt/epoll-use-get-cpu-light.patch +++ b/debian/patches-rt/epoll-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: fs/epoll: Do not disable preemption on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 08 Jul 2011 16:35:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz ep_call_nested() takes a sleeping lock so we can't disable preemption. The light version is enough since ep_call_nested() doesn't mind beeing diff --git a/debian/patches-rt/fs-buffer-Make-BH_Uptodate_Lock-bit_spin_lock-a-regu.patch b/debian/patches-rt/fs-buffer-Make-BH_Uptodate_Lock-bit_spin_lock-a-regu.patch index 3669e87b26ff..415e2c70659b 100644 --- a/debian/patches-rt/fs-buffer-Make-BH_Uptodate_Lock-bit_spin_lock-a-regu.patch +++ b/debian/patches-rt/fs-buffer-Make-BH_Uptodate_Lock-bit_spin_lock-a-regu.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 15 Nov 2019 18:54:20 +0100 Subject: [PATCH] fs/buffer: Make BH_Uptodate_Lock bit_spin_lock a regular spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Bit spinlocks are problematic if PREEMPT_RT is enabled, because they disable preemption, which is undesired for latency reasons and breaks when diff --git a/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch b/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch index 698d4282871b..c38df34110ac 100644 --- a/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch +++ b/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 13 Sep 2017 12:32:34 +0200 Subject: [PATCH] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However diff --git a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index 67f0727af2a0..8723cc3f42dd 100644 --- a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 20 Oct 2017 11:29:53 +0200 Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is diff --git a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch index 571007636b98..d8501d78ee7b 100644 --- a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch +++ b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Sep 2016 14:35:49 +0200 Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. diff --git a/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch b/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch index f1bce903b8ee..cbd663cf98d1 100644 --- a/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch +++ b/debian/patches-rt/fs-namespace-use-cpu-chill-in-trylock-loops.patch @@ -1,7 +1,7 @@ Subject: fs: namespace: Use cpu_chill() in trylock loops From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 07 Mar 2012 21:00:34 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch b/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch index 676751f93bd5..e13b3f555ea2 100644 --- a/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch +++ b/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 15 Sep 2016 10:51:27 +0200 Subject: [PATCH] fs/nfs: turn rmdir_sem into a semaphore -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The RW semaphore had a reader side which used the _non_owner version because it most likely took the reader lock in one thread and released it diff --git a/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch b/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch index 96dce314b465..22c8a75c4cee 100644 --- a/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch +++ b/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch @@ -1,7 +1,7 @@ From: Clark Williams <williams@redhat.com> Date: Tue, 3 Jul 2018 13:34:30 -0500 Subject: [PATCH] fscache: initialize cookie hash table raw spinlocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The fscache cookie mechanism uses a hash table of hlist_bl_head structures. The PREEMPT_RT patcheset adds a raw spinlock to this structure and so on PREEMPT_RT diff --git a/debian/patches-rt/ftrace-migrate-disable-tracing.patch b/debian/patches-rt/ftrace-migrate-disable-tracing.patch index 280f26c09d83..63e4fadcfa80 100644 --- a/debian/patches-rt/ftrace-migrate-disable-tracing.patch +++ b/debian/patches-rt/ftrace-migrate-disable-tracing.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 21:56:42 +0200 Subject: trace: Add migrate-disabled counter to tracing output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- diff --git a/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch index d4d8871a0af6..666b60fab78e 100644 --- a/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch +++ b/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 1 Mar 2013 11:17:42 +0100 Subject: futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In exit_pi_state_list() we have the following locking construct: diff --git a/debian/patches-rt/futex-requeue-pi-fix.patch b/debian/patches-rt/futex-requeue-pi-fix.patch index 921ce1a0cd13..5cd764221fe4 100644 --- a/debian/patches-rt/futex-requeue-pi-fix.patch +++ b/debian/patches-rt/futex-requeue-pi-fix.patch @@ -1,7 +1,7 @@ From: Steven Rostedt <rostedt@goodmis.org> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: futex: Fix bug on when a requeued RT task times out -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Requeue with timeout causes a bug with PREEMPT_RT. diff --git a/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch b/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch index 7d89fbcbf493..45b03584df76 100644 --- a/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch +++ b/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 8 Mar 2017 14:23:35 +0100 Subject: [PATCH] futex: workaround migrate_disable/enable in different context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz migrate_enable() invokes __schedule() and it expects a preempt count of one. Holding a raw_spinlock_t with disabled interrupts should not allow scheduling. diff --git a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch index 62740a22756d..d53d8db4ab1a 100644 --- a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch +++ b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:29:57 -0500 Subject: genirq: Disable irqpoll on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Creates long latencies for no value diff --git a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch index d94b8097c97f..2e835f16fa0d 100644 --- a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch +++ b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <joshc@ni.com> Date: Thu, 11 Feb 2016 11:54:00 -0600 Subject: genirq: update irq_set_irqchip_state documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On -rt kernels, the use of migrate_disable()/migrate_enable() is sufficient to guarantee a task isn't moved to another CPU. Update the diff --git a/debian/patches-rt/hrtimer-Allow-raw-wakeups-during-boot.patch b/debian/patches-rt/hrtimer-Allow-raw-wakeups-during-boot.patch index 29760ba4cc56..6d0f6fb44251 100644 --- a/debian/patches-rt/hrtimer-Allow-raw-wakeups-during-boot.patch +++ b/debian/patches-rt/hrtimer-Allow-raw-wakeups-during-boot.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 9 Aug 2019 15:25:21 +0200 Subject: [PATCH] hrtimer: Allow raw wakeups during boot -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There are a few wake-up timers during the early boot which are essencial for the system to make progress. At this stage there are no softirq spawn for the diff --git a/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch b/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch index 23c46ca10d27..88c01565592b 100644 --- a/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch +++ b/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 6 Dec 2018 10:15:13 +0100 Subject: [PATCH] hrtimer: move state change before hrtimer_cancel in do_nanosleep() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There is a small window between setting t->task to NULL and waking the task up (which would set TASK_RUNNING). So the timer would fire, run and diff --git a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch index f7c27960172f..4aaa226b527d 100644 --- a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch +++ b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch @@ -1,7 +1,7 @@ Subject: irqwork: push most work into softirq context From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 23 Jun 2015 15:32:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Initially we defered all irqwork into softirq because we didn't want the latency spikes if perf or another user was busy and delayed the RT task. diff --git a/debian/patches-rt/jump-label-rt.patch b/debian/patches-rt/jump-label-rt.patch index 986d2a45dd5d..041dea3a9625 100644 --- a/debian/patches-rt/jump-label-rt.patch +++ b/debian/patches-rt/jump-label-rt.patch @@ -1,7 +1,7 @@ Subject: jump-label: disable if stop_machine() is used From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 08 Jul 2015 17:14:48 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. diff --git a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch index 636e0bc332b9..346bc22db11f 100644 --- a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch +++ b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch @@ -1,7 +1,7 @@ Subject: kconfig: Disable config options which are not RT compatible From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 24 Jul 2011 12:11:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Disable stuff which is known to have issues on RT diff --git a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch index 580b25b95a35..13cd65536699 100644 --- a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch +++ b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 21 Nov 2016 19:31:08 +0100 Subject: [PATCH] kernel/sched: move stack + kprobe clean up to __put_task_struct() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There is no need to free the stack before the task struct (except for reasons mentioned in commit 68f24b08ee89 ("sched/core: Free the stack early if diff --git a/debian/patches-rt/kmemleak-Change-the-lock-of-kmemleak_object-to-raw_s.patch b/debian/patches-rt/kmemleak-Turn-kmemleak_lock-and-object-lock-to-raw_s.patch index e50bb401c19d..b0dc4f822457 100644 --- a/debian/patches-rt/kmemleak-Change-the-lock-of-kmemleak_object-to-raw_s.patch +++ b/debian/patches-rt/kmemleak-Turn-kmemleak_lock-and-object-lock-to-raw_s.patch @@ -1,27 +1,69 @@ -From: Liu Haitao <haitao.liu@windriver.com> -Date: Fri, 27 Sep 2019 16:22:30 +0800 -Subject: [PATCH] kmemleak: Change the lock of kmemleak_object to +From: He Zhe <zhe.he@windriver.com> +Date: Wed, 19 Dec 2018 16:30:57 +0100 +Subject: [PATCH] kmemleak: Turn kmemleak_lock and object->lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz -The commit ("kmemleak: Turn kmemleak_lock to raw spinlock on RT") -changed the kmemleak_lock to raw spinlock. However the -kmemleak_object->lock is held after the kmemleak_lock is held in -scan_block(). +kmemleak_lock as a rwlock on RT can possibly be acquired in atomic context +which does work on RT. +Since the kmemleak operation is performed in atomic context make it a +raw_spinlock_t so it can also be acquired on RT. This is used for +debugging and is not enabled by default in a production like environment +(where performance/latency matters) so it makes sense to make it a +raw_spinlock_t instead trying to get rid of the atomic context. +Turn also the kmemleak_object->lock into raw_spinlock_t which is +acquired (nested) while the kmemleak_lock is held. -Make the object->lock a raw_spinlock_t. +The time spent in "echo scan > kmemleak" slightly improved on 64core box +with this patch applied after boot. -Cc: stable-rt@vger.kernel.org +Acked-by: Catalin Marinas <catalin.marinas@arm.com> +Link: https://lkml.kernel.org/r/20181218150744.GB20197@arrakis.emea.arm.com +Link: https://lkml.kernel.org/r/1542877459-144382-1-git-send-email-zhe.he@windriver.com Link: https://lkml.kernel.org/r/20190927082230.34152-1-yongxin.liu@windriver.com +Signed-off-by: He Zhe <zhe.he@windriver.com> Signed-off-by: Liu Haitao <haitao.liu@windriver.com> Signed-off-by: Yongxin Liu <yongxin.liu@windriver.com> +[bigeasy: Redo the description. Merge the individual bits: He Zhe did +the kmemleak_lock, Liu Haitao the ->lock and Yongxin Liu forwarded the +patch.] Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- - mm/kmemleak.c | 68 +++++++++++++++++++++++++++++----------------------------- - 1 file changed, 34 insertions(+), 34 deletions(-) + mm/kmemleak.c | 112 +++++++++++++++++++++++++++++----------------------------- + 1 file changed, 56 insertions(+), 56 deletions(-) --- a/mm/kmemleak.c +++ b/mm/kmemleak.c +@@ -13,7 +13,7 @@ + * + * The following locks and mutexes are used by kmemleak: + * +- * - kmemleak_lock (rwlock): protects the object_list modifications and ++ * - kmemleak_lock (raw_spinlock_t): protects the object_list modifications and + * accesses to the object_tree_root. The object_list is the main list + * holding the metadata (struct kmemleak_object) for the allocated memory + * blocks. The object_tree_root is a red black tree used to look-up +@@ -22,13 +22,13 @@ + * object_tree_root in the create_object() function called from the + * kmemleak_alloc() callback and removed in delete_object() called from the + * kmemleak_free() callback +- * - kmemleak_object.lock (spinlock): protects a kmemleak_object. Accesses to +- * the metadata (e.g. count) are protected by this lock. Note that some +- * members of this structure may be protected by other means (atomic or +- * kmemleak_lock). This lock is also held when scanning the corresponding +- * memory block to avoid the kernel freeing it via the kmemleak_free() +- * callback. This is less heavyweight than holding a global lock like +- * kmemleak_lock during scanning ++ * - kmemleak_object.lock (raw_spinlock_t): protects a kmemleak_object. ++ * Accesses to the metadata (e.g. count) are protected by this lock. Note ++ * that some members of this structure may be protected by other means ++ * (atomic or kmemleak_lock). This lock is also held when scanning the ++ * corresponding memory block to avoid the kernel freeing it via the ++ * kmemleak_free() callback. This is less heavyweight than holding a global ++ * lock like kmemleak_lock during scanning. + * - scan_mutex (mutex): ensures that only one thread may scan the memory for + * unreferenced objects at a time. The gray_list contains the objects which + * are already referenced or marked as false positives and need to be @@ -135,7 +135,7 @@ struct kmemleak_scan_area { * (use_count) and freed using the RCU mechanism. */ @@ -31,6 +73,73 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> unsigned int flags; /* object status flags */ struct list_head object_list; struct list_head gray_list; +@@ -191,8 +191,8 @@ static int mem_pool_free_count = ARRAY_S + static LIST_HEAD(mem_pool_free_list); + /* search tree for object boundaries */ + static struct rb_root object_tree_root = RB_ROOT; +-/* rw_lock protecting the access to object_list and object_tree_root */ +-static DEFINE_RWLOCK(kmemleak_lock); ++/* protecting the access to object_list and object_tree_root */ ++static DEFINE_RAW_SPINLOCK(kmemleak_lock); + + /* allocation caches for kmemleak internal data */ + static struct kmem_cache *object_cache; +@@ -426,7 +426,7 @@ static struct kmemleak_object *mem_pool_ + } + + /* slab allocation failed, try the memory pool */ +- write_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + object = list_first_entry_or_null(&mem_pool_free_list, + typeof(*object), object_list); + if (object) +@@ -435,7 +435,7 @@ static struct kmemleak_object *mem_pool_ + object = &mem_pool[--mem_pool_free_count]; + else + pr_warn_once("Memory pool empty, consider increasing CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE\n"); +- write_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + + return object; + } +@@ -453,9 +453,9 @@ static void mem_pool_free(struct kmemlea + } + + /* add the object to the memory pool free list */ +- write_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + list_add(&object->object_list, &mem_pool_free_list); +- write_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + } + + /* +@@ -514,9 +514,9 @@ static struct kmemleak_object *find_and_ + struct kmemleak_object *object; + + rcu_read_lock(); +- read_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + object = lookup_object(ptr, alias); +- read_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + + /* check whether the object is still available */ + if (object && !get_object(object)) +@@ -546,11 +546,11 @@ static struct kmemleak_object *find_and_ + unsigned long flags; + struct kmemleak_object *object; + +- write_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + object = lookup_object(ptr, alias); + if (object) + __remove_object(object); +- write_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + + return object; + } @@ -585,7 +585,7 @@ static struct kmemleak_object *create_ob INIT_LIST_HEAD(&object->object_list); INIT_LIST_HEAD(&object->gray_list); @@ -40,6 +149,24 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> atomic_set(&object->use_count, 1); object->flags = OBJECT_ALLOCATED; object->pointer = ptr; +@@ -617,7 +617,7 @@ static struct kmemleak_object *create_ob + /* kernel backtrace */ + object->trace_len = __save_stack_trace(object->trace); + +- write_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + + untagged_ptr = (unsigned long)kasan_reset_tag((void *)ptr); + min_addr = min(min_addr, untagged_ptr); +@@ -649,7 +649,7 @@ static struct kmemleak_object *create_ob + + list_add_tail_rcu(&object->object_list, &object_list); + out: +- write_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + return object; + } + @@ -667,9 +667,9 @@ static void __delete_object(struct kmeml * Locking here also ensures that the corresponding memory block * cannot be freed when it is being scanned. @@ -118,6 +245,15 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> put_object(object); } +@@ -1233,7 +1233,7 @@ static void scan_block(void *_start, voi + unsigned long flags; + unsigned long untagged_ptr; + +- read_lock_irqsave(&kmemleak_lock, flags); ++ raw_spin_lock_irqsave(&kmemleak_lock, flags); + for (ptr = start; ptr < end; ptr++) { + struct kmemleak_object *object; + unsigned long pointer; @@ -1268,7 +1268,7 @@ static void scan_block(void *_start, voi * previously acquired in scan_object(). These locks are * enclosed by scan_mutex. @@ -136,7 +272,7 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> if (excess_ref) { object = lookup_object(excess_ref, 0); -@@ -1286,9 +1286,9 @@ static void scan_block(void *_start, voi +@@ -1286,12 +1286,12 @@ static void scan_block(void *_start, voi if (object == scanned) /* circular reference, ignore */ continue; @@ -147,7 +283,11 @@ Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> + raw_spin_unlock(&object->lock); } } - raw_spin_unlock_irqrestore(&kmemleak_lock, flags); +- read_unlock_irqrestore(&kmemleak_lock, flags); ++ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); + } + + /* @@ -1324,7 +1324,7 @@ static void scan_object(struct kmemleak_ * Once the object->lock is acquired, the corresponding memory block * cannot be freed (the same lock is acquired in delete_object). diff --git a/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch b/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch deleted file mode 100644 index ab0d36fb1a3f..000000000000 --- a/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch +++ /dev/null @@ -1,188 +0,0 @@ -From: He Zhe <zhe.he@windriver.com> -Date: Wed, 19 Dec 2018 16:30:57 +0100 -Subject: [PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz - -kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and -causes the follow BUG. - -BUG: scheduling while atomic: migration/15/132/0x00000002 -Preemption disabled at: -[<ffffffff8c927c11>] cpu_stopper_thread+0x71/0x100 -CPU: 15 PID: 132 Comm: migration/15 Not tainted 4.19.0-rt1-preempt-rt #1 -Call Trace: - schedule+0x3d/0xe0 - __rt_spin_lock+0x26/0x30 - __write_rt_lock+0x23/0x1a0 - rt_write_lock+0x2a/0x30 - find_and_remove_object+0x1e/0x80 - delete_object_full+0x10/0x20 - kmemleak_free+0x32/0x50 - kfree+0x104/0x1f0 - intel_pmu_cpu_dying+0x67/0x70 - x86_pmu_dying_cpu+0x1a/0x30 - cpuhp_invoke_callback+0x92/0x700 - take_cpu_down+0x70/0xa0 - multi_cpu_stop+0x62/0xc0 - cpu_stopper_thread+0x79/0x100 - smpboot_thread_fn+0x20f/0x2d0 - kthread+0x121/0x140 - -And on v4.18 stable tree the following call trace, caused by grabbing -kmemleak_lock again, is also observed. - -kernel BUG at kernel/locking/rtmutex.c:1048! -CPU: 5 PID: 689 Comm: mkfs.ext4 Not tainted 4.18.16-rt9-preempt-rt #1 -Call Trace: - rt_write_lock+0x2a/0x30 - create_object+0x17d/0x2b0 - kmemleak_alloc+0x34/0x50 - kmem_cache_alloc+0x146/0x220 - mempool_alloc_slab+0x15/0x20 - mempool_alloc+0x65/0x170 - sg_pool_alloc+0x21/0x60 - sg_alloc_table_chained+0x8b/0xb0 -… - blk_flush_plug_list+0x204/0x230 - schedule+0x87/0xe0 - rt_write_lock+0x2a/0x30 - create_object+0x17d/0x2b0 - kmemleak_alloc+0x34/0x50 - __kmalloc_node+0x1cd/0x340 - alloc_request_size+0x30/0x70 - mempool_alloc+0x65/0x170 - get_request+0x4e3/0x8d0 - blk_queue_bio+0x153/0x470 - generic_make_request+0x1dc/0x3f0 - submit_bio+0x49/0x140 -… - -kmemleak is an error detecting feature. We would not expect as good performance -as without it. As there is no raw rwlock defining helpers, we turn kmemleak_lock -to a raw spinlock. - -Signed-off-by: He Zhe <zhe.he@windriver.com> -Cc: catalin.marinas@arm.com -Cc: bigeasy@linutronix.de -Cc: tglx@linutronix.de -Cc: rostedt@goodmis.org -Acked-by: Catalin Marinas <catalin.marinas@arm.com> -Link: https://lkml.kernel.org/r/1542877459-144382-1-git-send-email-zhe.he@windriver.com -Link: https://lkml.kernel.org/r/20181218150744.GB20197@arrakis.emea.arm.com -Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> ---- - mm/kmemleak.c | 28 ++++++++++++++-------------- - 1 file changed, 14 insertions(+), 14 deletions(-) - ---- a/mm/kmemleak.c -+++ b/mm/kmemleak.c -@@ -13,7 +13,7 @@ - * - * The following locks and mutexes are used by kmemleak: - * -- * - kmemleak_lock (rwlock): protects the object_list modifications and -+ * - kmemleak_lock (raw spinlock): protects the object_list modifications and - * accesses to the object_tree_root. The object_list is the main list - * holding the metadata (struct kmemleak_object) for the allocated memory - * blocks. The object_tree_root is a red black tree used to look-up -@@ -192,7 +192,7 @@ static LIST_HEAD(mem_pool_free_list); - /* search tree for object boundaries */ - static struct rb_root object_tree_root = RB_ROOT; - /* rw_lock protecting the access to object_list and object_tree_root */ --static DEFINE_RWLOCK(kmemleak_lock); -+static DEFINE_RAW_SPINLOCK(kmemleak_lock); - - /* allocation caches for kmemleak internal data */ - static struct kmem_cache *object_cache; -@@ -426,7 +426,7 @@ static struct kmemleak_object *mem_pool_ - } - - /* slab allocation failed, try the memory pool */ -- write_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - object = list_first_entry_or_null(&mem_pool_free_list, - typeof(*object), object_list); - if (object) -@@ -435,7 +435,7 @@ static struct kmemleak_object *mem_pool_ - object = &mem_pool[--mem_pool_free_count]; - else - pr_warn_once("Memory pool empty, consider increasing CONFIG_DEBUG_KMEMLEAK_MEM_POOL_SIZE\n"); -- write_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - - return object; - } -@@ -453,9 +453,9 @@ static void mem_pool_free(struct kmemlea - } - - /* add the object to the memory pool free list */ -- write_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - list_add(&object->object_list, &mem_pool_free_list); -- write_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - } - - /* -@@ -514,9 +514,9 @@ static struct kmemleak_object *find_and_ - struct kmemleak_object *object; - - rcu_read_lock(); -- read_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - object = lookup_object(ptr, alias); -- read_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - - /* check whether the object is still available */ - if (object && !get_object(object)) -@@ -546,11 +546,11 @@ static struct kmemleak_object *find_and_ - unsigned long flags; - struct kmemleak_object *object; - -- write_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - object = lookup_object(ptr, alias); - if (object) - __remove_object(object); -- write_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - - return object; - } -@@ -617,7 +617,7 @@ static struct kmemleak_object *create_ob - /* kernel backtrace */ - object->trace_len = __save_stack_trace(object->trace); - -- write_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - - untagged_ptr = (unsigned long)kasan_reset_tag((void *)ptr); - min_addr = min(min_addr, untagged_ptr); -@@ -649,7 +649,7 @@ static struct kmemleak_object *create_ob - - list_add_tail_rcu(&object->object_list, &object_list); - out: -- write_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - return object; - } - -@@ -1233,7 +1233,7 @@ static void scan_block(void *_start, voi - unsigned long flags; - unsigned long untagged_ptr; - -- read_lock_irqsave(&kmemleak_lock, flags); -+ raw_spin_lock_irqsave(&kmemleak_lock, flags); - for (ptr = start; ptr < end; ptr++) { - struct kmemleak_object *object; - unsigned long pointer; -@@ -1291,7 +1291,7 @@ static void scan_block(void *_start, voi - spin_unlock(&object->lock); - } - } -- read_unlock_irqrestore(&kmemleak_lock, flags); -+ raw_spin_unlock_irqrestore(&kmemleak_lock, flags); - } - - /* diff --git a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch index 307bc06d57a2..6d262b291020 100644 --- a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch +++ b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 23 Jan 2014 14:45:59 +0100 Subject: leds: trigger: disable CPU trigger on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 diff --git a/debian/patches-rt/lib-smp_processor_id-Don-t-use-cpumask_equal.patch b/debian/patches-rt/lib-smp_processor_id-Don-t-use-cpumask_equal.patch index 4519ecd9200c..8ea2f10d7601 100644 --- a/debian/patches-rt/lib-smp_processor_id-Don-t-use-cpumask_equal.patch +++ b/debian/patches-rt/lib-smp_processor_id-Don-t-use-cpumask_equal.patch @@ -1,7 +1,7 @@ From: Waiman Long <longman@redhat.com> Date: Thu, 3 Oct 2019 16:36:08 -0400 Subject: [PATCH] lib/smp_processor_id: Don't use cpumask_equal() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The check_preemption_disabled() function uses cpumask_equal() to see if the task is bounded to the current CPU only. cpumask_equal() calls diff --git a/debian/patches-rt/lib-ubsan-Don-t-seralize-UBSAN-report.patch b/debian/patches-rt/lib-ubsan-Don-t-seralize-UBSAN-report.patch index 32f6321dee37..78a5c9edb4c4 100644 --- a/debian/patches-rt/lib-ubsan-Don-t-seralize-UBSAN-report.patch +++ b/debian/patches-rt/lib-ubsan-Don-t-seralize-UBSAN-report.patch @@ -1,7 +1,7 @@ From: Julien Grall <julien.grall@arm.com> Date: Fri, 20 Sep 2019 11:08:35 +0100 Subject: [PATCH] lib/ubsan: Don't seralize UBSAN report -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz At the moment, UBSAN report will be serialized using a spin_lock(). On RT-systems, spinlocks are turned to rt_spin_lock and may sleep. This will diff --git a/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch b/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch index b6760673ca9f..ef38bdd93362 100644 --- a/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch +++ b/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch @@ -1,7 +1,7 @@ From: Paul Gortmaker <paul.gortmaker@windriver.com> Date: Fri, 21 Jun 2013 15:07:25 -0400 Subject: list_bl: Make list head locking RT safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz As per changes in include/linux/jbd_common.h for avoiding the bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal diff --git a/debian/patches-rt/localversion.patch b/debian/patches-rt/localversion.patch index fef69d70abd4..82468c43fd94 100644 --- a/debian/patches-rt/localversion.patch +++ b/debian/patches-rt/localversion.patch @@ -1,7 +1,7 @@ Subject: Add localversion for -RT release From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 08 Jul 2011 20:25:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- @@ -11,4 +11,4 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt1 ++-rt3 diff --git a/debian/patches-rt/lockdep-disable-self-test.patch b/debian/patches-rt/lockdep-disable-self-test.patch index f65256821bfc..553e5d36fe16 100644 --- a/debian/patches-rt/lockdep-disable-self-test.patch +++ b/debian/patches-rt/lockdep-disable-self-test.patch @@ -4,7 +4,7 @@ Subject: [PATCH] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The self-test wasn't always 100% accurate for RT. We disabled a few tests which failed because they had a different semantic for RT. Some diff --git a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch index fe6fb5efa9fd..ce588184cb2e 100644 --- a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch +++ b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch @@ -1,7 +1,7 @@ Subject: lockdep: Make it RT aware From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 17 Jul 2011 18:51:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz teach lockdep that we don't really do softirqs on -RT. diff --git a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch index 77ff5d23acc8..e278a0f196c1 100644 --- a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch +++ b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch @@ -1,7 +1,7 @@ From: Josh Cartwright <josh.cartwright@ni.com> Date: Wed, 28 Jan 2015 13:08:45 -0600 Subject: lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz "lockdep: Selftest: Only do hardirq context test for raw spinlock" disabled the execution of certain tests with PREEMPT_RT, but did diff --git a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch index 26ee04bbafc2..6dfa9999e278 100644 --- a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch +++ b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch @@ -1,7 +1,7 @@ Subject: lockdep: selftest: Only do hardirq context test for raw spinlock From: Yong Zhang <yong.zhang0@gmail.com> Date: Mon, 16 Apr 2012 15:01:56 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz From: Yong Zhang <yong.zhang@windriver.com> diff --git a/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch b/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch index 6590fba76277..ac8ca1812a29 100644 --- a/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch +++ b/debian/patches-rt/locking-Make-spinlock_t-and-rwlock_t-a-RCU-section-o.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 19 Nov 2019 09:25:04 +0100 Subject: [PATCH] locking: Make spinlock_t and rwlock_t a RCU section on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On !RT a locked spinlock_t and rwlock_t disables preemption which implies a RCU read section. There is code that relies on that behaviour. diff --git a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch index 0df979561927..84b2f461313a 100644 --- a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch +++ b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 4 Aug 2017 17:40:42 +0200 Subject: [PATCH 1/2] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Upstream uses arch_spinlock_t within spinlock_t and requests that spinlock_types.h header file is included first. diff --git a/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch b/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch index 363dc5b129cd..2540e286bcc3 100644 --- a/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch +++ b/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch @@ -1,7 +1,7 @@ From: "Wolfgang M. Reimer" <linuxball@gmail.com> Date: Tue, 21 Jul 2015 16:20:07 +0200 Subject: locking: locktorture: Do NOT include rwlock.h directly -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Including rwlock.h directly will cause kernel builds to fail if CONFIG_PREEMPT_RT is defined. The correct header file diff --git a/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch b/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch index 43659f6290b8..8e0b482fd16e 100644 --- a/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch +++ b/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch @@ -1,7 +1,7 @@ From: Scott Wood <swood@redhat.com> Date: Fri, 4 Jan 2019 15:33:21 -0500 Subject: [PATCH] locking/rt-mutex: Flush block plug on __down_read() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __down_read() bypasses the rtmutex frontend to call rt_mutex_slowlock_locked() directly, and thus it needs to call diff --git a/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch b/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch index fb9196d0f3a0..62fce1a44113 100644 --- a/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch +++ b/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch @@ -1,7 +1,7 @@ From: Mikulas Patocka <mpatocka@redhat.com> Date: Mon, 13 Nov 2017 12:56:53 -0500 Subject: [PATCH] locking/rt-mutex: fix deadlock in device mapper / block-IO -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When some block device driver creates a bio and submits it to another block device driver, the bio is added to current->bio_list (in order to diff --git a/debian/patches-rt/locking-rtmutex-Clean-pi_blocked_on-in-the-error-cas.patch b/debian/patches-rt/locking-rtmutex-Clean-pi_blocked_on-in-the-error-cas.patch index 52d9d4dd170c..d9d3d49f44dd 100644 --- a/debian/patches-rt/locking-rtmutex-Clean-pi_blocked_on-in-the-error-cas.patch +++ b/debian/patches-rt/locking-rtmutex-Clean-pi_blocked_on-in-the-error-cas.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 30 Sep 2019 18:15:44 +0200 Subject: [PATCH] locking/rtmutex: Clean ->pi_blocked_on in the error case -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The function rt_mutex_wait_proxy_lock() cleans ->pi_blocked_on in case of failure (timeout, signal). The same cleanup is required in diff --git a/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch b/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch index 754899b19ec1..82906ca6a106 100644 --- a/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch +++ b/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 16 Nov 2017 16:48:48 +0100 Subject: [PATCH] locking/rtmutex: re-init the wait_lock in rt_mutex_init_proxy_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz We could provide a key-class for the lockdep (and fixup all callers) or move the init to all callers (like it was) in order to avoid lockdep diff --git a/debian/patches-rt/md-disable-bcache.patch b/debian/patches-rt/md-disable-bcache.patch index 9f683a05f347..59f4c9d2146e 100644 --- a/debian/patches-rt/md-disable-bcache.patch +++ b/debian/patches-rt/md-disable-bcache.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Aug 2013 11:48:57 +0200 Subject: md: disable bcache -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz It uses anon semaphores |drivers/md/bcache/request.c: In function ‘cached_dev_write_complete’: diff --git a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch index ba8290e5659f..8e9265a028e4 100644 --- a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch +++ b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 6 Apr 2010 16:51:31 +0200 Subject: md: raid5: Make raid5_percpu handling RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic diff --git a/debian/patches-rt/mips-disable-highmem-on-rt.patch b/debian/patches-rt/mips-disable-highmem-on-rt.patch index 1e8b06206ac2..2dbb3b56d9e9 100644 --- a/debian/patches-rt/mips-disable-highmem-on-rt.patch +++ b/debian/patches-rt/mips-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: mips: Disable highmem on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 17:10:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch b/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch index d30468f92609..eeec89e66d18 100644 --- a/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch +++ b/debian/patches-rt/mm-compaction-Disable-compact_unevictable_allowed-on.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 8 Nov 2019 12:55:47 +0100 Subject: [PATCH] mm/compaction: Disable compact_unevictable_allowed on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since commit 5bbe3547aa3ba ("mm: allow compaction of unevictable pages") diff --git a/debian/patches-rt/mm-disable-sloub-rt.patch b/debian/patches-rt/mm-disable-sloub-rt.patch index d6e130730ae1..0f78b4194e41 100644 --- a/debian/patches-rt/mm-disable-sloub-rt.patch +++ b/debian/patches-rt/mm-disable-sloub-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:44:03 -0500 Subject: mm: Allow only SLUB on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Memory allocation disables interrupts as part of the allocation and freeing process. For -RT it is important that this section remain short and don't diff --git a/debian/patches-rt/mm-enable-slub.patch b/debian/patches-rt/mm-enable-slub.patch index 439bc07eba64..96e210f5275d 100644 --- a/debian/patches-rt/mm-enable-slub.patch +++ b/debian/patches-rt/mm-enable-slub.patch @@ -1,7 +1,7 @@ Subject: mm: Enable SLUB for RT From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 25 Oct 2012 10:32:35 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Avoid the memory allocation in IRQ section diff --git a/debian/patches-rt/mm-make-vmstat-rt-aware.patch b/debian/patches-rt/mm-make-vmstat-rt-aware.patch index f09961d37e9d..de969ca6dd5b 100644 --- a/debian/patches-rt/mm-make-vmstat-rt-aware.patch +++ b/debian/patches-rt/mm-make-vmstat-rt-aware.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:30:13 -0500 Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Disable preemption on -RT for the vmstat code. On vanila the code runs in IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the diff --git a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch index 52a5abb3a1b2..07cb7d3f05e0 100644 --- a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch +++ b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch @@ -1,7 +1,7 @@ From: Yang Shi <yang.shi@windriver.com> Subject: mm/memcontrol: Don't call schedule_work_on in preemption disabled context Date: Wed, 30 Oct 2013 11:48:33 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The following trace is triggered when running ltp oom test cases: diff --git a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch index 2b12211840ee..1cab01fc4cb4 100644 --- a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch +++ b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Subject: mm/memcontrol: Replace local_irq_disable with local locks Date: Wed, 28 Jan 2015 17:14:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. diff --git a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch index b25c97da67b8..e65266d6101e 100644 --- a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,7 @@ From: Ingo Molnar <mingo@elte.hu> Date: Fri, 3 Jul 2009 08:29:37 -0500 Subject: mm: page_alloc: rt-friendly per-cpu pages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. diff --git a/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch b/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch index 00dde59cf5bf..97eaf6aeb6a6 100644 --- a/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch +++ b/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch @@ -1,7 +1,7 @@ Subject: mm, rt: kmap_atomic scheduling From: Peter Zijlstra <peterz@infradead.org> Date: Thu, 28 Jul 2011 10:43:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In fact, with migrate_disable() existing one could play games with kmap_atomic. You could save/restore the kmap_atomic slots on context diff --git a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index 487275d6fb7c..c8e212dd1c17 100644 --- a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch +++ b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 3 Jul 2009 08:44:34 -0500 Subject: mm/scatterlist: Do not disable irqs on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz For -RT it is enough to keep pagefault disabled (which is currently handled by kmap_atomic()). diff --git a/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch b/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch index 51f7bfdf1026..21c2cbb16343 100644 --- a/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch +++ b/debian/patches-rt/mm-swap-Enable-use-pvec-lock-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 12 Aug 2019 11:20:44 +0200 Subject: [PATCH] mm/swap: Enable use pvec lock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On RT we also need to avoid preempt disable/IRQ-off regions so have to enable the locking while accessing pvecs. diff --git a/debian/patches-rt/mm-vmalloc-remove-preempt_disable-enable-when-doing-.patch b/debian/patches-rt/mm-vmalloc-remove-preempt_disable-enable-when-doing-.patch index 4788adccd337..1e85f37ce8ac 100644 --- a/debian/patches-rt/mm-vmalloc-remove-preempt_disable-enable-when-doing-.patch +++ b/debian/patches-rt/mm-vmalloc-remove-preempt_disable-enable-when-doing-.patch @@ -2,7 +2,7 @@ From: "Uladzislau Rezki (Sony)" <urezki@gmail.com> Date: Sat, 30 Nov 2019 17:54:33 -0800 Subject: [PATCH] mm/vmalloc: remove preempt_disable/enable when doing preloading -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Some background. The preemption was disabled before to guarantee that a preloaded object is available for a CPU, it was stored for. That was diff --git a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch index 75289d6aa8cf..d7e895d69005 100644 --- a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch +++ b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: mm/vmalloc: Another preempt disable region which sucks From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 12 Jul 2011 11:39:36 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. diff --git a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch index f793a58c63a7..1c33944bc463 100644 --- a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch +++ b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Feb 2019 10:40:46 +0100 Subject: [PATCH] mm: workingset: replace IRQ-off check with a lockdep assert. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Commit diff --git a/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch b/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch index 06c78c71db1a..e64176904683 100644 --- a/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch +++ b/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch @@ -2,7 +2,7 @@ From: "Luis Claudio R. Goncalves" <lclaudio@uudg.org> Date: Tue, 25 Jun 2019 11:28:04 -0300 Subject: [PATCH] mm/zswap: Do not disable preemption in zswap_frontswap_store() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Zswap causes "BUG: scheduling while atomic" by blocking on a rt_spin_lock() with preemption disabled. The preemption is disabled by get_cpu_var() in diff --git a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch index 665e304756e8..0852518254ce 100644 --- a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch +++ b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Tue, 22 Mar 2016 11:16:09 +0100 Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz get_cpu_var() disables preemption and triggers a might_sleep() splat later. This is replaced with get_locked_var(). diff --git a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch index 668bf4bc24c0..86f6e5705ab0 100644 --- a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 14 Sep 2016 17:36:35 +0200 Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The seqcount disables preemption on -RT while it is held which can't remove. Also we don't want the reader to spin for ages if the writer is diff --git a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch index 46459ec4e977..ee17ff60c289 100644 --- a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch +++ b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 16 Jun 2017 19:03:16 +0200 Subject: [PATCH] net/core: use local_bh_disable() in netif_rx_ni() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz In 2004 netif_rx_ni() gained a preempt_disable() section around netif_rx() and its do_softirq() + testing for it. The do_softirq() part diff --git a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index da0756a6f1b1..3bc7c4fc13dd 100644 --- a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +++ b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 30 Mar 2016 13:36:29 +0200 Subject: [PATCH] net: dev: always take qdisc's busylock in __dev_xmit_skb() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The root-lock is dropped before dev_hard_start_xmit() is invoked and after setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away diff --git a/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch b/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch index f6a11c8b98be..dfc1e2a6c09c 100644 --- a/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch +++ b/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 20 Mar 2013 18:06:20 +0100 Subject: net: Add a mutex around devnet_rename_seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On RT write_seqcount_begin() disables preemption and device_rename() allocates memory with GFP_KERNEL and grabs later the sysfs_mutex diff --git a/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch b/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch index a278a9037e05..b5c7bfd193be 100644 --- a/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch +++ b/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch @@ -1,7 +1,7 @@ From: Marc Kleine-Budde <mkl@pengutronix.de> Date: Wed, 5 Mar 2014 00:49:47 +0100 Subject: net: sched: Use msleep() instead of yield() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50 (by default). If a high priority userspace process tries to shut down a busy diff --git a/debian/patches-rt/net-use-cpu-chill.patch b/debian/patches-rt/net-use-cpu-chill.patch index fb79dff4dbda..8867d9650056 100644 --- a/debian/patches-rt/net-use-cpu-chill.patch +++ b/debian/patches-rt/net-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: net: Use cpu_chill() instead of cpu_relax() From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 07 Mar 2012 21:10:04 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch index 650b6c7e864c..2b34e1459817 100644 --- a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch +++ b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 27 May 2017 19:02:06 +0200 Subject: net/core: disable NET_RX_BUSY_POLL on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz napi_busy_loop() disables preemption and performs a NAPI poll. We can't acquire sleeping locks with disabled preemption so we would have to work around this diff --git a/debian/patches-rt/of-Rework-and-simplify-phandle-cache-to-use-a-fixed-.patch b/debian/patches-rt/of-Rework-and-simplify-phandle-cache-to-use-a-fixed-.patch index 6c301a68da0a..9e55e30e89bc 100644 --- a/debian/patches-rt/of-Rework-and-simplify-phandle-cache-to-use-a-fixed-.patch +++ b/debian/patches-rt/of-Rework-and-simplify-phandle-cache-to-use-a-fixed-.patch @@ -1,7 +1,7 @@ From: Rob Herring <robh@kernel.org> Date: Wed, 11 Dec 2019 17:23:45 -0600 Subject: [PATCH] of: Rework and simplify phandle cache to use a fixed size -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The phandle cache was added to speed up of_find_node_by_phandle() by avoiding walking the whole DT to find a matching phandle. The diff --git a/debian/patches-rt/oleg-signal-rt-fix.patch b/debian/patches-rt/oleg-signal-rt-fix.patch index 48fb89176e23..e5c59d67f057 100644 --- a/debian/patches-rt/oleg-signal-rt-fix.patch +++ b/debian/patches-rt/oleg-signal-rt-fix.patch @@ -1,7 +1,7 @@ From: Oleg Nesterov <oleg@redhat.com> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: signal/x86: Delay calling signals in atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using diff --git a/debian/patches-rt/panic-disable-random-on-rt.patch b/debian/patches-rt/panic-disable-random-on-rt.patch index 92d98d189710..9565110b542e 100644 --- a/debian/patches-rt/panic-disable-random-on-rt.patch +++ b/debian/patches-rt/panic-disable-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. diff --git a/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch b/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch index 9c6870a90bad..f5e94e53bd8a 100644 --- a/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch +++ b/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 4 Oct 2017 10:24:23 +0200 Subject: [PATCH] pci/switchtec: Don't use completion's wait queue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The poll callback is using completion's wait_queue_head_t member and puts it in poll_wait() so the poll() caller gets a wakeup after command diff --git a/debian/patches-rt/percpu-refcount-use-normal-instead-of-RCU-sched.patch b/debian/patches-rt/percpu-refcount-use-normal-instead-of-RCU-sched.patch index 0ee0b78d854c..53ee8b8105b8 100644 --- a/debian/patches-rt/percpu-refcount-use-normal-instead-of-RCU-sched.patch +++ b/debian/patches-rt/percpu-refcount-use-normal-instead-of-RCU-sched.patch @@ -4,7 +4,7 @@ Subject: [PATCH] percpu-refcount: use normal instead of RCU-sched" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This is a revert of commit a4244454df129 ("percpu-refcount: use RCU-sched insted of normal RCU") diff --git a/debian/patches-rt/perf-core-Add-SRCU-annotation-for-pmus-list-walk.patch b/debian/patches-rt/perf-core-Add-SRCU-annotation-for-pmus-list-walk.patch index 3e038d436f66..639e00557f1b 100644 --- a/debian/patches-rt/perf-core-Add-SRCU-annotation-for-pmus-list-walk.patch +++ b/debian/patches-rt/perf-core-Add-SRCU-annotation-for-pmus-list-walk.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 15 Nov 2019 18:04:07 +0100 Subject: [PATCH] perf/core: Add SRCU annotation for pmus list walk -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since commit 28875945ba98d ("rcu: Add support for consolidated-RCU reader checking") diff --git a/debian/patches-rt/pid.h-include-atomic.h.patch b/debian/patches-rt/pid.h-include-atomic.h.patch index 39063b36c18e..bab913140bb4 100644 --- a/debian/patches-rt/pid.h-include-atomic.h.patch +++ b/debian/patches-rt/pid.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Grygorii Strashko <Grygorii.Strashko@linaro.org> Date: Tue, 21 Jul 2015 19:43:56 +0300 Subject: pid.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This patch fixes build error: CC kernel/pid_namespace.o diff --git a/debian/patches-rt/posix-timers-expiry-lock.patch b/debian/patches-rt/posix-timers-expiry-lock.patch index 1f4f92fdea22..35d90a2e0067 100644 --- a/debian/patches-rt/posix-timers-expiry-lock.patch +++ b/debian/patches-rt/posix-timers-expiry-lock.patch @@ -4,7 +4,7 @@ Subject: [PATCH] posix-timers: Add expiry lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz If a about to be removed posix timer is active then the code will retry the delete operation until it succeeds / the timer callback completes. diff --git a/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch b/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch index e7abb5e6aed8..f3740327c459 100644 --- a/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch +++ b/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch @@ -1,7 +1,7 @@ From: John Stultz <johnstul@us.ibm.com> Date: Fri, 3 Jul 2009 08:29:58 -0500 Subject: posix-timers: Thread posix-cpu-timers on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. diff --git a/debian/patches-rt/power-disable-highmem-on-rt.patch b/debian/patches-rt/power-disable-highmem-on-rt.patch index ab432f041578..bffff12462f5 100644 --- a/debian/patches-rt/power-disable-highmem-on-rt.patch +++ b/debian/patches-rt/power-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: powerpc: Disable highmem on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 17:08:34 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index c98a643e8698..71777e86533c 100644 --- a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +++ b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,7 +1,7 @@ From: Bogdan Purcareata <bogdan.purcareata@freescale.com> Date: Fri, 24 Apr 2015 15:53:13 +0000 Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz While converting the openpic emulation code to use a raw_spinlock_t enables guests to run on RT, there's still a performance issue. For interrupts sent in diff --git a/debian/patches-rt/powerpc-preempt-lazy-support.patch b/debian/patches-rt/powerpc-preempt-lazy-support.patch index 11aab2576925..246975888fc4 100644 --- a/debian/patches-rt/powerpc-preempt-lazy-support.patch +++ b/debian/patches-rt/powerpc-preempt-lazy-support.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 1 Nov 2012 10:14:11 +0100 Subject: powerpc: Add support for lazy preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Implement the powerpc pieces for lazy preempt. diff --git a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch index 6c18bb8e9c92..03044838e049 100644 --- a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch +++ b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 26 Mar 2019 18:31:54 +0100 Subject: [PATCH] powerpc/pseries/iommu: Use a locallock instead local_irq_save() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The locallock protects the per-CPU variable tce_page. The function attempts to allocate memory while tce_page is protected (by disabling diff --git a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch index 7ef5d8128a40..9a6b52d71ab2 100644 --- a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch +++ b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Tue, 26 Mar 2019 18:31:29 +0100 Subject: [PATCH ] powerpc/stackprotector: work around stack-guard init from atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This is invoked from the secondary CPU in atomic context. On x86 we use tsc instead. On Power we XOR it against mftb() so lets use stack address diff --git a/debian/patches-rt/preempt-lazy-support.patch b/debian/patches-rt/preempt-lazy-support.patch index 97aeed2350c0..fbcfd1232738 100644 --- a/debian/patches-rt/preempt-lazy-support.patch +++ b/debian/patches-rt/preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: sched: Add support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 26 Oct 2012 18:50:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points diff --git a/debian/patches-rt/preempt-nort-rt-variants.patch b/debian/patches-rt/preempt-nort-rt-variants.patch index 66cee71ace1a..2f301b8ebabd 100644 --- a/debian/patches-rt/preempt-nort-rt-variants.patch +++ b/debian/patches-rt/preempt-nort-rt-variants.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 24 Jul 2009 12:38:56 +0200 Subject: preempt: Provide preempt_*_(no)rt variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch b/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch index e1ef1805ba69..2090e8321562 100644 --- a/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch +++ b/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Fri, 22 Feb 2019 23:02:44 +0100 Subject: [PATCH] printk: devkmsg: llseek: reset clear if it is lost -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz SEEK_DATA will seek to the last clear record. If this clear record is no longer in the ring buffer, devkmsg_llseek() will go into an diff --git a/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch b/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch index 2c778adff639..e8d30592b4f4 100644 --- a/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch +++ b/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch @@ -2,7 +2,7 @@ From: He Zhe <zhe.he@windriver.com> Date: Tue, 24 Sep 2019 15:26:39 +0800 Subject: [PATCH] printk: devkmsg: read: Return EPIPE when the first message user-space wants has gone -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When user-space wants to read the first message, that is when user->seq is 0, and that message has gone, it currently automatically resets diff --git a/debian/patches-rt/printk-hack-out-emergency-loglevel-usage.patch b/debian/patches-rt/printk-hack-out-emergency-loglevel-usage.patch index f4e9eda8a55d..eb818d081ce7 100644 --- a/debian/patches-rt/printk-hack-out-emergency-loglevel-usage.patch +++ b/debian/patches-rt/printk-hack-out-emergency-loglevel-usage.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Tue, 3 Dec 2019 09:14:57 +0100 Subject: [PATCH] printk: hack out emergency loglevel usage -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Instead of using an emergency loglevel to determine if atomic messages should be printed, use oops_in_progress. This conforms diff --git a/debian/patches-rt/printk-handle-iterating-while-buffer-changing.patch b/debian/patches-rt/printk-handle-iterating-while-buffer-changing.patch index 6b64b9ca9b53..8fb1fb6d8fda 100644 --- a/debian/patches-rt/printk-handle-iterating-while-buffer-changing.patch +++ b/debian/patches-rt/printk-handle-iterating-while-buffer-changing.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Mon, 7 Oct 2019 16:20:39 +0200 Subject: [PATCH] printk: handle iterating while buffer changing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The syslog and kmsg_dump readers are provided buffers to fill. Both try to maximize the provided buffer usage by calculating the diff --git a/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch b/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch index 768bf2137d14..a151a5ac9369 100644 --- a/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch +++ b/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Wed, 24 Apr 2019 16:36:04 +0200 Subject: [PATCH] printk: kmsg_dump: remove mutex usage -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The kmsg dumper can be called from any context, but the dumping helpers were using a mutex to synchronize the iterator against diff --git a/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch b/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch index 77fe9092b977..557a10d11efa 100644 --- a/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch +++ b/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Sun, 17 Feb 2019 03:11:20 +0100 Subject: [PATCH] printk: only allow kernel to emergency message -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Emergency messages exist as a mechanism for the kernel to communicate critical information to users. It is not meant for diff --git a/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch b/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch index 3a6cb0f25840..b581fcddb36e 100644 --- a/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch +++ b/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 22 Feb 2019 12:47:13 +0100 Subject: [PATCH] printk: print "rate-limitted" message as info -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz If messages which are injected via kmsg are dropped then they don't need to be printed as warnings. This is to avoid latency spikes if the diff --git a/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch b/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch index 9dea797e84c3..bfcb090263f1 100644 --- a/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch +++ b/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch @@ -1,7 +1,7 @@ From: John Ogness <john.ogness@linutronix.de> Date: Thu, 14 Feb 2019 23:13:30 +0100 Subject: [PATCH] printk: set deferred to default loglevel, enforce mask -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz All messages printed via vpritnk_deferred() were being automatically treated as emergency messages. diff --git a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch index 845121307826..cadf35e51a2f 100644 --- a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch +++ b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 29 Aug 2013 18:21:04 +0200 Subject: ptrace: fix ptrace vs tasklist_lock race -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz As explained by Alexander Fyodorov <halcy@yandex.ru>: diff --git a/debian/patches-rt/radix-tree-use-local-locks.patch b/debian/patches-rt/radix-tree-use-local-locks.patch index adbcee1bfa7a..15edf8806b09 100644 --- a/debian/patches-rt/radix-tree-use-local-locks.patch +++ b/debian/patches-rt/radix-tree-use-local-locks.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 25 Jan 2017 16:34:27 +0100 Subject: [PATCH] radix-tree: use local locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The preload functionality uses per-CPU variables and preempt-disable to ensure that it does not switch CPUs during its usage. This patch adds diff --git a/debian/patches-rt/random-make-it-work-on-rt.patch b/debian/patches-rt/random-make-it-work-on-rt.patch index 2a89659000c3..4f64957ed9b5 100644 --- a/debian/patches-rt/random-make-it-work-on-rt.patch +++ b/debian/patches-rt/random-make-it-work-on-rt.patch @@ -1,7 +1,7 @@ Subject: random: Make it work on rt From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 21 Aug 2012 20:38:50 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq diff --git a/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch b/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch index 69492bf66505..d43a96038d1f 100644 --- a/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch +++ b/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch @@ -1,7 +1,7 @@ From: Scott Wood <swood@redhat.com> Date: Wed, 11 Sep 2019 17:57:28 +0100 Subject: [PATCH] rcu: Use rcuc threads on PREEMPT_RT as we did -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz While switching to the reworked RCU-thread code, it has been forgotten to enable the thread processing on -RT. diff --git a/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch b/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch index c47fd3b6afa2..b731a0001b56 100644 --- a/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch +++ b/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch @@ -1,7 +1,7 @@ From: Julia Cartwright <julia@ni.com> Date: Wed, 12 Oct 2016 11:21:14 -0500 Subject: [PATCH] rcu: enable rcu_normal_after_boot by default for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The forcing of an expedited grace period is an expensive and very RT-application unfriendly operation, as it forcibly preempts all running diff --git a/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch b/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch index 516234096985..a1fa6181a5c5 100644 --- a/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch +++ b/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 21 Mar 2014 20:19:05 +0100 Subject: rcu: make RCU_BOOST default on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Since it is no longer invoked from the softirq people run into OOM more often if the priority of the RCU thread is too low. Making boosting diff --git a/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch index 8cf8c56d6e20..596acb0af3a1 100644 --- a/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch +++ b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch @@ -2,7 +2,7 @@ From: Scott Wood <swood@redhat.com> Date: Wed, 11 Sep 2019 17:57:29 +0100 Subject: [PATCH] rcutorture: Avoid problematic critical section nesting on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz rcutorture was generating some nesting scenarios that are not reasonable. Constrain the state selection to avoid them. diff --git a/debian/patches-rt/rt-introduce-cpu-chill.patch b/debian/patches-rt/rt-introduce-cpu-chill.patch index 541ac6840847..c260b399c3fe 100644 --- a/debian/patches-rt/rt-introduce-cpu-chill.patch +++ b/debian/patches-rt/rt-introduce-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: rt: Introduce cpu_chill() From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 07 Mar 2012 20:51:03 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() diff --git a/debian/patches-rt/rt-local-irq-lock.patch b/debian/patches-rt/rt-local-irq-lock.patch index bb39990b4829..0557b3215125 100644 --- a/debian/patches-rt/rt-local-irq-lock.patch +++ b/debian/patches-rt/rt-local-irq-lock.patch @@ -1,7 +1,7 @@ Subject: rt: Add local irq locks From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 20 Jun 2011 09:03:47 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Introduce locallock. For !RT this maps to preempt_disable()/ local_irq_disable() so there is not much that changes. For RT this will diff --git a/debian/patches-rt/rt-serial-warn-fix.patch b/debian/patches-rt/rt-serial-warn-fix.patch index 9b1615a78fac..f35c4b9b9ecf 100644 --- a/debian/patches-rt/rt-serial-warn-fix.patch +++ b/debian/patches-rt/rt-serial-warn-fix.patch @@ -1,7 +1,7 @@ Subject: rt: Improve the serial console PASS_LIMIT From: Ingo Molnar <mingo@elte.hu> Date: Wed Dec 14 13:05:54 CET 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Beyond the warning: diff --git a/debian/patches-rt/rtmutex-Make-lock_killable-work.patch b/debian/patches-rt/rtmutex-Make-lock_killable-work.patch index 04c091d75ce5..402b94c8ef57 100644 --- a/debian/patches-rt/rtmutex-Make-lock_killable-work.patch +++ b/debian/patches-rt/rtmutex-Make-lock_killable-work.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 1 Apr 2017 12:50:59 +0200 Subject: [PATCH] rtmutex: Make lock_killable work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Locking an rt mutex killable does not work because signal handling is restricted to TASK_INTERRUPTIBLE. diff --git a/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch b/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch index 166c88ad69aa..41ee32997147 100644 --- a/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch +++ b/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 16:14:22 +0200 Subject: rtmutex: Provide rt_mutex_slowlock_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This is the inner-part of rt_mutex_slowlock(), required for rwsem-rt. diff --git a/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch index 9aed58daf50a..b9eb5b85751d 100644 --- a/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:17:03 +0200 Subject: rtmutex: add mutex implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> diff --git a/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch index e1014bd90cbb..efaab6e6311f 100644 --- a/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:18:06 +0200 Subject: rtmutex: add rwlock implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The implementation is bias-based, similar to the rwsem implementation. diff --git a/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch index c8b1e40708b4..e005c00c0ac0 100644 --- a/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:28:34 +0200 Subject: rtmutex: add rwsem implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The RT specific R/W semaphore implementation restricts the number of readers to one because a writer cannot block on multiple readers and inherit its diff --git a/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch b/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch index 91cea51f2d01..1489c0035d99 100644 --- a/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch +++ b/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:11:19 +0200 Subject: rtmutex: add sleeping lock implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> diff --git a/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch b/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch index fad1fdd21c90..7080bf3e706a 100644 --- a/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch +++ b/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Oct 2017 17:34:38 +0200 Subject: rtmutex: add ww_mutex addon for mutex-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/rtmutex-avoid-include-hell.patch b/debian/patches-rt/rtmutex-avoid-include-hell.patch index aefc7c5d33be..4009655922d3 100644 --- a/debian/patches-rt/rtmutex-avoid-include-hell.patch +++ b/debian/patches-rt/rtmutex-avoid-include-hell.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Avoid include hell From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 29 Jun 2011 20:06:39 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Include only the required raw types. This avoids pulling in the complete spinlock header which in turn requires rtmutex.h at some point. diff --git a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch index 3a5a37c0403c..a7d9a5fe974b 100644 --- a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch +++ b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 16:36:39 +0200 Subject: rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Required for lock implementation ontop of rtmutex. diff --git a/debian/patches-rt/rtmutex-futex-prepare-rt.patch b/debian/patches-rt/rtmutex-futex-prepare-rt.patch index e39f7be7a561..72a7b8768950 100644 --- a/debian/patches-rt/rtmutex-futex-prepare-rt.patch +++ b/debian/patches-rt/rtmutex-futex-prepare-rt.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Handle the various new futex race conditions From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 10 Jun 2011 11:04:15 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz RT opens a few new interesting race conditions in the rtmutex/futex combo due to futex hash bucket lock being a 'sleeping' spinlock and diff --git a/debian/patches-rt/rtmutex-lock-killable.patch b/debian/patches-rt/rtmutex-lock-killable.patch index 1ad45535a293..39c6a4b29bad 100644 --- a/debian/patches-rt/rtmutex-lock-killable.patch +++ b/debian/patches-rt/rtmutex-lock-killable.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Add rtmutex_lock_killable() From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 09 Jun 2011 11:43:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add "killable" type to rtmutex. We need this since rtmutex are used as "normal" mutexes which do use this type. diff --git a/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch b/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch index 18a751b052d4..4dcf4d37da85 100644 --- a/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch +++ b/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed 02 Dec 2015 11:34:07 +0100 Subject: rtmutex: trylock is okay on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz non-RT kernel could deadlock on rt_mutex_trylock() in softirq context. On -RT we don't run softirqs in IRQ context but in thread context so it is diff --git a/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch b/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch index 29efb5146f74..cbf9f7b82702 100644 --- a/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch +++ b/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 12 Oct 2017 17:31:14 +0200 Subject: rtmutex: wire up RT's locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> diff --git a/debian/patches-rt/rtmutex_dont_include_rcu.patch b/debian/patches-rt/rtmutex_dont_include_rcu.patch index 5d198f7832d6..de5329e75b9f 100644 --- a/debian/patches-rt/rtmutex_dont_include_rcu.patch +++ b/debian/patches-rt/rtmutex_dont_include_rcu.patch @@ -1,6 +1,6 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Subject: rbtree: don't include the rcu header -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The RCU header pulls in spinlock.h and fails due not yet defined types: diff --git a/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch b/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch index 2792531396f3..a0f028cf1e4d 100644 --- a/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch +++ b/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch @@ -2,7 +2,7 @@ From: Scott Wood <swood@redhat.com> Date: Sat, 27 Jul 2019 00:56:32 -0500 Subject: [PATCH] sched: __set_cpus_allowed_ptr(): Check cpus_mask, not cpus_ptr -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This function is concerned with the long-term cpu mask, not the transitory mask the task might have while migrate disabled. Before diff --git a/debian/patches-rt/sched-core-migrate_enable-must-access-takedown_cpu_t.patch b/debian/patches-rt/sched-core-migrate_enable-must-access-takedown_cpu_t.patch index 384a89080496..95110fbc5690 100644 --- a/debian/patches-rt/sched-core-migrate_enable-must-access-takedown_cpu_t.patch +++ b/debian/patches-rt/sched-core-migrate_enable-must-access-takedown_cpu_t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Fri, 29 Nov 2019 17:24:55 +0100 Subject: [PATCH] sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The variable takedown_cpu_task is never declared/used on !HOTPLUG_CPU except for migrate_enable(). This leads to a link error. diff --git a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch index 81f88907ecb2..693c96adb55c 100644 --- a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch +++ b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch @@ -1,7 +1,7 @@ Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 17:03:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Carsten reported problems when running: diff --git a/debian/patches-rt/sched-disable-ttwu-queue.patch b/debian/patches-rt/sched-disable-ttwu-queue.patch index 06708fa20901..29b2572c1cdc 100644 --- a/debian/patches-rt/sched-disable-ttwu-queue.patch +++ b/debian/patches-rt/sched-disable-ttwu-queue.patch @@ -1,7 +1,7 @@ Subject: sched: Disable TTWU_QUEUE on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 13 Sep 2011 16:42:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The queued remote wakeup mechanism can introduce rather large latencies if the number of migrated tasks is high. Disable it for RT. diff --git a/debian/patches-rt/sched-limit-nr-migrate.patch b/debian/patches-rt/sched-limit-nr-migrate.patch index 9817cf7e6c8b..064ee9cd75fc 100644 --- a/debian/patches-rt/sched-limit-nr-migrate.patch +++ b/debian/patches-rt/sched-limit-nr-migrate.patch @@ -1,7 +1,7 @@ Subject: sched: Limit the number of task migrations per batch From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 06 Jun 2011 12:12:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. diff --git a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch index 9158701cbf61..f3f8eb16f7ec 100644 --- a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch +++ b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch @@ -1,7 +1,7 @@ Subject: sched: Do not account rcu_preempt_depth on RT in might_sleep() From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 07 Jun 2011 09:19:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz RT changes the rcu_preempt_depth semantics, so we cannot check for it in might_sleep(). diff --git a/debian/patches-rt/sched-migrate_enable-Use-stop_one_cpu_nowait.patch b/debian/patches-rt/sched-migrate_enable-Use-stop_one_cpu_nowait.patch index e75d0e3066f7..cd86072f1792 100644 --- a/debian/patches-rt/sched-migrate_enable-Use-stop_one_cpu_nowait.patch +++ b/debian/patches-rt/sched-migrate_enable-Use-stop_one_cpu_nowait.patch @@ -1,7 +1,7 @@ From: Scott Wood <swood@redhat.com> Date: Sat, 12 Oct 2019 01:52:14 -0500 Subject: [PATCH] sched: migrate_enable: Use stop_one_cpu_nowait() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz migrate_enable() can be called with current->state != TASK_RUNNING. Avoid clobbering the existing state by using stop_one_cpu_nowait(). diff --git a/debian/patches-rt/sched-mmdrop-delayed.patch b/debian/patches-rt/sched-mmdrop-delayed.patch index 7fa9e561404e..739f3c2957d7 100644 --- a/debian/patches-rt/sched-mmdrop-delayed.patch +++ b/debian/patches-rt/sched-mmdrop-delayed.patch @@ -1,7 +1,7 @@ Subject: sched: Move mmdrop to RCU on RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 06 Jun 2011 12:20:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. diff --git a/debian/patches-rt/sched-rt-mutex-wakeup.patch b/debian/patches-rt/sched-rt-mutex-wakeup.patch index fac8c65fc5d4..eb349630ed07 100644 --- a/debian/patches-rt/sched-rt-mutex-wakeup.patch +++ b/debian/patches-rt/sched-rt-mutex-wakeup.patch @@ -1,7 +1,7 @@ Subject: sched: Add saved_state for tasks blocked on sleeping locks From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 25 Jun 2011 09:21:04 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Spinlocks are state preserving in !RT. RT changes the state when a task gets blocked on a lock. So we need to remember the state before diff --git a/debian/patches-rt/scsi-fcoe-rt-aware.patch b/debian/patches-rt/scsi-fcoe-rt-aware.patch index 535fadbd3fb3..51c64987a3f8 100644 --- a/debian/patches-rt/scsi-fcoe-rt-aware.patch +++ b/debian/patches-rt/scsi-fcoe-rt-aware.patch @@ -1,7 +1,7 @@ Subject: scsi/fcoe: Make RT aware. From: Thomas Gleixner <tglx@linutronix.de> Date: Sat, 12 Nov 2011 14:00:48 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. diff --git a/debian/patches-rt/seqlock-prevent-rt-starvation.patch b/debian/patches-rt/seqlock-prevent-rt-starvation.patch index dbb2e6b123e3..6bce25d2c58d 100644 --- a/debian/patches-rt/seqlock-prevent-rt-starvation.patch +++ b/debian/patches-rt/seqlock-prevent-rt-starvation.patch @@ -1,7 +1,7 @@ Subject: seqlock: Prevent rt starvation From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 22 Feb 2012 12:03:30 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. diff --git a/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch b/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch index dac1b0e77456..4a1bb30237b2 100644 --- a/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch +++ b/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 16 Feb 2019 09:02:00 +0100 Subject: [PATCH] serial: 8250: export symbols which are used by symbols -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch b/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch index 48f8fca01923..263137ed68b3 100644 --- a/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch +++ b/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 14 Feb 2019 17:38:24 +0100 Subject: [PATCH] serial: 8250: remove that trylock in serial8250_console_write_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This does not work as rtmutex in NMI context. As per John, it is not needed. diff --git a/debian/patches-rt/series b/debian/patches-rt/series index 97d479a2a19c..9c7f6ac9c180 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -101,8 +101,12 @@ fs-buffer-Make-BH_Uptodate_Lock-bit_spin_lock-a-regu.patch thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch # 20191119121429.zhcubzdhm672zasg@linutronix.de +# tip, 9f0bff1180efc9ea988fed3fd93da7647151ac8b perf-core-Add-SRCU-annotation-for-pmus-list-walk.patch +# 20191219170834.4tah3prf2gdothz4@linutronix.de +kmemleak-Turn-kmemleak_lock-and-object-lock-to-raw_s.patch + ############################################################ # Ready for posting ############################################################ @@ -153,10 +157,6 @@ tpm-remove-tpm_dev_wq_lock.patch # 20191211232345.24810-1-robh@kernel.org of-Rework-and-simplify-phandle-cache-to-use-a-fixed-.patch -# Merge, check, repost. -kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch -kmemleak-Change-the-lock-of-kmemleak_object-to-raw_s.patch - ############################################################### # Stuff broken upstream and upstream wants something different ############################################################### @@ -180,6 +180,7 @@ seqlock-prevent-rt-starvation.patch NFSv4-replace-seqcount_t-with-a-seqlock_t.patch net-Qdisc-use-a-seqlock-instead-seqcount.patch net-make-devnet_rename_seq-a-mutex.patch +userfaultfd-Use-a-seqlock-instead-of-seqcount.patch # Revisit and add to the other NFS crap fs-nfs-turn-rmdir_sem-into-a-semaphore.patch @@ -195,9 +196,6 @@ fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch fs-dcache-use-swait_queue-instead-of-waitqueue.patch ############################################################ -# proper changelog, check -cpumask-disable-offstack-on-rt.patch - # split changelog kconfig-disable-a-few-options-rt.patch @@ -235,7 +233,7 @@ softirq-Add-preemptible-softirq.patch oleg-signal-rt-fix.patch # MM page alloc -# +# 0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch 0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch 0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch @@ -292,7 +290,7 @@ posix-timers-thread-posix-cpu-timers-on-rt.patch posix-timers-expiry-lock.patch # SCHEDULER -# PUSH IPI? +# PUSH IPI? sched-limit-nr-migrate.patch # Combine in series with delay put task @@ -405,7 +403,7 @@ net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch irqwork-push_most_work_into_softirq_context.patch # crypto drivers -# Revisit +# Revisit x86-crypto-reduce-preempt-disabled-regions.patch crypto-Reduce-preempt-disabled-regions-more-algos.patch crypto-limit-more-FPU-enabled-sections.patch @@ -484,7 +482,6 @@ tty-serial-pl011-warning-about-uninitialized.patch arm-include-definition-for-cpumask_t.patch ARM-enable-irq-in-translation-section-permission-fau.patch genirq-update-irq_set_irqchip_state-documentation.patch -arm-disable-NEON-in-kernel-mode.patch KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch diff --git a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch index e1a5d984f019..a8ea6cfefb89 100644 --- a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch +++ b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch @@ -1,7 +1,7 @@ Subject: signal: Revert ptrace preempt magic From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 21 Sep 2011 19:57:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a diff --git a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch index cc3af2688a2b..85ab6c2c009e 100644 --- a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Fri, 3 Jul 2009 08:44:56 -0500 Subject: signals: Allow rt tasks to cache one sigqueue struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. diff --git a/debian/patches-rt/skbufhead-raw-lock.patch b/debian/patches-rt/skbufhead-raw-lock.patch index bd853ddb0b7c..7bf16de6a20c 100644 --- a/debian/patches-rt/skbufhead-raw-lock.patch +++ b/debian/patches-rt/skbufhead-raw-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Tue, 12 Jul 2011 15:38:34 +0200 Subject: net: Use skbufhead with raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Use the rps lock as rawlock so we can keep irq-off regions. It looks low latency. However we can't kfree() from this context therefore we defer this @@ -16,7 +16,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> --- a/include/linux/netdevice.h +++ b/include/linux/netdevice.h -@@ -3011,6 +3011,7 @@ struct softnet_data { +@@ -3016,6 +3016,7 @@ struct softnet_data { unsigned int dropped; struct sk_buff_head input_pkt_queue; struct napi_struct backlog; @@ -134,7 +134,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> for (;;) { struct napi_struct *n; -@@ -9891,10 +9904,13 @@ static int dev_cpu_dead(unsigned int old +@@ -9892,10 +9905,13 @@ static int dev_cpu_dead(unsigned int old netif_rx_ni(skb); input_queue_head_incr(oldsd); } @@ -149,7 +149,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> return 0; } -@@ -10205,8 +10221,9 @@ static int __init net_dev_init(void) +@@ -10206,8 +10222,9 @@ static int __init net_dev_init(void) INIT_WORK(flush, flush_backlog); diff --git a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch index eed51ba881bd..ae0ee89c9bf5 100644 --- a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch +++ b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 15 Apr 2015 19:00:47 +0200 Subject: slub: Disable SLUB_CPU_PARTIAL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7 diff --git a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch index 90db15287d4d..f554924e5947 100644 --- a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch +++ b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch @@ -1,7 +1,7 @@ Subject: slub: Enable irqs for __GFP_WAIT From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 09 Jan 2013 12:08:15 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz SYSTEM_RUNNING might be too late for enabling interrupts. Allocations with GFP_WAIT can happen before that. So use this as an indicator. diff --git a/debian/patches-rt/softirq-Add-preemptible-softirq.patch b/debian/patches-rt/softirq-Add-preemptible-softirq.patch index 4775acf47427..9640889e20a2 100644 --- a/debian/patches-rt/softirq-Add-preemptible-softirq.patch +++ b/debian/patches-rt/softirq-Add-preemptible-softirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 20 May 2019 13:09:08 +0200 Subject: [PATCH] softirq: Add preemptible softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add preemptible softirq for RT's needs. By removing the softirq count from the preempt counter, the softirq becomes preemptible. A per-CPU diff --git a/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch b/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch index 1eb54ea370ab..205a8d8271a6 100644 --- a/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch +++ b/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Sat, 22 Jun 2019 00:09:22 +0200 Subject: [PATCH] softirq: Avoid a cancel dead-lock in tasklet handling due to preemptible-softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz A pending / active tasklet which is preempted by a task on the same CPU will spin indefinitely because the tasklet makes no progress. diff --git a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch index 895d709889e0..1d5f2ca17f59 100644 --- a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch +++ b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch @@ -1,7 +1,7 @@ Subject: softirq: Disable softirq stacks for RT From: Thomas Gleixner <tglx@linutronix.de> Date: Mon, 18 Jul 2011 13:59:17 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Disable extra stacks for softirqs. We want to preempt softirqs and having them on special IRQ-stack does not make this easier. diff --git a/debian/patches-rt/softirq-preempt-fix-3-re.patch b/debian/patches-rt/softirq-preempt-fix-3-re.patch index 3ef7588e82cb..40d28beb0380 100644 --- a/debian/patches-rt/softirq-preempt-fix-3-re.patch +++ b/debian/patches-rt/softirq-preempt-fix-3-re.patch @@ -1,7 +1,7 @@ Subject: softirq: Check preemption after reenabling interrupts From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, @@ -151,7 +151,7 @@ Signed-off-by: Thomas Gleixner <tglx@linutronix.de> } EXPORT_SYMBOL(__napi_schedule); -@@ -9873,6 +9879,7 @@ static int dev_cpu_dead(unsigned int old +@@ -9874,6 +9880,7 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); diff --git a/debian/patches-rt/spinlock-types-separate-raw.patch b/debian/patches-rt/spinlock-types-separate-raw.patch index 7aa8e8fe7f2c..143eebaa41da 100644 --- a/debian/patches-rt/spinlock-types-separate-raw.patch +++ b/debian/patches-rt/spinlock-types-separate-raw.patch @@ -1,7 +1,7 @@ Subject: spinlock: Split the lock types header From: Thomas Gleixner <tglx@linutronix.de> Date: Wed, 29 Jun 2011 19:34:01 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Split raw_spinlock into its own file and the remaining spinlock_t into its own non-RT header. The non-RT header will be replaced later by sleeping diff --git a/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch b/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch index d1bde857fc41..b9941e4d00bd 100644 --- a/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch +++ b/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch @@ -2,7 +2,7 @@ From: Julia Cartwright <julia@ni.com> Date: Mon, 7 May 2018 08:58:57 -0500 Subject: [PATCH] squashfs: make use of local lock in multi_cpu decompressor -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Currently, the squashfs multi_cpu decompressor makes use of get_cpu_ptr()/put_cpu_ptr(), which unconditionally disable preemption diff --git a/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch b/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch index 792bae9d979a..3fb31d5699f8 100644 --- a/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch +++ b/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 12 Oct 2017 18:37:12 +0200 Subject: [PATCH] srcu: replace local_irqsave() with a locallock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There are two instances which disable interrupts in order to become a stable this_cpu_ptr() pointer. The restore part is coupled with diff --git a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch index 098b5e7952ec..4d4b08d54f59 100644 --- a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch +++ b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,7 +1,7 @@ From: Mike Galbraith <umgwanakikbuti@gmail.com> Date: Wed, 18 Feb 2015 16:05:28 +0100 Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd diff --git a/debian/patches-rt/sysfs-realtime-entry.patch b/debian/patches-rt/sysfs-realtime-entry.patch index 96746425f0a8..9813519f7945 100644 --- a/debian/patches-rt/sysfs-realtime-entry.patch +++ b/debian/patches-rt/sysfs-realtime-entry.patch @@ -1,7 +1,7 @@ Subject: sysfs: Add /sys/kernel/realtime entry From: Clark Williams <williams@redhat.com> Date: Sat Jul 30 21:55:53 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch b/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch index fbf831409f3a..aff6fde733cf 100644 --- a/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch +++ b/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch @@ -1,7 +1,7 @@ From: Clark Williams <williams@redhat.com> Date: Mon, 15 Jul 2019 15:25:00 -0500 Subject: [PATCH] thermal/x86_pkg_temp: Make pkg_temp_lock a raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz The spinlock pkg_temp_lock has the potential of being taken in atomic context because it can be acquired from the thermal IRQ vector. diff --git a/debian/patches-rt/timekeeping-split-jiffies-lock.patch b/debian/patches-rt/timekeeping-split-jiffies-lock.patch index b00aa877d6b5..c7b0dd7a9012 100644 --- a/debian/patches-rt/timekeeping-split-jiffies-lock.patch +++ b/debian/patches-rt/timekeeping-split-jiffies-lock.patch @@ -1,7 +1,7 @@ Subject: timekeeping: Split jiffies seqlock From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 14 Feb 2013 22:36:59 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so it can be taken in atomic context on RT. diff --git a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch index 3468a18bf1c4..05dfac253553 100644 --- a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch +++ b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Feb 2019 11:33:11 +0100 Subject: [PATCH] tpm: remove tpm_dev_wq_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Added in commit diff --git a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch index de92d6b590f2..a2957234e3ea 100644 --- a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch +++ b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,7 +1,7 @@ From: Haris Okanovic <haris.okanovic@ni.com> Date: Tue, 15 Aug 2017 15:13:08 -0500 Subject: [PATCH] tpm_tis: fix stall after iowrite*()s -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. diff --git a/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch index 6deb9f5b3796..32f65bf8b437 100644 --- a/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch +++ b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch @@ -4,7 +4,7 @@ Subject: [PATCH] tty: serial: pl011: explicitly initialize the flags variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Silence the following gcc warning: diff --git a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch index 4da37c1e0556..7ae0302d8bee 100644 --- a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch +++ b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -1,7 +1,7 @@ Subject: net: Remove preemption disabling in netif_rx() From: Priyanka Jain <Priyanka.Jain@freescale.com> Date: Thu, 17 May 2012 09:35:11 +0530 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by diff --git a/debian/patches-rt/userfaultfd-Use-a-seqlock-instead-of-seqcount.patch b/debian/patches-rt/userfaultfd-Use-a-seqlock-instead-of-seqcount.patch new file mode 100644 index 000000000000..610e25218f4d --- /dev/null +++ b/debian/patches-rt/userfaultfd-Use-a-seqlock-instead-of-seqcount.patch @@ -0,0 +1,71 @@ +From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +Date: Wed, 18 Dec 2019 12:25:09 +0100 +Subject: [PATCH] userfaultfd: Use a seqlock instead of seqcount +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz + +On RT write_seqcount_begin() disables preemption which leads to warning +in add_wait_queue() while the spinlock_t is acquired. +The waitqueue can't be converted to swait_queue because +userfaultfd_wake_function() is used as a custom wake function. + +Use seqlock instead seqcount to avoid the preempt_disable() section +during add_wait_queue(). + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> +--- + fs/userfaultfd.c | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +--- a/fs/userfaultfd.c ++++ b/fs/userfaultfd.c +@@ -61,7 +61,7 @@ struct userfaultfd_ctx { + /* waitqueue head for events */ + wait_queue_head_t event_wqh; + /* a refile sequence protected by fault_pending_wqh lock */ +- struct seqcount refile_seq; ++ seqlock_t refile_seq; + /* pseudo fd refcounting */ + refcount_t refcount; + /* userfaultfd syscall flags */ +@@ -1063,7 +1063,7 @@ static ssize_t userfaultfd_ctx_read(stru + * waitqueue could become empty if this is the + * only userfault. + */ +- write_seqcount_begin(&ctx->refile_seq); ++ write_seqlock(&ctx->refile_seq); + + /* + * The fault_pending_wqh.lock prevents the uwq +@@ -1089,7 +1089,7 @@ static ssize_t userfaultfd_ctx_read(stru + list_del(&uwq->wq.entry); + add_wait_queue(&ctx->fault_wqh, &uwq->wq); + +- write_seqcount_end(&ctx->refile_seq); ++ write_sequnlock(&ctx->refile_seq); + + /* careful to always initialize msg if ret == 0 */ + *msg = uwq->msg; +@@ -1262,11 +1262,11 @@ static __always_inline void wake_userfau + * sure we've userfaults to wake. + */ + do { +- seq = read_seqcount_begin(&ctx->refile_seq); ++ seq = read_seqbegin(&ctx->refile_seq); + need_wakeup = waitqueue_active(&ctx->fault_pending_wqh) || + waitqueue_active(&ctx->fault_wqh); + cond_resched(); +- } while (read_seqcount_retry(&ctx->refile_seq, seq)); ++ } while (read_seqretry(&ctx->refile_seq, seq)); + if (need_wakeup) + __wake_userfault(ctx, range); + } +@@ -1935,7 +1935,7 @@ static void init_once_userfaultfd_ctx(vo + init_waitqueue_head(&ctx->fault_wqh); + init_waitqueue_head(&ctx->event_wqh); + init_waitqueue_head(&ctx->fd_wqh); +- seqcount_init(&ctx->refile_seq); ++ seqlock_init(&ctx->refile_seq); + } + + SYSCALL_DEFINE1(userfaultfd, int, flags) diff --git a/debian/patches-rt/wait.h-include-atomic.h.patch b/debian/patches-rt/wait.h-include-atomic.h.patch index bd23023e2374..1e32ecca168b 100644 --- a/debian/patches-rt/wait.h-include-atomic.h.patch +++ b/debian/patches-rt/wait.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 28 Oct 2013 12:19:57 +0100 Subject: wait.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz | CC init/main.o |In file included from include/linux/mmzone.h:9:0, diff --git a/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch index 6e39706a3398..5f259279cb57 100644 --- a/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch +++ b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch @@ -1,7 +1,7 @@ From: Julia Cartwright <julia@ni.com> Date: Fri, 28 Sep 2018 21:03:51 +0000 Subject: [PATCH] watchdog: prevent deferral of watchdogd wakeup on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz When PREEMPT_RT is enabled, all hrtimer expiry functions are deferred for execution into the context of ksoftirqd unless otherwise diff --git a/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch b/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch index ce3c1cfa8653..cb9fff50afcc 100644 --- a/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch +++ b/debian/patches-rt/workqueue-Convert-for_each_wq-to-use-built-in-list-c.patch @@ -1,7 +1,7 @@ From: "Joel Fernandes (Google)" <joel@joelfernandes.org> Date: Thu, 15 Aug 2019 10:18:42 -0400 Subject: [PATCH] workqueue: Convert for_each_wq to use built-in list check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Because list_for_each_entry_rcu() can now check for holding a lock as well as for being in an RCU read-side critical section, diff --git a/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch b/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch index d0c61e6ba575..081795fef740 100644 --- a/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch +++ b/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch @@ -4,7 +4,7 @@ Subject: [PATCH] x86: Disable HAVE_ARCH_JUMP_LABEL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz __text_poke() does: | local_irq_save(flags); diff --git a/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch b/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch index c4250852586a..cd46f972f06a 100644 --- a/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch +++ b/debian/patches-rt/x86-Enable-RT-also-on-32bit.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Thu, 7 Nov 2019 17:49:20 +0100 Subject: [PATCH] x86: Enable RT also on 32bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- diff --git a/debian/patches-rt/x86-Enable-RT.patch b/debian/patches-rt/x86-Enable-RT.patch index dc7d7a6eb865..54518bfd56b9 100644 --- a/debian/patches-rt/x86-Enable-RT.patch +++ b/debian/patches-rt/x86-Enable-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Wed, 7 Aug 2019 18:15:38 +0200 Subject: [PATCH] x86: Allow to enable RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Allow to select RT. diff --git a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch index 542c2dbe9204..d304dbc666f9 100644 --- a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch +++ b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch @@ -1,7 +1,7 @@ Subject: x86: crypto: Reduce preempt disabled regions From: Peter Zijlstra <peterz@infradead.org> Date: Mon, 14 Nov 2011 18:19:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch b/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch index 0e4a3b37bf7f..6380baf18962 100644 --- a/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch +++ b/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Date: Mon, 11 Mar 2013 17:09:55 +0100 Subject: x86/highmem: Add a "already used pte" check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz This is a copy from kmap_atomic_prot(). diff --git a/debian/patches-rt/x86-ioapic-Prevent-inconsistent-state-when-moving-an.patch b/debian/patches-rt/x86-ioapic-Prevent-inconsistent-state-when-moving-an.patch index c27214c1b262..85bfc31bf53a 100644 --- a/debian/patches-rt/x86-ioapic-Prevent-inconsistent-state-when-moving-an.patch +++ b/debian/patches-rt/x86-ioapic-Prevent-inconsistent-state-when-moving-an.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 17 Oct 2019 12:19:01 +0200 Subject: [PATCH] x86/ioapic: Prevent inconsistent state when moving an interrupt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz There is an issue with threaded interrupts which are marked ONESHOT and using the fasteoi handler: diff --git a/debian/patches-rt/x86-ioapic-Rename-misnamed-functions.patch b/debian/patches-rt/x86-ioapic-Rename-misnamed-functions.patch index 35132f7719c8..1742c736d78e 100644 --- a/debian/patches-rt/x86-ioapic-Rename-misnamed-functions.patch +++ b/debian/patches-rt/x86-ioapic-Rename-misnamed-functions.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 17 Oct 2019 12:19:02 +0200 Subject: [PATCH] x86/ioapic: Rename misnamed functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz ioapic_irqd_[un]mask() are misnomers as both functions do way more than masking and unmasking the interrupt line. Both deal with the moving the diff --git a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch index 26672624af0f..42ee49c67236 100644 --- a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch +++ b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch @@ -1,7 +1,7 @@ Subject: x86: kvm Require const tsc for RT From: Thomas Gleixner <tglx@linutronix.de> Date: Sun, 06 Nov 2011 12:26:18 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds diff --git a/debian/patches-rt/x86-preempt-lazy.patch b/debian/patches-rt/x86-preempt-lazy.patch index 85fc4e0e244a..c4e9fd883772 100644 --- a/debian/patches-rt/x86-preempt-lazy.patch +++ b/debian/patches-rt/x86-preempt-lazy.patch @@ -1,7 +1,7 @@ Subject: x86: Support for lazy preemption From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 01 Nov 2012 11:03:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz Implement the x86 pieces for lazy preempt. diff --git a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch index 89dbb5d3bb18..fba9d965a377 100644 --- a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch +++ b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner <tglx@linutronix.de> Date: Thu, 16 Dec 2010 14:25:18 +0100 Subject: x86: stackprotector: Avoid random pool on rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.3-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.4/older/patches-5.4.5-rt3.tar.xz CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep |