diff --git a/kernel/Makefile b/kernel/Makefile index 12618a1b2..51f2e5d77 100644 --- a/kernel/Makefile +++ b/kernel/Makefile @@ -254,14 +254,14 @@ ifeq ($(ARCH),x86_64) $(eval $(call kernel,5.1.15,5.1.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.19.56,4.19.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.19.56,4.19.x,,-dbg)) -$(eval $(call kernel,4.19.50,4.19.x,-rt,)) +$(eval $(call kernel,4.19.59,4.19.x,-rt,)) $(eval $(call kernel,4.14.131,4.14.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.9.184,4.9.x,$(EXTRA),$(DEBUG))) else ifeq ($(ARCH),aarch64) $(eval $(call kernel,5.1.15,5.1.x,$(EXTRA),$(DEBUG))) $(eval $(call kernel,4.19.56,4.19.x,$(EXTRA),$(DEBUG))) -$(eval $(call kernel,4.19.50,4.19.x,-rt,)) +$(eval $(call kernel,4.19.59,4.19.x,-rt,)) else ifeq ($(ARCH),s390x) $(eval $(call kernel,5.1.15,5.1.x,$(EXTRA),$(DEBUG))) diff --git a/kernel/patches-4.19.x-rt/0001-ARM-at91-add-TCB-registers-definitions.patch b/kernel/patches-4.19.x-rt/0001-ARM-at91-add-TCB-registers-definitions.patch index 75b83bfd1..112eac1fc 100644 --- a/kernel/patches-4.19.x-rt/0001-ARM-at91-add-TCB-registers-definitions.patch +++ b/kernel/patches-4.19.x-rt/0001-ARM-at91-add-TCB-registers-definitions.patch @@ -1,7 +1,7 @@ -From 51502f785ba92dab73427034abe6ebc29b827637 Mon Sep 17 00:00:00 2001 +From 200fca9a9f123bcca859fadc996b1e40c0384269 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:18 +0200 -Subject: [PATCH 001/268] ARM: at91: add TCB registers definitions +Subject: [PATCH 001/283] ARM: at91: add TCB registers definitions Add registers and bits definitions for the timer counter blocks found on Atmel ARM SoCs. diff --git a/kernel/patches-4.19.x-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch b/kernel/patches-4.19.x-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch index 42bce94d4..09b3a68fd 100644 --- a/kernel/patches-4.19.x-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch +++ b/kernel/patches-4.19.x-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch @@ -1,7 +1,7 @@ -From 0d17e392d25ce41fbd73368c207e9e3c8a509200 Mon Sep 17 00:00:00 2001 +From 13e8b97c81d4029a2c41ce13ffc84507af252845 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:19 +0200 -Subject: [PATCH 002/268] clocksource/drivers: Add a new driver for the Atmel +Subject: [PATCH 002/283] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks Add a driver for the Atmel Timer Counter Blocks. This driver provides a diff --git a/kernel/patches-4.19.x-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch b/kernel/patches-4.19.x-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch index 51686422f..56c334c68 100644 --- a/kernel/patches-4.19.x-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch +++ b/kernel/patches-4.19.x-rt/0003-clocksource-drivers-timer-atmel-tcb-add-clockevent-d.patch @@ -1,7 +1,7 @@ -From a4ddee4eca713013e407261d0e2b49bec1d1cadc Mon Sep 17 00:00:00 2001 +From 108301f18eaae6fde1bf8b864d52052bdc2a7043 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:20 +0200 -Subject: [PATCH 003/268] clocksource/drivers: timer-atmel-tcb: add clockevent +Subject: [PATCH 003/283] clocksource/drivers: timer-atmel-tcb: add clockevent device on separate channel Add an other clockevent device that uses a separate TCB channel when diff --git a/kernel/patches-4.19.x-rt/0004-clocksource-drivers-atmel-pit-make-option-silent.patch b/kernel/patches-4.19.x-rt/0004-clocksource-drivers-atmel-pit-make-option-silent.patch index 39657d4e0..b69a612c1 100644 --- a/kernel/patches-4.19.x-rt/0004-clocksource-drivers-atmel-pit-make-option-silent.patch +++ b/kernel/patches-4.19.x-rt/0004-clocksource-drivers-atmel-pit-make-option-silent.patch @@ -1,7 +1,7 @@ -From c1264e05e78e9ef1643471e975f411ec4b1e9015 Mon Sep 17 00:00:00 2001 +From e60c9d976e3462237d2f3644c18091ac1e7746c6 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:21 +0200 -Subject: [PATCH 004/268] clocksource/drivers: atmel-pit: make option silent +Subject: [PATCH 004/283] clocksource/drivers: atmel-pit: make option silent To conform with the other option, make the ATMEL_PIT option silent so it can be selected from the platform diff --git a/kernel/patches-4.19.x-rt/0005-ARM-at91-Implement-clocksource-selection.patch b/kernel/patches-4.19.x-rt/0005-ARM-at91-Implement-clocksource-selection.patch index e7eb87a1f..94f4a1dc7 100644 --- a/kernel/patches-4.19.x-rt/0005-ARM-at91-Implement-clocksource-selection.patch +++ b/kernel/patches-4.19.x-rt/0005-ARM-at91-Implement-clocksource-selection.patch @@ -1,7 +1,7 @@ -From e228d79e34fd799304ff0c6696e52c00e3caa066 Mon Sep 17 00:00:00 2001 +From 8cd066d01a3bc84384ba64a7521fdc80598a3418 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:22 +0200 -Subject: [PATCH 005/268] ARM: at91: Implement clocksource selection +Subject: [PATCH 005/283] ARM: at91: Implement clocksource selection Allow selecting and unselecting the PIT clocksource driver so it doesn't have to be compile when unused. diff --git a/kernel/patches-4.19.x-rt/0006-ARM-configs-at91-use-new-TCB-timer-driver.patch b/kernel/patches-4.19.x-rt/0006-ARM-configs-at91-use-new-TCB-timer-driver.patch index bf756235a..1933b4abf 100644 --- a/kernel/patches-4.19.x-rt/0006-ARM-configs-at91-use-new-TCB-timer-driver.patch +++ b/kernel/patches-4.19.x-rt/0006-ARM-configs-at91-use-new-TCB-timer-driver.patch @@ -1,7 +1,7 @@ -From 719de0a8c6c4489eae0ea592aaa78898611c5f7f Mon Sep 17 00:00:00 2001 +From db6f702c9d0558505d757c28c61f4f6a567a898a Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:23 +0200 -Subject: [PATCH 006/268] ARM: configs: at91: use new TCB timer driver +Subject: [PATCH 006/283] ARM: configs: at91: use new TCB timer driver Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to timer-atmel-tcb. diff --git a/kernel/patches-4.19.x-rt/0007-ARM-configs-at91-unselect-PIT.patch b/kernel/patches-4.19.x-rt/0007-ARM-configs-at91-unselect-PIT.patch index 6cffbb3fb..771f4ba5e 100644 --- a/kernel/patches-4.19.x-rt/0007-ARM-configs-at91-unselect-PIT.patch +++ b/kernel/patches-4.19.x-rt/0007-ARM-configs-at91-unselect-PIT.patch @@ -1,7 +1,7 @@ -From 4175bca0551889fda7dfdf2391a242b0c80bb59a Mon Sep 17 00:00:00 2001 +From 95cda24e3882fa19a569c029275d14089e8418e9 Mon Sep 17 00:00:00 2001 From: Alexandre Belloni Date: Thu, 13 Sep 2018 13:30:24 +0200 -Subject: [PATCH 007/268] ARM: configs: at91: unselect PIT +Subject: [PATCH 007/283] ARM: configs: at91: unselect PIT The PIT is not required anymore to successfully boot and may actually harm in case preempt-rt is used because the PIT interrupt is shared. diff --git a/kernel/patches-4.19.x-rt/0008-irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch b/kernel/patches-4.19.x-rt/0008-irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch index 62323b845..43803c3cd 100644 --- a/kernel/patches-4.19.x-rt/0008-irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch +++ b/kernel/patches-4.19.x-rt/0008-irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch @@ -1,7 +1,7 @@ -From 860cae9aedf5937c7f9e6d7c228e02ece79b0e0a Mon Sep 17 00:00:00 2001 +From 44f074c1b1621cbfa2d9f8f44aa69231154399d9 Mon Sep 17 00:00:00 2001 From: Marc Zyngier Date: Fri, 27 Jul 2018 13:38:54 +0100 -Subject: [PATCH 008/268] irqchip/gic-v3-its: Move pending table allocation to +Subject: [PATCH 008/283] irqchip/gic-v3-its: Move pending table allocation to init time Signed-off-by: Marc Zyngier diff --git a/kernel/patches-4.19.x-rt/0009-kthread-convert-worker-lock-to-raw-spinlock.patch b/kernel/patches-4.19.x-rt/0009-kthread-convert-worker-lock-to-raw-spinlock.patch index 073c532df..1e6ccac5f 100644 --- a/kernel/patches-4.19.x-rt/0009-kthread-convert-worker-lock-to-raw-spinlock.patch +++ b/kernel/patches-4.19.x-rt/0009-kthread-convert-worker-lock-to-raw-spinlock.patch @@ -1,7 +1,7 @@ -From 9e8f94470c29280436a04d2d6d1eeb61667b0af8 Mon Sep 17 00:00:00 2001 +From cd9320a1954642117f572891a8b45b177e6b0ebf Mon Sep 17 00:00:00 2001 From: Julia Cartwright Date: Fri, 28 Sep 2018 21:03:51 +0000 -Subject: [PATCH 009/268] kthread: convert worker lock to raw spinlock +Subject: [PATCH 009/283] kthread: convert worker lock to raw spinlock In order to enable the queuing of kthread work items from hardirq context even when PREEMPT_RT_FULL is enabled, convert the worker diff --git a/kernel/patches-4.19.x-rt/0010-crypto-caam-qi-simplify-CGR-allocation-freeing.patch b/kernel/patches-4.19.x-rt/0010-crypto-caam-qi-simplify-CGR-allocation-freeing.patch index f30a31f14..8afb44c13 100644 --- a/kernel/patches-4.19.x-rt/0010-crypto-caam-qi-simplify-CGR-allocation-freeing.patch +++ b/kernel/patches-4.19.x-rt/0010-crypto-caam-qi-simplify-CGR-allocation-freeing.patch @@ -1,7 +1,7 @@ -From ab7516f814d1df7736f158b4217b78c99e40168e Mon Sep 17 00:00:00 2001 +From d4cc8969937e548b95b4d6f40804a4b706c9b441 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Horia=20Geant=C4=83?= Date: Mon, 8 Oct 2018 14:09:37 +0300 -Subject: [PATCH 010/268] crypto: caam/qi - simplify CGR allocation, freeing +Subject: [PATCH 010/283] crypto: caam/qi - simplify CGR allocation, freeing MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0011-sched-fair-Robustify-CFS-bandwidth-timer-locking.patch b/kernel/patches-4.19.x-rt/0011-sched-fair-Robustify-CFS-bandwidth-timer-locking.patch index d9bd1c468..daf2d0c2f 100644 --- a/kernel/patches-4.19.x-rt/0011-sched-fair-Robustify-CFS-bandwidth-timer-locking.patch +++ b/kernel/patches-4.19.x-rt/0011-sched-fair-Robustify-CFS-bandwidth-timer-locking.patch @@ -1,7 +1,7 @@ -From cfe30af225801582b76bde294f920c8018ccb75a Mon Sep 17 00:00:00 2001 +From 256f2e459fd2eea3e04b6b9934f06c46e19185bb Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 7 Jan 2019 13:52:31 +0100 -Subject: [PATCH 011/268] sched/fair: Robustify CFS-bandwidth timer locking +Subject: [PATCH 011/283] sched/fair: Robustify CFS-bandwidth timer locking Traditionally hrtimer callbacks were run with IRQs disabled, but with the introduction of HRTIMER_MODE_SOFT it is possible they run from diff --git a/kernel/patches-4.19.x-rt/0012-arm-Convert-arm-boot_lock-to-raw.patch b/kernel/patches-4.19.x-rt/0012-arm-Convert-arm-boot_lock-to-raw.patch index ad2b7bb81..d96ae5bbf 100644 --- a/kernel/patches-4.19.x-rt/0012-arm-Convert-arm-boot_lock-to-raw.patch +++ b/kernel/patches-4.19.x-rt/0012-arm-Convert-arm-boot_lock-to-raw.patch @@ -1,7 +1,7 @@ -From cd3c3d6a852d1ad0077e1fbbd667c7a715b7daad Mon Sep 17 00:00:00 2001 +From 3c866fa6b40a3acfe50a091680cd9f51a54cd45b Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Mon, 19 Sep 2011 14:51:14 -0700 -Subject: [PATCH 012/268] arm: Convert arm boot_lock to raw +Subject: [PATCH 012/283] arm: Convert arm boot_lock to raw The arm boot_lock is used by the secondary processor startup code. The locking task is the idle thread, which has idle->sched_class == &idle_sched_class. diff --git a/kernel/patches-4.19.x-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch b/kernel/patches-4.19.x-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch index 31aae50c2..8c642ca24 100644 --- a/kernel/patches-4.19.x-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch +++ b/kernel/patches-4.19.x-rt/0013-x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch @@ -1,7 +1,7 @@ -From d3b004343e524bde70e0ff21eb2ef4d4989a21d5 Mon Sep 17 00:00:00 2001 +From abbec8803a7e474a1e1a1b1ee105de8ffd0c8cbc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 17 Jul 2018 18:25:31 +0200 -Subject: [PATCH 013/268] x86/ioapic: Don't let setaffinity unmask threaded EOI +Subject: [PATCH 013/283] x86/ioapic: Don't let setaffinity unmask threaded EOI interrupt too early There is an issue with threaded interrupts which are marked ONESHOT diff --git a/kernel/patches-4.19.x-rt/0014-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch b/kernel/patches-4.19.x-rt/0014-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch index 66171763d..9cc2e9ef2 100644 --- a/kernel/patches-4.19.x-rt/0014-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch +++ b/kernel/patches-4.19.x-rt/0014-cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch @@ -1,7 +1,7 @@ -From bce3ba7d9bf5c645f5425e98fc15f9c14c4d1bd5 Mon Sep 17 00:00:00 2001 +From 39150ca165ea6d7d6b5ffe76efb6170893ffdb06 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 18:19:48 +0200 -Subject: [PATCH 014/268] cgroup: use irqsave in cgroup_rstat_flush_locked() +Subject: [PATCH 014/283] cgroup: use irqsave in cgroup_rstat_flush_locked() All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). diff --git a/kernel/patches-4.19.x-rt/0015-fscache-initialize-cookie-hash-table-raw-spinlocks.patch b/kernel/patches-4.19.x-rt/0015-fscache-initialize-cookie-hash-table-raw-spinlocks.patch index 24954daa2..08ae3a9c7 100644 --- a/kernel/patches-4.19.x-rt/0015-fscache-initialize-cookie-hash-table-raw-spinlocks.patch +++ b/kernel/patches-4.19.x-rt/0015-fscache-initialize-cookie-hash-table-raw-spinlocks.patch @@ -1,7 +1,7 @@ -From bdc5bf179f2fd29ef29ea44993ad316ffaae41b3 Mon Sep 17 00:00:00 2001 +From 6c83cc3183d8efc6378788160d78a3a917a5ae96 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 3 Jul 2018 13:34:30 -0500 -Subject: [PATCH 015/268] fscache: initialize cookie hash table raw spinlocks +Subject: [PATCH 015/283] fscache: initialize cookie hash table raw spinlocks 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/kernel/patches-4.19.x-rt/0016-Drivers-hv-vmbus-include-header-for-get_irq_regs.patch b/kernel/patches-4.19.x-rt/0016-Drivers-hv-vmbus-include-header-for-get_irq_regs.patch index 39edef896..eecc295c3 100644 --- a/kernel/patches-4.19.x-rt/0016-Drivers-hv-vmbus-include-header-for-get_irq_regs.patch +++ b/kernel/patches-4.19.x-rt/0016-Drivers-hv-vmbus-include-header-for-get_irq_regs.patch @@ -1,7 +1,7 @@ -From d748238ff973cd42f7e7d6d2eb0476960d2c5a77 Mon Sep 17 00:00:00 2001 +From fdfc7c94f7e160bd80c27ac31c6823fbb20330f7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 29 Aug 2018 21:59:04 +0200 -Subject: [PATCH 016/268] Drivers: hv: vmbus: include header for get_irq_regs() +Subject: [PATCH 016/283] Drivers: hv: vmbus: include header for get_irq_regs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0017-percpu-include-irqflags.h-for-raw_local_irq_save.patch b/kernel/patches-4.19.x-rt/0017-percpu-include-irqflags.h-for-raw_local_irq_save.patch index da13b6d69..ad4ed292c 100644 --- a/kernel/patches-4.19.x-rt/0017-percpu-include-irqflags.h-for-raw_local_irq_save.patch +++ b/kernel/patches-4.19.x-rt/0017-percpu-include-irqflags.h-for-raw_local_irq_save.patch @@ -1,7 +1,7 @@ -From b9113e5cdf8382192972523dbb746daea3aa90b1 Mon Sep 17 00:00:00 2001 +From 31f7158d8389cec550de5964422b1123fc94079b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 11 Oct 2018 16:39:59 +0200 -Subject: [PATCH 017/268] percpu: include irqflags.h for raw_local_irq_save() +Subject: [PATCH 017/283] percpu: include irqflags.h for raw_local_irq_save() The header percpu.h header file is using raw_local_irq_save() but does not include irqflags.h for its definition. It compiles because the diff --git a/kernel/patches-4.19.x-rt/0018-efi-Allow-efi-runtime.patch b/kernel/patches-4.19.x-rt/0018-efi-Allow-efi-runtime.patch index 5bbf828a6..bbe046eaf 100644 --- a/kernel/patches-4.19.x-rt/0018-efi-Allow-efi-runtime.patch +++ b/kernel/patches-4.19.x-rt/0018-efi-Allow-efi-runtime.patch @@ -1,7 +1,7 @@ -From 58823352a672562d5c098affcb951fbe43b6d721 Mon Sep 17 00:00:00 2001 +From fcb3ebea1da6aede14a10c28a06902043072f250 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 15:06:10 +0200 -Subject: [PATCH 018/268] efi: Allow efi=runtime +Subject: [PATCH 018/283] efi: Allow efi=runtime In case the option "efi=noruntime" is default at built-time, the user could overwrite its sate by `efi=runtime' and allow it again. diff --git a/kernel/patches-4.19.x-rt/0019-x86-efi-drop-task_lock-from-efi_switch_mm.patch b/kernel/patches-4.19.x-rt/0019-x86-efi-drop-task_lock-from-efi_switch_mm.patch index fef58eae8..126a042eb 100644 --- a/kernel/patches-4.19.x-rt/0019-x86-efi-drop-task_lock-from-efi_switch_mm.patch +++ b/kernel/patches-4.19.x-rt/0019-x86-efi-drop-task_lock-from-efi_switch_mm.patch @@ -1,7 +1,7 @@ -From eb484bfff976730c7eaac1843e193e1fb6c949c4 Mon Sep 17 00:00:00 2001 +From 9dda6e746277e68f244d5660b5a3f3f85b0d9be0 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 24 Jul 2018 14:48:55 +0200 -Subject: [PATCH 019/268] x86/efi: drop task_lock() from efi_switch_mm() +Subject: [PATCH 019/283] x86/efi: drop task_lock() from efi_switch_mm() efi_switch_mm() is a wrapper around switch_mm() which saves current's ->active_mm, sets the requests mm as ->active_mm and invokes diff --git a/kernel/patches-4.19.x-rt/0020-arm64-KVM-compute_layout-before-altenates-are-applie.patch b/kernel/patches-4.19.x-rt/0020-arm64-KVM-compute_layout-before-altenates-are-applie.patch index 3f65a5014..a3d37cef7 100644 --- a/kernel/patches-4.19.x-rt/0020-arm64-KVM-compute_layout-before-altenates-are-applie.patch +++ b/kernel/patches-4.19.x-rt/0020-arm64-KVM-compute_layout-before-altenates-are-applie.patch @@ -1,7 +1,7 @@ -From 0d6bc3016c56136ba59d6a3519ba23bcaecf4e37 Mon Sep 17 00:00:00 2001 +From b66a9f85a9e8ee817d0e2de1637bf95b7710127f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 09:13:42 +0200 -Subject: [PATCH 020/268] arm64: KVM: compute_layout before altenates are +Subject: [PATCH 020/283] arm64: KVM: compute_layout before altenates are applied compute_layout() is invoked as part of an alternative fixup under diff --git a/kernel/patches-4.19.x-rt/0021-of-allocate-free-phandle-cache-outside-of-the-devtre.patch b/kernel/patches-4.19.x-rt/0021-of-allocate-free-phandle-cache-outside-of-the-devtre.patch index efb6397a1..2c6a8d7aa 100644 --- a/kernel/patches-4.19.x-rt/0021-of-allocate-free-phandle-cache-outside-of-the-devtre.patch +++ b/kernel/patches-4.19.x-rt/0021-of-allocate-free-phandle-cache-outside-of-the-devtre.patch @@ -1,7 +1,7 @@ -From 7912b78543a4d0312c0b7c625bb7ab26360c477a Mon Sep 17 00:00:00 2001 +From 6d0f5b28de481062ee69b0d62ae5ef2fc5101f9c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 31 Aug 2018 14:16:30 +0200 -Subject: [PATCH 021/268] of: allocate / free phandle cache outside of the +Subject: [PATCH 021/283] of: allocate / free phandle cache outside of the devtree_lock The phandle cache code allocates memory while holding devtree_lock which diff --git a/kernel/patches-4.19.x-rt/0022-mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch b/kernel/patches-4.19.x-rt/0022-mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch index 6e5a96243..29206d29a 100644 --- a/kernel/patches-4.19.x-rt/0022-mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch +++ b/kernel/patches-4.19.x-rt/0022-mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch @@ -1,7 +1,7 @@ -From 6e5efbd87443d2c1a3df01401ed51638d28d50c1 Mon Sep 17 00:00:00 2001 +From 3ec52d2ee13b6e83429a4f7a048a0005305b8033 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 18 Sep 2018 10:29:31 -0500 -Subject: [PATCH 022/268] mm/kasan: make quarantine_lock a raw_spinlock_t +Subject: [PATCH 022/283] mm/kasan: make quarantine_lock a raw_spinlock_t The static lock quarantine_lock is used in quarantine.c to protect the quarantine queue datastructures. It is taken inside quarantine queue diff --git a/kernel/patches-4.19.x-rt/0023-EXP-rcu-Revert-expedited-GP-parallelization-cleverne.patch b/kernel/patches-4.19.x-rt/0023-EXP-rcu-Revert-expedited-GP-parallelization-cleverne.patch index 0b6a71b39..24c775279 100644 --- a/kernel/patches-4.19.x-rt/0023-EXP-rcu-Revert-expedited-GP-parallelization-cleverne.patch +++ b/kernel/patches-4.19.x-rt/0023-EXP-rcu-Revert-expedited-GP-parallelization-cleverne.patch @@ -1,7 +1,7 @@ -From 3e3086ae2a7f6bb9834e51d8322673247a1d3e4c Mon Sep 17 00:00:00 2001 +From 22ddccee8b48a817b261c98dda99967345475755 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 29 Oct 2018 11:53:01 +0100 -Subject: [PATCH 023/268] EXP rcu: Revert expedited GP parallelization +Subject: [PATCH 023/283] EXP rcu: Revert expedited GP parallelization cleverness (Commit 258ba8e089db23f760139266c232f01bad73f85c from linux-rcu) diff --git a/kernel/patches-4.19.x-rt/0024-kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch b/kernel/patches-4.19.x-rt/0024-kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch index 145aa8ccf..b464e2722 100644 --- a/kernel/patches-4.19.x-rt/0024-kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0024-kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch @@ -1,7 +1,7 @@ -From e27fcb8add849554b0073094e6685ca3248b0f01 Mon Sep 17 00:00:00 2001 +From ced9290a5d8460c8a46615a475cd094bc3b0c344 Mon Sep 17 00:00:00 2001 From: He Zhe Date: Wed, 19 Dec 2018 16:30:57 +0100 -Subject: [PATCH 024/268] kmemleak: Turn kmemleak_lock to raw spinlock on RT +Subject: [PATCH 024/283] kmemleak: Turn kmemleak_lock to raw spinlock on RT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0025-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch b/kernel/patches-4.19.x-rt/0025-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch index 302a7e774..040038b59 100644 --- a/kernel/patches-4.19.x-rt/0025-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch +++ b/kernel/patches-4.19.x-rt/0025-NFSv4-replace-seqcount_t-with-a-seqlock_t.patch @@ -1,7 +1,7 @@ -From 8f433a327631f56d446edaa607b815681c84073d Mon Sep 17 00:00:00 2001 +From e1b321401ca437984b8973749826aea3a245e15b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 28 Oct 2016 23:05:11 +0200 -Subject: [PATCH 025/268] NFSv4: replace seqcount_t with a seqlock_t +Subject: [PATCH 025/283] NFSv4: replace seqcount_t with a seqlock_t The raw_write_seqcount_begin() in nfs4_reclaim_open_state() bugs me because it maps to preempt_disable() in -RT which I can't have at this @@ -57,10 +57,10 @@ index 63287d911c08..2ae55eaa4a1e 100644 }; diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c -index 53cf8599a46e..42850fb5944b 100644 +index 1de855e0ae61..78c3f4359e76 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c -@@ -2863,7 +2863,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, +@@ -2865,7 +2865,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, unsigned int seq; int ret; @@ -69,7 +69,7 @@ index 53cf8599a46e..42850fb5944b 100644 ret = _nfs4_proc_open(opendata, ctx); if (ret != 0) -@@ -2904,7 +2904,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, +@@ -2906,7 +2906,7 @@ static int _nfs4_open_and_get_state(struct nfs4_opendata *opendata, if (d_inode(dentry) == state->inode) { nfs_inode_attach_open_context(ctx); diff --git a/kernel/patches-4.19.x-rt/0026-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch b/kernel/patches-4.19.x-rt/0026-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch index 3d0182692..20fef60db 100644 --- a/kernel/patches-4.19.x-rt/0026-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch +++ b/kernel/patches-4.19.x-rt/0026-kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch @@ -1,7 +1,7 @@ -From e22533415f2d2e4fbc723286a1946a5ac1c3d2ed Mon Sep 17 00:00:00 2001 +From 02954bb06eedf19db3637fea6699d0dc1761b270 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 4 Apr 2017 12:50:16 +0200 -Subject: [PATCH 026/268] kernel: sched: Provide a pointer to the valid CPU +Subject: [PATCH 026/283] kernel: sched: Provide a pointer to the valid CPU mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -254,7 +254,7 @@ index 98e1ce14fa2a..5d3828625017 100644 if (weight == 1 && !test_bit(cpu, qib_cpulist)) if (!find_hca(cpu, &unit) && unit >= 0) diff --git a/fs/proc/array.c b/fs/proc/array.c -index 0ceb3b6b37e7..ccfef702c771 100644 +index 9eb99a43f849..e4d0cfebaac5 100644 --- a/fs/proc/array.c +++ b/fs/proc/array.c @@ -381,9 +381,9 @@ static inline void task_context_switch_counts(struct seq_file *m, @@ -307,7 +307,7 @@ index 5aebe3be4d7c..0b49b9cf5571 100644 .mm = NULL, .active_mm = &init_mm, diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c -index 266f10cb7222..ef085d84a940 100644 +index ff956ccbb6df..7bb129c5b412 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -2090,7 +2090,7 @@ static void cpuset_fork(struct task_struct *task) diff --git a/kernel/patches-4.19.x-rt/0027-kernel-sched-core-add-migrate_disable.patch b/kernel/patches-4.19.x-rt/0027-kernel-sched-core-add-migrate_disable.patch index cd15a0a85..af6667cc9 100644 --- a/kernel/patches-4.19.x-rt/0027-kernel-sched-core-add-migrate_disable.patch +++ b/kernel/patches-4.19.x-rt/0027-kernel-sched-core-add-migrate_disable.patch @@ -1,7 +1,7 @@ -From de7795ed1a14201e737e05a2d1b240a9dc6aded6 Mon Sep 17 00:00:00 2001 +From bda814671dc9f9f74cabd99a65cad3101b68ee83 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 -Subject: [PATCH 027/268] kernel/sched/core: add migrate_disable() +Subject: [PATCH 027/283] kernel/sched/core: add migrate_disable() --- include/linux/preempt.h | 23 +++++++ diff --git a/kernel/patches-4.19.x-rt/0028-sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch b/kernel/patches-4.19.x-rt/0028-sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch index c0fc03af5..078f8ec1e 100644 --- a/kernel/patches-4.19.x-rt/0028-sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch +++ b/kernel/patches-4.19.x-rt/0028-sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch @@ -1,7 +1,7 @@ -From 3eb644da699b9d5916ad3b0e8465e4edc5f6a333 Mon Sep 17 00:00:00 2001 +From 6fb56185df42e49e0e2d8fe12d315356a57f4bce Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 9 Oct 2018 17:34:50 +0200 -Subject: [PATCH 028/268] sched/migrate_disable: Add export_symbol_gpl for +Subject: [PATCH 028/283] sched/migrate_disable: Add export_symbol_gpl for __migrate_disabled Jonathan reported that lttng/modules can't use __migrate_disabled(). diff --git a/kernel/patches-4.19.x-rt/0029-arm-at91-do-not-disable-enable-clocks-in-a-row.patch b/kernel/patches-4.19.x-rt/0029-arm-at91-do-not-disable-enable-clocks-in-a-row.patch index feb24b4bf..e5e4f86c4 100644 --- a/kernel/patches-4.19.x-rt/0029-arm-at91-do-not-disable-enable-clocks-in-a-row.patch +++ b/kernel/patches-4.19.x-rt/0029-arm-at91-do-not-disable-enable-clocks-in-a-row.patch @@ -1,7 +1,7 @@ -From c397de61ffe5014b500d4cb9041776ee6f1fdf96 Mon Sep 17 00:00:00 2001 +From 35e0294d43f7c53bdb7ecba19df0710037d888ec Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 9 Mar 2016 10:51:06 +0100 -Subject: [PATCH 029/268] arm: at91: do not disable/enable clocks in a row +Subject: [PATCH 029/283] arm: at91: do not disable/enable clocks in a row 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/kernel/patches-4.19.x-rt/0030-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch b/kernel/patches-4.19.x-rt/0030-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch index b2074e730..8d453986f 100644 --- a/kernel/patches-4.19.x-rt/0030-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch +++ b/kernel/patches-4.19.x-rt/0030-clocksource-TCLIB-Allow-higher-clock-rates-for-clock.patch @@ -1,7 +1,7 @@ -From b0ab70a4f78b70454e5b35d8a21170fedc297c06 Mon Sep 17 00:00:00 2001 +From 4d4322de76f7b52df1529acfc6e5fc46e25761f1 Mon Sep 17 00:00:00 2001 From: Benedikt Spranger Date: Mon, 8 Mar 2010 18:57:04 +0100 -Subject: [PATCH 030/268] clocksource: TCLIB: Allow higher clock rates for +Subject: [PATCH 030/283] clocksource: TCLIB: Allow higher clock rates for clock events MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/kernel/patches-4.19.x-rt/0031-timekeeping-Split-jiffies-seqlock.patch b/kernel/patches-4.19.x-rt/0031-timekeeping-Split-jiffies-seqlock.patch index 239564892..328725562 100644 --- a/kernel/patches-4.19.x-rt/0031-timekeeping-Split-jiffies-seqlock.patch +++ b/kernel/patches-4.19.x-rt/0031-timekeeping-Split-jiffies-seqlock.patch @@ -1,7 +1,7 @@ -From b09d65be8e3e09795b3ce4ab655f04b5a7b42217 Mon Sep 17 00:00:00 2001 +From 64f770d93319861d308ce265a4389e4ca0a6ed5f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 14 Feb 2013 22:36:59 +0100 -Subject: [PATCH 031/268] timekeeping: Split jiffies seqlock +Subject: [PATCH 031/283] timekeeping: Split jiffies seqlock Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so it can be taken in atomic context on RT. @@ -135,10 +135,10 @@ index 5b33e2f5c0ed..54fd344ef973 100644 ts->timer_expires_base = basemono; diff --git a/kernel/time/timekeeping.c b/kernel/time/timekeeping.c -index 9a6bfcd22dc6..5e584cdebd24 100644 +index 443edcddac8a..0517bc42c6b6 100644 --- a/kernel/time/timekeeping.c +++ b/kernel/time/timekeeping.c -@@ -2417,8 +2417,10 @@ EXPORT_SYMBOL(hardpps); +@@ -2418,8 +2418,10 @@ EXPORT_SYMBOL(hardpps); */ void xtime_update(unsigned long ticks) { diff --git a/kernel/patches-4.19.x-rt/0032-signal-Revert-ptrace-preempt-magic.patch b/kernel/patches-4.19.x-rt/0032-signal-Revert-ptrace-preempt-magic.patch index 5b264a2f7..33aabab5e 100644 --- a/kernel/patches-4.19.x-rt/0032-signal-Revert-ptrace-preempt-magic.patch +++ b/kernel/patches-4.19.x-rt/0032-signal-Revert-ptrace-preempt-magic.patch @@ -1,7 +1,7 @@ -From f1184fbeee330b224af538e519e2215522bbc951 Mon Sep 17 00:00:00 2001 +From 8cf90f7e58f51438a7ec0e4e704918afaa450ff1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 21 Sep 2011 19:57:12 +0200 -Subject: [PATCH 032/268] signal: Revert ptrace preempt magic +Subject: [PATCH 032/283] signal: Revert ptrace preempt magic Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a diff --git a/kernel/patches-4.19.x-rt/0033-net-sched-Use-msleep-instead-of-yield.patch b/kernel/patches-4.19.x-rt/0033-net-sched-Use-msleep-instead-of-yield.patch index adb04e39a..dbe773d3a 100644 --- a/kernel/patches-4.19.x-rt/0033-net-sched-Use-msleep-instead-of-yield.patch +++ b/kernel/patches-4.19.x-rt/0033-net-sched-Use-msleep-instead-of-yield.patch @@ -1,7 +1,7 @@ -From 677aefdaf998f7a5c0fe715201a903187adf03e3 Mon Sep 17 00:00:00 2001 +From 882c4f88db8d6179773dc733e794fa504aef75e3 Mon Sep 17 00:00:00 2001 From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 -Subject: [PATCH 033/268] net: sched: Use msleep() instead of yield() +Subject: [PATCH 033/283] net: sched: Use msleep() instead of yield() 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/kernel/patches-4.19.x-rt/0034-dm-rq-remove-BUG_ON-irqs_disabled-check.patch b/kernel/patches-4.19.x-rt/0034-dm-rq-remove-BUG_ON-irqs_disabled-check.patch index f65609ec1..329582cea 100644 --- a/kernel/patches-4.19.x-rt/0034-dm-rq-remove-BUG_ON-irqs_disabled-check.patch +++ b/kernel/patches-4.19.x-rt/0034-dm-rq-remove-BUG_ON-irqs_disabled-check.patch @@ -1,7 +1,7 @@ -From 7f70887609c161140d9b37c3865fd0e01c755e11 Mon Sep 17 00:00:00 2001 +From ea6d238547b58b5fe9ce953cd818ef8bf6cb8915 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 27 Mar 2018 16:24:15 +0200 -Subject: [PATCH 034/268] dm rq: remove BUG_ON(!irqs_disabled) check +Subject: [PATCH 034/283] dm rq: remove BUG_ON(!irqs_disabled) check In commit 052189a2ec95 ("dm: remove superfluous irq disablement in dm_request_fn") the spin_lock_irq() was replaced with spin_lock() + a diff --git a/kernel/patches-4.19.x-rt/0035-usb-do-no-disable-interrupts-in-giveback.patch b/kernel/patches-4.19.x-rt/0035-usb-do-no-disable-interrupts-in-giveback.patch index 9bbff023e..0ae2929a5 100644 --- a/kernel/patches-4.19.x-rt/0035-usb-do-no-disable-interrupts-in-giveback.patch +++ b/kernel/patches-4.19.x-rt/0035-usb-do-no-disable-interrupts-in-giveback.patch @@ -1,7 +1,7 @@ -From a7d0a6cef67c51b65ef7a826069f17fd3e027d7c Mon Sep 17 00:00:00 2001 +From b91ae27f3efa2e15087397591db35dd1d11f5120 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 8 Nov 2013 17:34:54 +0100 -Subject: [PATCH 035/268] usb: do no disable interrupts in giveback +Subject: [PATCH 035/283] usb: do no disable interrupts in giveback Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet context") the USB code disables interrupts before invoking the complete diff --git a/kernel/patches-4.19.x-rt/0036-rt-Provide-PREEMPT_RT_BASE-config-switch.patch b/kernel/patches-4.19.x-rt/0036-rt-Provide-PREEMPT_RT_BASE-config-switch.patch index 4a8626726..7935c14fd 100644 --- a/kernel/patches-4.19.x-rt/0036-rt-Provide-PREEMPT_RT_BASE-config-switch.patch +++ b/kernel/patches-4.19.x-rt/0036-rt-Provide-PREEMPT_RT_BASE-config-switch.patch @@ -1,7 +1,7 @@ -From f478188cf8735d85f62c91f1766b395f8294e72c Mon Sep 17 00:00:00 2001 +From 79f8ad95ffc5f1cd2ac721ab3d01291d4ad055df Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 17 Jun 2011 12:39:57 +0200 -Subject: [PATCH 036/268] rt: Provide PREEMPT_RT_BASE config switch +Subject: [PATCH 036/283] rt: Provide PREEMPT_RT_BASE config switch Introduce PREEMPT_RT_BASE which enables parts of PREEMPT_RT_FULL. Forces interrupt threading and enables some of the RT diff --git a/kernel/patches-4.19.x-rt/0037-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch b/kernel/patches-4.19.x-rt/0037-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch index c319ebfb0..cd9cc998c 100644 --- a/kernel/patches-4.19.x-rt/0037-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0037-cpumask-Disable-CONFIG_CPUMASK_OFFSTACK-for-RT.patch @@ -1,7 +1,7 @@ -From e32f48e4f42494ed9a8908091c76af925fca59d6 Mon Sep 17 00:00:00 2001 +From 75df679c581581978487f6f6de91bf86a9f72e7c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 14 Dec 2011 01:03:49 +0100 -Subject: [PATCH 037/268] cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT +Subject: [PATCH 037/283] cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT There are "valid" GFP_ATOMIC allocations such as diff --git a/kernel/patches-4.19.x-rt/0038-jump-label-disable-if-stop_machine-is-used.patch b/kernel/patches-4.19.x-rt/0038-jump-label-disable-if-stop_machine-is-used.patch index da4c568d6..e391c4ac9 100644 --- a/kernel/patches-4.19.x-rt/0038-jump-label-disable-if-stop_machine-is-used.patch +++ b/kernel/patches-4.19.x-rt/0038-jump-label-disable-if-stop_machine-is-used.patch @@ -1,7 +1,7 @@ -From c4b0f04fc2d915cc272de6018b5581fce5d5dda7 Mon Sep 17 00:00:00 2001 +From b5d77d6b4b4bcead77cd720e8a93f4ae78420034 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 8 Jul 2015 17:14:48 +0200 -Subject: [PATCH 038/268] jump-label: disable if stop_machine() is used +Subject: [PATCH 038/283] jump-label: disable if stop_machine() is used Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. diff --git a/kernel/patches-4.19.x-rt/0039-kconfig-Disable-config-options-which-are-not-RT-comp.patch b/kernel/patches-4.19.x-rt/0039-kconfig-Disable-config-options-which-are-not-RT-comp.patch index e1519fd36..d03898953 100644 --- a/kernel/patches-4.19.x-rt/0039-kconfig-Disable-config-options-which-are-not-RT-comp.patch +++ b/kernel/patches-4.19.x-rt/0039-kconfig-Disable-config-options-which-are-not-RT-comp.patch @@ -1,7 +1,7 @@ -From 29c669c7c70f5c80be40b69f20b4c4a8034ee7a1 Mon Sep 17 00:00:00 2001 +From 94fd428643474b867a8cac432d7d911a5250c367 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 24 Jul 2011 12:11:43 +0200 -Subject: [PATCH 039/268] kconfig: Disable config options which are not RT +Subject: [PATCH 039/283] kconfig: Disable config options which are not RT compatible Disable stuff which is known to have issues on RT @@ -25,7 +25,7 @@ index a336548487e6..3f537b264852 100644 select RING_BUFFER_ALLOW_SWAP help diff --git a/mm/Kconfig b/mm/Kconfig -index de64ea658716..438460486a5b 100644 +index b457e94ae618..0dddbb2a3282 100644 --- a/mm/Kconfig +++ b/mm/Kconfig @@ -377,7 +377,7 @@ config NOMMU_INITIAL_TRIM_EXCESS diff --git a/kernel/patches-4.19.x-rt/0040-lockdep-disable-self-test.patch b/kernel/patches-4.19.x-rt/0040-lockdep-disable-self-test.patch index d1be9db78..21f32fbf2 100644 --- a/kernel/patches-4.19.x-rt/0040-lockdep-disable-self-test.patch +++ b/kernel/patches-4.19.x-rt/0040-lockdep-disable-self-test.patch @@ -1,7 +1,7 @@ -From 36f9204a770887f7280fb9db2450f6dd8ef11b33 Mon Sep 17 00:00:00 2001 +From 1a9e9b418236c18717a91955eeafe5bd72a00598 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 17 Oct 2017 16:36:18 +0200 -Subject: [PATCH 040/268] lockdep: disable self-test +Subject: [PATCH 040/283] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0041-mm-Allow-only-slub-on-RT.patch b/kernel/patches-4.19.x-rt/0041-mm-Allow-only-slub-on-RT.patch index e478f9f29..e70af310f 100644 --- a/kernel/patches-4.19.x-rt/0041-mm-Allow-only-slub-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0041-mm-Allow-only-slub-on-RT.patch @@ -1,7 +1,7 @@ -From 13ed901518597f2db47f69a5e06cd219389bc331 Mon Sep 17 00:00:00 2001 +From 75102ff5e253e5ababc30c7512e0c07f2b7dc297 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:03 -0500 -Subject: [PATCH 041/268] mm: Allow only slub on RT +Subject: [PATCH 041/283] mm: Allow only slub on RT Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs. diff --git a/kernel/patches-4.19.x-rt/0042-locking-Disable-spin-on-owner-for-RT.patch b/kernel/patches-4.19.x-rt/0042-locking-Disable-spin-on-owner-for-RT.patch index 5ea5c0f60..80046d4f2 100644 --- a/kernel/patches-4.19.x-rt/0042-locking-Disable-spin-on-owner-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0042-locking-Disable-spin-on-owner-for-RT.patch @@ -1,7 +1,7 @@ -From 3437a78b60ceab08492a829b2e8662f7ec640860 Mon Sep 17 00:00:00 2001 +From 32697a0be9afdc5c631cc3d232a298b5880ed65c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:51:45 +0200 -Subject: [PATCH 042/268] locking: Disable spin on owner for RT +Subject: [PATCH 042/283] locking: Disable spin on owner for RT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0043-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch b/kernel/patches-4.19.x-rt/0043-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch index e5c68b119..713fa4120 100644 --- a/kernel/patches-4.19.x-rt/0043-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0043-rcu-Disable-RCU_FAST_NO_HZ-on-RT.patch @@ -1,7 +1,7 @@ -From 43b1a887cc73fc7f4685ceb5b0e34671e87989b7 Mon Sep 17 00:00:00 2001 +From 708879e986c1b552ee69d6444b808a196bba0f5f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 28 Oct 2012 13:26:09 +0000 -Subject: [PATCH 043/268] rcu: Disable RCU_FAST_NO_HZ on RT +Subject: [PATCH 043/283] rcu: Disable RCU_FAST_NO_HZ on RT This uses a timer_list timer from the irq disabled guts of the idle code. Disable it for now to prevent wreckage. diff --git a/kernel/patches-4.19.x-rt/0044-rcu-make-RCU_BOOST-default-on-RT.patch b/kernel/patches-4.19.x-rt/0044-rcu-make-RCU_BOOST-default-on-RT.patch index ac23c12b3..3b5aa9c21 100644 --- a/kernel/patches-4.19.x-rt/0044-rcu-make-RCU_BOOST-default-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0044-rcu-make-RCU_BOOST-default-on-RT.patch @@ -1,7 +1,7 @@ -From f9b4cb4ccfa7e2d695d4510b8159b5205fe80c97 Mon Sep 17 00:00:00 2001 +From a14822b6d5fcc441064faf3edc2f91b5d461e703 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 21 Mar 2014 20:19:05 +0100 -Subject: [PATCH 044/268] rcu: make RCU_BOOST default on RT +Subject: [PATCH 044/283] rcu: make RCU_BOOST default on RT 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/kernel/patches-4.19.x-rt/0045-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch b/kernel/patches-4.19.x-rt/0045-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch index fabd6db66..836daa95f 100644 --- a/kernel/patches-4.19.x-rt/0045-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0045-sched-Disable-CONFIG_RT_GROUP_SCHED-on-RT.patch @@ -1,7 +1,7 @@ -From ca1b9c071f5b45c0d82722d5b9f957d4c2be185e Mon Sep 17 00:00:00 2001 +From 36c33c65b461082612dffa7be01862b7bd55270e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:03:52 +0200 -Subject: [PATCH 045/268] sched: Disable CONFIG_RT_GROUP_SCHED on RT +Subject: [PATCH 045/283] sched: Disable CONFIG_RT_GROUP_SCHED on RT Carsten reported problems when running: diff --git a/kernel/patches-4.19.x-rt/0046-net-core-disable-NET_RX_BUSY_POLL.patch b/kernel/patches-4.19.x-rt/0046-net-core-disable-NET_RX_BUSY_POLL.patch index ea54e00db..b9723934d 100644 --- a/kernel/patches-4.19.x-rt/0046-net-core-disable-NET_RX_BUSY_POLL.patch +++ b/kernel/patches-4.19.x-rt/0046-net-core-disable-NET_RX_BUSY_POLL.patch @@ -1,7 +1,7 @@ -From efe57b197e5cc1e85e486bebe98e95235f5c3410 Mon Sep 17 00:00:00 2001 +From f2b7e396c43d3607ee0a0090c7470da50f833e93 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 -Subject: [PATCH 046/268] net/core: disable NET_RX_BUSY_POLL +Subject: [PATCH 046/283] net/core: disable NET_RX_BUSY_POLL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0047-arm-disable-NEON-in-kernel-mode.patch b/kernel/patches-4.19.x-rt/0047-arm-disable-NEON-in-kernel-mode.patch index 27bb28384..f94e6325b 100644 --- a/kernel/patches-4.19.x-rt/0047-arm-disable-NEON-in-kernel-mode.patch +++ b/kernel/patches-4.19.x-rt/0047-arm-disable-NEON-in-kernel-mode.patch @@ -1,7 +1,7 @@ -From f9353b78df9da136edb2afc49f247e8576de5764 Mon Sep 17 00:00:00 2001 +From 477660c22f2036e69299438b1292307ee1dba46b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 1 Dec 2017 10:42:03 +0100 -Subject: [PATCH 047/268] arm*: disable NEON in kernel mode +Subject: [PATCH 047/283] arm*: disable NEON in kernel mode 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 diff --git a/kernel/patches-4.19.x-rt/0048-powerpc-Use-generic-rwsem-on-RT.patch b/kernel/patches-4.19.x-rt/0048-powerpc-Use-generic-rwsem-on-RT.patch index cf98d0b05..50aec59f6 100644 --- a/kernel/patches-4.19.x-rt/0048-powerpc-Use-generic-rwsem-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0048-powerpc-Use-generic-rwsem-on-RT.patch @@ -1,7 +1,7 @@ -From 11ee0822882b1b72d163eb6fbdf161b8f9178f7c Mon Sep 17 00:00:00 2001 +From 297ef639cbc4bc3aac2e5a8835090136753796fc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 -Subject: [PATCH 048/268] powerpc: Use generic rwsem on RT +Subject: [PATCH 048/283] powerpc: Use generic rwsem on RT Use generic code which uses rtmutex diff --git a/kernel/patches-4.19.x-rt/0049-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/kernel/patches-4.19.x-rt/0049-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index ae1bf1711..b3fb730ac 100644 --- a/kernel/patches-4.19.x-rt/0049-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +++ b/kernel/patches-4.19.x-rt/0049-powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,7 +1,7 @@ -From ee886c042d19029e21776b96c9e1f1f9d00d2da4 Mon Sep 17 00:00:00 2001 +From 3bead4e3fc7560659c1982ace99de374aa9df79c Mon Sep 17 00:00:00 2001 From: Bogdan Purcareata Date: Fri, 24 Apr 2015 15:53:13 +0000 -Subject: [PATCH 049/268] powerpc/kvm: Disable in-kernel MPIC emulation for +Subject: [PATCH 049/283] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL While converting the openpic emulation code to use a raw_spinlock_t enables diff --git a/kernel/patches-4.19.x-rt/0050-powerpc-Disable-highmem-on-RT.patch b/kernel/patches-4.19.x-rt/0050-powerpc-Disable-highmem-on-RT.patch index d28a6e4bf..9b69bb6c8 100644 --- a/kernel/patches-4.19.x-rt/0050-powerpc-Disable-highmem-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0050-powerpc-Disable-highmem-on-RT.patch @@ -1,7 +1,7 @@ -From 9a80112c0cde9a52ce2e158bd6391f0e5035dc04 Mon Sep 17 00:00:00 2001 +From ae9000e3c66794249fbca61b8a71bcdf690910e0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:08:34 +0200 -Subject: [PATCH 050/268] powerpc: Disable highmem on RT +Subject: [PATCH 050/283] powerpc: Disable highmem on RT The current highmem handling on -RT is not compatible and needs fixups. diff --git a/kernel/patches-4.19.x-rt/0051-mips-Disable-highmem-on-RT.patch b/kernel/patches-4.19.x-rt/0051-mips-Disable-highmem-on-RT.patch index 9bb9691dc..c8ecd3a42 100644 --- a/kernel/patches-4.19.x-rt/0051-mips-Disable-highmem-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0051-mips-Disable-highmem-on-RT.patch @@ -1,7 +1,7 @@ -From 593308991349a9b9d16ccb020dee918680b9f6e4 Mon Sep 17 00:00:00 2001 +From 454e636edd0bb26495afb3850a37aa5e5214a4ed Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:10:12 +0200 -Subject: [PATCH 051/268] mips: Disable highmem on RT +Subject: [PATCH 051/283] mips: Disable highmem on RT The current highmem handling on -RT is not compatible and needs fixups. diff --git a/kernel/patches-4.19.x-rt/0052-x86-Use-generic-rwsem_spinlocks-on-rt.patch b/kernel/patches-4.19.x-rt/0052-x86-Use-generic-rwsem_spinlocks-on-rt.patch index ca52bdf16..93935d4e2 100644 --- a/kernel/patches-4.19.x-rt/0052-x86-Use-generic-rwsem_spinlocks-on-rt.patch +++ b/kernel/patches-4.19.x-rt/0052-x86-Use-generic-rwsem_spinlocks-on-rt.patch @@ -1,7 +1,7 @@ -From 4609ae9016c2cac126bafd6b4efb7bc5be590bbc Mon Sep 17 00:00:00 2001 +From 5c86aec91ae10f140d18bd33cd62783cdde0922d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 26 Jul 2009 02:21:32 +0200 -Subject: [PATCH 052/268] x86: Use generic rwsem_spinlocks on -rt +Subject: [PATCH 052/283] x86: Use generic rwsem_spinlocks on -rt Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt. diff --git a/kernel/patches-4.19.x-rt/0053-leds-trigger-disable-CPU-trigger-on-RT.patch b/kernel/patches-4.19.x-rt/0053-leds-trigger-disable-CPU-trigger-on-RT.patch index a007efb87..e330c8328 100644 --- a/kernel/patches-4.19.x-rt/0053-leds-trigger-disable-CPU-trigger-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0053-leds-trigger-disable-CPU-trigger-on-RT.patch @@ -1,7 +1,7 @@ -From 542738bf81c9f5b0ab0de898b1c785fb12a5caf8 Mon Sep 17 00:00:00 2001 +From 9cd1a715d85ace3e9b1d3ae703eb16744dd3ebb6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 23 Jan 2014 14:45:59 +0100 -Subject: [PATCH 053/268] leds: trigger: disable CPU trigger on -RT +Subject: [PATCH 053/283] leds: trigger: disable CPU trigger on -RT as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 diff --git a/kernel/patches-4.19.x-rt/0054-cpufreq-drop-K8-s-driver-from-beeing-selected.patch b/kernel/patches-4.19.x-rt/0054-cpufreq-drop-K8-s-driver-from-beeing-selected.patch index 265949236..b6db4ddad 100644 --- a/kernel/patches-4.19.x-rt/0054-cpufreq-drop-K8-s-driver-from-beeing-selected.patch +++ b/kernel/patches-4.19.x-rt/0054-cpufreq-drop-K8-s-driver-from-beeing-selected.patch @@ -1,7 +1,7 @@ -From 0dcf02e4d56dcf2255f436d792959cf28a04dc54 Mon Sep 17 00:00:00 2001 +From f19ffb87fe48ba1e8904df670b13d52f8b9c08f1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 9 Apr 2015 15:23:01 +0200 -Subject: [PATCH 054/268] cpufreq: drop K8's driver from beeing selected +Subject: [PATCH 054/283] cpufreq: drop K8's driver from beeing selected Ralf posted a picture of a backtrace from diff --git a/kernel/patches-4.19.x-rt/0055-md-disable-bcache.patch b/kernel/patches-4.19.x-rt/0055-md-disable-bcache.patch index 5a1d2f728..297731318 100644 --- a/kernel/patches-4.19.x-rt/0055-md-disable-bcache.patch +++ b/kernel/patches-4.19.x-rt/0055-md-disable-bcache.patch @@ -1,7 +1,7 @@ -From a01400fc47cb4ce13c00b03a908533848af6cf74 Mon Sep 17 00:00:00 2001 +From 3b1c3bc41b87cd7a714ebfa5e88651d4f3326f2e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 11:48:57 +0200 -Subject: [PATCH 055/268] md: disable bcache +Subject: [PATCH 055/283] md: disable bcache MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0056-efi-Disable-runtime-services-on-RT.patch b/kernel/patches-4.19.x-rt/0056-efi-Disable-runtime-services-on-RT.patch index c15bad5cb..25f7d8f34 100644 --- a/kernel/patches-4.19.x-rt/0056-efi-Disable-runtime-services-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0056-efi-Disable-runtime-services-on-RT.patch @@ -1,7 +1,7 @@ -From d141803da471bfe539c38f8022cf8f6297aa27a6 Mon Sep 17 00:00:00 2001 +From f0e7a6e0f76d2ab27a0c5ef0f7872d971ec1dd23 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 15:03:16 +0200 -Subject: [PATCH 056/268] efi: Disable runtime services on RT +Subject: [PATCH 056/283] efi: Disable runtime services on RT Based on meassurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. diff --git a/kernel/patches-4.19.x-rt/0057-printk-Add-a-printk-kill-switch.patch b/kernel/patches-4.19.x-rt/0057-printk-Add-a-printk-kill-switch.patch index cdc19e09b..29ecbea4a 100644 --- a/kernel/patches-4.19.x-rt/0057-printk-Add-a-printk-kill-switch.patch +++ b/kernel/patches-4.19.x-rt/0057-printk-Add-a-printk-kill-switch.patch @@ -1,7 +1,7 @@ -From 9de1c1091c3b7a7d6037733b3d3026601eb096cd Mon Sep 17 00:00:00 2001 +From d1e9e20fe16f16a1665eabaa44a0f1c2a4cebfec Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 22 Jul 2011 17:58:40 +0200 -Subject: [PATCH 057/268] printk: Add a printk kill switch +Subject: [PATCH 057/283] printk: Add a printk kill switch Add a prinkt-kill-switch. This is used from (NMI) watchdog to ensure that it does not dead-lock with the early printk code. diff --git a/kernel/patches-4.19.x-rt/0058-printk-Add-force_early_printk-boot-param-to-help-wit.patch b/kernel/patches-4.19.x-rt/0058-printk-Add-force_early_printk-boot-param-to-help-wit.patch index 2290009b2..aa218e634 100644 --- a/kernel/patches-4.19.x-rt/0058-printk-Add-force_early_printk-boot-param-to-help-wit.patch +++ b/kernel/patches-4.19.x-rt/0058-printk-Add-force_early_printk-boot-param-to-help-wit.patch @@ -1,7 +1,7 @@ -From 55ac9fe1a16eab7f85e646280cb842f4cf31e27d Mon Sep 17 00:00:00 2001 +From 3d881bc012788bea38e0bf55b03d9996eb40b1b9 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Fri, 2 Sep 2011 14:41:29 +0200 -Subject: [PATCH 058/268] printk: Add "force_early_printk" boot param to help +Subject: [PATCH 058/283] printk: Add "force_early_printk" boot param to help with debugging Gives me an option to screw printk and actually see what the machine diff --git a/kernel/patches-4.19.x-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch b/kernel/patches-4.19.x-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch index 7bbb64ef5..d93b423c3 100644 --- a/kernel/patches-4.19.x-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch +++ b/kernel/patches-4.19.x-rt/0059-preempt-Provide-preempt_-_-no-rt-variants.patch @@ -1,7 +1,7 @@ -From bfb747584de1b0f321d8f3b893580b4d39f93fec Mon Sep 17 00:00:00 2001 +From 6a3ec551d9ea7e49f20d8f9d3d45fb8d9ca1b720 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 24 Jul 2009 12:38:56 +0200 -Subject: [PATCH 059/268] preempt: Provide preempt_*_(no)rt variants +Subject: [PATCH 059/283] preempt: Provide preempt_*_(no)rt variants RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/kernel/patches-4.19.x-rt/0060-futex-workaround-migrate_disable-enable-in-different.patch b/kernel/patches-4.19.x-rt/0060-futex-workaround-migrate_disable-enable-in-different.patch index 422ec179b..7d4b732a2 100644 --- a/kernel/patches-4.19.x-rt/0060-futex-workaround-migrate_disable-enable-in-different.patch +++ b/kernel/patches-4.19.x-rt/0060-futex-workaround-migrate_disable-enable-in-different.patch @@ -1,7 +1,7 @@ -From 66ea8bcf4a5d31c51bb0b08b6fcfdb920bf7df51 Mon Sep 17 00:00:00 2001 +From 02487d0393920e03426a2378e40bc7547193c3aa Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 8 Mar 2017 14:23:35 +0100 -Subject: [PATCH 060/268] futex: workaround migrate_disable/enable in different +Subject: [PATCH 060/283] futex: workaround migrate_disable/enable in different context migrate_disable()/migrate_enable() takes a different path in atomic() vs diff --git a/kernel/patches-4.19.x-rt/0061-rt-Add-local-irq-locks.patch b/kernel/patches-4.19.x-rt/0061-rt-Add-local-irq-locks.patch index 3c1255566..79a34778c 100644 --- a/kernel/patches-4.19.x-rt/0061-rt-Add-local-irq-locks.patch +++ b/kernel/patches-4.19.x-rt/0061-rt-Add-local-irq-locks.patch @@ -1,7 +1,7 @@ -From 4104d3d4d2d94ac19edef31fef10a471b4085c24 Mon Sep 17 00:00:00 2001 +From 1e4195bafdb198d778c98aece678c7b16cd035c8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 20 Jun 2011 09:03:47 +0200 -Subject: [PATCH 061/268] rt: Add local irq locks +Subject: [PATCH 061/283] rt: Add local irq locks 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/kernel/patches-4.19.x-rt/0062-locallock-provide-get-put-_locked_ptr-variants.patch b/kernel/patches-4.19.x-rt/0062-locallock-provide-get-put-_locked_ptr-variants.patch index 98068d0a9..ba512347b 100644 --- a/kernel/patches-4.19.x-rt/0062-locallock-provide-get-put-_locked_ptr-variants.patch +++ b/kernel/patches-4.19.x-rt/0062-locallock-provide-get-put-_locked_ptr-variants.patch @@ -1,7 +1,7 @@ -From c16b283427931d20279125c773aca78b01235f68 Mon Sep 17 00:00:00 2001 +From 58ee9341c0c3521cdb41239c83807a98cef97bd0 Mon Sep 17 00:00:00 2001 From: Julia Cartwright Date: Mon, 7 May 2018 08:58:56 -0500 -Subject: [PATCH 062/268] locallock: provide {get,put}_locked_ptr() variants +Subject: [PATCH 062/283] locallock: provide {get,put}_locked_ptr() variants Provide a set of locallocked accessors for pointers to per-CPU data; this is useful for dynamically-allocated per-CPU regions, for example. diff --git a/kernel/patches-4.19.x-rt/0063-mm-scatterlist-Do-not-disable-irqs-on-RT.patch b/kernel/patches-4.19.x-rt/0063-mm-scatterlist-Do-not-disable-irqs-on-RT.patch index c3f496a09..659dd3b38 100644 --- a/kernel/patches-4.19.x-rt/0063-mm-scatterlist-Do-not-disable-irqs-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0063-mm-scatterlist-Do-not-disable-irqs-on-RT.patch @@ -1,7 +1,7 @@ -From c8f195054bbdf59c6e791bbd698d3ffce9776265 Mon Sep 17 00:00:00 2001 +From a6c38f0b349a8921a1bfe4dcef5972cf1e2224a0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:34 -0500 -Subject: [PATCH 063/268] mm/scatterlist: Do not disable irqs on RT +Subject: [PATCH 063/283] mm/scatterlist: Do not disable irqs on RT For -RT it is enough to keep pagefault disabled (which is currently handled by kmap_atomic()). diff --git a/kernel/patches-4.19.x-rt/0064-signal-x86-Delay-calling-signals-in-atomic.patch b/kernel/patches-4.19.x-rt/0064-signal-x86-Delay-calling-signals-in-atomic.patch index 7e2560150..fc2b07c35 100644 --- a/kernel/patches-4.19.x-rt/0064-signal-x86-Delay-calling-signals-in-atomic.patch +++ b/kernel/patches-4.19.x-rt/0064-signal-x86-Delay-calling-signals-in-atomic.patch @@ -1,7 +1,7 @@ -From 41445095315411d8baebfc36b2f6f30aefe2abc6 Mon Sep 17 00:00:00 2001 +From f994c5279fb1173131e67419c540713cd25a59e3 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Tue, 14 Jul 2015 14:26:34 +0200 -Subject: [PATCH 064/268] signal/x86: Delay calling signals in atomic +Subject: [PATCH 064/283] signal/x86: Delay calling signals in atomic 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/kernel/patches-4.19.x-rt/0065-x86-signal-delay-calling-signals-on-32bit.patch b/kernel/patches-4.19.x-rt/0065-x86-signal-delay-calling-signals-on-32bit.patch index 6c249e779..0118cc134 100644 --- a/kernel/patches-4.19.x-rt/0065-x86-signal-delay-calling-signals-on-32bit.patch +++ b/kernel/patches-4.19.x-rt/0065-x86-signal-delay-calling-signals-on-32bit.patch @@ -1,7 +1,7 @@ -From f9d175548eeb780a2da87b33b2055b747bdf4618 Mon Sep 17 00:00:00 2001 +From 77f58646e4722365c6b6b91802d5feddd57dff34 Mon Sep 17 00:00:00 2001 From: Yang Shi Date: Thu, 10 Dec 2015 10:58:51 -0800 -Subject: [PATCH 065/268] x86/signal: delay calling signals on 32bit +Subject: [PATCH 065/283] x86/signal: delay calling signals on 32bit When running some ptrace single step tests on x86-32 machine, the below problem is triggered: diff --git a/kernel/patches-4.19.x-rt/0066-buffer_head-Replace-bh_uptodate_lock-for-rt.patch b/kernel/patches-4.19.x-rt/0066-buffer_head-Replace-bh_uptodate_lock-for-rt.patch index 673493e88..0ee5dfabc 100644 --- a/kernel/patches-4.19.x-rt/0066-buffer_head-Replace-bh_uptodate_lock-for-rt.patch +++ b/kernel/patches-4.19.x-rt/0066-buffer_head-Replace-bh_uptodate_lock-for-rt.patch @@ -1,7 +1,7 @@ -From 4412fbb024c634740aa2ab4db609244bb957fb43 Mon Sep 17 00:00:00 2001 +From 86a1cbd4eddbe083ad0331f0eeec002f6fa7b322 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 18 Mar 2011 09:18:52 +0100 -Subject: [PATCH 066/268] buffer_head: Replace bh_uptodate_lock for -rt +Subject: [PATCH 066/283] buffer_head: Replace bh_uptodate_lock for -rt Wrap the bit_spin_lock calls into a separate inline and add the RT replacements with a real spinlock. diff --git a/kernel/patches-4.19.x-rt/0067-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch b/kernel/patches-4.19.x-rt/0067-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch index d7f0a7943..742f848b7 100644 --- a/kernel/patches-4.19.x-rt/0067-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch +++ b/kernel/patches-4.19.x-rt/0067-fs-jbd-jbd2-Make-state-lock-and-journal-head-lock-rt.patch @@ -1,7 +1,7 @@ -From 35cce66d60508a5221b8ffdc4a6dabd3548ba2c9 Mon Sep 17 00:00:00 2001 +From a0ac5bf9b179bff5745bd4c15d14cb2ec5c81c16 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 18 Mar 2011 10:11:25 +0100 -Subject: [PATCH 067/268] fs: jbd/jbd2: Make state lock and journal head lock +Subject: [PATCH 067/283] fs: jbd/jbd2: Make state lock and journal head lock rt safe bit_spin_locks break under RT. diff --git a/kernel/patches-4.19.x-rt/0068-list_bl-Make-list-head-locking-RT-safe.patch b/kernel/patches-4.19.x-rt/0068-list_bl-Make-list-head-locking-RT-safe.patch index cf9d08222..5fd8fb1b6 100644 --- a/kernel/patches-4.19.x-rt/0068-list_bl-Make-list-head-locking-RT-safe.patch +++ b/kernel/patches-4.19.x-rt/0068-list_bl-Make-list-head-locking-RT-safe.patch @@ -1,7 +1,7 @@ -From 39396411087b5831b20ac4fa694b3001d358989d Mon Sep 17 00:00:00 2001 +From 575440eb3e514693de4892b3589bd02b584834ef Mon Sep 17 00:00:00 2001 From: Paul Gortmaker Date: Fri, 21 Jun 2013 15:07:25 -0400 -Subject: [PATCH 068/268] list_bl: Make list head locking RT safe +Subject: [PATCH 068/283] list_bl: Make list head locking RT safe 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/kernel/patches-4.19.x-rt/0069-list_bl-fixup-bogus-lockdep-warning.patch b/kernel/patches-4.19.x-rt/0069-list_bl-fixup-bogus-lockdep-warning.patch index 2e4178ad6..919bcbd7e 100644 --- a/kernel/patches-4.19.x-rt/0069-list_bl-fixup-bogus-lockdep-warning.patch +++ b/kernel/patches-4.19.x-rt/0069-list_bl-fixup-bogus-lockdep-warning.patch @@ -1,7 +1,7 @@ -From fb2fdfdc67deb3b7b5541d28f9d2cdfbebbc7a9b Mon Sep 17 00:00:00 2001 +From 386260fdddeed151902355b8c816f9b166c1c2b8 Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Thu, 31 Mar 2016 00:04:25 -0500 -Subject: [PATCH 069/268] list_bl: fixup bogus lockdep warning +Subject: [PATCH 069/283] list_bl: fixup bogus lockdep warning At first glance, the use of 'static inline' seems appropriate for INIT_HLIST_BL_HEAD(). diff --git a/kernel/patches-4.19.x-rt/0070-genirq-Disable-irqpoll-on-rt.patch b/kernel/patches-4.19.x-rt/0070-genirq-Disable-irqpoll-on-rt.patch index 71d10b46b..03c1d8bbc 100644 --- a/kernel/patches-4.19.x-rt/0070-genirq-Disable-irqpoll-on-rt.patch +++ b/kernel/patches-4.19.x-rt/0070-genirq-Disable-irqpoll-on-rt.patch @@ -1,7 +1,7 @@ -From 3eada8624fd7eee399757276e5f33f311f2baba3 Mon Sep 17 00:00:00 2001 +From d884d2bff2d643468c5e37727aa29e8f5c88b3be Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:57 -0500 -Subject: [PATCH 070/268] genirq: Disable irqpoll on -rt +Subject: [PATCH 070/283] genirq: Disable irqpoll on -rt Creates long latencies for no value diff --git a/kernel/patches-4.19.x-rt/0071-genirq-Force-interrupt-thread-on-RT.patch b/kernel/patches-4.19.x-rt/0071-genirq-Force-interrupt-thread-on-RT.patch index caa8b2f9c..811c5459a 100644 --- a/kernel/patches-4.19.x-rt/0071-genirq-Force-interrupt-thread-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0071-genirq-Force-interrupt-thread-on-RT.patch @@ -1,7 +1,7 @@ -From 3681b7011d489da9a82f90fee87711d1bab983fe Mon Sep 17 00:00:00 2001 +From 91f768aed73cc93826112811b4e622dce0c1915f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 3 Apr 2011 11:57:29 +0200 -Subject: [PATCH 071/268] genirq: Force interrupt thread on RT +Subject: [PATCH 071/283] genirq: Force interrupt thread on RT Force threaded_irqs and optimize the code (force_irqthreads) in regard to this. diff --git a/kernel/patches-4.19.x-rt/0072-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/kernel/patches-4.19.x-rt/0072-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 1fee929de..33ce3b1b6 100644 --- a/kernel/patches-4.19.x-rt/0072-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/kernel/patches-4.19.x-rt/0072-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -1,7 +1,7 @@ -From 95156c42eddf17dc207a94b719ec18b031e4a713 Mon Sep 17 00:00:00 2001 +From 6ec0e8d1526370de73bd18c096f7f96827594308 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 28 May 2018 15:24:20 +0200 -Subject: [PATCH 072/268] Split IRQ-off and zone->lock while freeing pages from +Subject: [PATCH 072/283] Split IRQ-off and zone->lock while freeing pages from PCP list #1 Split the IRQ-off section while accessing the PCP list from zone->lock @@ -17,7 +17,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 52 insertions(+), 30 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 8e6932a140b8..8c10f34364c0 100644 +index 2d04bd2e1ced..332b48f38d1e 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1095,7 +1095,7 @@ static inline void prefetch_buddy(struct page *page) diff --git a/kernel/patches-4.19.x-rt/0073-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/kernel/patches-4.19.x-rt/0073-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 3ca194601..f60adfde3 100644 --- a/kernel/patches-4.19.x-rt/0073-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/kernel/patches-4.19.x-rt/0073-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -1,7 +1,7 @@ -From 85fe71fd7fa2ac8945d33c49966dde1662a13228 Mon Sep 17 00:00:00 2001 +From f9efb76f365f15eaca8f29ee7f2648de90925a76 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 28 May 2018 15:24:21 +0200 -Subject: [PATCH 073/268] Split IRQ-off and zone->lock while freeing pages from +Subject: [PATCH 073/283] Split IRQ-off and zone->lock while freeing pages from PCP list #2 Split the IRQ-off section while accessing the PCP list from zone->lock @@ -17,7 +17,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 50 insertions(+), 10 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 8c10f34364c0..4d630aebd84f 100644 +index 332b48f38d1e..55cee9a17a36 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -1105,8 +1105,8 @@ static inline void prefetch_buddy(struct page *page) diff --git a/kernel/patches-4.19.x-rt/0074-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch b/kernel/patches-4.19.x-rt/0074-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch index 26bbf5cf8..5762eea2f 100644 --- a/kernel/patches-4.19.x-rt/0074-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch +++ b/kernel/patches-4.19.x-rt/0074-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ -From e38ec11acd94c6fe346d33ce75e30349b1734e40 Mon Sep 17 00:00:00 2001 +From 302fcfd8e9527e8f7b6ec9d733a5a3a760af64ef Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 28 May 2018 15:24:22 +0200 -Subject: [PATCH 074/268] mm/SLxB: change list_lock to raw_spinlock_t +Subject: [PATCH 074/283] mm/SLxB: change list_lock to raw_spinlock_t 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 @@ -18,7 +18,7 @@ Signed-off-by: Sebastian Andrzej Siewior 3 files changed, 73 insertions(+), 73 deletions(-) diff --git a/mm/slab.c b/mm/slab.c -index 018d32496e8d..8ccc092fcd39 100644 +index 46f21e73db2f..38f6609343b3 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -233,7 +233,7 @@ static void kmem_cache_node_init(struct kmem_cache_node *parent) @@ -368,7 +368,7 @@ index 018d32496e8d..8ccc092fcd39 100644 } num_objs = total_slabs * cachep->num; active_slabs = total_slabs - free_slabs; -@@ -4334,13 +4334,13 @@ static int leaks_show(struct seq_file *m, void *p) +@@ -4338,13 +4338,13 @@ static int leaks_show(struct seq_file *m, void *p) for_each_kmem_cache_node(cachep, node, n) { check_irq_on(); diff --git a/kernel/patches-4.19.x-rt/0075-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch b/kernel/patches-4.19.x-rt/0075-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch index 4e393bb8f..953a10b67 100644 --- a/kernel/patches-4.19.x-rt/0075-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch +++ b/kernel/patches-4.19.x-rt/0075-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch @@ -1,7 +1,7 @@ -From e5dbe8c3a2188b0eed47fc087904da4df4f2711a Mon Sep 17 00:00:00 2001 +From 9da82885e5b9187857b5fdc2eaa482752e814fbc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 21 Jun 2018 17:29:19 +0200 -Subject: [PATCH 075/268] mm/SLUB: delay giving back empty slubs to IRQ enabled +Subject: [PATCH 075/283] mm/SLUB: delay giving back empty slubs to IRQ enabled regions __free_slab() is invoked with disabled interrupts which increases the diff --git a/kernel/patches-4.19.x-rt/0076-mm-page_alloc-rt-friendly-per-cpu-pages.patch b/kernel/patches-4.19.x-rt/0076-mm-page_alloc-rt-friendly-per-cpu-pages.patch index dcf35eea5..698762232 100644 --- a/kernel/patches-4.19.x-rt/0076-mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/kernel/patches-4.19.x-rt/0076-mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,7 @@ -From 1dc89f1379f4b2b2d2c1f1928faa9781232a804c Mon Sep 17 00:00:00 2001 +From 4cd1dede47de27525631161fdc6cdfc9d8608c31 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:37 -0500 -Subject: [PATCH 076/268] mm: page_alloc: rt-friendly per-cpu pages +Subject: [PATCH 076/283] mm: page_alloc: rt-friendly per-cpu pages rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. @@ -17,7 +17,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 43 insertions(+), 20 deletions(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 4d630aebd84f..4d11ec179aa7 100644 +index 55cee9a17a36..99b3861b1ef6 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -60,6 +60,7 @@ @@ -215,7 +215,7 @@ index 4d630aebd84f..4d11ec179aa7 100644 return NULL; } -@@ -8094,7 +8117,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8096,7 +8119,7 @@ void zone_pcp_reset(struct zone *zone) struct per_cpu_pageset *pset; /* avoid races with drain_pages() */ @@ -224,7 +224,7 @@ index 4d630aebd84f..4d11ec179aa7 100644 if (zone->pageset != &boot_pageset) { for_each_online_cpu(cpu) { pset = per_cpu_ptr(zone->pageset, cpu); -@@ -8103,7 +8126,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8105,7 +8128,7 @@ void zone_pcp_reset(struct zone *zone) free_percpu(zone->pageset); zone->pageset = &boot_pageset; } diff --git a/kernel/patches-4.19.x-rt/0077-mm-swap-Convert-to-percpu-locked.patch b/kernel/patches-4.19.x-rt/0077-mm-swap-Convert-to-percpu-locked.patch index cd3cbfa6d..bc037c26b 100644 --- a/kernel/patches-4.19.x-rt/0077-mm-swap-Convert-to-percpu-locked.patch +++ b/kernel/patches-4.19.x-rt/0077-mm-swap-Convert-to-percpu-locked.patch @@ -1,7 +1,7 @@ -From 3f837e858bd7d4ee248e9b075cce128beaf94252 Mon Sep 17 00:00:00 2001 +From 98c01e9756e741d807b1198eb885a26e0998fcde Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:51 -0500 -Subject: [PATCH 077/268] mm/swap: Convert to percpu locked +Subject: [PATCH 077/283] mm/swap: Convert to percpu locked Replace global locks (get_cpu + local_irq_save) with "local_locks()". Currently there is one of for "rotate" and one for "swap". @@ -55,10 +55,10 @@ index faca45ebe62d..f8ccb9d9daa3 100644 cc->last_migrated_pfn = 0; } diff --git a/mm/page_alloc.c b/mm/page_alloc.c -index 4d11ec179aa7..a01c15fdb723 100644 +index 99b3861b1ef6..1679f5883307 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7205,8 +7205,9 @@ void __init free_area_init(unsigned long *zones_size) +@@ -7207,8 +7207,9 @@ void __init free_area_init(unsigned long *zones_size) static int page_alloc_cpu_dead(unsigned int cpu) { diff --git a/kernel/patches-4.19.x-rt/0078-mm-perform-lru_add_drain_all-remotely.patch b/kernel/patches-4.19.x-rt/0078-mm-perform-lru_add_drain_all-remotely.patch index 52e7f424e..568e1f70f 100644 --- a/kernel/patches-4.19.x-rt/0078-mm-perform-lru_add_drain_all-remotely.patch +++ b/kernel/patches-4.19.x-rt/0078-mm-perform-lru_add_drain_all-remotely.patch @@ -1,7 +1,7 @@ -From e06defe13153f9c3195a350898b54b88fe38867b Mon Sep 17 00:00:00 2001 +From f4f53c9fdf55676d783a4fbad5049f39401a0542 Mon Sep 17 00:00:00 2001 From: Luiz Capitulino Date: Fri, 27 May 2016 15:03:28 +0200 -Subject: [PATCH 078/268] mm: perform lru_add_drain_all() remotely +Subject: [PATCH 078/283] mm: perform lru_add_drain_all() remotely lru_add_drain_all() works by scheduling lru_add_drain_cpu() to run on all CPUs that have non-empty LRU pagevecs and then waiting for diff --git a/kernel/patches-4.19.x-rt/0079-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch b/kernel/patches-4.19.x-rt/0079-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch index e46c59c97..e86cd6984 100644 --- a/kernel/patches-4.19.x-rt/0079-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch +++ b/kernel/patches-4.19.x-rt/0079-mm-vmstat-Protect-per-cpu-variables-with-preempt-dis.patch @@ -1,7 +1,7 @@ -From c111e38989bb30e13df9f5480f5f549b31351d28 Mon Sep 17 00:00:00 2001 +From 3e1b4a0068b41c1782264376379985fb992bd41e Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:13 -0500 -Subject: [PATCH 079/268] mm/vmstat: Protect per cpu variables with preempt +Subject: [PATCH 079/283] mm/vmstat: Protect per cpu variables with preempt disable on RT Disable preemption on -RT for the vmstat code. On vanila the code runs in diff --git a/kernel/patches-4.19.x-rt/0080-ARM-Initialize-split-page-table-locks-for-vector-pag.patch b/kernel/patches-4.19.x-rt/0080-ARM-Initialize-split-page-table-locks-for-vector-pag.patch index f487b4098..8e1c123f1 100644 --- a/kernel/patches-4.19.x-rt/0080-ARM-Initialize-split-page-table-locks-for-vector-pag.patch +++ b/kernel/patches-4.19.x-rt/0080-ARM-Initialize-split-page-table-locks-for-vector-pag.patch @@ -1,7 +1,7 @@ -From 6d873013d0191323247ffcc8345c08178c272988 Mon Sep 17 00:00:00 2001 +From fb089e89b26bc5653a90d9983021813e15fa04d9 Mon Sep 17 00:00:00 2001 From: Frank Rowand Date: Sat, 1 Oct 2011 18:58:13 -0700 -Subject: [PATCH 080/268] ARM: Initialize split page table locks for vector +Subject: [PATCH 080/283] ARM: Initialize split page table locks for vector page Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if diff --git a/kernel/patches-4.19.x-rt/0081-mm-Enable-SLUB-for-RT.patch b/kernel/patches-4.19.x-rt/0081-mm-Enable-SLUB-for-RT.patch index 62ec636bd..27e96e11c 100644 --- a/kernel/patches-4.19.x-rt/0081-mm-Enable-SLUB-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0081-mm-Enable-SLUB-for-RT.patch @@ -1,7 +1,7 @@ -From 50c1ce833125e10e59496d55aadac08ac0dfec71 Mon Sep 17 00:00:00 2001 +From b01d03c695bcba2149713f4425c806b5b5e3410d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 25 Oct 2012 10:32:35 +0100 -Subject: [PATCH 081/268] mm: Enable SLUB for RT +Subject: [PATCH 081/283] mm: Enable SLUB for RT Avoid the memory allocation in IRQ section diff --git a/kernel/patches-4.19.x-rt/0082-slub-Enable-irqs-for-__GFP_WAIT.patch b/kernel/patches-4.19.x-rt/0082-slub-Enable-irqs-for-__GFP_WAIT.patch index fcbad0114..fd0874e0b 100644 --- a/kernel/patches-4.19.x-rt/0082-slub-Enable-irqs-for-__GFP_WAIT.patch +++ b/kernel/patches-4.19.x-rt/0082-slub-Enable-irqs-for-__GFP_WAIT.patch @@ -1,7 +1,7 @@ -From 64d21bbe1300711eaf9a6c7d1977308201d8220b Mon Sep 17 00:00:00 2001 +From 14471a3281f661b8b8bccdb64820879a699fb2ad Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 9 Jan 2013 12:08:15 +0100 -Subject: [PATCH 082/268] slub: Enable irqs for __GFP_WAIT +Subject: [PATCH 082/283] slub: Enable irqs for __GFP_WAIT 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/kernel/patches-4.19.x-rt/0083-slub-Disable-SLUB_CPU_PARTIAL.patch b/kernel/patches-4.19.x-rt/0083-slub-Disable-SLUB_CPU_PARTIAL.patch index 0c881953e..8f6640441 100644 --- a/kernel/patches-4.19.x-rt/0083-slub-Disable-SLUB_CPU_PARTIAL.patch +++ b/kernel/patches-4.19.x-rt/0083-slub-Disable-SLUB_CPU_PARTIAL.patch @@ -1,7 +1,7 @@ -From b652776b565212235e147d11064da4bf8f63c5df Mon Sep 17 00:00:00 2001 +From fb6bfe69057a4177f5f5b273cace7ea5cbb5f649 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 15 Apr 2015 19:00:47 +0200 -Subject: [PATCH 083/268] slub: Disable SLUB_CPU_PARTIAL +Subject: [PATCH 083/283] slub: Disable SLUB_CPU_PARTIAL |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/kernel/patches-4.19.x-rt/0084-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/kernel/patches-4.19.x-rt/0084-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch index 0b17fbb62..6b18cd5f7 100644 --- a/kernel/patches-4.19.x-rt/0084-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch +++ b/kernel/patches-4.19.x-rt/0084-mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch @@ -1,7 +1,7 @@ -From 74f8110e2380913103e09eb16ed6f41996d29278 Mon Sep 17 00:00:00 2001 +From b64de8d2bb376abf6af01c84a94e1a201aecc6ec Mon Sep 17 00:00:00 2001 From: Yang Shi Date: Wed, 30 Oct 2013 11:48:33 -0700 -Subject: [PATCH 084/268] mm/memcontrol: Don't call schedule_work_on in +Subject: [PATCH 084/283] mm/memcontrol: Don't call schedule_work_on in preemption disabled context The following trace is triggered when running ltp oom test cases: diff --git a/kernel/patches-4.19.x-rt/0085-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch b/kernel/patches-4.19.x-rt/0085-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch index 4cd086f9d..1188a7203 100644 --- a/kernel/patches-4.19.x-rt/0085-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch +++ b/kernel/patches-4.19.x-rt/0085-mm-memcontrol-Replace-local_irq_disable-with-local-l.patch @@ -1,7 +1,7 @@ -From 9fe5cd2edadfa8760b3ebc58af32d2d0f3ee8af4 Mon Sep 17 00:00:00 2001 +From 3cb7dde3b41a847eefeac79763e46ce167c8521f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 28 Jan 2015 17:14:16 +0100 -Subject: [PATCH 085/268] mm/memcontrol: Replace local_irq_disable with local +Subject: [PATCH 085/283] mm/memcontrol: Replace local_irq_disable with local locks There are a few local_irq_disable() which then take sleeping locks. This diff --git a/kernel/patches-4.19.x-rt/0086-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch b/kernel/patches-4.19.x-rt/0086-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch index 548244c84..2639dfede 100644 --- a/kernel/patches-4.19.x-rt/0086-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch +++ b/kernel/patches-4.19.x-rt/0086-mm-zsmalloc-copy-with-get_cpu_var-and-locking.patch @@ -1,7 +1,7 @@ -From eafb2205942eee5257b3fd40aa6b513b07a21661 Mon Sep 17 00:00:00 2001 +From 50eae40f0475c039a273e2f5441f4ecda84d104e Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Tue, 22 Mar 2016 11:16:09 +0100 -Subject: [PATCH 086/268] mm/zsmalloc: copy with get_cpu_var() and locking +Subject: [PATCH 086/283] mm/zsmalloc: copy with get_cpu_var() and locking get_cpu_var() disables preemption and triggers a might_sleep() splat later. This is replaced with get_locked_var(). diff --git a/kernel/patches-4.19.x-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch b/kernel/patches-4.19.x-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch index fe865593f..1b991502b 100644 --- a/kernel/patches-4.19.x-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch +++ b/kernel/patches-4.19.x-rt/0087-x86-mm-pat-disable-preemption-__split_large_page-aft.patch @@ -1,7 +1,7 @@ -From 789271b9a5c962ee26a3ec8d65c7c58db403d9e4 Mon Sep 17 00:00:00 2001 +From 3d625e1fb1f5adff8191330efe6d47017b0806bd Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 11 Dec 2018 21:53:43 +0100 -Subject: [PATCH 087/268] x86/mm/pat: disable preemption __split_large_page() +Subject: [PATCH 087/283] x86/mm/pat: disable preemption __split_large_page() after spin_lock() Commit "x86/mm/pat: Disable preemption around __flush_tlb_all()" added a diff --git a/kernel/patches-4.19.x-rt/0088-radix-tree-use-local-locks.patch b/kernel/patches-4.19.x-rt/0088-radix-tree-use-local-locks.patch index 46ff6803a..7e37768f9 100644 --- a/kernel/patches-4.19.x-rt/0088-radix-tree-use-local-locks.patch +++ b/kernel/patches-4.19.x-rt/0088-radix-tree-use-local-locks.patch @@ -1,7 +1,7 @@ -From c279de8e446c1b1c790aef81b598e7b259ebd6e6 Mon Sep 17 00:00:00 2001 +From 0a7a65a5055b7a5a94c57ee2dc8404116cff804b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 25 Jan 2017 16:34:27 +0100 -Subject: [PATCH 088/268] radix-tree: use local locks +Subject: [PATCH 088/283] radix-tree: use local locks 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/kernel/patches-4.19.x-rt/0089-timers-Prepare-for-full-preemption.patch b/kernel/patches-4.19.x-rt/0089-timers-Prepare-for-full-preemption.patch index 2cd5aa039..7edf7ae23 100644 --- a/kernel/patches-4.19.x-rt/0089-timers-Prepare-for-full-preemption.patch +++ b/kernel/patches-4.19.x-rt/0089-timers-Prepare-for-full-preemption.patch @@ -1,7 +1,7 @@ -From 76691edf9b2f9e9bce47a7fad48aed97af769508 Mon Sep 17 00:00:00 2001 +From 5bbf9de052f34cd8d685120f60da34937f2b0772 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 -Subject: [PATCH 089/268] timers: Prepare for full preemption +Subject: [PATCH 089/283] timers: Prepare for full preemption When softirqs can be preempted we need to make sure that cancelling the timer from the active thread can not deadlock vs. a running timer diff --git a/kernel/patches-4.19.x-rt/0090-x86-kvm-Require-const-tsc-for-RT.patch b/kernel/patches-4.19.x-rt/0090-x86-kvm-Require-const-tsc-for-RT.patch index beb8966d3..a6b3954fa 100644 --- a/kernel/patches-4.19.x-rt/0090-x86-kvm-Require-const-tsc-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0090-x86-kvm-Require-const-tsc-for-RT.patch @@ -1,7 +1,7 @@ -From 78ee89fc14623b109a4b5383aac8ea85bb7cde47 Mon Sep 17 00:00:00 2001 +From 49f95baf1667e4853406b63d30062b94afff4a25 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 6 Nov 2011 12:26:18 +0100 -Subject: [PATCH 090/268] x86: kvm Require const tsc for RT +Subject: [PATCH 090/283] x86: kvm Require const tsc for RT Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds @@ -14,7 +14,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 7 insertions(+) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c -index 7fed1d6dd1a1..b2b11374c663 100644 +index cea6568667c4..c90545667fd6 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -6756,6 +6756,13 @@ int kvm_arch_init(void *opaque) diff --git a/kernel/patches-4.19.x-rt/0091-pci-switchtec-Don-t-use-completion-s-wait-queue.patch b/kernel/patches-4.19.x-rt/0091-pci-switchtec-Don-t-use-completion-s-wait-queue.patch index 4ac307081..0e73ede1d 100644 --- a/kernel/patches-4.19.x-rt/0091-pci-switchtec-Don-t-use-completion-s-wait-queue.patch +++ b/kernel/patches-4.19.x-rt/0091-pci-switchtec-Don-t-use-completion-s-wait-queue.patch @@ -1,7 +1,7 @@ -From 7e0d19b7cfe86f42ae378cdb488c207ad2ff152e Mon Sep 17 00:00:00 2001 +From 99fc3867798d14c5cff8c71c3872af84605d572d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 4 Oct 2017 10:24:23 +0200 -Subject: [PATCH 091/268] pci/switchtec: Don't use completion's wait queue +Subject: [PATCH 091/283] pci/switchtec: Don't use completion's wait queue 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 @@ -23,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c -index 37d0c15c9eeb..c396f3ef1852 100644 +index 72db2e0ebced..77d4fb86d05b 100644 --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c @@ -43,10 +43,11 @@ struct switchtec_user { diff --git a/kernel/patches-4.19.x-rt/0092-wait.h-include-atomic.h.patch b/kernel/patches-4.19.x-rt/0092-wait.h-include-atomic.h.patch index 773e177e3..0d975c37a 100644 --- a/kernel/patches-4.19.x-rt/0092-wait.h-include-atomic.h.patch +++ b/kernel/patches-4.19.x-rt/0092-wait.h-include-atomic.h.patch @@ -1,7 +1,7 @@ -From f38b5d4083660218919ae8aaf04084ec81984b3f Mon Sep 17 00:00:00 2001 +From 88037fc07062d469557427c97507d3f95d7ca3a6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 28 Oct 2013 12:19:57 +0100 -Subject: [PATCH 092/268] wait.h: include atomic.h +Subject: [PATCH 092/283] wait.h: include atomic.h MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0093-work-simple-Simple-work-queue-implemenation.patch b/kernel/patches-4.19.x-rt/0093-work-simple-Simple-work-queue-implemenation.patch index e1e806353..3489114bc 100644 --- a/kernel/patches-4.19.x-rt/0093-work-simple-Simple-work-queue-implemenation.patch +++ b/kernel/patches-4.19.x-rt/0093-work-simple-Simple-work-queue-implemenation.patch @@ -1,7 +1,7 @@ -From 1f3734247d6d14bcd0adce848f10ed802dbbcacc Mon Sep 17 00:00:00 2001 +From 67478d9c6704de32600fd4363f3853bcdffcf391 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 11 Jul 2014 15:26:11 +0200 -Subject: [PATCH 093/268] work-simple: Simple work queue implemenation +Subject: [PATCH 093/283] work-simple: Simple work queue implemenation Provides a framework for enqueuing callbacks from irq context PREEMPT_RT_FULL safe. The callbacks are executed in kthread context. diff --git a/kernel/patches-4.19.x-rt/0094-work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch b/kernel/patches-4.19.x-rt/0094-work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch index e8cd9182e..92c4a2856 100644 --- a/kernel/patches-4.19.x-rt/0094-work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch +++ b/kernel/patches-4.19.x-rt/0094-work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch @@ -1,7 +1,7 @@ -From 6e00748d2128e6af60b7e37506da39208dc8e0ca Mon Sep 17 00:00:00 2001 +From 147a7822bfe8f027b88fa0ca82ae0d210e57bf34 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 10 Sep 2018 18:00:31 +0200 -Subject: [PATCH 094/268] work-simple: drop a shit statement in +Subject: [PATCH 094/283] work-simple: drop a shit statement in SWORK_EVENT_PENDING Dan Carpenter reported diff --git a/kernel/patches-4.19.x-rt/0095-completion-Use-simple-wait-queues.patch b/kernel/patches-4.19.x-rt/0095-completion-Use-simple-wait-queues.patch index 52fc04e1c..6ef29cbb9 100644 --- a/kernel/patches-4.19.x-rt/0095-completion-Use-simple-wait-queues.patch +++ b/kernel/patches-4.19.x-rt/0095-completion-Use-simple-wait-queues.patch @@ -1,7 +1,7 @@ -From 1ae4e1e50bf83abfe832fb78fab3b4ca6797ee18 Mon Sep 17 00:00:00 2001 +From 334dc78522991ee04c4704a53d24f0009be71172 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 11 Jan 2013 11:23:51 +0100 -Subject: [PATCH 095/268] completion: Use simple wait queues +Subject: [PATCH 095/283] completion: Use simple wait queues Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the diff --git a/kernel/patches-4.19.x-rt/0096-fs-aio-simple-simple-work.patch b/kernel/patches-4.19.x-rt/0096-fs-aio-simple-simple-work.patch index 9ff7c18f7..077962d3e 100644 --- a/kernel/patches-4.19.x-rt/0096-fs-aio-simple-simple-work.patch +++ b/kernel/patches-4.19.x-rt/0096-fs-aio-simple-simple-work.patch @@ -1,7 +1,7 @@ -From 488ed4279b12fb35f1d3e865c60e7c2841807834 Mon Sep 17 00:00:00 2001 +From b576efb7cedb58ffa58242d7b0df24d14063ba0e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 16 Feb 2015 18:49:10 +0100 -Subject: [PATCH 096/268] fs/aio: simple simple work +Subject: [PATCH 096/283] fs/aio: simple simple work |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:768 |in_atomic(): 1, irqs_disabled(): 0, pid: 26, name: rcuos/2 diff --git a/kernel/patches-4.19.x-rt/0097-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch b/kernel/patches-4.19.x-rt/0097-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch index d49c074b3..dc3f70a2c 100644 --- a/kernel/patches-4.19.x-rt/0097-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch +++ b/kernel/patches-4.19.x-rt/0097-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch @@ -1,7 +1,7 @@ -From 46fbd681dc222e3c76385b0421c6663371aa1738 Mon Sep 17 00:00:00 2001 +From bac483c38a96edeadc43fa8dcf03c3e57c41cc62 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 21 Aug 2013 17:48:46 +0200 -Subject: [PATCH 097/268] genirq: Do not invoke the affinity callback via a +Subject: [PATCH 097/283] genirq: Do not invoke the affinity callback via a workqueue on RT Joe Korty reported, that __irq_set_affinity_locked() schedules a diff --git a/kernel/patches-4.19.x-rt/0098-time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch b/kernel/patches-4.19.x-rt/0098-time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch index d4a26a11f..0e1a7aaa2 100644 --- a/kernel/patches-4.19.x-rt/0098-time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch +++ b/kernel/patches-4.19.x-rt/0098-time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch @@ -1,7 +1,7 @@ -From c9994c24a20393e9dc9af05bf1859a0a81aeebba Mon Sep 17 00:00:00 2001 +From 7ada38687fe4d4f0ff8b7390d1588f7fed28a28d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 15 Nov 2017 17:29:51 +0100 -Subject: [PATCH 098/268] time/hrtimer: avoid schedule_work() with interrupts +Subject: [PATCH 098/283] time/hrtimer: avoid schedule_work() with interrupts disabled The NOHZ code tries to schedule a workqueue with interrupts disabled. diff --git a/kernel/patches-4.19.x-rt/0099-hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch b/kernel/patches-4.19.x-rt/0099-hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch index 8ae34da50..b63eb5494 100644 --- a/kernel/patches-4.19.x-rt/0099-hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch +++ b/kernel/patches-4.19.x-rt/0099-hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch @@ -1,7 +1,7 @@ -From 7a13f46fcc126f6aa31e1b203a33cb8ba7b17c2e Mon Sep 17 00:00:00 2001 +From 2decd81945344204be663182b0eac46997f297b2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 11:25:41 +0200 -Subject: [PATCH 099/268] hrtimer: consolidate hrtimer_init() + +Subject: [PATCH 099/283] hrtimer: consolidate hrtimer_init() + hrtimer_init_sleeper() calls hrtimer_init_sleeper() calls require a prior initialisation of the @@ -27,10 +27,10 @@ Signed-off-by: Anna-Maria Gleixner 7 files changed, 67 insertions(+), 34 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c -index 4e563ee462cb..fa984527b1ae 100644 +index 70d839b9c3b0..e3e7a88e03a6 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -3126,10 +3126,9 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, +@@ -3128,10 +3128,9 @@ static bool blk_mq_poll_hybrid_sleep(struct request_queue *q, kt = nsecs; mode = HRTIMER_MODE_REL; diff --git a/kernel/patches-4.19.x-rt/0100-hrtimers-Prepare-full-preemption.patch b/kernel/patches-4.19.x-rt/0100-hrtimers-Prepare-full-preemption.patch index 44bf2996e..911522b9c 100644 --- a/kernel/patches-4.19.x-rt/0100-hrtimers-Prepare-full-preemption.patch +++ b/kernel/patches-4.19.x-rt/0100-hrtimers-Prepare-full-preemption.patch @@ -1,7 +1,7 @@ -From 33ca6a98e6b332e1e52099b27151e7672af6516b Mon Sep 17 00:00:00 2001 +From 15ee476637495474369f2b444a8ae5c041e59ed4 Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 -Subject: [PATCH 100/268] hrtimers: Prepare full preemption +Subject: [PATCH 100/283] hrtimers: Prepare full preemption Make cancellation of a running callback in softirq context safe against preemption. diff --git a/kernel/patches-4.19.x-rt/0101-hrtimer-by-timers-by-default-into-the-softirq-contex.patch b/kernel/patches-4.19.x-rt/0101-hrtimer-by-timers-by-default-into-the-softirq-contex.patch index 66837d925..457b6f33a 100644 --- a/kernel/patches-4.19.x-rt/0101-hrtimer-by-timers-by-default-into-the-softirq-contex.patch +++ b/kernel/patches-4.19.x-rt/0101-hrtimer-by-timers-by-default-into-the-softirq-contex.patch @@ -1,7 +1,7 @@ -From d064ab26bcb4da0b801921c6b1115d344abb9496 Mon Sep 17 00:00:00 2001 +From da6822e02b92c82126e1e2ef3846912c9874b024 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 3 Jul 2009 08:44:31 -0500 -Subject: [PATCH 101/268] hrtimer: by timers by default into the softirq +Subject: [PATCH 101/283] hrtimer: by timers by default into the softirq context We can't have hrtimers callbacks running in hardirq context on RT. Therefore @@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior 11 files changed, 37 insertions(+), 14 deletions(-) diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c -index cba414db14cb..e4e4147daa93 100644 +index 031bd7f91f98..4b2a399f1df5 100644 --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c @@ -2252,7 +2252,7 @@ int kvm_create_lapic(struct kvm_vcpu *vcpu) diff --git a/kernel/patches-4.19.x-rt/0102-sched-fair-Make-the-hrtimers-non-hard-again.patch b/kernel/patches-4.19.x-rt/0102-sched-fair-Make-the-hrtimers-non-hard-again.patch index f980ebd03..fea1dfbea 100644 --- a/kernel/patches-4.19.x-rt/0102-sched-fair-Make-the-hrtimers-non-hard-again.patch +++ b/kernel/patches-4.19.x-rt/0102-sched-fair-Make-the-hrtimers-non-hard-again.patch @@ -1,7 +1,7 @@ -From 2aa3a8a817b84f4145d811fa84365a6249b7472f Mon Sep 17 00:00:00 2001 +From bccc05d43b6e3443288909080b555413b80fe36a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 8 Jan 2019 12:31:06 +0100 -Subject: [PATCH 102/268] sched/fair: Make the hrtimers non-hard again +Subject: [PATCH 102/283] sched/fair: Make the hrtimers non-hard again Since commit "sched/fair: Robustify CFS-bandwidth timer locking" both hrtimer can run in softirq context because now interrupts are disabled diff --git a/kernel/patches-4.19.x-rt/0103-hrtimer-Move-schedule_work-call-to-helper-thread.patch b/kernel/patches-4.19.x-rt/0103-hrtimer-Move-schedule_work-call-to-helper-thread.patch index 430984cb2..ce5b11097 100644 --- a/kernel/patches-4.19.x-rt/0103-hrtimer-Move-schedule_work-call-to-helper-thread.patch +++ b/kernel/patches-4.19.x-rt/0103-hrtimer-Move-schedule_work-call-to-helper-thread.patch @@ -1,7 +1,7 @@ -From 0f08536dde0688190121bf0856a78c26227c0aeb Mon Sep 17 00:00:00 2001 +From 73842c09ad741a2814a0df56dccd630cbd503cf9 Mon Sep 17 00:00:00 2001 From: Yang Shi Date: Mon, 16 Sep 2013 14:09:19 -0700 -Subject: [PATCH 103/268] hrtimer: Move schedule_work call to helper thread +Subject: [PATCH 103/283] hrtimer: Move schedule_work call to helper thread When run ltp leapsec_timer test, the following call trace is caught: diff --git a/kernel/patches-4.19.x-rt/0104-hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch b/kernel/patches-4.19.x-rt/0104-hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch index c4502258e..ac1c935b7 100644 --- a/kernel/patches-4.19.x-rt/0104-hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch +++ b/kernel/patches-4.19.x-rt/0104-hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch @@ -1,7 +1,7 @@ -From 9a8c2b871dbfc84555fccac1a07f73733462045b Mon Sep 17 00:00:00 2001 +From f9cb7c14dad693481c5b5dfea9223e1904a63a09 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 6 Dec 2018 10:15:13 +0100 -Subject: [PATCH 104/268] hrtimer: move state change before hrtimer_cancel in +Subject: [PATCH 104/283] hrtimer: move state change before hrtimer_cancel in do_nanosleep() There is a small window between setting t->task to NULL and waking the diff --git a/kernel/patches-4.19.x-rt/0105-posix-timers-Thread-posix-cpu-timers-on-rt.patch b/kernel/patches-4.19.x-rt/0105-posix-timers-Thread-posix-cpu-timers-on-rt.patch index 68e56ed44..67bf0e77a 100644 --- a/kernel/patches-4.19.x-rt/0105-posix-timers-Thread-posix-cpu-timers-on-rt.patch +++ b/kernel/patches-4.19.x-rt/0105-posix-timers-Thread-posix-cpu-timers-on-rt.patch @@ -1,7 +1,7 @@ -From 57f8b04f189ae0ed6d736994fb38f3ea540c2f4b Mon Sep 17 00:00:00 2001 +From f7d44ae1ff53ff9277b2207c7987b8ffa0a65738 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Fri, 3 Jul 2009 08:29:58 -0500 -Subject: [PATCH 105/268] posix-timers: Thread posix-cpu-timers on -rt +Subject: [PATCH 105/283] posix-timers: Thread posix-cpu-timers on -rt posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. diff --git a/kernel/patches-4.19.x-rt/0106-sched-Move-task_struct-cleanup-to-RCU.patch b/kernel/patches-4.19.x-rt/0106-sched-Move-task_struct-cleanup-to-RCU.patch index 453d85ca2..ef4420fbe 100644 --- a/kernel/patches-4.19.x-rt/0106-sched-Move-task_struct-cleanup-to-RCU.patch +++ b/kernel/patches-4.19.x-rt/0106-sched-Move-task_struct-cleanup-to-RCU.patch @@ -1,7 +1,7 @@ -From 581d1c64f3bb23b8270f64380ef672cd0eeed527 Mon Sep 17 00:00:00 2001 +From bc6dc2730e93dec5ead183a44781b5c8bf47b3d7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 31 May 2011 16:59:16 +0200 -Subject: [PATCH 106/268] sched: Move task_struct cleanup to RCU +Subject: [PATCH 106/283] sched: Move task_struct cleanup to RCU __put_task_struct() does quite some expensive work. We don't want to burden random tasks with that. diff --git a/kernel/patches-4.19.x-rt/0107-sched-Limit-the-number-of-task-migrations-per-batch.patch b/kernel/patches-4.19.x-rt/0107-sched-Limit-the-number-of-task-migrations-per-batch.patch index 6bbf4f996..714f63d5c 100644 --- a/kernel/patches-4.19.x-rt/0107-sched-Limit-the-number-of-task-migrations-per-batch.patch +++ b/kernel/patches-4.19.x-rt/0107-sched-Limit-the-number-of-task-migrations-per-batch.patch @@ -1,7 +1,7 @@ -From 673aef2016b9f06dbf3ca839d06d1ca5d38fe883 Mon Sep 17 00:00:00 2001 +From 5e09842f9bc61a1babc80804a7c2e003b56989c3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 6 Jun 2011 12:12:51 +0200 -Subject: [PATCH 107/268] sched: Limit the number of task migrations per batch +Subject: [PATCH 107/283] sched: Limit the number of task migrations per batch Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. diff --git a/kernel/patches-4.19.x-rt/0108-sched-Move-mmdrop-to-RCU-on-RT.patch b/kernel/patches-4.19.x-rt/0108-sched-Move-mmdrop-to-RCU-on-RT.patch index 679f1519c..88af0a54d 100644 --- a/kernel/patches-4.19.x-rt/0108-sched-Move-mmdrop-to-RCU-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0108-sched-Move-mmdrop-to-RCU-on-RT.patch @@ -1,7 +1,7 @@ -From feffa6aee3aaca77452731da0452ebbd27e28d5e Mon Sep 17 00:00:00 2001 +From a07363220fb1b9eb6ed3a28d5eef11e4b95f6170 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 6 Jun 2011 12:20:33 +0200 -Subject: [PATCH 108/268] sched: Move mmdrop to RCU on RT +Subject: [PATCH 108/283] sched: Move mmdrop to RCU on RT Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. @@ -37,7 +37,7 @@ index 5ed8f6292a53..f430cf0a377e 100644 atomic_long_t hugetlb_usage; #endif diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h -index cebb79fe2c72..6e578905e4ec 100644 +index 0d10b7ce0da7..b6758c6fffbf 100644 --- a/include/linux/sched/mm.h +++ b/include/linux/sched/mm.h @@ -49,6 +49,17 @@ static inline void mmdrop(struct mm_struct *mm) diff --git a/kernel/patches-4.19.x-rt/0109-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/kernel/patches-4.19.x-rt/0109-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch index 5b5dbda34..e173edf85 100644 --- a/kernel/patches-4.19.x-rt/0109-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch +++ b/kernel/patches-4.19.x-rt/0109-kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch @@ -1,7 +1,7 @@ -From a113d3ac7f8347ca2f05072f50d5d98307f03833 Mon Sep 17 00:00:00 2001 +From fcd92c128f39749e17ad0c95cf7154f14f3b575a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 21 Nov 2016 19:31:08 +0100 -Subject: [PATCH 109/268] kernel/sched: move stack + kprobe clean up to +Subject: [PATCH 109/283] kernel/sched: move stack + kprobe clean up to __put_task_struct() There is no need to free the stack before the task struct (except for reasons diff --git a/kernel/patches-4.19.x-rt/0110-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch b/kernel/patches-4.19.x-rt/0110-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch index 30ebbff41..1bb313334 100644 --- a/kernel/patches-4.19.x-rt/0110-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch +++ b/kernel/patches-4.19.x-rt/0110-sched-Add-saved_state-for-tasks-blocked-on-sleeping-.patch @@ -1,7 +1,7 @@ -From 7f463ba82dfb810763df6caed8502b90e9c587c5 Mon Sep 17 00:00:00 2001 +From 1b7fcb7ee765eafbf39fa9f1427f38370c00eff3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 25 Jun 2011 09:21:04 +0200 -Subject: [PATCH 110/268] sched: Add saved_state for tasks blocked on sleeping +Subject: [PATCH 110/283] sched: Add saved_state for tasks blocked on sleeping locks Spinlocks are state preserving in !RT. RT changes the state when a diff --git a/kernel/patches-4.19.x-rt/0111-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch b/kernel/patches-4.19.x-rt/0111-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch index 720edd546..58a963410 100644 --- a/kernel/patches-4.19.x-rt/0111-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch +++ b/kernel/patches-4.19.x-rt/0111-sched-Do-not-account-rcu_preempt_depth-on-RT-in-migh.patch @@ -1,7 +1,7 @@ -From 6ebb53ba7f0d4bdcd9b6ff936f018aa66e8963fb Mon Sep 17 00:00:00 2001 +From 833fc1aa92cf522d59c1a02d410198e8ba4d1832 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 7 Jun 2011 09:19:06 +0200 -Subject: [PATCH 111/268] sched: Do not account rcu_preempt_depth on RT in +Subject: [PATCH 111/283] sched: Do not account rcu_preempt_depth on RT in might_sleep() RT changes the rcu_preempt_depth semantics, so we cannot check for it diff --git a/kernel/patches-4.19.x-rt/0112-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch b/kernel/patches-4.19.x-rt/0112-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch index 40d1da920..8bb210d42 100644 --- a/kernel/patches-4.19.x-rt/0112-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch +++ b/kernel/patches-4.19.x-rt/0112-sched-Use-the-proper-LOCK_OFFSET-for-cond_resched.patch @@ -1,7 +1,7 @@ -From a8e4e323368bb9fcc7b3c14664411438fb641578 Mon Sep 17 00:00:00 2001 +From be9eeaeabb9966cc740ca075b3bbffe54b2506a4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:51:33 +0200 -Subject: [PATCH 112/268] sched: Use the proper LOCK_OFFSET for cond_resched() +Subject: [PATCH 112/283] sched: Use the proper LOCK_OFFSET for cond_resched() RT does not increment preempt count when a 'sleeping' spinlock is locked. Update PREEMPT_LOCK_OFFSET for that case. diff --git a/kernel/patches-4.19.x-rt/0113-sched-Disable-TTWU_QUEUE-on-RT.patch b/kernel/patches-4.19.x-rt/0113-sched-Disable-TTWU_QUEUE-on-RT.patch index 5d5839f69..ace574056 100644 --- a/kernel/patches-4.19.x-rt/0113-sched-Disable-TTWU_QUEUE-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0113-sched-Disable-TTWU_QUEUE-on-RT.patch @@ -1,7 +1,7 @@ -From a443b3530e4b114f3a1cfa5c3918f7157b0ad169 Mon Sep 17 00:00:00 2001 +From a6ae12a40e837ece98c723e624820e41421b70a0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 13 Sep 2011 16:42:35 +0200 -Subject: [PATCH 113/268] sched: Disable TTWU_QUEUE on RT +Subject: [PATCH 113/283] sched: Disable TTWU_QUEUE on RT 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/kernel/patches-4.19.x-rt/0114-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch b/kernel/patches-4.19.x-rt/0114-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch index a735c587a..86dc7f63c 100644 --- a/kernel/patches-4.19.x-rt/0114-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch +++ b/kernel/patches-4.19.x-rt/0114-sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch @@ -1,7 +1,7 @@ -From dfc2626360c00270806603e89a95316ece262a01 Mon Sep 17 00:00:00 2001 +From 4ad0a976dcfe34e35355f20f464dd7eb08dd38e5 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 18 Mar 2013 15:12:49 -0400 -Subject: [PATCH 114/268] sched/workqueue: Only wake up idle workers if not +Subject: [PATCH 114/283] sched/workqueue: Only wake up idle workers if not blocked on sleeping spin lock In -rt, most spin_locks() turn into mutexes. One of these spin_lock diff --git a/kernel/patches-4.19.x-rt/0115-rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch b/kernel/patches-4.19.x-rt/0115-rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch index dc4580011..3af1e3ecd 100644 --- a/kernel/patches-4.19.x-rt/0115-rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch +++ b/kernel/patches-4.19.x-rt/0115-rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch @@ -1,7 +1,7 @@ -From e325e8bf70d1919c09b47af2880b2eccdda59e9d Mon Sep 17 00:00:00 2001 +From 807cb05d929f39b81b980b673d69ea33c6473b96 Mon Sep 17 00:00:00 2001 From: Daniel Bristot de Oliveira Date: Mon, 26 Jun 2017 17:07:15 +0200 -Subject: [PATCH 115/268] rt: Increase/decrease the nr of migratory tasks when +Subject: [PATCH 115/283] rt: Increase/decrease the nr of migratory tasks when enabling/disabling migration There is a problem in the migrate_disable()/enable() implementation diff --git a/kernel/patches-4.19.x-rt/0116-hotplug-Lightweight-get-online-cpus.patch b/kernel/patches-4.19.x-rt/0116-hotplug-Lightweight-get-online-cpus.patch index 028bd1054..9ba8924e0 100644 --- a/kernel/patches-4.19.x-rt/0116-hotplug-Lightweight-get-online-cpus.patch +++ b/kernel/patches-4.19.x-rt/0116-hotplug-Lightweight-get-online-cpus.patch @@ -1,7 +1,7 @@ -From 56c3100fe3a1b4a512d394b5c851473ac95bad3b Mon Sep 17 00:00:00 2001 +From 6c5886f66d8a616f3294c2fd8ca26b4c638e430b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 15 Jun 2011 12:36:06 +0200 -Subject: [PATCH 116/268] hotplug: Lightweight get online cpus +Subject: [PATCH 116/283] hotplug: Lightweight get online cpus get_online_cpus() is a heavy weight function which involves a global mutex. migrate_disable() wants a simpler construct which prevents only @@ -42,7 +42,7 @@ index 006f69f9277b..d45ea5c98cdd 100644 /* Wrappers which go away once all code is converted */ diff --git a/kernel/cpu.c b/kernel/cpu.c -index 5d65eae893bd..e1efb98a56de 100644 +index 46aefe5c0e35..9001e1779325 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -281,6 +281,21 @@ static int cpu_hotplug_disabled; diff --git a/kernel/patches-4.19.x-rt/0117-trace-Add-migrate-disabled-counter-to-tracing-output.patch b/kernel/patches-4.19.x-rt/0117-trace-Add-migrate-disabled-counter-to-tracing-output.patch index 16da2c950..19a6ad264 100644 --- a/kernel/patches-4.19.x-rt/0117-trace-Add-migrate-disabled-counter-to-tracing-output.patch +++ b/kernel/patches-4.19.x-rt/0117-trace-Add-migrate-disabled-counter-to-tracing-output.patch @@ -1,7 +1,7 @@ -From 0add084e2fc599e34a02b6d87f1657895c25bac2 Mon Sep 17 00:00:00 2001 +From cea179e4bc61a9548573e2f5ece3e78b976c35eb Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:56:42 +0200 -Subject: [PATCH 117/268] trace: Add migrate-disabled counter to tracing output +Subject: [PATCH 117/283] trace: Add migrate-disabled counter to tracing output Signed-off-by: Thomas Gleixner --- @@ -25,7 +25,7 @@ index 78a010e19ed4..0403d9696944 100644 #define TRACE_EVENT_TYPE_MAX \ diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 1bd7a758583b..10843c80cffb 100644 +index 3b0de19b9ed7..496c5d358010 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2149,6 +2149,8 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, diff --git a/kernel/patches-4.19.x-rt/0118-lockdep-Make-it-RT-aware.patch b/kernel/patches-4.19.x-rt/0118-lockdep-Make-it-RT-aware.patch index 0e47b83e1..8862d371d 100644 --- a/kernel/patches-4.19.x-rt/0118-lockdep-Make-it-RT-aware.patch +++ b/kernel/patches-4.19.x-rt/0118-lockdep-Make-it-RT-aware.patch @@ -1,7 +1,7 @@ -From 3b768b5a33bd0ddea3c1eb9523a725be70d798a3 Mon Sep 17 00:00:00 2001 +From d2810fd8e650b96863a15b748cf385698ecde121 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 18:51:23 +0200 -Subject: [PATCH 118/268] lockdep: Make it RT aware +Subject: [PATCH 118/283] lockdep: Make it RT aware teach lockdep that we don't really do softirqs on -RT. diff --git a/kernel/patches-4.19.x-rt/0119-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch b/kernel/patches-4.19.x-rt/0119-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch index 7b6a1dfa0..a80369cfa 100644 --- a/kernel/patches-4.19.x-rt/0119-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch +++ b/kernel/patches-4.19.x-rt/0119-tasklet-Prevent-tasklets-from-going-into-infinite-sp.patch @@ -1,7 +1,7 @@ -From 6929ef433a0ceeecc81b41d3cedf4008023ebec7 Mon Sep 17 00:00:00 2001 +From bb78f12d34959257b4413ff817644ce7477a93cd Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Tue, 29 Nov 2011 20:18:22 -0500 -Subject: [PATCH 119/268] tasklet: Prevent tasklets from going into infinite +Subject: [PATCH 119/283] tasklet: Prevent tasklets from going into infinite spin in RT When CONFIG_PREEMPT_RT_FULL is enabled, tasklets run as threads, diff --git a/kernel/patches-4.19.x-rt/0120-softirq-Check-preemption-after-reenabling-interrupts.patch b/kernel/patches-4.19.x-rt/0120-softirq-Check-preemption-after-reenabling-interrupts.patch index 50022f507..5f8408cc5 100644 --- a/kernel/patches-4.19.x-rt/0120-softirq-Check-preemption-after-reenabling-interrupts.patch +++ b/kernel/patches-4.19.x-rt/0120-softirq-Check-preemption-after-reenabling-interrupts.patch @@ -1,7 +1,7 @@ -From fc9facec00715571d089cdefb406c72a8b05e8a3 Mon Sep 17 00:00:00 2001 +From 573f3d4984a2aa2239e4e28c0df1dc28517397d2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 13 Nov 2011 17:17:09 +0100 -Subject: [PATCH 120/268] softirq: Check preemption after reenabling interrupts +Subject: [PATCH 120/283] softirq: Check preemption after reenabling interrupts raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, diff --git a/kernel/patches-4.19.x-rt/0121-softirq-Disable-softirq-stacks-for-RT.patch b/kernel/patches-4.19.x-rt/0121-softirq-Disable-softirq-stacks-for-RT.patch index 2c4befc48..0b1735d0f 100644 --- a/kernel/patches-4.19.x-rt/0121-softirq-Disable-softirq-stacks-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0121-softirq-Disable-softirq-stacks-for-RT.patch @@ -1,7 +1,7 @@ -From d77fb7d27741bbe41b0f531f90d2db7a8a88c265 Mon Sep 17 00:00:00 2001 +From ac1ed27a8471e837c8ea8811ca8322f47f47add2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 18 Jul 2011 13:59:17 +0200 -Subject: [PATCH 121/268] softirq: Disable softirq stacks for RT +Subject: [PATCH 121/283] softirq: Disable softirq stacks for RT 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/kernel/patches-4.19.x-rt/0122-softirq-Split-softirq-locks.patch b/kernel/patches-4.19.x-rt/0122-softirq-Split-softirq-locks.patch index 414f76a14..bafab2489 100644 --- a/kernel/patches-4.19.x-rt/0122-softirq-Split-softirq-locks.patch +++ b/kernel/patches-4.19.x-rt/0122-softirq-Split-softirq-locks.patch @@ -1,7 +1,7 @@ -From 3957a5e25779f87d825a2309f3da9084dfacae01 Mon Sep 17 00:00:00 2001 +From 92ea7fb3bb1aa31dbfaa1aa02e6a83b3d5e2e476 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 4 Oct 2012 14:20:47 +0100 -Subject: [PATCH 122/268] softirq: Split softirq locks +Subject: [PATCH 122/283] softirq: Split softirq locks The 3.x RT series removed the split softirq implementation in favour of pushing softirq processing into the context of the thread which diff --git a/kernel/patches-4.19.x-rt/0123-net-core-use-local_bh_disable-in-netif_rx_ni.patch b/kernel/patches-4.19.x-rt/0123-net-core-use-local_bh_disable-in-netif_rx_ni.patch index 4e980a3df..b2d2bc23f 100644 --- a/kernel/patches-4.19.x-rt/0123-net-core-use-local_bh_disable-in-netif_rx_ni.patch +++ b/kernel/patches-4.19.x-rt/0123-net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,7 +1,7 @@ -From 88bee7f8c3b942350cdafe85c78387c056a2d049 Mon Sep 17 00:00:00 2001 +From 05b2969dc9be8c70c6bac548cf956a1d14d905f5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 16 Jun 2017 19:03:16 +0200 -Subject: [PATCH 123/268] net/core: use local_bh_disable() in netif_rx_ni() +Subject: [PATCH 123/283] net/core: use local_bh_disable() in netif_rx_ni() 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/kernel/patches-4.19.x-rt/0124-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch b/kernel/patches-4.19.x-rt/0124-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch index 1b1d9407c..a52680294 100644 --- a/kernel/patches-4.19.x-rt/0124-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch +++ b/kernel/patches-4.19.x-rt/0124-genirq-Allow-disabling-of-softirq-processing-in-irq-.patch @@ -1,7 +1,7 @@ -From b4d0cc11ac3bdc7d27daab0b5481b1587eadd044 Mon Sep 17 00:00:00 2001 +From c1e610ee580a46e958b904e4b2ec3c0d701e08d1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 31 Jan 2012 13:01:27 +0100 -Subject: [PATCH 124/268] genirq: Allow disabling of softirq processing in irq +Subject: [PATCH 124/283] genirq: Allow disabling of softirq processing in irq thread context The processing of softirqs in irq thread context is a performance gain diff --git a/kernel/patches-4.19.x-rt/0125-softirq-split-timer-softirqs-out-of-ksoftirqd.patch b/kernel/patches-4.19.x-rt/0125-softirq-split-timer-softirqs-out-of-ksoftirqd.patch index 7873a517d..4ee3468c5 100644 --- a/kernel/patches-4.19.x-rt/0125-softirq-split-timer-softirqs-out-of-ksoftirqd.patch +++ b/kernel/patches-4.19.x-rt/0125-softirq-split-timer-softirqs-out-of-ksoftirqd.patch @@ -1,7 +1,7 @@ -From a5b5fd887096b76347cf769dae55c87dbef87422 Mon Sep 17 00:00:00 2001 +From 9d4b8d35c23cd7cece2662fa17dea28d39f73e82 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 16:34:17 +0100 -Subject: [PATCH 125/268] softirq: split timer softirqs out of ksoftirqd +Subject: [PATCH 125/283] softirq: split timer softirqs out of ksoftirqd The softirqd runs in -RT with SCHED_FIFO (prio 1) and deals mostly with timer wakeup which can not happen in hardirq context. The prio has been diff --git a/kernel/patches-4.19.x-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-ksof.patch b/kernel/patches-4.19.x-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-ksof.patch index 89d3293c9..9dd004d34 100644 --- a/kernel/patches-4.19.x-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-ksof.patch +++ b/kernel/patches-4.19.x-rt/0126-softirq-Avoid-local_softirq_pending-messages-if-ksof.patch @@ -1,7 +1,7 @@ -From 352ba4a234b354e8dffc9bf8ce2f76159d635c81 Mon Sep 17 00:00:00 2001 +From 75bef693f46a9a3fd05cda70554c004df275c92b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 18 Feb 2019 13:19:59 +0100 -Subject: [PATCH 126/268] softirq: Avoid "local_softirq_pending" messages if +Subject: [PATCH 126/283] softirq: Avoid "local_softirq_pending" messages if ksoftirqd is blocked If the ksoftirqd thread has a softirq pending and is blocked on the diff --git a/kernel/patches-4.19.x-rt/0127-softirq-Avoid-local_softirq_pending-messages-if-task.patch b/kernel/patches-4.19.x-rt/0127-softirq-Avoid-local_softirq_pending-messages-if-task.patch index da75a4682..35daafaf5 100644 --- a/kernel/patches-4.19.x-rt/0127-softirq-Avoid-local_softirq_pending-messages-if-task.patch +++ b/kernel/patches-4.19.x-rt/0127-softirq-Avoid-local_softirq_pending-messages-if-task.patch @@ -1,7 +1,7 @@ -From 9abf3c7d8b43d087c3154991c899d8547e677332 Mon Sep 17 00:00:00 2001 +From fffcebd7dd6c2220fd06db35bffa957b6d4f3de1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 19 Feb 2019 16:49:29 +0100 -Subject: [PATCH 127/268] softirq: Avoid "local_softirq_pending" messages if +Subject: [PATCH 127/283] softirq: Avoid "local_softirq_pending" messages if task is in cpu_chill() If the softirq thread enters cpu_chill() then ->state is UNINTERRUPTIBLE diff --git a/kernel/patches-4.19.x-rt/0128-rtmutex-trylock-is-okay-on-RT.patch b/kernel/patches-4.19.x-rt/0128-rtmutex-trylock-is-okay-on-RT.patch index c68165fab..010d8d4c2 100644 --- a/kernel/patches-4.19.x-rt/0128-rtmutex-trylock-is-okay-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0128-rtmutex-trylock-is-okay-on-RT.patch @@ -1,7 +1,7 @@ -From 9e7dadefc501fae6061a5523691c87e41a02086b Mon Sep 17 00:00:00 2001 +From e35f309a9eb6078f3d09d042b9ebcff7612d9398 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 2 Dec 2015 11:34:07 +0100 -Subject: [PATCH 128/268] rtmutex: trylock is okay on -RT +Subject: [PATCH 128/283] rtmutex: trylock is okay on -RT 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/kernel/patches-4.19.x-rt/0129-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch b/kernel/patches-4.19.x-rt/0129-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch index e8c66a560..9930df52f 100644 --- a/kernel/patches-4.19.x-rt/0129-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch +++ b/kernel/patches-4.19.x-rt/0129-fs-nfs-turn-rmdir_sem-into-a-semaphore.patch @@ -1,7 +1,7 @@ -From 4e0f711dde32659589c68d7bb50274bfdda538cb Mon Sep 17 00:00:00 2001 +From 2755280eb692ac3db15304cb7874d039103cf43f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 15 Sep 2016 10:51:27 +0200 -Subject: [PATCH 129/268] fs/nfs: turn rmdir_sem into a semaphore +Subject: [PATCH 129/283] fs/nfs: turn rmdir_sem into a semaphore 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/kernel/patches-4.19.x-rt/0130-rtmutex-Handle-the-various-new-futex-race-conditions.patch b/kernel/patches-4.19.x-rt/0130-rtmutex-Handle-the-various-new-futex-race-conditions.patch index 723f68420..ec47d6173 100644 --- a/kernel/patches-4.19.x-rt/0130-rtmutex-Handle-the-various-new-futex-race-conditions.patch +++ b/kernel/patches-4.19.x-rt/0130-rtmutex-Handle-the-various-new-futex-race-conditions.patch @@ -1,7 +1,7 @@ -From 1d0178f658356c2001dd5144ac3ab7974d32b872 Mon Sep 17 00:00:00 2001 +From 7130157f0703b4fe45ca427befd9ef0a7f88612f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:04:15 +0200 -Subject: [PATCH 130/268] rtmutex: Handle the various new futex race conditions +Subject: [PATCH 130/283] rtmutex: Handle the various new futex race conditions 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/kernel/patches-4.19.x-rt/0131-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch b/kernel/patches-4.19.x-rt/0131-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch index abd26bacd..f480389e8 100644 --- a/kernel/patches-4.19.x-rt/0131-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch +++ b/kernel/patches-4.19.x-rt/0131-futex-Fix-bug-on-when-a-requeued-RT-task-times-out.patch @@ -1,7 +1,7 @@ -From c3c07a68fab785f20de5eaa7034a2df733074865 Mon Sep 17 00:00:00 2001 +From 7e148d447a1c2abcfba79f0d7cefeeb24350ca70 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 14 Jul 2015 14:26:34 +0200 -Subject: [PATCH 131/268] futex: Fix bug on when a requeued RT task times out +Subject: [PATCH 131/283] futex: Fix bug on when a requeued RT task times out Requeue with timeout causes a bug with PREEMPT_RT_FULL. diff --git a/kernel/patches-4.19.x-rt/0132-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/kernel/patches-4.19.x-rt/0132-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch index 959a43cb8..dc1800a22 100644 --- a/kernel/patches-4.19.x-rt/0132-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch +++ b/kernel/patches-4.19.x-rt/0132-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch @@ -1,7 +1,7 @@ -From eaaf66fa04a418e1d9e6b587eb089e3977b3b7e5 Mon Sep 17 00:00:00 2001 +From aee00b9108ae7ac1108f577b3bbdfd0b34709904 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 1 Mar 2013 11:17:42 +0100 -Subject: [PATCH 132/268] futex: Ensure lock/unlock symetry versus pi_lock and +Subject: [PATCH 132/283] futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock In exit_pi_state_list() we have the following locking construct: diff --git a/kernel/patches-4.19.x-rt/0133-pid.h-include-atomic.h.patch b/kernel/patches-4.19.x-rt/0133-pid.h-include-atomic.h.patch index ca309deaa..e222dd0f4 100644 --- a/kernel/patches-4.19.x-rt/0133-pid.h-include-atomic.h.patch +++ b/kernel/patches-4.19.x-rt/0133-pid.h-include-atomic.h.patch @@ -1,7 +1,7 @@ -From 921ce8878aa0e4f3ab10bf9026cd1129c9055393 Mon Sep 17 00:00:00 2001 +From 6a4de7464f4d9165d37b0649a2b3e15f4cb64385 Mon Sep 17 00:00:00 2001 From: Grygorii Strashko Date: Tue, 21 Jul 2015 19:43:56 +0300 -Subject: [PATCH 133/268] pid.h: include atomic.h +Subject: [PATCH 133/283] pid.h: include atomic.h This patch fixes build error: CC kernel/pid_namespace.o diff --git a/kernel/patches-4.19.x-rt/0134-arm-include-definition-for-cpumask_t.patch b/kernel/patches-4.19.x-rt/0134-arm-include-definition-for-cpumask_t.patch index 2b2e4484e..d4b3db7a7 100644 --- a/kernel/patches-4.19.x-rt/0134-arm-include-definition-for-cpumask_t.patch +++ b/kernel/patches-4.19.x-rt/0134-arm-include-definition-for-cpumask_t.patch @@ -1,7 +1,7 @@ -From 83b8d6b7af22014f1cc6001b8509627485bef74a Mon Sep 17 00:00:00 2001 +From 7a6eaa6b88680cbb1309983cc198a08c1bccacfa Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 22 Dec 2016 17:28:33 +0100 -Subject: [PATCH 134/268] arm: include definition for cpumask_t +Subject: [PATCH 134/283] arm: include definition for cpumask_t 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/kernel/patches-4.19.x-rt/0135-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch b/kernel/patches-4.19.x-rt/0135-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch index 21a205b61..ee1cbc73f 100644 --- a/kernel/patches-4.19.x-rt/0135-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch +++ b/kernel/patches-4.19.x-rt/0135-locking-locktorture-Do-NOT-include-rwlock.h-directly.patch @@ -1,7 +1,7 @@ -From 5f5987421a2880669ee5a3fa75d1435cef7d3118 Mon Sep 17 00:00:00 2001 +From 9043ba063f09071ec009efc5a340864f46b5d660 Mon Sep 17 00:00:00 2001 From: "Wolfgang M. Reimer" Date: Tue, 21 Jul 2015 16:20:07 +0200 -Subject: [PATCH 135/268] locking: locktorture: Do NOT include rwlock.h +Subject: [PATCH 135/283] locking: locktorture: Do NOT include rwlock.h directly Including rwlock.h directly will cause kernel builds to fail diff --git a/kernel/patches-4.19.x-rt/0136-rtmutex-Add-rtmutex_lock_killable.patch b/kernel/patches-4.19.x-rt/0136-rtmutex-Add-rtmutex_lock_killable.patch index 3455460d0..ccbe33ea7 100644 --- a/kernel/patches-4.19.x-rt/0136-rtmutex-Add-rtmutex_lock_killable.patch +++ b/kernel/patches-4.19.x-rt/0136-rtmutex-Add-rtmutex_lock_killable.patch @@ -1,7 +1,7 @@ -From 49e5af76f13c77609d54ea56c3b9e0c51e68d2e7 Mon Sep 17 00:00:00 2001 +From 471f3ddc1d39e94a3bb7b3de877630a7ba33e9ed Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 9 Jun 2011 11:43:52 +0200 -Subject: [PATCH 136/268] rtmutex: Add rtmutex_lock_killable() +Subject: [PATCH 136/283] rtmutex: Add rtmutex_lock_killable() Add "killable" type to rtmutex. We need this since rtmutex are used as "normal" mutexes which do use this type. diff --git a/kernel/patches-4.19.x-rt/0137-rtmutex-Make-lock_killable-work.patch b/kernel/patches-4.19.x-rt/0137-rtmutex-Make-lock_killable-work.patch index b9c48472b..af3b5d82e 100644 --- a/kernel/patches-4.19.x-rt/0137-rtmutex-Make-lock_killable-work.patch +++ b/kernel/patches-4.19.x-rt/0137-rtmutex-Make-lock_killable-work.patch @@ -1,7 +1,7 @@ -From ad096777cd7f279ffd9083c8f410331955d1816a Mon Sep 17 00:00:00 2001 +From f8590dc009d4339ab04d322fbc87a267824eb97f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 1 Apr 2017 12:50:59 +0200 -Subject: [PATCH 137/268] rtmutex: Make lock_killable work +Subject: [PATCH 137/283] rtmutex: Make lock_killable work Locking an rt mutex killable does not work because signal handling is restricted to TASK_INTERRUPTIBLE. diff --git a/kernel/patches-4.19.x-rt/0138-spinlock-Split-the-lock-types-header.patch b/kernel/patches-4.19.x-rt/0138-spinlock-Split-the-lock-types-header.patch index ab7e7b39c..ee0e92654 100644 --- a/kernel/patches-4.19.x-rt/0138-spinlock-Split-the-lock-types-header.patch +++ b/kernel/patches-4.19.x-rt/0138-spinlock-Split-the-lock-types-header.patch @@ -1,7 +1,7 @@ -From a963738794f761dbf9138b2bce910ddc33d8f750 Mon Sep 17 00:00:00 2001 +From 2211e897694e1560a1b5b5e552c2321e131dacc3 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:34:01 +0200 -Subject: [PATCH 138/268] spinlock: Split the lock types header +Subject: [PATCH 138/283] spinlock: Split the lock types header 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/kernel/patches-4.19.x-rt/0139-rtmutex-Avoid-include-hell.patch b/kernel/patches-4.19.x-rt/0139-rtmutex-Avoid-include-hell.patch index b8e9080a1..4f304dae9 100644 --- a/kernel/patches-4.19.x-rt/0139-rtmutex-Avoid-include-hell.patch +++ b/kernel/patches-4.19.x-rt/0139-rtmutex-Avoid-include-hell.patch @@ -1,7 +1,7 @@ -From 750ec04c4e7ab26c993aa398b5ce6a282d6e9f31 Mon Sep 17 00:00:00 2001 +From eac9084f86148510c6c67ed209d33fcb15fb8b94 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:06:39 +0200 -Subject: [PATCH 139/268] rtmutex: Avoid include hell +Subject: [PATCH 139/283] rtmutex: Avoid include hell 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/kernel/patches-4.19.x-rt/0140-rbtree-don-t-include-the-rcu-header.patch b/kernel/patches-4.19.x-rt/0140-rbtree-don-t-include-the-rcu-header.patch index 6d29940e9..3b10ccc02 100644 --- a/kernel/patches-4.19.x-rt/0140-rbtree-don-t-include-the-rcu-header.patch +++ b/kernel/patches-4.19.x-rt/0140-rbtree-don-t-include-the-rcu-header.patch @@ -1,7 +1,7 @@ -From d1b0b3ad3b5dd89c0ec4ca6abffc706b47d60305 Mon Sep 17 00:00:00 2001 +From ac40e3b4806fe59befb8c9387e7bb317a560cd9a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Feb 2019 16:56:02 +0100 -Subject: [PATCH 140/268] rbtree: don't include the rcu header +Subject: [PATCH 140/283] rbtree: don't include the rcu header MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0141-rtmutex-Provide-rt_mutex_slowlock_locked.patch b/kernel/patches-4.19.x-rt/0141-rtmutex-Provide-rt_mutex_slowlock_locked.patch index bef16f85a..e3456f637 100644 --- a/kernel/patches-4.19.x-rt/0141-rtmutex-Provide-rt_mutex_slowlock_locked.patch +++ b/kernel/patches-4.19.x-rt/0141-rtmutex-Provide-rt_mutex_slowlock_locked.patch @@ -1,7 +1,7 @@ -From 827993141f8e1aad6255a651f570a2e77b2649aa Mon Sep 17 00:00:00 2001 +From 701e93b4c6964c05cec92d9611c50dc83a6b6b9b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:14:22 +0200 -Subject: [PATCH 141/268] rtmutex: Provide rt_mutex_slowlock_locked() +Subject: [PATCH 141/283] rtmutex: Provide rt_mutex_slowlock_locked() This is the inner-part of rt_mutex_slowlock(), required for rwsem-rt. diff --git a/kernel/patches-4.19.x-rt/0142-rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch b/kernel/patches-4.19.x-rt/0142-rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch index afd064e2a..4c2db5da6 100644 --- a/kernel/patches-4.19.x-rt/0142-rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch +++ b/kernel/patches-4.19.x-rt/0142-rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch @@ -1,7 +1,7 @@ -From b3ba05bf82300eb35078a61e5e33a1c12c9b8e6f Mon Sep 17 00:00:00 2001 +From 8bd2090cb448193446dee9a6a7fb661e89263f46 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:36:39 +0200 -Subject: [PATCH 142/268] rtmutex: export lockdep-less version of rt_mutex's +Subject: [PATCH 142/283] rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock Required for lock implementation ontop of rtmutex. diff --git a/kernel/patches-4.19.x-rt/0143-rtmutex-add-sleeping-lock-implementation.patch b/kernel/patches-4.19.x-rt/0143-rtmutex-add-sleeping-lock-implementation.patch index b5570d37e..72f929a28 100644 --- a/kernel/patches-4.19.x-rt/0143-rtmutex-add-sleeping-lock-implementation.patch +++ b/kernel/patches-4.19.x-rt/0143-rtmutex-add-sleeping-lock-implementation.patch @@ -1,7 +1,7 @@ -From cfc52d28d5405bb2efe7c9d06ebc5920852245ad Mon Sep 17 00:00:00 2001 +From 966d9bcd54442c2ae5dd15f89a908539d6ad7137 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:11:19 +0200 -Subject: [PATCH 143/268] rtmutex: add sleeping lock implementation +Subject: [PATCH 143/283] rtmutex: add sleeping lock implementation Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/kernel/patches-4.19.x-rt/0144-rtmutex-add-mutex-implementation-based-on-rtmutex.patch b/kernel/patches-4.19.x-rt/0144-rtmutex-add-mutex-implementation-based-on-rtmutex.patch index 96298795f..5f384c3db 100644 --- a/kernel/patches-4.19.x-rt/0144-rtmutex-add-mutex-implementation-based-on-rtmutex.patch +++ b/kernel/patches-4.19.x-rt/0144-rtmutex-add-mutex-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ -From 3f4998a83b09b0003d56f8f6a9932bcdc38ddfa9 Mon Sep 17 00:00:00 2001 +From b589ab9fd5ba3e54255590659660a6c0beecdc4b Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:17:03 +0200 -Subject: [PATCH 144/268] rtmutex: add mutex implementation based on rtmutex +Subject: [PATCH 144/283] rtmutex: add mutex implementation based on rtmutex Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/kernel/patches-4.19.x-rt/0145-rtmutex-add-rwsem-implementation-based-on-rtmutex.patch b/kernel/patches-4.19.x-rt/0145-rtmutex-add-rwsem-implementation-based-on-rtmutex.patch index d83658936..d0cba75dc 100644 --- a/kernel/patches-4.19.x-rt/0145-rtmutex-add-rwsem-implementation-based-on-rtmutex.patch +++ b/kernel/patches-4.19.x-rt/0145-rtmutex-add-rwsem-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ -From 7db979724ca86664b3bc0b4448eb05fcc06eb226 Mon Sep 17 00:00:00 2001 +From 5b491c8328f76502a2285229fd224ec7116dfed7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:28:34 +0200 -Subject: [PATCH 145/268] rtmutex: add rwsem implementation based on rtmutex +Subject: [PATCH 145/283] rtmutex: add rwsem implementation based on rtmutex 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/kernel/patches-4.19.x-rt/0146-rtmutex-add-rwlock-implementation-based-on-rtmutex.patch b/kernel/patches-4.19.x-rt/0146-rtmutex-add-rwlock-implementation-based-on-rtmutex.patch index f98b8109a..ee0656e98 100644 --- a/kernel/patches-4.19.x-rt/0146-rtmutex-add-rwlock-implementation-based-on-rtmutex.patch +++ b/kernel/patches-4.19.x-rt/0146-rtmutex-add-rwlock-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ -From 4902321bc0e6616144d8a98ddadff7f48f0ecebc Mon Sep 17 00:00:00 2001 +From 0ac4d3a8d1b2e6effaea2997c80bb3583d3f6a12 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:18:06 +0200 -Subject: [PATCH 146/268] rtmutex: add rwlock implementation based on rtmutex +Subject: [PATCH 146/283] rtmutex: add rwlock implementation based on rtmutex The implementation is bias-based, similar to the rwsem implementation. diff --git a/kernel/patches-4.19.x-rt/0147-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch b/kernel/patches-4.19.x-rt/0147-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch index 069804916..da6363262 100644 --- a/kernel/patches-4.19.x-rt/0147-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch +++ b/kernel/patches-4.19.x-rt/0147-rtmutex-rwlock-preserve-state-like-a-sleeping-lock.patch @@ -1,7 +1,7 @@ -From 647b6c69a2a6ddfeb44274f9e73f00ceebc3abff Mon Sep 17 00:00:00 2001 +From fa17e8511d2f284ca4d1bebe5744ec1e41ce1803 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 11 Jan 2019 21:16:31 +0100 -Subject: [PATCH 147/268] rtmutex/rwlock: preserve state like a sleeping lock +Subject: [PATCH 147/283] rtmutex/rwlock: preserve state like a sleeping lock The rwlock is spinning while acquiring a lock. Therefore it must become a sleeping lock on RT and preserve its task state while sleeping and diff --git a/kernel/patches-4.19.x-rt/0148-rtmutex-wire-up-RT-s-locking.patch b/kernel/patches-4.19.x-rt/0148-rtmutex-wire-up-RT-s-locking.patch index f2f76ecb3..0a08b39fe 100644 --- a/kernel/patches-4.19.x-rt/0148-rtmutex-wire-up-RT-s-locking.patch +++ b/kernel/patches-4.19.x-rt/0148-rtmutex-wire-up-RT-s-locking.patch @@ -1,7 +1,7 @@ -From 36b9c9892b97509dee373fb324375d3c91b057b3 Mon Sep 17 00:00:00 2001 +From c3de22b64c9e40a638fd521cbfb87285e475d2ee Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:31:14 +0200 -Subject: [PATCH 148/268] rtmutex: wire up RT's locking +Subject: [PATCH 148/283] rtmutex: wire up RT's locking Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/kernel/patches-4.19.x-rt/0149-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch b/kernel/patches-4.19.x-rt/0149-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch index 5420e9870..16d561761 100644 --- a/kernel/patches-4.19.x-rt/0149-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch +++ b/kernel/patches-4.19.x-rt/0149-rtmutex-add-ww_mutex-addon-for-mutex-rt.patch @@ -1,7 +1,7 @@ -From 587ca9ed2107d61e00da8de96a3e9b978ebc3841 Mon Sep 17 00:00:00 2001 +From a0132c114d821b81d4e4104b797f76f0dd8fbcba Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 17:34:38 +0200 -Subject: [PATCH 149/268] rtmutex: add ww_mutex addon for mutex-rt +Subject: [PATCH 149/283] rtmutex: add ww_mutex addon for mutex-rt Signed-off-by: Sebastian Andrzej Siewior --- diff --git a/kernel/patches-4.19.x-rt/0150-kconfig-Add-PREEMPT_RT_FULL.patch b/kernel/patches-4.19.x-rt/0150-kconfig-Add-PREEMPT_RT_FULL.patch index eef706c9e..2707268ae 100644 --- a/kernel/patches-4.19.x-rt/0150-kconfig-Add-PREEMPT_RT_FULL.patch +++ b/kernel/patches-4.19.x-rt/0150-kconfig-Add-PREEMPT_RT_FULL.patch @@ -1,7 +1,7 @@ -From 0714c0e1fc16782acb7f0db5ae6f50d6b30ec26f Mon Sep 17 00:00:00 2001 +From b0a0152ae5fe9de88c2b10c9e213ab1d10459876 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 29 Jun 2011 14:58:57 +0200 -Subject: [PATCH 150/268] kconfig: Add PREEMPT_RT_FULL +Subject: [PATCH 150/283] kconfig: Add PREEMPT_RT_FULL Introduce the final symbol for PREEMPT_RT_FULL. diff --git a/kernel/patches-4.19.x-rt/0151-locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch b/kernel/patches-4.19.x-rt/0151-locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch index 6b422085c..f6eb3d2f7 100644 --- a/kernel/patches-4.19.x-rt/0151-locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch +++ b/kernel/patches-4.19.x-rt/0151-locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch @@ -1,7 +1,7 @@ -From 4cd478418b45517f4dfd003715b1b3af02880d5a Mon Sep 17 00:00:00 2001 +From bb6f7fcdf67a3a410b786714d43f24dde243ff4e Mon Sep 17 00:00:00 2001 From: Mikulas Patocka Date: Mon, 13 Nov 2017 12:56:53 -0500 -Subject: [PATCH 151/268] locking/rt-mutex: fix deadlock in device mapper / +Subject: [PATCH 151/283] locking/rt-mutex: fix deadlock in device mapper / block-IO When some block device driver creates a bio and submits it to another diff --git a/kernel/patches-4.19.x-rt/0152-locking-rt-mutex-Flush-block-plug-on-__down_read.patch b/kernel/patches-4.19.x-rt/0152-locking-rt-mutex-Flush-block-plug-on-__down_read.patch index e2580ace0..f5263e55c 100644 --- a/kernel/patches-4.19.x-rt/0152-locking-rt-mutex-Flush-block-plug-on-__down_read.patch +++ b/kernel/patches-4.19.x-rt/0152-locking-rt-mutex-Flush-block-plug-on-__down_read.patch @@ -1,7 +1,7 @@ -From 46adf7b6e8e7cc3956f5181cc5ef01a76fbc70da Mon Sep 17 00:00:00 2001 +From 8b1428c9761e45fabdb70309947582526e3bbfbc Mon Sep 17 00:00:00 2001 From: Scott Wood Date: Fri, 4 Jan 2019 15:33:21 -0500 -Subject: [PATCH 152/268] locking/rt-mutex: Flush block plug on __down_read() +Subject: [PATCH 152/283] locking/rt-mutex: Flush block plug on __down_read() __down_read() bypasses the rtmutex frontend to call rt_mutex_slowlock_locked() directly, and thus it needs to call diff --git a/kernel/patches-4.19.x-rt/0153-locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch b/kernel/patches-4.19.x-rt/0153-locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch index 7f25aed67..b0676e749 100644 --- a/kernel/patches-4.19.x-rt/0153-locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch +++ b/kernel/patches-4.19.x-rt/0153-locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch @@ -1,7 +1,7 @@ -From 58b55a9d70bdab31ff9d6119ce0958ae8c7234c0 Mon Sep 17 00:00:00 2001 +From 232cc4794d35bf36a49924022ebd18edb13c8a5d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 16 Nov 2017 16:48:48 +0100 -Subject: [PATCH 153/268] locking/rtmutex: re-init the wait_lock in +Subject: [PATCH 153/283] locking/rtmutex: re-init the wait_lock in rt_mutex_init_proxy_locked() We could provide a key-class for the lockdep (and fixup all callers) or diff --git a/kernel/patches-4.19.x-rt/0154-ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/kernel/patches-4.19.x-rt/0154-ptrace-fix-ptrace-vs-tasklist_lock-race.patch index ce422bc04..b53db8336 100644 --- a/kernel/patches-4.19.x-rt/0154-ptrace-fix-ptrace-vs-tasklist_lock-race.patch +++ b/kernel/patches-4.19.x-rt/0154-ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,7 +1,7 @@ -From 91b6c0acd7435a12a250d41c7c7cc9c6f38cddae Mon Sep 17 00:00:00 2001 +From b031672801c6d24d255cc3d458e9a546899c919b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 18:21:04 +0200 -Subject: [PATCH 154/268] ptrace: fix ptrace vs tasklist_lock race +Subject: [PATCH 154/283] ptrace: fix ptrace vs tasklist_lock race As explained by Alexander Fyodorov : @@ -99,10 +99,10 @@ index 1797fd3c8cbb..25e9a40f9576 100644 * cond_resched() and cond_resched_lock(): latency reduction via * explicit rescheduling in places that are safe. The return diff --git a/kernel/ptrace.c b/kernel/ptrace.c -index fc0d667f5792..536a917ac6c0 100644 +index fed682a01a75..ace2839323de 100644 --- a/kernel/ptrace.c +++ b/kernel/ptrace.c -@@ -176,7 +176,14 @@ static bool ptrace_freeze_traced(struct task_struct *task) +@@ -174,7 +174,14 @@ static bool ptrace_freeze_traced(struct task_struct *task) spin_lock_irq(&task->sighand->siglock); if (task_is_traced(task) && !__fatal_signal_pending(task)) { diff --git a/kernel/patches-4.19.x-rt/0155-rtmutex-annotate-sleeping-lock-context.patch b/kernel/patches-4.19.x-rt/0155-rtmutex-annotate-sleeping-lock-context.patch index 0547794cc..880e32281 100644 --- a/kernel/patches-4.19.x-rt/0155-rtmutex-annotate-sleeping-lock-context.patch +++ b/kernel/patches-4.19.x-rt/0155-rtmutex-annotate-sleeping-lock-context.patch @@ -1,7 +1,7 @@ -From bc76479aeddec4b75a6e18bf57b6ac3df6b6ce97 Mon Sep 17 00:00:00 2001 +From f9ae4924361c91598ce03771aaa5f99c4bfa8100 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2017 14:25:13 +0200 -Subject: [PATCH 155/268] rtmutex: annotate sleeping lock context +Subject: [PATCH 155/283] rtmutex: annotate sleeping lock context The RCU code complains on schedule() within a rcu_readlock() section. The valid scenario on -RT is if a sleeping is held. In order to suppress diff --git a/kernel/patches-4.19.x-rt/0156-sched-migrate_disable-fallback-to-preempt_disable-in.patch b/kernel/patches-4.19.x-rt/0156-sched-migrate_disable-fallback-to-preempt_disable-in.patch index f902648ad..11f21453d 100644 --- a/kernel/patches-4.19.x-rt/0156-sched-migrate_disable-fallback-to-preempt_disable-in.patch +++ b/kernel/patches-4.19.x-rt/0156-sched-migrate_disable-fallback-to-preempt_disable-in.patch @@ -1,7 +1,7 @@ -From 2e8a1d88c6613f72f219e3cc24178658f6abed52 Mon Sep 17 00:00:00 2001 +From 55652e517f87d321623cda451d7bfbcdc55528d9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 5 Jul 2018 14:44:51 +0200 -Subject: [PATCH 156/268] sched/migrate_disable: fallback to preempt_disable() +Subject: [PATCH 156/283] sched/migrate_disable: fallback to preempt_disable() instead barrier() On SMP + !RT migrate_disable() is still around. It is not part of spin_lock() diff --git a/kernel/patches-4.19.x-rt/0157-locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch b/kernel/patches-4.19.x-rt/0157-locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch index 82014fca4..a8c78c3e1 100644 --- a/kernel/patches-4.19.x-rt/0157-locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch +++ b/kernel/patches-4.19.x-rt/0157-locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch @@ -1,7 +1,7 @@ -From 0d77c9cbc5377be77ff4b40a1ce75de234d6179d Mon Sep 17 00:00:00 2001 +From 86ad5f1aff0d9992886c176a2f136ef494754c55 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 17:40:42 +0200 -Subject: [PATCH 157/268] locking: don't check for __LINUX_SPINLOCK_TYPES_H on +Subject: [PATCH 157/283] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs Upstream uses arch_spinlock_t within spinlock_t and requests that diff --git a/kernel/patches-4.19.x-rt/0158-rcu-Frob-softirq-test.patch b/kernel/patches-4.19.x-rt/0158-rcu-Frob-softirq-test.patch index 4bd8b9ac5..b106a28c7 100644 --- a/kernel/patches-4.19.x-rt/0158-rcu-Frob-softirq-test.patch +++ b/kernel/patches-4.19.x-rt/0158-rcu-Frob-softirq-test.patch @@ -1,7 +1,7 @@ -From b7863852fbe6ca45e5d867b15f392c1ee3412a5c Mon Sep 17 00:00:00 2001 +From 3b403e90bb2186f5908b365157b777ed870de348 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Sat, 13 Aug 2011 00:23:17 +0200 -Subject: [PATCH 158/268] rcu: Frob softirq test +Subject: [PATCH 158/283] rcu: Frob softirq test With RT_FULL we get the below wreckage: diff --git a/kernel/patches-4.19.x-rt/0159-rcu-Merge-RCU-bh-into-RCU-preempt.patch b/kernel/patches-4.19.x-rt/0159-rcu-Merge-RCU-bh-into-RCU-preempt.patch index e446b3137..bd0e76d6c 100644 --- a/kernel/patches-4.19.x-rt/0159-rcu-Merge-RCU-bh-into-RCU-preempt.patch +++ b/kernel/patches-4.19.x-rt/0159-rcu-Merge-RCU-bh-into-RCU-preempt.patch @@ -1,7 +1,7 @@ -From 4eb76fc1dccdec1b6b64cb5be42a2fe21d1e3e67 Mon Sep 17 00:00:00 2001 +From 324e697209ed33e734f64df4cf0ddf60658de5ff Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 5 Oct 2011 11:59:38 -0700 -Subject: [PATCH 159/268] rcu: Merge RCU-bh into RCU-preempt +Subject: [PATCH 159/283] rcu: Merge RCU-bh into RCU-preempt The Linux kernel has long RCU-bh read-side critical sections that intolerably increase scheduling latency under mainline's RCU-bh rules, diff --git a/kernel/patches-4.19.x-rt/0160-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch b/kernel/patches-4.19.x-rt/0160-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch index 50d3d92b3..6e1b40bad 100644 --- a/kernel/patches-4.19.x-rt/0160-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch +++ b/kernel/patches-4.19.x-rt/0160-rcu-Make-ksoftirqd-do-RCU-quiescent-states.patch @@ -1,7 +1,7 @@ -From 7dd717c039fab874d3827b2a76502589997db0f7 Mon Sep 17 00:00:00 2001 +From 00cbdab312799cf3648a917434e3178644f44f07 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Wed, 5 Oct 2011 11:45:18 -0700 -Subject: [PATCH 160/268] rcu: Make ksoftirqd do RCU quiescent states +Subject: [PATCH 160/283] rcu: Make ksoftirqd do RCU quiescent states Implementing RCU-bh in terms of RCU-preempt makes the system vulnerable to network-based denial-of-service attacks. This patch therefore diff --git a/kernel/patches-4.19.x-rt/0161-rcu-Eliminate-softirq-processing-from-rcutree.patch b/kernel/patches-4.19.x-rt/0161-rcu-Eliminate-softirq-processing-from-rcutree.patch index 35b5c1ae2..7e3aeb2c9 100644 --- a/kernel/patches-4.19.x-rt/0161-rcu-Eliminate-softirq-processing-from-rcutree.patch +++ b/kernel/patches-4.19.x-rt/0161-rcu-Eliminate-softirq-processing-from-rcutree.patch @@ -1,7 +1,7 @@ -From 9fec7184287147b427b5a3a3cb0a8c1eaf546f17 Mon Sep 17 00:00:00 2001 +From e270d045cc4c717e9781c7e4f0d351b63e61858a Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 4 Nov 2013 13:21:10 -0800 -Subject: [PATCH 161/268] rcu: Eliminate softirq processing from rcutree +Subject: [PATCH 161/283] rcu: Eliminate softirq processing from rcutree Running RCU out of softirq is a problem for some workloads that would like to manage RCU core processing independently of other softirq work, diff --git a/kernel/patches-4.19.x-rt/0162-srcu-use-cpu_online-instead-custom-check.patch b/kernel/patches-4.19.x-rt/0162-srcu-use-cpu_online-instead-custom-check.patch index 5f4dfc3e2..6b8da688b 100644 --- a/kernel/patches-4.19.x-rt/0162-srcu-use-cpu_online-instead-custom-check.patch +++ b/kernel/patches-4.19.x-rt/0162-srcu-use-cpu_online-instead-custom-check.patch @@ -1,7 +1,7 @@ -From 65dde8c4bc16a1dde81f4aac939c46b6a5fe3c14 Mon Sep 17 00:00:00 2001 +From ceae4b480cbafa469d9bfb43e2916b8cd4092ec6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 14:43:41 +0200 -Subject: [PATCH 162/268] srcu: use cpu_online() instead custom check +Subject: [PATCH 162/283] srcu: use cpu_online() instead custom check The current check via srcu_online is slightly racy because after looking at srcu_online there could be an interrupt that interrupted us long diff --git a/kernel/patches-4.19.x-rt/0163-srcu-replace-local_irqsave-with-a-locallock.patch b/kernel/patches-4.19.x-rt/0163-srcu-replace-local_irqsave-with-a-locallock.patch index 52cbf2ea5..4aac514ba 100644 --- a/kernel/patches-4.19.x-rt/0163-srcu-replace-local_irqsave-with-a-locallock.patch +++ b/kernel/patches-4.19.x-rt/0163-srcu-replace-local_irqsave-with-a-locallock.patch @@ -1,7 +1,7 @@ -From 938c5d8e0a8dce8e3781b26dfb9c8f60a81d2072 Mon Sep 17 00:00:00 2001 +From c5179e3d05fb9c649a24846aec42fd142baaba46 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 18:37:12 +0200 -Subject: [PATCH 163/268] srcu: replace local_irqsave() with a locallock +Subject: [PATCH 163/283] srcu: replace local_irqsave() with a locallock 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/kernel/patches-4.19.x-rt/0164-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch b/kernel/patches-4.19.x-rt/0164-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch index c7771bad4..a9f1a469e 100644 --- a/kernel/patches-4.19.x-rt/0164-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch +++ b/kernel/patches-4.19.x-rt/0164-rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch @@ -1,7 +1,7 @@ -From 12c9b9d7ba61f8ce4f88d27f7888b3952e4a37ae Mon Sep 17 00:00:00 2001 +From 279a404efccb555b0b9cb897445eb06bab8efe14 Mon Sep 17 00:00:00 2001 From: Julia Cartwright Date: Wed, 12 Oct 2016 11:21:14 -0500 -Subject: [PATCH 164/268] rcu: enable rcu_normal_after_boot by default for RT +Subject: [PATCH 164/283] rcu: enable rcu_normal_after_boot by default for RT 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/kernel/patches-4.19.x-rt/0165-tty-serial-omap-Make-the-locking-RT-aware.patch b/kernel/patches-4.19.x-rt/0165-tty-serial-omap-Make-the-locking-RT-aware.patch index 187908603..d379abb3b 100644 --- a/kernel/patches-4.19.x-rt/0165-tty-serial-omap-Make-the-locking-RT-aware.patch +++ b/kernel/patches-4.19.x-rt/0165-tty-serial-omap-Make-the-locking-RT-aware.patch @@ -1,7 +1,7 @@ -From b49f07e955da380f07112ea70807f067ff8f58d6 Mon Sep 17 00:00:00 2001 +From e88697f5f31d546848145184386ec739cc7aabfd Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 28 Jul 2011 13:32:57 +0200 -Subject: [PATCH 165/268] tty/serial/omap: Make the locking RT aware +Subject: [PATCH 165/283] tty/serial/omap: Make the locking RT aware 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/kernel/patches-4.19.x-rt/0166-tty-serial-pl011-Make-the-locking-work-on-RT.patch b/kernel/patches-4.19.x-rt/0166-tty-serial-pl011-Make-the-locking-work-on-RT.patch index 60f426d6c..0afbc4c42 100644 --- a/kernel/patches-4.19.x-rt/0166-tty-serial-pl011-Make-the-locking-work-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0166-tty-serial-pl011-Make-the-locking-work-on-RT.patch @@ -1,7 +1,7 @@ -From 2e24a03516d7f9ec59e6566116447f590378de1b Mon Sep 17 00:00:00 2001 +From 5d5a72172d1b6447861b7359fb2fa8e4ea1e707c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 8 Jan 2013 21:36:51 +0100 -Subject: [PATCH 166/268] tty/serial/pl011: Make the locking work on RT +Subject: [PATCH 166/283] tty/serial/pl011: Make the locking work on RT 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/kernel/patches-4.19.x-rt/0167-tty-serial-pl011-explicitly-initialize-the-flags-var.patch b/kernel/patches-4.19.x-rt/0167-tty-serial-pl011-explicitly-initialize-the-flags-var.patch index c43fd55ca..ebd5f2b2f 100644 --- a/kernel/patches-4.19.x-rt/0167-tty-serial-pl011-explicitly-initialize-the-flags-var.patch +++ b/kernel/patches-4.19.x-rt/0167-tty-serial-pl011-explicitly-initialize-the-flags-var.patch @@ -1,7 +1,7 @@ -From 44737bfdb1bdf0012da1f5a8ceea5d865ad2d7cc Mon Sep 17 00:00:00 2001 +From 1d9fb6ef0391f5e2ee11e6ae76fbdad192da7f6a Mon Sep 17 00:00:00 2001 From: Kurt Kanzenbach Date: Mon, 24 Sep 2018 10:29:01 +0200 -Subject: [PATCH 167/268] tty: serial: pl011: explicitly initialize the flags +Subject: [PATCH 167/283] tty: serial: pl011: explicitly initialize the flags variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/kernel/patches-4.19.x-rt/0168-rt-Improve-the-serial-console-PASS_LIMIT.patch b/kernel/patches-4.19.x-rt/0168-rt-Improve-the-serial-console-PASS_LIMIT.patch index 3851bc154..b2525bc5d 100644 --- a/kernel/patches-4.19.x-rt/0168-rt-Improve-the-serial-console-PASS_LIMIT.patch +++ b/kernel/patches-4.19.x-rt/0168-rt-Improve-the-serial-console-PASS_LIMIT.patch @@ -1,7 +1,7 @@ -From a8c8d56e51832376b4f5ebc2328cff44af8d17c4 Mon Sep 17 00:00:00 2001 +From 1e7abe5e3aee5c132a0d65d39713c6f4cb67be9c Mon Sep 17 00:00:00 2001 From: Ingo Molnar Date: Wed, 14 Dec 2011 13:05:54 +0100 -Subject: [PATCH 168/268] rt: Improve the serial console PASS_LIMIT +Subject: [PATCH 168/283] rt: Improve the serial console PASS_LIMIT MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0169-tty-serial-8250-don-t-take-the-trylock-during-oops.patch b/kernel/patches-4.19.x-rt/0169-tty-serial-8250-don-t-take-the-trylock-during-oops.patch index f94bca77c..d0f376b26 100644 --- a/kernel/patches-4.19.x-rt/0169-tty-serial-8250-don-t-take-the-trylock-during-oops.patch +++ b/kernel/patches-4.19.x-rt/0169-tty-serial-8250-don-t-take-the-trylock-during-oops.patch @@ -1,7 +1,7 @@ -From b746b54e8838d94983e63144613ce2762b2efaa2 Mon Sep 17 00:00:00 2001 +From 872de798df0e839bfdfdaebdde0eae1b50de4614 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 11 Apr 2016 16:55:02 +0200 -Subject: [PATCH 169/268] tty: serial: 8250: don't take the trylock during oops +Subject: [PATCH 169/283] tty: serial: 8250: don't take the trylock during oops An oops with irqs off (panic() from irqsafe hrtimer like the watchdog timer) will lead to a lockdep warning on each invocation and as such @@ -14,10 +14,10 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c -index 3f779d25ec0c..851d7f6046a4 100644 +index e26d87b6ffc5..8d85448975d3 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c -@@ -3239,10 +3239,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, +@@ -3238,10 +3238,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, serial8250_rpm_get(up); diff --git a/kernel/patches-4.19.x-rt/0170-locking-percpu-rwsem-Remove-preempt_disable-variants.patch b/kernel/patches-4.19.x-rt/0170-locking-percpu-rwsem-Remove-preempt_disable-variants.patch index b8fbbf09e..4cf515f84 100644 --- a/kernel/patches-4.19.x-rt/0170-locking-percpu-rwsem-Remove-preempt_disable-variants.patch +++ b/kernel/patches-4.19.x-rt/0170-locking-percpu-rwsem-Remove-preempt_disable-variants.patch @@ -1,7 +1,7 @@ -From 659ec146a8ae4a93cb3db931421eebfb5aef1c58 Mon Sep 17 00:00:00 2001 +From e1d3a8c231f929b0069ddc2dc3059bab193e9d00 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Wed, 23 Nov 2016 16:29:32 +0100 -Subject: [PATCH 170/268] locking/percpu-rwsem: Remove preempt_disable variants +Subject: [PATCH 170/283] locking/percpu-rwsem: Remove preempt_disable variants Effective revert commit: diff --git a/kernel/patches-4.19.x-rt/0171-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch b/kernel/patches-4.19.x-rt/0171-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch index dbe5b6c0a..3a4c70164 100644 --- a/kernel/patches-4.19.x-rt/0171-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch +++ b/kernel/patches-4.19.x-rt/0171-mm-Protect-activate_mm-by-preempt_-disable-enable-_r.patch @@ -1,7 +1,7 @@ -From 072dae00e2d88ef93bfa2c80b4be0dad7ac8b15b Mon Sep 17 00:00:00 2001 +From 3fe311d6ea2109a5390bffc6870dafee03cab931 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Tue, 15 May 2012 13:53:56 +0800 -Subject: [PATCH 171/268] mm: Protect activate_mm() by +Subject: [PATCH 171/283] mm: Protect activate_mm() by preempt_[disable&enable]_rt() User preempt_*_rt instead of local_irq_*_rt or otherwise there will be diff --git a/kernel/patches-4.19.x-rt/0172-fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-ini.patch b/kernel/patches-4.19.x-rt/0172-fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-ini.patch index e73035424..9b4995bac 100644 --- a/kernel/patches-4.19.x-rt/0172-fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-ini.patch +++ b/kernel/patches-4.19.x-rt/0172-fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-ini.patch @@ -1,7 +1,7 @@ -From 97bc78094bf8bd0789398abb1bfdefef58b8b0a2 Mon Sep 17 00:00:00 2001 +From a82c4acdfe13556ab98571ef02f3a3eb9d29dd6e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 12:32:34 +0200 -Subject: [PATCH 172/268] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD +Subject: [PATCH 172/283] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed diff --git a/kernel/patches-4.19.x-rt/0173-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/kernel/patches-4.19.x-rt/0173-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index 8ee05d2b0..e76d8a6fa 100644 --- a/kernel/patches-4.19.x-rt/0173-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/kernel/patches-4.19.x-rt/0173-fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ -From 4a8d6c41cb7db68eb7c40595089bbc166c5d6f2a Mon Sep 17 00:00:00 2001 +From 09acbcc860c548ba124fb4402beed59790f49218 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 20 Oct 2017 11:29:53 +0200 -Subject: [PATCH 173/268] fs/dcache: disable preemption on i_dir_seq's write +Subject: [PATCH 173/283] fs/dcache: disable preemption on i_dir_seq's write side i_dir_seq is an opencoded seqcounter. Based on the code it looks like we @@ -69,7 +69,7 @@ index 10225a9135fb..dcde8ffe384c 100644 rcu_read_unlock(); goto retry; diff --git a/fs/inode.c b/fs/inode.c -index 42f6d25f32a5..97f11df6ca6a 100644 +index 5c63693326bb..c3e17dcbb558 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -155,7 +155,7 @@ int inode_init_always(struct super_block *sb, struct inode *inode) diff --git a/kernel/patches-4.19.x-rt/0174-squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch b/kernel/patches-4.19.x-rt/0174-squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch index a7b8945f8..6b7bb5ee3 100644 --- a/kernel/patches-4.19.x-rt/0174-squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch +++ b/kernel/patches-4.19.x-rt/0174-squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch @@ -1,7 +1,7 @@ -From c2d337965b344aacba20864e4ddcb6272c6d40e6 Mon Sep 17 00:00:00 2001 +From d1843e5a615442fd804b363f5593ddbf58bc6688 Mon Sep 17 00:00:00 2001 From: Julia Cartwright Date: Mon, 7 May 2018 08:58:57 -0500 -Subject: [PATCH 174/268] squashfs: make use of local lock in multi_cpu +Subject: [PATCH 174/283] squashfs: make use of local lock in multi_cpu decompressor Currently, the squashfs multi_cpu decompressor makes use of diff --git a/kernel/patches-4.19.x-rt/0175-thermal-Defer-thermal-wakups-to-threads.patch b/kernel/patches-4.19.x-rt/0175-thermal-Defer-thermal-wakups-to-threads.patch index e6dbbbea6..6c2f61c3a 100644 --- a/kernel/patches-4.19.x-rt/0175-thermal-Defer-thermal-wakups-to-threads.patch +++ b/kernel/patches-4.19.x-rt/0175-thermal-Defer-thermal-wakups-to-threads.patch @@ -1,7 +1,7 @@ -From 29f4a4c9e93f54fc4db7a32b3963a3e5cf931839 Mon Sep 17 00:00:00 2001 +From 4f73daf6f6c5ecfca2198293c10701d2d777a451 Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 17 Feb 2015 09:37:44 +0100 -Subject: [PATCH 175/268] thermal: Defer thermal wakups to threads +Subject: [PATCH 175/283] thermal: Defer thermal wakups to threads On RT the spin lock in pkg_temp_thermal_platfrom_thermal_notify will call schedule while we run in irq context. diff --git a/kernel/patches-4.19.x-rt/0176-x86-fpu-Disable-preemption-around-local_bh_disable.patch b/kernel/patches-4.19.x-rt/0176-x86-fpu-Disable-preemption-around-local_bh_disable.patch index dfbe8f52d..48d8c3dde 100644 --- a/kernel/patches-4.19.x-rt/0176-x86-fpu-Disable-preemption-around-local_bh_disable.patch +++ b/kernel/patches-4.19.x-rt/0176-x86-fpu-Disable-preemption-around-local_bh_disable.patch @@ -1,7 +1,7 @@ -From 9b5de25508fdcf3dfaccbe5a2c99832a22508f21 Mon Sep 17 00:00:00 2001 +From c3a958f7c3d63e98096d5c662e8346b5fc0fafec Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 11 Dec 2018 15:10:33 +0100 -Subject: [PATCH 176/268] x86/fpu: Disable preemption around local_bh_disable() +Subject: [PATCH 176/283] x86/fpu: Disable preemption around local_bh_disable() __fpu__restore_sig() restores the content of the FPU state in the CPUs and in order to avoid concurency it disbles BH. On !RT it also disables diff --git a/kernel/patches-4.19.x-rt/0177-fs-epoll-Do-not-disable-preemption-on-RT.patch b/kernel/patches-4.19.x-rt/0177-fs-epoll-Do-not-disable-preemption-on-RT.patch index c83174656..ee6c29553 100644 --- a/kernel/patches-4.19.x-rt/0177-fs-epoll-Do-not-disable-preemption-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0177-fs-epoll-Do-not-disable-preemption-on-RT.patch @@ -1,7 +1,7 @@ -From 84494b284beb71d7beb044cebab91eee663d083c Mon Sep 17 00:00:00 2001 +From 2bc1814482c92194daf20b98841321870709e4dd Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 8 Jul 2011 16:35:35 +0200 -Subject: [PATCH 177/268] fs/epoll: Do not disable preemption on RT +Subject: [PATCH 177/283] fs/epoll: Do not disable preemption on RT 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/kernel/patches-4.19.x-rt/0178-mm-vmalloc-Another-preempt-disable-region-which-suck.patch b/kernel/patches-4.19.x-rt/0178-mm-vmalloc-Another-preempt-disable-region-which-suck.patch index 8ff1db0c8..002d0dcbb 100644 --- a/kernel/patches-4.19.x-rt/0178-mm-vmalloc-Another-preempt-disable-region-which-suck.patch +++ b/kernel/patches-4.19.x-rt/0178-mm-vmalloc-Another-preempt-disable-region-which-suck.patch @@ -1,7 +1,7 @@ -From d8ebbf146ccc6acd85fd1ef0e0902b6862e20dbc Mon Sep 17 00:00:00 2001 +From 974d73cf26c5d957984cd6078582894a25a0600a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 12 Jul 2011 11:39:36 +0200 -Subject: [PATCH 178/268] mm/vmalloc: Another preempt disable region which +Subject: [PATCH 178/283] mm/vmalloc: Another preempt disable region which sucks Avoid the preempt disable version of get_cpu_var(). The inner-lock should diff --git a/kernel/patches-4.19.x-rt/0179-block-mq-use-cpu_light.patch b/kernel/patches-4.19.x-rt/0179-block-mq-use-cpu_light.patch index a4cd22224..69c8bc6e4 100644 --- a/kernel/patches-4.19.x-rt/0179-block-mq-use-cpu_light.patch +++ b/kernel/patches-4.19.x-rt/0179-block-mq-use-cpu_light.patch @@ -1,7 +1,7 @@ -From 4997e907787c2348986768e3f3ad13f6276c19fa Mon Sep 17 00:00:00 2001 +From a8a7839dcded1152098641824de0792247d0af82 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 9 Apr 2014 10:37:23 +0200 -Subject: [PATCH 179/268] block: mq: use cpu_light() +Subject: [PATCH 179/283] block: mq: use cpu_light() there is a might sleep splat because get_cpu() disables preemption and later we grab a lock. As a workaround for this we use get_cpu_light(). diff --git a/kernel/patches-4.19.x-rt/0180-block-mq-do-not-invoke-preempt_disable.patch b/kernel/patches-4.19.x-rt/0180-block-mq-do-not-invoke-preempt_disable.patch index 5d268adc2..293189a43 100644 --- a/kernel/patches-4.19.x-rt/0180-block-mq-do-not-invoke-preempt_disable.patch +++ b/kernel/patches-4.19.x-rt/0180-block-mq-do-not-invoke-preempt_disable.patch @@ -1,7 +1,7 @@ -From 58883e4aa517102ac5ff7360efd99eac09818b8a Mon Sep 17 00:00:00 2001 +From f981eb8d8253e9496a5551600aa89d6ac82f153d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 14 Jul 2015 14:26:34 +0200 -Subject: [PATCH 180/268] block/mq: do not invoke preempt_disable() +Subject: [PATCH 180/283] block/mq: do not invoke preempt_disable() preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. @@ -13,7 +13,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c -index fa984527b1ae..8d00d8dc9e59 100644 +index e3e7a88e03a6..b07332cab8ff 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -570,7 +570,7 @@ static void __blk_mq_complete_request(struct request *rq) diff --git a/kernel/patches-4.19.x-rt/0181-block-mq-don-t-complete-requests-via-IPI.patch b/kernel/patches-4.19.x-rt/0181-block-mq-don-t-complete-requests-via-IPI.patch index f03749ffc..59d1b5285 100644 --- a/kernel/patches-4.19.x-rt/0181-block-mq-don-t-complete-requests-via-IPI.patch +++ b/kernel/patches-4.19.x-rt/0181-block-mq-don-t-complete-requests-via-IPI.patch @@ -1,7 +1,7 @@ -From 51879ee35d8ba158a433bdb91e441c4ce9c51e01 Mon Sep 17 00:00:00 2001 +From 806f56991b1c799b77919980a4331ebd857eca6e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 15:10:08 +0100 -Subject: [PATCH 181/268] block/mq: don't complete requests via IPI +Subject: [PATCH 181/283] block/mq: don't complete requests via IPI The IPI runs in hardirq context and there are sleeping locks. This patch moves the completion into a workqueue. @@ -15,7 +15,7 @@ Signed-off-by: Sebastian Andrzej Siewior 4 files changed, 30 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c -index 33488b1426b7..709a4108f78c 100644 +index 682bc561b77b..b6010a1c3aad 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -189,6 +189,9 @@ void blk_rq_init(struct request_queue *q, struct request *rq) @@ -29,7 +29,7 @@ index 33488b1426b7..709a4108f78c 100644 rq->q = q; rq->__sector = (sector_t) -1; diff --git a/block/blk-mq.c b/block/blk-mq.c -index 8d00d8dc9e59..9df82adf428b 100644 +index b07332cab8ff..a01b6aba61fa 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -320,6 +320,9 @@ static struct request *blk_mq_rq_ctx_init(struct blk_mq_alloc_data *data, diff --git a/kernel/patches-4.19.x-rt/0182-md-raid5-Make-raid5_percpu-handling-RT-aware.patch b/kernel/patches-4.19.x-rt/0182-md-raid5-Make-raid5_percpu-handling-RT-aware.patch index d7eebea76..0751d3564 100644 --- a/kernel/patches-4.19.x-rt/0182-md-raid5-Make-raid5_percpu-handling-RT-aware.patch +++ b/kernel/patches-4.19.x-rt/0182-md-raid5-Make-raid5_percpu-handling-RT-aware.patch @@ -1,7 +1,7 @@ -From ea45edac555bc904634e0a24666a413fd8f45ce8 Mon Sep 17 00:00:00 2001 +From 149113bd6da78fc421b65edab96f402b3fdfc0f8 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 6 Apr 2010 16:51:31 +0200 -Subject: [PATCH 182/268] md: raid5: Make raid5_percpu handling RT aware +Subject: [PATCH 182/283] md: raid5: Make raid5_percpu handling RT aware __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic diff --git a/kernel/patches-4.19.x-rt/0183-rt-Introduce-cpu_chill.patch b/kernel/patches-4.19.x-rt/0183-rt-Introduce-cpu_chill.patch index 4d63aee27..4a44280b7 100644 --- a/kernel/patches-4.19.x-rt/0183-rt-Introduce-cpu_chill.patch +++ b/kernel/patches-4.19.x-rt/0183-rt-Introduce-cpu_chill.patch @@ -1,7 +1,7 @@ -From 0374fcc1623d37d71ef922ad3b9f2b6d401ff11f Mon Sep 17 00:00:00 2001 +From e4e5f1cc93c38f1bc914494fc1a4a0c4388e42e1 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 7 Mar 2012 20:51:03 +0100 -Subject: [PATCH 183/268] rt: Introduce cpu_chill() +Subject: [PATCH 183/283] rt: Introduce cpu_chill() 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/kernel/patches-4.19.x-rt/0184-hrtimer-Don-t-lose-state-in-cpu_chill.patch b/kernel/patches-4.19.x-rt/0184-hrtimer-Don-t-lose-state-in-cpu_chill.patch index 8ac87e653..62a4859ae 100644 --- a/kernel/patches-4.19.x-rt/0184-hrtimer-Don-t-lose-state-in-cpu_chill.patch +++ b/kernel/patches-4.19.x-rt/0184-hrtimer-Don-t-lose-state-in-cpu_chill.patch @@ -1,7 +1,7 @@ -From 176a3497716d87ec778211490d443f51dbcd9bc9 Mon Sep 17 00:00:00 2001 +From 33f5a28483e30eb660e9ebc75308de9618a279ff Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 19 Feb 2019 16:59:15 +0100 -Subject: [PATCH 184/268] hrtimer: Don't lose state in cpu_chill() +Subject: [PATCH 184/283] hrtimer: Don't lose state in cpu_chill() In cpu_chill() the state is set to TASK_UNINTERRUPTIBLE and a timer is programmed. On return the state is always TASK_RUNNING which means we diff --git a/kernel/patches-4.19.x-rt/0185-hrtimer-cpu_chill-save-task-state-in-saved_state.patch b/kernel/patches-4.19.x-rt/0185-hrtimer-cpu_chill-save-task-state-in-saved_state.patch index fe5635d78..74907e410 100644 --- a/kernel/patches-4.19.x-rt/0185-hrtimer-cpu_chill-save-task-state-in-saved_state.patch +++ b/kernel/patches-4.19.x-rt/0185-hrtimer-cpu_chill-save-task-state-in-saved_state.patch @@ -1,7 +1,7 @@ -From aa5a624b58a513730b1c7b73a1a2a9d1e52265b7 Mon Sep 17 00:00:00 2001 +From 65b275b3fee3444107af46dd38c427834861ea37 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Feb 2019 12:31:10 +0100 -Subject: [PATCH 185/268] hrtimer: cpu_chill(): save task state in +Subject: [PATCH 185/283] hrtimer: cpu_chill(): save task state in ->saved_state() In the previous change I saved the current task state on stack. This was diff --git a/kernel/patches-4.19.x-rt/0186-block-blk-mq-move-blk_queue_usage_counter_release-in.patch b/kernel/patches-4.19.x-rt/0186-block-blk-mq-move-blk_queue_usage_counter_release-in.patch index d517c366f..bfd09496b 100644 --- a/kernel/patches-4.19.x-rt/0186-block-blk-mq-move-blk_queue_usage_counter_release-in.patch +++ b/kernel/patches-4.19.x-rt/0186-block-blk-mq-move-blk_queue_usage_counter_release-in.patch @@ -1,7 +1,7 @@ -From 34c9d1a4c3123b2571722e9f3d04cca17841acc1 Mon Sep 17 00:00:00 2001 +From a0f3744dd80367c9d401ebb5764b426fa7634006 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 13 Mar 2018 13:49:16 +0100 -Subject: [PATCH 186/268] block: blk-mq: move blk_queue_usage_counter_release() +Subject: [PATCH 186/283] block: blk-mq: move blk_queue_usage_counter_release() into process context | BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914 @@ -51,10 +51,10 @@ Signed-off-by: Sebastian Andrzej Siewior 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/block/blk-core.c b/block/blk-core.c -index 709a4108f78c..6c1421ea14df 100644 +index b6010a1c3aad..38b1bd493165 100644 --- a/block/blk-core.c +++ b/block/blk-core.c -@@ -968,12 +968,21 @@ void blk_queue_exit(struct request_queue *q) +@@ -967,12 +967,21 @@ void blk_queue_exit(struct request_queue *q) percpu_ref_put(&q->q_usage_counter); } @@ -77,7 +77,7 @@ index 709a4108f78c..6c1421ea14df 100644 } static void blk_rq_timed_out_timer(struct timer_list *t) -@@ -1070,6 +1079,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id, +@@ -1069,6 +1078,7 @@ struct request_queue *blk_alloc_queue_node(gfp_t gfp_mask, int node_id, queue_flag_set_unlocked(QUEUE_FLAG_BYPASS, q); init_waitqueue_head(&q->mq_freeze_wq); @@ -85,7 +85,7 @@ index 709a4108f78c..6c1421ea14df 100644 /* * Init percpu_ref in atomic mode so that it's faster to shutdown. -@@ -3960,6 +3970,8 @@ int __init blk_dev_init(void) +@@ -3958,6 +3968,8 @@ int __init blk_dev_init(void) if (!kblockd_workqueue) panic("Failed to create kblockd\n"); diff --git a/kernel/patches-4.19.x-rt/0187-block-Use-cpu_chill-for-retry-loops.patch b/kernel/patches-4.19.x-rt/0187-block-Use-cpu_chill-for-retry-loops.patch index cfe5a1c56..8e2b8ce9a 100644 --- a/kernel/patches-4.19.x-rt/0187-block-Use-cpu_chill-for-retry-loops.patch +++ b/kernel/patches-4.19.x-rt/0187-block-Use-cpu_chill-for-retry-loops.patch @@ -1,7 +1,7 @@ -From 6860d2d566e69688c552d8044e68c006c52f1893 Mon Sep 17 00:00:00 2001 +From 21b09ece0276ba2e189265b580648e8505039067 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 20 Dec 2012 18:28:26 +0100 -Subject: [PATCH 187/268] block: Use cpu_chill() for retry loops +Subject: [PATCH 187/283] block: Use cpu_chill() for retry loops 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/kernel/patches-4.19.x-rt/0188-fs-dcache-Use-cpu_chill-in-trylock-loops.patch b/kernel/patches-4.19.x-rt/0188-fs-dcache-Use-cpu_chill-in-trylock-loops.patch index d6170c86a..37c4c1bed 100644 --- a/kernel/patches-4.19.x-rt/0188-fs-dcache-Use-cpu_chill-in-trylock-loops.patch +++ b/kernel/patches-4.19.x-rt/0188-fs-dcache-Use-cpu_chill-in-trylock-loops.patch @@ -1,7 +1,7 @@ -From 1ab863bb2d985228b7bec14117d4467e44058b03 Mon Sep 17 00:00:00 2001 +From 0a339e66574cbd8cf1cb2b146d2b960db46a2803 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 7 Mar 2012 21:00:34 +0100 -Subject: [PATCH 188/268] fs: dcache: Use cpu_chill() in trylock loops +Subject: [PATCH 188/283] fs: dcache: Use cpu_chill() in trylock loops 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/kernel/patches-4.19.x-rt/0189-net-Use-cpu_chill-instead-of-cpu_relax.patch b/kernel/patches-4.19.x-rt/0189-net-Use-cpu_chill-instead-of-cpu_relax.patch index bdd41ae92..9235cffab 100644 --- a/kernel/patches-4.19.x-rt/0189-net-Use-cpu_chill-instead-of-cpu_relax.patch +++ b/kernel/patches-4.19.x-rt/0189-net-Use-cpu_chill-instead-of-cpu_relax.patch @@ -1,7 +1,7 @@ -From b51485a019f68d142abc91c7b4aae67bab9dc76f Mon Sep 17 00:00:00 2001 +From 3e88f3c941795af8750994fd1a26f7031b691be6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 7 Mar 2012 21:10:04 +0100 -Subject: [PATCH 189/268] net: Use cpu_chill() instead of cpu_relax() +Subject: [PATCH 189/283] net: Use cpu_chill() instead of cpu_relax() Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system @@ -14,7 +14,7 @@ Signed-off-by: Thomas Gleixner 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/net/packet/af_packet.c b/net/packet/af_packet.c -index d98fcf926166..e99b69846aeb 100644 +index 93b5a4200585..47009dddb740 100644 --- a/net/packet/af_packet.c +++ b/net/packet/af_packet.c @@ -63,6 +63,7 @@ diff --git a/kernel/patches-4.19.x-rt/0190-fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/kernel/patches-4.19.x-rt/0190-fs-dcache-use-swait_queue-instead-of-waitqueue.patch index 9675c4fa4..2160b06cb 100644 --- a/kernel/patches-4.19.x-rt/0190-fs-dcache-use-swait_queue-instead-of-waitqueue.patch +++ b/kernel/patches-4.19.x-rt/0190-fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,7 +1,7 @@ -From 39d3c3e68c29022f49c912be08823922d6864dce Mon Sep 17 00:00:00 2001 +From 4625df6903b8b9c8ebbcddea1660e7df3e4f9efa Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 14:35:49 +0200 -Subject: [PATCH 190/268] fs/dcache: use swait_queue instead of waitqueue +Subject: [PATCH 190/283] fs/dcache: use swait_queue instead of waitqueue __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/kernel/patches-4.19.x-rt/0191-workqueue-Use-normal-rcu.patch b/kernel/patches-4.19.x-rt/0191-workqueue-Use-normal-rcu.patch index 801a7c283..9d06d188c 100644 --- a/kernel/patches-4.19.x-rt/0191-workqueue-Use-normal-rcu.patch +++ b/kernel/patches-4.19.x-rt/0191-workqueue-Use-normal-rcu.patch @@ -1,7 +1,7 @@ -From e3c37d47f9a87accb9845a5c0289a011017e0e3f Mon Sep 17 00:00:00 2001 +From 4018ce6d082178ff8281c68418cb65803b58482e Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 24 Jul 2013 15:26:54 +0200 -Subject: [PATCH 191/268] workqueue: Use normal rcu +Subject: [PATCH 191/283] workqueue: Use normal rcu There is no need for sched_rcu. The undocumented reason why sched_rcu is used is to avoid a few explicit rcu_read_lock()/unlock() pairs by diff --git a/kernel/patches-4.19.x-rt/0192-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch b/kernel/patches-4.19.x-rt/0192-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch index 26449eef4..4b0e4fb69 100644 --- a/kernel/patches-4.19.x-rt/0192-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch +++ b/kernel/patches-4.19.x-rt/0192-workqueue-Use-local-irq-lock-instead-of-irq-disable-.patch @@ -1,7 +1,7 @@ -From a760e3d3db919ed90f2a71a124ff2ba1239752f4 Mon Sep 17 00:00:00 2001 +From c6764ccb97710b9c7026328c5403d2fac671b693 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:42:26 +0200 -Subject: [PATCH 192/268] workqueue: Use local irq lock instead of irq disable +Subject: [PATCH 192/283] workqueue: Use local irq lock instead of irq disable regions Use a local_irq_lock as a replacement for irq off regions. We keep the diff --git a/kernel/patches-4.19.x-rt/0193-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch b/kernel/patches-4.19.x-rt/0193-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch index 92cb4f014..68515d39d 100644 --- a/kernel/patches-4.19.x-rt/0193-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch +++ b/kernel/patches-4.19.x-rt/0193-workqueue-Prevent-workqueue-versus-ata-piix-livelock.patch @@ -1,7 +1,7 @@ -From 07649b01e48cbe190f7deb2cc1498ab8734ebc47 Mon Sep 17 00:00:00 2001 +From 95e529176f4d5f1da0194d25b6a7434f5dc66590 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Mon, 1 Jul 2013 11:02:42 +0200 -Subject: [PATCH 193/268] workqueue: Prevent workqueue versus ata-piix livelock +Subject: [PATCH 193/283] workqueue: Prevent workqueue versus ata-piix livelock An Intel i7 system regularly detected rcu_preempt stalls after the kernel was upgraded from 3.6-rt to 3.8-rt. When the stall happened, disk I/O was no diff --git a/kernel/patches-4.19.x-rt/0194-sched-Distangle-worker-accounting-from-rqlock.patch b/kernel/patches-4.19.x-rt/0194-sched-Distangle-worker-accounting-from-rqlock.patch index 848d6d45a..c9ed774e6 100644 --- a/kernel/patches-4.19.x-rt/0194-sched-Distangle-worker-accounting-from-rqlock.patch +++ b/kernel/patches-4.19.x-rt/0194-sched-Distangle-worker-accounting-from-rqlock.patch @@ -1,7 +1,7 @@ -From 362bcb09ec2183fe4a7d43abf3924ffe9be6f071 Mon Sep 17 00:00:00 2001 +From 2a67f032ed0f4dc51e3cfbba38a8b4bedbf3f9a0 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 22 Jun 2011 19:47:03 +0200 -Subject: [PATCH 194/268] sched: Distangle worker accounting from rqlock +Subject: [PATCH 194/283] sched: Distangle worker accounting from rqlock The worker accounting for cpu bound workers is plugged into the core scheduler code and the wakeup code. This is not a hard requirement and diff --git a/kernel/patches-4.19.x-rt/0195-debugobjects-Make-RT-aware.patch b/kernel/patches-4.19.x-rt/0195-debugobjects-Make-RT-aware.patch index 25851a9bd..5302147cd 100644 --- a/kernel/patches-4.19.x-rt/0195-debugobjects-Make-RT-aware.patch +++ b/kernel/patches-4.19.x-rt/0195-debugobjects-Make-RT-aware.patch @@ -1,7 +1,7 @@ -From f4fdeabd2e1324863707187f288ee4c544046192 Mon Sep 17 00:00:00 2001 +From a51785a98d1a72ead35a11a9fc57eaaf37789736 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:41:35 +0200 -Subject: [PATCH 195/268] debugobjects: Make RT aware +Subject: [PATCH 195/283] debugobjects: Make RT aware Avoid filling the pool / allocating memory with irqs off(). diff --git a/kernel/patches-4.19.x-rt/0196-seqlock-Prevent-rt-starvation.patch b/kernel/patches-4.19.x-rt/0196-seqlock-Prevent-rt-starvation.patch index 39c293be0..dff9fdc2d 100644 --- a/kernel/patches-4.19.x-rt/0196-seqlock-Prevent-rt-starvation.patch +++ b/kernel/patches-4.19.x-rt/0196-seqlock-Prevent-rt-starvation.patch @@ -1,7 +1,7 @@ -From b3d4335aafea80587783e32061db060077554d7c Mon Sep 17 00:00:00 2001 +From 57407205aa8a3eacf4fb95e6ae48e68850c42cf4 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 22 Feb 2012 12:03:30 +0100 -Subject: [PATCH 196/268] seqlock: Prevent rt starvation +Subject: [PATCH 196/283] seqlock: Prevent rt starvation If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. diff --git a/kernel/patches-4.19.x-rt/0197-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/kernel/patches-4.19.x-rt/0197-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch index 4f8a791cb..32bbbb575 100644 --- a/kernel/patches-4.19.x-rt/0197-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch +++ b/kernel/patches-4.19.x-rt/0197-sunrpc-Make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,7 +1,7 @@ -From a8814418fedb85297ffed1a4688372b20533d462 Mon Sep 17 00:00:00 2001 +From 69eb884bf0625cc689fe528f261b51906bf389d1 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Wed, 18 Feb 2015 16:05:28 +0100 -Subject: [PATCH 197/268] sunrpc: Make svc_xprt_do_enqueue() use +Subject: [PATCH 197/283] sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 diff --git a/kernel/patches-4.19.x-rt/0198-net-Use-skbufhead-with-raw-lock.patch b/kernel/patches-4.19.x-rt/0198-net-Use-skbufhead-with-raw-lock.patch index 27f893f21..ce144a84a 100644 --- a/kernel/patches-4.19.x-rt/0198-net-Use-skbufhead-with-raw-lock.patch +++ b/kernel/patches-4.19.x-rt/0198-net-Use-skbufhead-with-raw-lock.patch @@ -1,7 +1,7 @@ -From 74e3131e8138baa49cf40c50b4b433c3323a00be Mon Sep 17 00:00:00 2001 +From 21c221625426b72acf5aad55261378a107daab99 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 12 Jul 2011 15:38:34 +0200 -Subject: [PATCH 198/268] net: Use skbufhead with raw lock +Subject: [PATCH 198/283] net: Use skbufhead with raw lock 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 diff --git a/kernel/patches-4.19.x-rt/0199-net-move-xmit_recursion-to-per-task-variable-on-RT.patch b/kernel/patches-4.19.x-rt/0199-net-move-xmit_recursion-to-per-task-variable-on-RT.patch index f230f4ecc..a52d46a7d 100644 --- a/kernel/patches-4.19.x-rt/0199-net-move-xmit_recursion-to-per-task-variable-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0199-net-move-xmit_recursion-to-per-task-variable-on-RT.patch @@ -1,7 +1,7 @@ -From 0978e6214358cf3fcc499500916fc616b6ba1193 Mon Sep 17 00:00:00 2001 +From 2cb581744045c7aea758c05bbc5c84389753b1a5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 13 Jan 2016 15:55:02 +0100 -Subject: [PATCH 199/268] net: move xmit_recursion to per-task variable on -RT +Subject: [PATCH 199/283] net: move xmit_recursion to per-task variable on -RT A softirq on -RT can be preempted. That means one task is in __dev_queue_xmit(), gets preempted and another task may enter @@ -248,7 +248,7 @@ index 616429a4715c..1a8677236939 100644 queue->dev = dev; #ifdef CONFIG_BQL diff --git a/net/core/filter.c b/net/core/filter.c -index eb81e9db4093..2dd1f2eef4fa 100644 +index 34ec9324737b..03925960fb5c 100644 --- a/net/core/filter.c +++ b/net/core/filter.c @@ -2000,7 +2000,7 @@ static inline int __bpf_tx_skb(struct net_device *dev, struct sk_buff *skb) diff --git a/kernel/patches-4.19.x-rt/0200-net-provide-a-way-to-delegate-processing-a-softirq-t.patch b/kernel/patches-4.19.x-rt/0200-net-provide-a-way-to-delegate-processing-a-softirq-t.patch index de1976885..0cdeeebf9 100644 --- a/kernel/patches-4.19.x-rt/0200-net-provide-a-way-to-delegate-processing-a-softirq-t.patch +++ b/kernel/patches-4.19.x-rt/0200-net-provide-a-way-to-delegate-processing-a-softirq-t.patch @@ -1,7 +1,7 @@ -From 3e228646d2f374c2f898558bf902fd53df73ff03 Mon Sep 17 00:00:00 2001 +From 713b395adee9bc6d03ba74839407be41a05a6e89 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 15:39:05 +0100 -Subject: [PATCH 200/268] net: provide a way to delegate processing a softirq +Subject: [PATCH 200/283] net: provide a way to delegate processing a softirq to ksoftirqd If the NET_RX uses up all of his budget it moves the following NAPI diff --git a/kernel/patches-4.19.x-rt/0201-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/kernel/patches-4.19.x-rt/0201-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index 0db85147e..a6a4f97b3 100644 --- a/kernel/patches-4.19.x-rt/0201-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +++ b/kernel/patches-4.19.x-rt/0201-net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,7 +1,7 @@ -From aff3a2f1f04ebcf3d036033357d6ff327dc77384 Mon Sep 17 00:00:00 2001 +From d81c8e92081b67d58e45585afb0020c6759e671e Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 30 Mar 2016 13:36:29 +0200 -Subject: [PATCH 201/268] net: dev: always take qdisc's busylock in +Subject: [PATCH 201/283] net: dev: always take qdisc's busylock in __dev_xmit_skb() The root-lock is dropped before dev_hard_start_xmit() is invoked and after diff --git a/kernel/patches-4.19.x-rt/0202-net-Qdisc-use-a-seqlock-instead-seqcount.patch b/kernel/patches-4.19.x-rt/0202-net-Qdisc-use-a-seqlock-instead-seqcount.patch index e83e3d7d1..f9ca70cdb 100644 --- a/kernel/patches-4.19.x-rt/0202-net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/kernel/patches-4.19.x-rt/0202-net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ -From d501fb01e4c03fe9bad99083b085f38d2332df8d Mon Sep 17 00:00:00 2001 +From f0d7dcb8d6664bb3c716c75710d0a37f3ed3d107 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 17:36:35 +0200 -Subject: [PATCH 202/268] net/Qdisc: use a seqlock instead seqcount +Subject: [PATCH 202/283] net/Qdisc: use a seqlock instead seqcount 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/kernel/patches-4.19.x-rt/0203-net-add-back-the-missing-serialization-in-ip_send_un.patch b/kernel/patches-4.19.x-rt/0203-net-add-back-the-missing-serialization-in-ip_send_un.patch index 8f002d828..3fb438268 100644 --- a/kernel/patches-4.19.x-rt/0203-net-add-back-the-missing-serialization-in-ip_send_un.patch +++ b/kernel/patches-4.19.x-rt/0203-net-add-back-the-missing-serialization-in-ip_send_un.patch @@ -1,7 +1,7 @@ -From 0538ba3efa31e5af2fefbd88fe76103981d512cf Mon Sep 17 00:00:00 2001 +From 65c80c3225a3398c6f65566593d114a2a92baa6c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 31 Aug 2016 17:21:56 +0200 -Subject: [PATCH 203/268] net: add back the missing serialization in +Subject: [PATCH 203/283] net: add back the missing serialization in ip_send_unicast_reply() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 @@ -42,7 +42,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 6 insertions(+) diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c -index 11101cf8693b..2b7205ad261a 100644 +index b76cf96d5cfe..51358c73dada 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c @@ -62,6 +62,7 @@ diff --git a/kernel/patches-4.19.x-rt/0204-net-add-a-lock-around-icmp_sk.patch b/kernel/patches-4.19.x-rt/0204-net-add-a-lock-around-icmp_sk.patch index 51b76fedc..880f3a5b5 100644 --- a/kernel/patches-4.19.x-rt/0204-net-add-a-lock-around-icmp_sk.patch +++ b/kernel/patches-4.19.x-rt/0204-net-add-a-lock-around-icmp_sk.patch @@ -1,7 +1,7 @@ -From 7b8e2481727fd1d4a6b292964b2d8af45a53e0b7 Mon Sep 17 00:00:00 2001 +From 46a531f02facc10cbd982f8de9c62e704d8f1815 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 31 Aug 2016 17:54:09 +0200 -Subject: [PATCH 204/268] net: add a lock around icmp_sk() +Subject: [PATCH 204/283] net: add a lock around icmp_sk() It looks like the this_cpu_ptr() access in icmp_sk() is protected with local_bh_disable(). To avoid missing serialization in -RT I am adding diff --git a/kernel/patches-4.19.x-rt/0205-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch b/kernel/patches-4.19.x-rt/0205-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch index 1453a76c3..57a2c9881 100644 --- a/kernel/patches-4.19.x-rt/0205-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch +++ b/kernel/patches-4.19.x-rt/0205-net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch @@ -1,7 +1,7 @@ -From 17c4aca36cbb68d9df8945b5a1eadfca5dbad225 Mon Sep 17 00:00:00 2001 +From 6b041ae87c727d10384398ec51f0003ef02cdc38 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 6 Dec 2016 17:50:30 -0500 -Subject: [PATCH 205/268] net: Have __napi_schedule_irqoff() disable interrupts +Subject: [PATCH 205/283] net: Have __napi_schedule_irqoff() disable interrupts on RT A customer hit a crash where the napi sd->poll_list became corrupted. diff --git a/kernel/patches-4.19.x-rt/0206-irqwork-push-most-work-into-softirq-context.patch b/kernel/patches-4.19.x-rt/0206-irqwork-push-most-work-into-softirq-context.patch index 5c0dfdcb3..288ef3c60 100644 --- a/kernel/patches-4.19.x-rt/0206-irqwork-push-most-work-into-softirq-context.patch +++ b/kernel/patches-4.19.x-rt/0206-irqwork-push-most-work-into-softirq-context.patch @@ -1,7 +1,7 @@ -From 778b3f11b6a4fbea6c57ac0482509d90187009c9 Mon Sep 17 00:00:00 2001 +From b1507e25e704c438e660c5c1825ec806b158f556 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 23 Jun 2015 15:32:51 +0200 -Subject: [PATCH 206/268] irqwork: push most work into softirq context +Subject: [PATCH 206/283] irqwork: push most work into softirq context 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/kernel/patches-4.19.x-rt/0207-printk-Make-rt-aware.patch b/kernel/patches-4.19.x-rt/0207-printk-Make-rt-aware.patch index 8b1d1d75f..267a06997 100644 --- a/kernel/patches-4.19.x-rt/0207-printk-Make-rt-aware.patch +++ b/kernel/patches-4.19.x-rt/0207-printk-Make-rt-aware.patch @@ -1,7 +1,7 @@ -From fe95afa24ff0e274547225ca1b67655341576a90 Mon Sep 17 00:00:00 2001 +From fd90db4e8653f0ebf2a6959313658fcdaadec8fc Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 19 Sep 2012 14:50:37 +0200 -Subject: [PATCH 207/268] printk: Make rt aware +Subject: [PATCH 207/283] printk: Make rt aware Drop the lock before calling the console driver and do not disable interrupts while printing to a serial console. diff --git a/kernel/patches-4.19.x-rt/0208-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch b/kernel/patches-4.19.x-rt/0208-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch index bd74f70c4..e3b80d82d 100644 --- a/kernel/patches-4.19.x-rt/0208-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch +++ b/kernel/patches-4.19.x-rt/0208-kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch @@ -1,7 +1,7 @@ -From 465429cd60203ac29544c5597dc2048c699d9573 Mon Sep 17 00:00:00 2001 +From af21e5c755447f232fe96ab7df9ecaf8df8a15a7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 19 May 2016 17:45:27 +0200 -Subject: [PATCH 208/268] kernel/printk: Don't try to print from IRQ/NMI region +Subject: [PATCH 208/283] kernel/printk: Don't try to print from IRQ/NMI region On -RT we try to acquire sleeping locks which might lead to warnings from lockdep or a warn_on() from spin_try_lock() (which is a rtmutex on diff --git a/kernel/patches-4.19.x-rt/0209-printk-Drop-the-logbuf_lock-more-often.patch b/kernel/patches-4.19.x-rt/0209-printk-Drop-the-logbuf_lock-more-often.patch index b271aeed2..d71d9c509 100644 --- a/kernel/patches-4.19.x-rt/0209-printk-Drop-the-logbuf_lock-more-often.patch +++ b/kernel/patches-4.19.x-rt/0209-printk-Drop-the-logbuf_lock-more-often.patch @@ -1,7 +1,7 @@ -From 3b86d75b24e224d91346205c94d36a90d0daa695 Mon Sep 17 00:00:00 2001 +From b0852ca451c4ab71a2ce94c00e267b8eb82e3ac2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Mar 2013 19:01:05 +0100 -Subject: [PATCH 209/268] printk: Drop the logbuf_lock more often +Subject: [PATCH 209/283] printk: Drop the logbuf_lock more often The lock is hold with irgs off. The latency drops 500us+ on my arm bugs with a "full" buffer after executing "dmesg" on the shell. diff --git a/kernel/patches-4.19.x-rt/0210-ARM-enable-irq-in-translation-section-permission-fau.patch b/kernel/patches-4.19.x-rt/0210-ARM-enable-irq-in-translation-section-permission-fau.patch index 4b94ac23f..cbaad861e 100644 --- a/kernel/patches-4.19.x-rt/0210-ARM-enable-irq-in-translation-section-permission-fau.patch +++ b/kernel/patches-4.19.x-rt/0210-ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,7 +1,7 @@ -From e6b9951b4a32e58860c21d934897143be2c8e60c Mon Sep 17 00:00:00 2001 +From d3668df4d5096d46b33e7f75444dcecf362dfb81 Mon Sep 17 00:00:00 2001 From: "Yadi.hu" Date: Wed, 10 Dec 2014 10:32:09 +0800 -Subject: [PATCH 210/268] ARM: enable irq in translation/section permission +Subject: [PATCH 210/283] ARM: enable irq in translation/section permission fault handlers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 diff --git a/kernel/patches-4.19.x-rt/0211-genirq-update-irq_set_irqchip_state-documentation.patch b/kernel/patches-4.19.x-rt/0211-genirq-update-irq_set_irqchip_state-documentation.patch index 2af6f21be..a2e96110b 100644 --- a/kernel/patches-4.19.x-rt/0211-genirq-update-irq_set_irqchip_state-documentation.patch +++ b/kernel/patches-4.19.x-rt/0211-genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,7 +1,7 @@ -From 7363a96960b8c2b297273a23b1a23af568962cfb Mon Sep 17 00:00:00 2001 +From a44a97a7d302fab9e3435afc7023d3ebff277efd Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:00 -0600 -Subject: [PATCH 211/268] genirq: update irq_set_irqchip_state documentation +Subject: [PATCH 211/283] genirq: update irq_set_irqchip_state documentation 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/kernel/patches-4.19.x-rt/0212-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/kernel/patches-4.19.x-rt/0212-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index c25a99ec1..b18408b3d 100644 --- a/kernel/patches-4.19.x-rt/0212-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +++ b/kernel/patches-4.19.x-rt/0212-KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,7 +1,7 @@ -From d3e608bd6ba544ecdb306b66afccd053e55f81c6 Mon Sep 17 00:00:00 2001 +From a3a039471f58abf91d2007ede9a7e308c834b456 Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:01 -0600 -Subject: [PATCH 212/268] KVM: arm/arm64: downgrade preempt_disable()d region +Subject: [PATCH 212/283] KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating diff --git a/kernel/patches-4.19.x-rt/0213-arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch b/kernel/patches-4.19.x-rt/0213-arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch index d3699a4f1..b2ba0e9e1 100644 --- a/kernel/patches-4.19.x-rt/0213-arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch +++ b/kernel/patches-4.19.x-rt/0213-arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch @@ -1,7 +1,7 @@ -From 6b294425c012e6e77ff2f11ff45f6828b9e33eb2 Mon Sep 17 00:00:00 2001 +From d42064d787982281635b029761c83a285c877f51 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 25 Jul 2018 14:02:38 +0200 -Subject: [PATCH 213/268] arm64: fpsimd: use preemp_disable in addition to +Subject: [PATCH 213/283] arm64: fpsimd: use preemp_disable in addition to local_bh_disable() In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The diff --git a/kernel/patches-4.19.x-rt/0214-kgdb-serial-Short-term-workaround.patch b/kernel/patches-4.19.x-rt/0214-kgdb-serial-Short-term-workaround.patch index 5276508fd..c34300aef 100644 --- a/kernel/patches-4.19.x-rt/0214-kgdb-serial-Short-term-workaround.patch +++ b/kernel/patches-4.19.x-rt/0214-kgdb-serial-Short-term-workaround.patch @@ -1,7 +1,7 @@ -From 8daad04cf92b929c682cb97f546645e4301b5567 Mon Sep 17 00:00:00 2001 +From afa7e85db981a95a467d06226214ecfb0bbca27b Mon Sep 17 00:00:00 2001 From: Jason Wessel Date: Thu, 28 Jul 2011 12:42:23 -0500 -Subject: [PATCH 214/268] kgdb/serial: Short term workaround +Subject: [PATCH 214/283] kgdb/serial: Short term workaround On 07/27/2011 04:37 PM, Thomas Gleixner wrote: > - KGDB (not yet disabled) is reportedly unusable on -rt right now due @@ -24,7 +24,7 @@ Jason. 3 files changed, 7 insertions(+) diff --git a/drivers/tty/serial/8250/8250_port.c b/drivers/tty/serial/8250/8250_port.c -index 851d7f6046a4..a2705b401efc 100644 +index 8d85448975d3..ebc98ce465b8 100644 --- a/drivers/tty/serial/8250/8250_port.c +++ b/drivers/tty/serial/8250/8250_port.c @@ -31,6 +31,7 @@ @@ -35,7 +35,7 @@ index 851d7f6046a4..a2705b401efc 100644 #include #include #include -@@ -3241,6 +3242,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, +@@ -3240,6 +3241,8 @@ void serial8250_console_write(struct uart_8250_port *up, const char *s, if (port->sysrq || oops_in_progress) locked = 0; diff --git a/kernel/patches-4.19.x-rt/0215-sysfs-Add-sys-kernel-realtime-entry.patch b/kernel/patches-4.19.x-rt/0215-sysfs-Add-sys-kernel-realtime-entry.patch index 32116ed7a..5e41fdaed 100644 --- a/kernel/patches-4.19.x-rt/0215-sysfs-Add-sys-kernel-realtime-entry.patch +++ b/kernel/patches-4.19.x-rt/0215-sysfs-Add-sys-kernel-realtime-entry.patch @@ -1,7 +1,7 @@ -From 29d5795cda74974977e2766d6c2a34da4924cc77 Mon Sep 17 00:00:00 2001 +From 012396ccc66ac609679e12d1bf475300918d4e31 Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Sat, 30 Jul 2011 21:55:53 -0500 -Subject: [PATCH 215/268] sysfs: Add /sys/kernel/realtime entry +Subject: [PATCH 215/283] sysfs: Add /sys/kernel/realtime entry Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/kernel/patches-4.19.x-rt/0216-mm-rt-kmap_atomic-scheduling.patch b/kernel/patches-4.19.x-rt/0216-mm-rt-kmap_atomic-scheduling.patch index 5990428e6..efd3c358e 100644 --- a/kernel/patches-4.19.x-rt/0216-mm-rt-kmap_atomic-scheduling.patch +++ b/kernel/patches-4.19.x-rt/0216-mm-rt-kmap_atomic-scheduling.patch @@ -1,7 +1,7 @@ -From eea2f1ac38ce1affeba31e7e4b1e79d475e1078d Mon Sep 17 00:00:00 2001 +From 7852dee63089f616ea97bbbc5137c7312fab3ea8 Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Thu, 28 Jul 2011 10:43:51 +0200 -Subject: [PATCH 216/268] mm, rt: kmap_atomic scheduling +Subject: [PATCH 216/283] mm, rt: kmap_atomic scheduling 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/kernel/patches-4.19.x-rt/0217-x86-highmem-Add-a-already-used-pte-check.patch b/kernel/patches-4.19.x-rt/0217-x86-highmem-Add-a-already-used-pte-check.patch index 1c041f260..d76ac7112 100644 --- a/kernel/patches-4.19.x-rt/0217-x86-highmem-Add-a-already-used-pte-check.patch +++ b/kernel/patches-4.19.x-rt/0217-x86-highmem-Add-a-already-used-pte-check.patch @@ -1,7 +1,7 @@ -From 65b251a960fc18a5a2e8b01902c4a1b4f76930e5 Mon Sep 17 00:00:00 2001 +From 26d14743e5183f7a37bf0a4489428926868186de Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 17:09:55 +0100 -Subject: [PATCH 217/268] x86/highmem: Add a "already used pte" check +Subject: [PATCH 217/283] x86/highmem: Add a "already used pte" check This is a copy from kmap_atomic_prot(). diff --git a/kernel/patches-4.19.x-rt/0218-arm-highmem-Flush-tlb-on-unmap.patch b/kernel/patches-4.19.x-rt/0218-arm-highmem-Flush-tlb-on-unmap.patch index d3a0c858c..f5a4dfdc8 100644 --- a/kernel/patches-4.19.x-rt/0218-arm-highmem-Flush-tlb-on-unmap.patch +++ b/kernel/patches-4.19.x-rt/0218-arm-highmem-Flush-tlb-on-unmap.patch @@ -1,7 +1,7 @@ -From 953d5ce85b3a6927cc557f046c1fd2ae21345d46 Mon Sep 17 00:00:00 2001 +From 2335fd68385693465319a8ed36dc816837cc2d13 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 21:37:27 +0100 -Subject: [PATCH 218/268] arm/highmem: Flush tlb on unmap +Subject: [PATCH 218/283] arm/highmem: Flush tlb on unmap 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/kernel/patches-4.19.x-rt/0219-arm-Enable-highmem-for-rt.patch b/kernel/patches-4.19.x-rt/0219-arm-Enable-highmem-for-rt.patch index 05d8f1fe5..0dd0851ac 100644 --- a/kernel/patches-4.19.x-rt/0219-arm-Enable-highmem-for-rt.patch +++ b/kernel/patches-4.19.x-rt/0219-arm-Enable-highmem-for-rt.patch @@ -1,7 +1,7 @@ -From 85b324f15d13d7122adee8404b78b5fc692e7ece Mon Sep 17 00:00:00 2001 +From dbd3e75fbbecfbb79a264b7c2b8f092d4671dfaa Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 13 Feb 2013 11:03:11 +0100 -Subject: [PATCH 219/268] arm: Enable highmem for rt +Subject: [PATCH 219/283] arm: Enable highmem for rt fixup highmem for ARM. diff --git a/kernel/patches-4.19.x-rt/0220-scsi-fcoe-Make-RT-aware.patch b/kernel/patches-4.19.x-rt/0220-scsi-fcoe-Make-RT-aware.patch index 3f9c504b6..ca63e607b 100644 --- a/kernel/patches-4.19.x-rt/0220-scsi-fcoe-Make-RT-aware.patch +++ b/kernel/patches-4.19.x-rt/0220-scsi-fcoe-Make-RT-aware.patch @@ -1,7 +1,7 @@ -From 51b529bfe4f44e5e7a13a52273aca383cf831e3c Mon Sep 17 00:00:00 2001 +From e8f1bc60d8f9bb78f3671441af7f6dea46c576a9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sat, 12 Nov 2011 14:00:48 +0100 -Subject: [PATCH 220/268] scsi/fcoe: Make RT aware. +Subject: [PATCH 220/283] scsi/fcoe: Make RT aware. Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. diff --git a/kernel/patches-4.19.x-rt/0221-x86-crypto-Reduce-preempt-disabled-regions.patch b/kernel/patches-4.19.x-rt/0221-x86-crypto-Reduce-preempt-disabled-regions.patch index 8c981bb9c..cfbcc16a4 100644 --- a/kernel/patches-4.19.x-rt/0221-x86-crypto-Reduce-preempt-disabled-regions.patch +++ b/kernel/patches-4.19.x-rt/0221-x86-crypto-Reduce-preempt-disabled-regions.patch @@ -1,7 +1,7 @@ -From ead629ca3a3d22e77e5a0fa3203542549b2a060b Mon Sep 17 00:00:00 2001 +From db7f78bb12a8de39b10bf4c414283150adf48dad Mon Sep 17 00:00:00 2001 From: Peter Zijlstra Date: Mon, 14 Nov 2011 18:19:27 +0100 -Subject: [PATCH 221/268] x86: crypto: Reduce preempt disabled regions +Subject: [PATCH 221/283] x86: crypto: Reduce preempt disabled regions Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/kernel/patches-4.19.x-rt/0222-crypto-Reduce-preempt-disabled-regions-more-algos.patch b/kernel/patches-4.19.x-rt/0222-crypto-Reduce-preempt-disabled-regions-more-algos.patch index e044ea222..3374d9502 100644 --- a/kernel/patches-4.19.x-rt/0222-crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/kernel/patches-4.19.x-rt/0222-crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ -From 61a4f04386766f585ad475f63f249bacc7d22278 Mon Sep 17 00:00:00 2001 +From a9bad506610e589f70cb9bcd40a91ae40a6fcd96 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 21 Feb 2014 17:24:04 +0100 -Subject: [PATCH 222/268] crypto: Reduce preempt disabled regions, more algos +Subject: [PATCH 222/283] crypto: Reduce preempt disabled regions, more algos Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() diff --git a/kernel/patches-4.19.x-rt/0223-crypto-limit-more-FPU-enabled-sections.patch b/kernel/patches-4.19.x-rt/0223-crypto-limit-more-FPU-enabled-sections.patch index 982085bac..2210b6895 100644 --- a/kernel/patches-4.19.x-rt/0223-crypto-limit-more-FPU-enabled-sections.patch +++ b/kernel/patches-4.19.x-rt/0223-crypto-limit-more-FPU-enabled-sections.patch @@ -1,7 +1,7 @@ -From 6555c5da9c6903d1fb1af6a7feaabfc3415f393e Mon Sep 17 00:00:00 2001 +From 76870a6a1befc6db5eb65682cb8190cf093d49a5 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 30 Nov 2017 13:40:10 +0100 -Subject: [PATCH 223/268] crypto: limit more FPU-enabled sections +Subject: [PATCH 223/283] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit diff --git a/kernel/patches-4.19.x-rt/0224-crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch b/kernel/patches-4.19.x-rt/0224-crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch index 44e2f7bfe..0040e3fbd 100644 --- a/kernel/patches-4.19.x-rt/0224-crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch +++ b/kernel/patches-4.19.x-rt/0224-crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch @@ -1,7 +1,7 @@ -From ceff40742ef6d19e8620a89092524380f46ea9e9 Mon Sep 17 00:00:00 2001 +From bb65fe43a0177184808e0426548a3e11bcd894e4 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Wed, 11 Jul 2018 17:14:47 +0200 -Subject: [PATCH 224/268] crypto: scompress - serialize RT percpu scratch +Subject: [PATCH 224/283] crypto: scompress - serialize RT percpu scratch buffer access with a local lock | BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 diff --git a/kernel/patches-4.19.x-rt/0225-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch b/kernel/patches-4.19.x-rt/0225-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index 949948ae3..be74d77be 100644 --- a/kernel/patches-4.19.x-rt/0225-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +++ b/kernel/patches-4.19.x-rt/0225-crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -1,7 +1,7 @@ -From 147f9e0fa93fb03bce31ee35f51c29a8cda94666 Mon Sep 17 00:00:00 2001 +From 46ee243833b0300b7f72e77268030fba7d083f36 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 18:52:00 +0200 -Subject: [PATCH 225/268] crypto: cryptd - add a lock instead +Subject: [PATCH 225/283] crypto: cryptd - add a lock instead preempt_disable/local_bh_disable cryptd has a per-CPU lock which protected with local_bh_disable() and @@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/crypto/cryptd.c b/crypto/cryptd.c -index addca7bae33f..8ad657cddc0a 100644 +index e0c8e907b086..e079f9a70201 100644 --- a/crypto/cryptd.c +++ b/crypto/cryptd.c @@ -39,6 +39,7 @@ MODULE_PARM_DESC(cryptd_max_cpu_qlen, "Set cryptd Max queue depth"); diff --git a/kernel/patches-4.19.x-rt/0226-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch b/kernel/patches-4.19.x-rt/0226-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch index f640cf962..0d2e2fdad 100644 --- a/kernel/patches-4.19.x-rt/0226-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch +++ b/kernel/patches-4.19.x-rt/0226-panic-skip-get_random_bytes-for-RT_FULL-in-init_oops.patch @@ -1,7 +1,7 @@ -From a58cde5b2641d0fa53a57bfc89eb238ab8e83a21 Mon Sep 17 00:00:00 2001 +From f05daa36cd3745fd6096f84b064ecd32d32ba72c Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 -Subject: [PATCH 226/268] panic: skip get_random_bytes for RT_FULL in +Subject: [PATCH 226/283] panic: skip get_random_bytes for RT_FULL in init_oops_id Disable on -RT. If this is invoked from irq-context we will have problems diff --git a/kernel/patches-4.19.x-rt/0227-x86-stackprotector-Avoid-random-pool-on-rt.patch b/kernel/patches-4.19.x-rt/0227-x86-stackprotector-Avoid-random-pool-on-rt.patch index df385ec6c..b9142c9e6 100644 --- a/kernel/patches-4.19.x-rt/0227-x86-stackprotector-Avoid-random-pool-on-rt.patch +++ b/kernel/patches-4.19.x-rt/0227-x86-stackprotector-Avoid-random-pool-on-rt.patch @@ -1,7 +1,7 @@ -From 39c8ab81df7e133ea2a8fee04ac9b52566029a02 Mon Sep 17 00:00:00 2001 +From 7ca9435f9f9b0a1c4f286bfc916aaa6894d5b1ab Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 16 Dec 2010 14:25:18 +0100 -Subject: [PATCH 227/268] x86: stackprotector: Avoid random pool on rt +Subject: [PATCH 227/283] x86: stackprotector: Avoid random pool on rt CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep diff --git a/kernel/patches-4.19.x-rt/0228-random-Make-it-work-on-rt.patch b/kernel/patches-4.19.x-rt/0228-random-Make-it-work-on-rt.patch index 54f5088e5..f35533390 100644 --- a/kernel/patches-4.19.x-rt/0228-random-Make-it-work-on-rt.patch +++ b/kernel/patches-4.19.x-rt/0228-random-Make-it-work-on-rt.patch @@ -1,7 +1,7 @@ -From fee18c5914434c940ccc463c9185e6153a6a2266 Mon Sep 17 00:00:00 2001 +From d7138138dbb45015e20668ec13215dc198c4c4d9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Tue, 21 Aug 2012 20:38:50 +0200 -Subject: [PATCH 228/268] random: Make it work on rt +Subject: [PATCH 228/283] random: Make it work on rt 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/kernel/patches-4.19.x-rt/0229-cpu-hotplug-Implement-CPU-pinning.patch b/kernel/patches-4.19.x-rt/0229-cpu-hotplug-Implement-CPU-pinning.patch index ff12dec28..d01c71b56 100644 --- a/kernel/patches-4.19.x-rt/0229-cpu-hotplug-Implement-CPU-pinning.patch +++ b/kernel/patches-4.19.x-rt/0229-cpu-hotplug-Implement-CPU-pinning.patch @@ -1,7 +1,7 @@ -From d9742afe3b864bbca10b951c7ed0b8b972aee020 Mon Sep 17 00:00:00 2001 +From 8d14b62a0aef3f8f55641157c07a65df44f4cdda Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 19 Jul 2017 17:31:20 +0200 -Subject: [PATCH 229/268] cpu/hotplug: Implement CPU pinning +Subject: [PATCH 229/283] cpu/hotplug: Implement CPU pinning Signed-off-by: Thomas Gleixner --- @@ -22,7 +22,7 @@ index 76e6cdafb992..0445d5c7ced0 100644 int migrate_disable_atomic; # endif diff --git a/kernel/cpu.c b/kernel/cpu.c -index e1efb98a56de..4f9121244618 100644 +index 9001e1779325..89b56880314d 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -75,6 +75,11 @@ static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state) = { diff --git a/kernel/patches-4.19.x-rt/0230-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch b/kernel/patches-4.19.x-rt/0230-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch index 504637ace..ca7ed6f37 100644 --- a/kernel/patches-4.19.x-rt/0230-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch +++ b/kernel/patches-4.19.x-rt/0230-sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch @@ -1,7 +1,7 @@ -From 514b9e065d13e89df397678ec72ecec1c7228363 Mon Sep 17 00:00:00 2001 +From 3ee298788bec1452e68227e1737ea65b196f5986 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sun, 19 Aug 2018 08:28:35 +0200 -Subject: [PATCH 230/268] sched: Allow pinned user tasks to be awakened to the +Subject: [PATCH 230/283] sched: Allow pinned user tasks to be awakened to the CPU they pinned Since commit 7af443ee16976 ("sched/core: Require cpu_active() in diff --git a/kernel/patches-4.19.x-rt/0231-hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch b/kernel/patches-4.19.x-rt/0231-hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch index e7be53b0e..3cb74c789 100644 --- a/kernel/patches-4.19.x-rt/0231-hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch +++ b/kernel/patches-4.19.x-rt/0231-hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch @@ -1,7 +1,7 @@ -From 7dba9624ee317e72ab248f8fa3e7a8f7cd97fc84 Mon Sep 17 00:00:00 2001 +From 6068c578a8d9cb4f49e39b4ae7f0fd7e60c7d0b6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 18:31:00 +0200 -Subject: [PATCH 231/268] hotplug: duct-tape RT-rwlock usage for non-RT +Subject: [PATCH 231/283] hotplug: duct-tape RT-rwlock usage for non-RT This type is only available on -RT. We need to craft something for non-RT. Since the only migrate_disable() user is -RT only, there is no @@ -13,7 +13,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/kernel/cpu.c b/kernel/cpu.c -index 4f9121244618..3c2135e8cbac 100644 +index 89b56880314d..0523f2f0f4a2 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -75,7 +75,7 @@ static DEFINE_PER_CPU(struct cpuhp_cpu_state, cpuhp_state) = { diff --git a/kernel/patches-4.19.x-rt/0232-net-Remove-preemption-disabling-in-netif_rx.patch b/kernel/patches-4.19.x-rt/0232-net-Remove-preemption-disabling-in-netif_rx.patch index 677bd8740..b48c57307 100644 --- a/kernel/patches-4.19.x-rt/0232-net-Remove-preemption-disabling-in-netif_rx.patch +++ b/kernel/patches-4.19.x-rt/0232-net-Remove-preemption-disabling-in-netif_rx.patch @@ -1,7 +1,7 @@ -From 4b04560187beea2dbdfcc16696f52d7a6f17593a Mon Sep 17 00:00:00 2001 +From 6cb14a01753bb2d287133787ca0f71e692eb74a5 Mon Sep 17 00:00:00 2001 From: Priyanka Jain Date: Thu, 17 May 2012 09:35:11 +0530 -Subject: [PATCH 232/268] net: Remove preemption disabling in netif_rx() +Subject: [PATCH 232/283] net: Remove preemption disabling in netif_rx() 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by diff --git a/kernel/patches-4.19.x-rt/0233-net-Another-local_irq_disable-kmalloc-headache.patch b/kernel/patches-4.19.x-rt/0233-net-Another-local_irq_disable-kmalloc-headache.patch index 3df430461..15885e6ab 100644 --- a/kernel/patches-4.19.x-rt/0233-net-Another-local_irq_disable-kmalloc-headache.patch +++ b/kernel/patches-4.19.x-rt/0233-net-Another-local_irq_disable-kmalloc-headache.patch @@ -1,7 +1,7 @@ -From 53f0e68188d4f6d6b4cfae7150446199bafc00cb Mon Sep 17 00:00:00 2001 +From d96d2893a46a35127c07a99df70a4c2b4bcde7c9 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 26 Sep 2012 16:21:08 +0200 -Subject: [PATCH 233/268] net: Another local_irq_disable/kmalloc headache +Subject: [PATCH 233/283] net: Another local_irq_disable/kmalloc headache Replace it by a local lock. Though that's pretty inefficient :( @@ -11,7 +11,7 @@ Signed-off-by: Thomas Gleixner 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index 8b5768113acd..f89d5388ea07 100644 +index 9b9f696281a9..9ce072fb662e 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -63,6 +63,7 @@ diff --git a/kernel/patches-4.19.x-rt/0234-net-core-protect-users-of-napi_alloc_cache-against-r.patch b/kernel/patches-4.19.x-rt/0234-net-core-protect-users-of-napi_alloc_cache-against-r.patch index bacb97bf3..80233cc0b 100644 --- a/kernel/patches-4.19.x-rt/0234-net-core-protect-users-of-napi_alloc_cache-against-r.patch +++ b/kernel/patches-4.19.x-rt/0234-net-core-protect-users-of-napi_alloc_cache-against-r.patch @@ -1,7 +1,7 @@ -From 4e22e8fa0088f0fe1d6b2c2649fcfd195cccb384 Mon Sep 17 00:00:00 2001 +From a3b202fa9f0aec800acb97c47a90c7c0ca27283f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 15 Jan 2016 16:33:34 +0100 -Subject: [PATCH 234/268] net/core: protect users of napi_alloc_cache against +Subject: [PATCH 234/283] net/core: protect users of napi_alloc_cache against reentrance On -RT the code running in BH can not be moved to another CPU so CPU @@ -17,7 +17,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/net/core/skbuff.c b/net/core/skbuff.c -index f89d5388ea07..e20b1f25a273 100644 +index 9ce072fb662e..15375d68b006 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -332,6 +332,7 @@ struct napi_alloc_cache { diff --git a/kernel/patches-4.19.x-rt/0235-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch b/kernel/patches-4.19.x-rt/0235-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch index 5fc841265..e06b4bb2c 100644 --- a/kernel/patches-4.19.x-rt/0235-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch +++ b/kernel/patches-4.19.x-rt/0235-net-netfilter-Serialize-xt_write_recseq-sections-on-.patch @@ -1,7 +1,7 @@ -From 61b1586ad82dc40ec6c262a76c390cfe1b64d256 Mon Sep 17 00:00:00 2001 +From 0e06ddd7109d337dafee0134e5e07c2a2ca1b4fb Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Sun, 28 Oct 2012 11:18:08 +0100 -Subject: [PATCH 235/268] net: netfilter: Serialize xt_write_recseq sections on +Subject: [PATCH 235/283] net: netfilter: Serialize xt_write_recseq sections on RT The netfilter code relies only on the implicit semantics of diff --git a/kernel/patches-4.19.x-rt/0236-net-Add-a-mutex-around-devnet_rename_seq.patch b/kernel/patches-4.19.x-rt/0236-net-Add-a-mutex-around-devnet_rename_seq.patch index 91b6545b3..f1afa84c3 100644 --- a/kernel/patches-4.19.x-rt/0236-net-Add-a-mutex-around-devnet_rename_seq.patch +++ b/kernel/patches-4.19.x-rt/0236-net-Add-a-mutex-around-devnet_rename_seq.patch @@ -1,7 +1,7 @@ -From 8292ac83590c63465d9f1eb234358dc12148d06d Mon Sep 17 00:00:00 2001 +From c9f595c704d979c0123fa62e3ef3a6254b32f2da Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 20 Mar 2013 18:06:20 +0100 -Subject: [PATCH 236/268] net: Add a mutex around devnet_rename_seq +Subject: [PATCH 236/283] net: Add a mutex around devnet_rename_seq On RT write_seqcount_begin() disables preemption and device_rename() allocates memory with GFP_KERNEL and grabs later the sysfs_mutex diff --git a/kernel/patches-4.19.x-rt/0237-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch b/kernel/patches-4.19.x-rt/0237-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch index 470589499..5f239b53e 100644 --- a/kernel/patches-4.19.x-rt/0237-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch +++ b/kernel/patches-4.19.x-rt/0237-lockdep-selftest-Only-do-hardirq-context-test-for-ra.patch @@ -1,7 +1,7 @@ -From 25b09445ad17e5bff831abafb029bcc3373b3e85 Mon Sep 17 00:00:00 2001 +From 817d0f6091be31075e77cb513f97d3087a692e82 Mon Sep 17 00:00:00 2001 From: Yong Zhang Date: Mon, 16 Apr 2012 15:01:56 +0800 -Subject: [PATCH 237/268] lockdep: selftest: Only do hardirq context test for +Subject: [PATCH 237/283] lockdep: selftest: Only do hardirq context test for raw spinlock On -rt there is no softirq context any more and rwlock is sleepable, diff --git a/kernel/patches-4.19.x-rt/0238-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/kernel/patches-4.19.x-rt/0238-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch index 748617ca0..4be342e38 100644 --- a/kernel/patches-4.19.x-rt/0238-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch +++ b/kernel/patches-4.19.x-rt/0238-lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch @@ -1,7 +1,7 @@ -From 05624840469b292b98e66584cfbe5234cc37a2fa Mon Sep 17 00:00:00 2001 +From 26b50852450a192a47d4baaaeb4911d5fa54789a Mon Sep 17 00:00:00 2001 From: Josh Cartwright Date: Wed, 28 Jan 2015 13:08:45 -0600 -Subject: [PATCH 238/268] lockdep: selftest: fix warnings due to missing +Subject: [PATCH 238/283] lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals "lockdep: Selftest: Only do hardirq context test for raw spinlock" diff --git a/kernel/patches-4.19.x-rt/0239-sched-Add-support-for-lazy-preemption.patch b/kernel/patches-4.19.x-rt/0239-sched-Add-support-for-lazy-preemption.patch index 4a7207f2c..690294b7e 100644 --- a/kernel/patches-4.19.x-rt/0239-sched-Add-support-for-lazy-preemption.patch +++ b/kernel/patches-4.19.x-rt/0239-sched-Add-support-for-lazy-preemption.patch @@ -1,7 +1,7 @@ -From ee6a6c573101060336e51ddacf0faa38099ddd9d Mon Sep 17 00:00:00 2001 +From 8cc7d52a64f1f62c24514589af91171961b4b31a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 26 Oct 2012 18:50:54 +0100 -Subject: [PATCH 239/268] sched: Add support for lazy preemption +Subject: [PATCH 239/283] sched: Add support for lazy preemption It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -244,7 +244,7 @@ index 907d72b3ba95..306567f72a3e 100644 prompt "Preemption Model" default PREEMPT_NONE diff --git a/kernel/cpu.c b/kernel/cpu.c -index 3c2135e8cbac..22a479fb720d 100644 +index 0523f2f0f4a2..3857a0afdfbf 100644 --- a/kernel/cpu.c +++ b/kernel/cpu.c @@ -304,11 +304,13 @@ void pin_current_cpu(void) @@ -529,7 +529,7 @@ index 49ae30da28ee..f7c1c262457f 100644 extern void init_rt_bandwidth(struct rt_bandwidth *rt_b, u64 period, u64 runtime); diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index 10843c80cffb..d51fc6825a6b 100644 +index 496c5d358010..da619e974a11 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -2137,6 +2137,7 @@ tracing_generic_entry_update(struct trace_entry *entry, unsigned long flags, @@ -601,7 +601,7 @@ index 10843c80cffb..d51fc6825a6b 100644 } diff --git a/kernel/trace/trace.h b/kernel/trace/trace.h -index 447bd96ee658..65afd0c04622 100644 +index d11d7bfc3fa5..6eba8c96f4bc 100644 --- a/kernel/trace/trace.h +++ b/kernel/trace/trace.h @@ -127,6 +127,7 @@ struct kretprobe_trace_entry_head { diff --git a/kernel/patches-4.19.x-rt/0240-ftrace-Fix-trace-header-alignment.patch b/kernel/patches-4.19.x-rt/0240-ftrace-Fix-trace-header-alignment.patch index f302aa3e7..fbe4aa414 100644 --- a/kernel/patches-4.19.x-rt/0240-ftrace-Fix-trace-header-alignment.patch +++ b/kernel/patches-4.19.x-rt/0240-ftrace-Fix-trace-header-alignment.patch @@ -1,7 +1,7 @@ -From b5f1bda181e054ae5afcfb2a2fb671ec16ea211f Mon Sep 17 00:00:00 2001 +From 03fa817c57795a125667feb747f1c683b3c456c1 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sun, 16 Oct 2016 05:08:30 +0200 -Subject: [PATCH 240/268] ftrace: Fix trace header alignment +Subject: [PATCH 240/283] ftrace: Fix trace header alignment Line up helper arrows to the right column. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c -index d51fc6825a6b..2ce8428d0f45 100644 +index da619e974a11..f82da65109eb 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c @@ -3351,17 +3351,17 @@ get_total_entries(struct trace_buffer *buf, diff --git a/kernel/patches-4.19.x-rt/0241-x86-Support-for-lazy-preemption.patch b/kernel/patches-4.19.x-rt/0241-x86-Support-for-lazy-preemption.patch index 35ee7545c..0285148d6 100644 --- a/kernel/patches-4.19.x-rt/0241-x86-Support-for-lazy-preemption.patch +++ b/kernel/patches-4.19.x-rt/0241-x86-Support-for-lazy-preemption.patch @@ -1,7 +1,7 @@ -From d6770ae0dff21e273f805126b99ad09e602ad27f Mon Sep 17 00:00:00 2001 +From fb20d310604701fc1f1d53bf74f792f58a83812f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 1 Nov 2012 11:03:47 +0100 -Subject: [PATCH 241/268] x86: Support for lazy preemption +Subject: [PATCH 241/283] x86: Support for lazy preemption Implement the x86 pieces for lazy preempt. diff --git a/kernel/patches-4.19.x-rt/0242-x86-lazy-preempt-properly-check-against-preempt-mask.patch b/kernel/patches-4.19.x-rt/0242-x86-lazy-preempt-properly-check-against-preempt-mask.patch index e5f9a32e0..9f4ffdcfe 100644 --- a/kernel/patches-4.19.x-rt/0242-x86-lazy-preempt-properly-check-against-preempt-mask.patch +++ b/kernel/patches-4.19.x-rt/0242-x86-lazy-preempt-properly-check-against-preempt-mask.patch @@ -1,7 +1,7 @@ -From 5e63d7fdebaf84c9c726a49717401f852d254be4 Mon Sep 17 00:00:00 2001 +From e9b59157aa2e702f58d3f7c6f1d6fbcef65dc75b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 18 Feb 2019 16:57:09 +0100 -Subject: [PATCH 242/268] x86: lazy-preempt: properly check against +Subject: [PATCH 242/283] x86: lazy-preempt: properly check against preempt-mask should_resched() should check against preempt_offset after unmasking the diff --git a/kernel/patches-4.19.x-rt/0243-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch b/kernel/patches-4.19.x-rt/0243-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch index 99df63d1c..0388118a5 100644 --- a/kernel/patches-4.19.x-rt/0243-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch +++ b/kernel/patches-4.19.x-rt/0243-x86-lazy-preempt-use-proper-return-label-on-32bit-x8.patch @@ -1,7 +1,7 @@ -From 1061769ef29ec710d0bf7711fe2d26545802a9e0 Mon Sep 17 00:00:00 2001 +From fb5b75a4b989c8e039eb585a99ee0c41ae05664b Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Feb 2019 14:53:49 +0100 -Subject: [PATCH 243/268] x86: lazy-preempt: use proper return label on +Subject: [PATCH 243/283] x86: lazy-preempt: use proper return label on 32bit-x86 The lazy-preempt uses the wrong return label in case preemption isn't diff --git a/kernel/patches-4.19.x-rt/0244-arm-Add-support-for-lazy-preemption.patch b/kernel/patches-4.19.x-rt/0244-arm-Add-support-for-lazy-preemption.patch index 5b444498e..c4a32b1bd 100644 --- a/kernel/patches-4.19.x-rt/0244-arm-Add-support-for-lazy-preemption.patch +++ b/kernel/patches-4.19.x-rt/0244-arm-Add-support-for-lazy-preemption.patch @@ -1,7 +1,7 @@ -From a60760dfedf815d50588123352546ba525d3adac Mon Sep 17 00:00:00 2001 +From f83f8291ac518e18c94e68d86fe1639ba7b25a2f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 31 Oct 2012 12:04:11 +0100 -Subject: [PATCH 244/268] arm: Add support for lazy preemption +Subject: [PATCH 244/283] arm: Add support for lazy preemption Implement the arm pieces for lazy preempt. diff --git a/kernel/patches-4.19.x-rt/0245-powerpc-Add-support-for-lazy-preemption.patch b/kernel/patches-4.19.x-rt/0245-powerpc-Add-support-for-lazy-preemption.patch index 92781db2d..566ddf36f 100644 --- a/kernel/patches-4.19.x-rt/0245-powerpc-Add-support-for-lazy-preemption.patch +++ b/kernel/patches-4.19.x-rt/0245-powerpc-Add-support-for-lazy-preemption.patch @@ -1,7 +1,7 @@ -From 5cd763fb8c07928da73bfd294ac7ede226d022d9 Mon Sep 17 00:00:00 2001 +From 47a223b448c07e6c574e14e44d912dcd27ca4803 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 1 Nov 2012 10:14:11 +0100 -Subject: [PATCH 245/268] powerpc: Add support for lazy preemption +Subject: [PATCH 245/283] powerpc: Add support for lazy preemption Implement the powerpc pieces for lazy preempt. diff --git a/kernel/patches-4.19.x-rt/0246-arch-arm64-Add-lazy-preempt-support.patch b/kernel/patches-4.19.x-rt/0246-arch-arm64-Add-lazy-preempt-support.patch index 8479af84b..5936c5834 100644 --- a/kernel/patches-4.19.x-rt/0246-arch-arm64-Add-lazy-preempt-support.patch +++ b/kernel/patches-4.19.x-rt/0246-arch-arm64-Add-lazy-preempt-support.patch @@ -1,7 +1,7 @@ -From e8dc1790091506a4fad530f2fc6da1428bf2f698 Mon Sep 17 00:00:00 2001 +From 283e7db367d829d84c78b83eb0099bc009fadcb4 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Thu, 14 May 2015 17:52:17 +0200 -Subject: [PATCH 246/268] arch/arm64: Add lazy preempt support +Subject: [PATCH 246/283] arch/arm64: Add lazy preempt support 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/kernel/patches-4.19.x-rt/0247-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch b/kernel/patches-4.19.x-rt/0247-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch index b7189551a..02b47a5e4 100644 --- a/kernel/patches-4.19.x-rt/0247-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch +++ b/kernel/patches-4.19.x-rt/0247-connector-cn_proc-Protect-send_msg-with-a-local-lock.patch @@ -1,7 +1,7 @@ -From 8169023aa101ae83455a3d6ffa9d92c9a22260cc Mon Sep 17 00:00:00 2001 +From cb13c6a753442e63d2b8097a890892bdd36305f1 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sun, 16 Oct 2016 05:11:54 +0200 -Subject: [PATCH 247/268] connector/cn_proc: Protect send_msg() with a local +Subject: [PATCH 247/283] connector/cn_proc: Protect send_msg() with a local lock on RT |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 diff --git a/kernel/patches-4.19.x-rt/0248-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/kernel/patches-4.19.x-rt/0248-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index 7d29907e1..17492cbbb 100644 --- a/kernel/patches-4.19.x-rt/0248-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +++ b/kernel/patches-4.19.x-rt/0248-drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -1,7 +1,7 @@ -From dcd28a1256254829109ceff081064f369eb310f8 Mon Sep 17 00:00:00 2001 +From 0a9138797894a06ad63067de77df6b2dcd97b61e Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Thu, 31 Mar 2016 04:08:28 +0200 -Subject: [PATCH 248/268] drivers/block/zram: Replace bit spinlocks with +Subject: [PATCH 248/283] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt They're nondeterministic, and lead to ___might_sleep() splats in -rt. diff --git a/kernel/patches-4.19.x-rt/0249-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch b/kernel/patches-4.19.x-rt/0249-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch index de0721ac8..4c15e6790 100644 --- a/kernel/patches-4.19.x-rt/0249-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch +++ b/kernel/patches-4.19.x-rt/0249-drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch @@ -1,7 +1,7 @@ -From 7ebc2fcbf40e267f5fc4785c62b5325e77dad1ce Mon Sep 17 00:00:00 2001 +From 3af8e8733e58687a2fe72ce5b8d47e458d09a9b5 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Thu, 20 Oct 2016 11:15:22 +0200 -Subject: [PATCH 249/268] drivers/zram: Don't disable preemption in +Subject: [PATCH 249/283] drivers/zram: Don't disable preemption in zcomp_stream_get/put() In v4.7, the driver switched to percpu compression streams, disabling diff --git a/kernel/patches-4.19.x-rt/0250-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch b/kernel/patches-4.19.x-rt/0250-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch index 8a207c84b..04659577d 100644 --- a/kernel/patches-4.19.x-rt/0250-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch +++ b/kernel/patches-4.19.x-rt/0250-drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch @@ -1,7 +1,7 @@ -From fd52008a2b0352c7b7ce12ab4e30805d94564ab3 Mon Sep 17 00:00:00 2001 +From 50839b1e639f5c139278123e369ebdb5066c325e Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Wed, 23 Aug 2017 11:57:29 +0200 -Subject: [PATCH 250/268] drivers/zram: fix zcomp_stream_get() +Subject: [PATCH 250/283] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code Use get_local_ptr() instead this_cpu_ptr() to avoid a warning regarding diff --git a/kernel/patches-4.19.x-rt/0251-tpm_tis-fix-stall-after-iowrite-s.patch b/kernel/patches-4.19.x-rt/0251-tpm_tis-fix-stall-after-iowrite-s.patch index a435a8959..5bfb509ec 100644 --- a/kernel/patches-4.19.x-rt/0251-tpm_tis-fix-stall-after-iowrite-s.patch +++ b/kernel/patches-4.19.x-rt/0251-tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,7 +1,7 @@ -From 110d89555fb0f82f8491bbcf96736254479f125f Mon Sep 17 00:00:00 2001 +From fb66fc28332e7786f93815228991067bf2b7feff Mon Sep 17 00:00:00 2001 From: Haris Okanovic Date: Tue, 15 Aug 2017 15:13:08 -0500 -Subject: [PATCH 251/268] tpm_tis: fix stall after iowrite*()s +Subject: [PATCH 251/283] tpm_tis: fix stall after iowrite*()s 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/kernel/patches-4.19.x-rt/0252-watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch b/kernel/patches-4.19.x-rt/0252-watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch index 176336cb0..aa72800d6 100644 --- a/kernel/patches-4.19.x-rt/0252-watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0252-watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch @@ -1,7 +1,7 @@ -From 0a3f47112dded98a022bfe83cc49f4b601110324 Mon Sep 17 00:00:00 2001 +From 4ebb1f9be0a95dc2c8bb4b0b1d465d5c395f49a6 Mon Sep 17 00:00:00 2001 From: Julia Cartwright Date: Fri, 28 Sep 2018 21:03:51 +0000 -Subject: [PATCH 252/268] watchdog: prevent deferral of watchdogd wakeup on RT +Subject: [PATCH 252/283] watchdog: prevent deferral of watchdogd wakeup on RT When PREEMPT_RT_FULL is enabled, all hrtimer expiry functions are deferred for execution into the context of ktimersoftd unless otherwise diff --git a/kernel/patches-4.19.x-rt/0253-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch b/kernel/patches-4.19.x-rt/0253-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch index adc3f65fa..4128040c4 100644 --- a/kernel/patches-4.19.x-rt/0253-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch +++ b/kernel/patches-4.19.x-rt/0253-drm-radeon-i915-Use-preempt_disable-enable_rt-where-.patch @@ -1,7 +1,7 @@ -From 5f676ed79ba9cc4ec81db474c5928fa2e0131bc3 Mon Sep 17 00:00:00 2001 +From 40e35f1fee95ea4707c63bde3f25068e2cc24cc5 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sat, 27 Feb 2016 08:09:11 +0100 -Subject: [PATCH 253/268] drm,radeon,i915: Use preempt_disable/enable_rt() +Subject: [PATCH 253/283] drm,radeon,i915: Use preempt_disable/enable_rt() where recommended DRM folks identified the spots, so use them. diff --git a/kernel/patches-4.19.x-rt/0254-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch b/kernel/patches-4.19.x-rt/0254-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch index 76a59bb28..ecbab1129 100644 --- a/kernel/patches-4.19.x-rt/0254-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch +++ b/kernel/patches-4.19.x-rt/0254-drm-i915-Use-local_lock-unlock_irq-in-intel_pipe_upd.patch @@ -1,7 +1,7 @@ -From 510af70547824cb615012d83872da2e69ced62ed Mon Sep 17 00:00:00 2001 +From dc4f20a517dce3a46fc2bc46240fb2f9452ce1cd Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sat, 27 Feb 2016 09:01:42 +0100 -Subject: [PATCH 254/268] drm,i915: Use local_lock/unlock_irq() in +Subject: [PATCH 254/283] drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end() [ 8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918 diff --git a/kernel/patches-4.19.x-rt/0255-drm-i915-disable-tracing-on-RT.patch b/kernel/patches-4.19.x-rt/0255-drm-i915-disable-tracing-on-RT.patch index c44b45bd0..086bac476 100644 --- a/kernel/patches-4.19.x-rt/0255-drm-i915-disable-tracing-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0255-drm-i915-disable-tracing-on-RT.patch @@ -1,7 +1,7 @@ -From 680c563b9d44305039cfce83a00de477d11d2c9e Mon Sep 17 00:00:00 2001 +From d884bf96bfbde9a4c7e1435aa0745e52891ae9fa Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 6 Dec 2018 09:52:20 +0100 -Subject: [PATCH 255/268] drm/i915: disable tracing on -RT +Subject: [PATCH 255/283] drm/i915: disable tracing on -RT Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 diff --git a/kernel/patches-4.19.x-rt/0256-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/kernel/patches-4.19.x-rt/0256-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch index 65ae9303f..fc18a701b 100644 --- a/kernel/patches-4.19.x-rt/0256-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +++ b/kernel/patches-4.19.x-rt/0256-drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch @@ -1,7 +1,7 @@ -From 26dabed799217a8f8f8b23777f78341813d319b5 Mon Sep 17 00:00:00 2001 +From 59051415a63f69b8eb7e36f6e30119334967d711 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 19 Dec 2018 10:47:02 +0100 -Subject: [PATCH 256/268] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with +Subject: [PATCH 256/283] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE The order of the header files is important. If this header file is diff --git a/kernel/patches-4.19.x-rt/0257-cgroups-use-simple-wait-in-css_release.patch b/kernel/patches-4.19.x-rt/0257-cgroups-use-simple-wait-in-css_release.patch index 91267668b..95791e6d3 100644 --- a/kernel/patches-4.19.x-rt/0257-cgroups-use-simple-wait-in-css_release.patch +++ b/kernel/patches-4.19.x-rt/0257-cgroups-use-simple-wait-in-css_release.patch @@ -1,7 +1,7 @@ -From bbb2678c2b60796f1abfd72bfe5492ee96013605 Mon Sep 17 00:00:00 2001 +From bd17886ee0bbb3d61ca16373b799a2e9f4f71fb3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 13 Feb 2015 15:52:24 +0100 -Subject: [PATCH 257/268] cgroups: use simple wait in css_release() +Subject: [PATCH 257/283] cgroups: use simple wait in css_release() To avoid: |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914 diff --git a/kernel/patches-4.19.x-rt/0258-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/kernel/patches-4.19.x-rt/0258-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch index 9809b5679..6a8c9c139 100644 --- a/kernel/patches-4.19.x-rt/0258-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch +++ b/kernel/patches-4.19.x-rt/0258-cpuset-Convert-callback_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ -From 660cd6e4eb91ed508585d0ec7bdf19c87a17f1e0 Mon Sep 17 00:00:00 2001 +From ca3c9be1f8eb136f8c37c87c0eb8a528ebbbba72 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sun, 8 Jan 2017 09:32:25 +0100 -Subject: [PATCH 258/268] cpuset: Convert callback_lock to raw_spinlock_t +Subject: [PATCH 258/283] cpuset: Convert callback_lock to raw_spinlock_t The two commits below add up to a cpuset might_sleep() splat for RT: @@ -50,7 +50,7 @@ Signed-off-by: Sebastian Andrzej Siewior 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/kernel/cgroup/cpuset.c b/kernel/cgroup/cpuset.c -index ef085d84a940..3e5d90076368 100644 +index 7bb129c5b412..92575cb9b493 100644 --- a/kernel/cgroup/cpuset.c +++ b/kernel/cgroup/cpuset.c @@ -288,7 +288,7 @@ static struct cpuset top_cpuset = { @@ -255,8 +255,8 @@ index ef085d84a940..3e5d90076368 100644 + raw_spin_unlock_irqrestore(&callback_lock, flags); } - void cpuset_cpus_allowed_fallback(struct task_struct *tsk) -@@ -2477,11 +2477,11 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk) + /** +@@ -2490,11 +2490,11 @@ nodemask_t cpuset_mems_allowed(struct task_struct *tsk) nodemask_t mask; unsigned long flags; @@ -270,7 +270,7 @@ index ef085d84a940..3e5d90076368 100644 return mask; } -@@ -2573,14 +2573,14 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask) +@@ -2586,14 +2586,14 @@ bool __cpuset_node_allowed(int node, gfp_t gfp_mask) return true; /* Not hardwall and node outside mems_allowed: scan up cpusets */ diff --git a/kernel/patches-4.19.x-rt/0259-apparmor-use-a-locallock-instead-preempt_disable.patch b/kernel/patches-4.19.x-rt/0259-apparmor-use-a-locallock-instead-preempt_disable.patch index 04b82bd10..f9189410b 100644 --- a/kernel/patches-4.19.x-rt/0259-apparmor-use-a-locallock-instead-preempt_disable.patch +++ b/kernel/patches-4.19.x-rt/0259-apparmor-use-a-locallock-instead-preempt_disable.patch @@ -1,7 +1,7 @@ -From 871cfd9e5e7aafaf8b0bcbbf0a4c4336e250fc27 Mon Sep 17 00:00:00 2001 +From 304bb4fbcbaaf44ce6ea8b7605d79c64d72c47df Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 11 Oct 2017 17:43:49 +0200 -Subject: [PATCH 259/268] apparmor: use a locallock instead preempt_disable() +Subject: [PATCH 259/283] apparmor: use a locallock instead preempt_disable() 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/kernel/patches-4.19.x-rt/0260-workqueue-Prevent-deadlock-stall-on-RT.patch b/kernel/patches-4.19.x-rt/0260-workqueue-Prevent-deadlock-stall-on-RT.patch index 2c7b9649e..f18d0c451 100644 --- a/kernel/patches-4.19.x-rt/0260-workqueue-Prevent-deadlock-stall-on-RT.patch +++ b/kernel/patches-4.19.x-rt/0260-workqueue-Prevent-deadlock-stall-on-RT.patch @@ -1,7 +1,7 @@ -From 0a4863ce60343bab3b2dd5a078a1c4b9d6a74284 Mon Sep 17 00:00:00 2001 +From 9d56ef1ce2d305509eb734d96c2bd1799ef7314f Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 27 Jun 2014 16:24:52 +0200 -Subject: [PATCH 260/268] workqueue: Prevent deadlock/stall on RT +Subject: [PATCH 260/283] workqueue: Prevent deadlock/stall on RT Austin reported a XFS deadlock/stall on RT where scheduled work gets never exececuted and tasks are waiting for each other for ever. diff --git a/kernel/patches-4.19.x-rt/0261-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/kernel/patches-4.19.x-rt/0261-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch index 5ae2136e9..edfa51e74 100644 --- a/kernel/patches-4.19.x-rt/0261-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/kernel/patches-4.19.x-rt/0261-signals-Allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,7 +1,7 @@ -From c5297a99ba9d1c0b75c3650cc5b18cbecec62838 Mon Sep 17 00:00:00 2001 +From 0eec97926a2deb4ccc517f574a40578bddc19cd7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:56 -0500 -Subject: [PATCH 261/268] signals: Allow rt tasks to cache one sigqueue struct +Subject: [PATCH 261/283] signals: Allow rt tasks to cache one sigqueue struct To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. diff --git a/kernel/patches-4.19.x-rt/0262-Add-localversion-for-RT-release.patch b/kernel/patches-4.19.x-rt/0262-Add-localversion-for-RT-release.patch index a52728ea5..3aa0c0dfa 100644 --- a/kernel/patches-4.19.x-rt/0262-Add-localversion-for-RT-release.patch +++ b/kernel/patches-4.19.x-rt/0262-Add-localversion-for-RT-release.patch @@ -1,7 +1,7 @@ -From d3d4bb55c2d289271ff369309d3f8675e651165d Mon Sep 17 00:00:00 2001 +From 1d605947258bfd1a27d7d2d155e7466da763ffd2 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 8 Jul 2011 20:25:16 +0200 -Subject: [PATCH 262/268] Add localversion for -RT release +Subject: [PATCH 262/283] Add localversion for -RT release Signed-off-by: Thomas Gleixner --- diff --git a/kernel/patches-4.19.x-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch b/kernel/patches-4.19.x-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch index 1bb51863e..d4ac1aca9 100644 --- a/kernel/patches-4.19.x-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch +++ b/kernel/patches-4.19.x-rt/0263-powerpc-pseries-iommu-Use-a-locallock-instead-local_.patch @@ -1,7 +1,7 @@ -From c9f120d53a7fa150f6f26dcfdc6edbde3e42d9ec Mon Sep 17 00:00:00 2001 +From e3dd55f0a687316bb52bce0835070079b26a21a2 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 26 Mar 2019 18:31:54 +0100 -Subject: [PATCH 263/268] powerpc/pseries/iommu: Use a locallock instead +Subject: [PATCH 263/283] powerpc/pseries/iommu: Use a locallock instead local_irq_save() The locallock protects the per-CPU variable tce_page. The function diff --git a/kernel/patches-4.19.x-rt/0264-powerpc-reshuffle-TIF-bits.patch b/kernel/patches-4.19.x-rt/0264-powerpc-reshuffle-TIF-bits.patch index d5879e52f..3ad108b51 100644 --- a/kernel/patches-4.19.x-rt/0264-powerpc-reshuffle-TIF-bits.patch +++ b/kernel/patches-4.19.x-rt/0264-powerpc-reshuffle-TIF-bits.patch @@ -1,7 +1,7 @@ -From a55a83a5c20bf641d7ded63b53e940f54c16778f Mon Sep 17 00:00:00 2001 +From 76ccb7ba434581a4fa6338c0451f3f0752582520 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 22 Mar 2019 17:15:58 +0100 -Subject: [PATCH 264/268] powerpc: reshuffle TIF bits +Subject: [PATCH 264/283] powerpc: reshuffle TIF bits Powerpc32/64 does not compile because TIF_SYSCALL_TRACE's bit is higher than 15 and the assembly instructions don't expect that. diff --git a/kernel/patches-4.19.x-rt/0265-tty-sysrq-Convert-show_lock-to-raw_spinlock_t.patch b/kernel/patches-4.19.x-rt/0265-tty-sysrq-Convert-show_lock-to-raw_spinlock_t.patch index ee735d527..80ce4386c 100644 --- a/kernel/patches-4.19.x-rt/0265-tty-sysrq-Convert-show_lock-to-raw_spinlock_t.patch +++ b/kernel/patches-4.19.x-rt/0265-tty-sysrq-Convert-show_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ -From a42ebff10207ebde6b4075a9d6ad13d2c9544f79 Mon Sep 17 00:00:00 2001 +From f264ec0373b575d16c232921fab39a5d7a6a3c21 Mon Sep 17 00:00:00 2001 From: Julien Grall Date: Wed, 13 Mar 2019 11:40:34 +0000 -Subject: [PATCH 265/268] tty/sysrq: Convert show_lock to raw_spinlock_t +Subject: [PATCH 265/283] tty/sysrq: Convert show_lock to raw_spinlock_t Systems which don't provide arch_trigger_cpumask_backtrace() will invoke showacpu() from a smp_call_function() function which is invoked diff --git a/kernel/patches-4.19.x-rt/0266-drm-i915-Don-t-disable-interrupts-independently-of-t.patch b/kernel/patches-4.19.x-rt/0266-drm-i915-Don-t-disable-interrupts-independently-of-t.patch index 6e2149d0f..d2e814f1c 100644 --- a/kernel/patches-4.19.x-rt/0266-drm-i915-Don-t-disable-interrupts-independently-of-t.patch +++ b/kernel/patches-4.19.x-rt/0266-drm-i915-Don-t-disable-interrupts-independently-of-t.patch @@ -1,7 +1,7 @@ -From f182d4e0b74c93b0e62a427ed236247d584d3e1a Mon Sep 17 00:00:00 2001 +From da8db6d203d29fd33215f60a1948967f2fe76386 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 10 Apr 2019 11:01:37 +0200 -Subject: [PATCH 266/268] drm/i915: Don't disable interrupts independently of +Subject: [PATCH 266/283] drm/i915: Don't disable interrupts independently of the lock The locks (timeline->lock and rq->lock) need to be taken with disabled diff --git a/kernel/patches-4.19.x-rt/0267-sched-completion-Fix-a-lockup-in-wait_for_completion.patch b/kernel/patches-4.19.x-rt/0267-sched-completion-Fix-a-lockup-in-wait_for_completion.patch index 7b06827f1..bf01908fd 100644 --- a/kernel/patches-4.19.x-rt/0267-sched-completion-Fix-a-lockup-in-wait_for_completion.patch +++ b/kernel/patches-4.19.x-rt/0267-sched-completion-Fix-a-lockup-in-wait_for_completion.patch @@ -1,7 +1,7 @@ -From e331096b94e8826b34dbbfc482bcb357e0ec2963 Mon Sep 17 00:00:00 2001 +From 2de445a925a0c92865a6308ce0e1587ebc250ccb Mon Sep 17 00:00:00 2001 From: Corey Minyard Date: Thu, 9 May 2019 14:33:20 -0500 -Subject: [PATCH 267/268] sched/completion: Fix a lockup in +Subject: [PATCH 267/283] sched/completion: Fix a lockup in wait_for_completion() Consider following race: diff --git a/kernel/patches-4.19.x-rt/0268-kthread-add-a-global-worker-thread.patch b/kernel/patches-4.19.x-rt/0268-kthread-add-a-global-worker-thread.patch new file mode 100644 index 000000000..b85c615f7 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0268-kthread-add-a-global-worker-thread.patch @@ -0,0 +1,179 @@ +From 59fa1a99358d2859eff36b2531fed5a219437ad5 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Tue, 12 Feb 2019 15:09:38 +0100 +Subject: [PATCH 268/283] kthread: add a global worker thread. + +[ Upstream commit 0532e87d9d44795221aa921ba7024bde689cc894 ] + +Add kthread_schedule_work() which uses a global kthread for all its +jobs. +Split the cgroup include to avoid recussive includes from interrupt.h. +Fixup everything that fails to build (and did not include all header). + +Signed-off-by: Sebastian Andrzej Siewior +[ + Fixed up include in blk-cgroup.h reported by Juri Lelli + http://lkml.kernel.org/r/20190722083009.GE25636@localhost.localdomain +] +Signed-off-by: Steven Rostedt (VMware) +--- + drivers/block/loop.c | 2 +- + drivers/spi/spi-rockchip.c | 1 + + include/linux/blk-cgroup.h | 2 +- + include/linux/kthread-cgroup.h | 17 +++++++++++++++++ + include/linux/kthread.h | 17 +++++++---------- + init/main.c | 1 + + kernel/kthread.c | 14 ++++++++++++++ + 7 files changed, 42 insertions(+), 12 deletions(-) + create mode 100644 include/linux/kthread-cgroup.h + +diff --git a/drivers/block/loop.c b/drivers/block/loop.c +index f1e63eb7cbca..aa76c816dbb4 100644 +--- a/drivers/block/loop.c ++++ b/drivers/block/loop.c +@@ -70,7 +70,7 @@ + #include + #include + #include +-#include ++#include + #include + #include + #include +diff --git a/drivers/spi/spi-rockchip.c b/drivers/spi/spi-rockchip.c +index fdcf3076681b..b56619418cea 100644 +--- a/drivers/spi/spi-rockchip.c ++++ b/drivers/spi/spi-rockchip.c +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + + #define DRIVER_NAME "rockchip-spi" + +diff --git a/include/linux/blk-cgroup.h b/include/linux/blk-cgroup.h +index 6d766a19f2bb..0473efda4c65 100644 +--- a/include/linux/blk-cgroup.h ++++ b/include/linux/blk-cgroup.h +@@ -14,7 +14,7 @@ + * Nauman Rafique + */ + +-#include ++#include + #include + #include + #include +diff --git a/include/linux/kthread-cgroup.h b/include/linux/kthread-cgroup.h +new file mode 100644 +index 000000000000..53d34bca9d72 +--- /dev/null ++++ b/include/linux/kthread-cgroup.h +@@ -0,0 +1,17 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ ++#ifndef _LINUX_KTHREAD_CGROUP_H ++#define _LINUX_KTHREAD_CGROUP_H ++#include ++#include ++ ++#ifdef CONFIG_BLK_CGROUP ++void kthread_associate_blkcg(struct cgroup_subsys_state *css); ++struct cgroup_subsys_state *kthread_blkcg(void); ++#else ++static inline void kthread_associate_blkcg(struct cgroup_subsys_state *css) { } ++static inline struct cgroup_subsys_state *kthread_blkcg(void) ++{ ++ return NULL; ++} ++#endif ++#endif +diff --git a/include/linux/kthread.h b/include/linux/kthread.h +index ad292898f7f2..7cf56eb54103 100644 +--- a/include/linux/kthread.h ++++ b/include/linux/kthread.h +@@ -4,7 +4,6 @@ + /* Simple interface for creating and stopping kernel threads without mess. */ + #include + #include +-#include + + __printf(4, 5) + struct task_struct *kthread_create_on_node(int (*threadfn)(void *data), +@@ -106,7 +105,7 @@ struct kthread_delayed_work { + }; + + #define KTHREAD_WORKER_INIT(worker) { \ +- .lock = __SPIN_LOCK_UNLOCKED((worker).lock), \ ++ .lock = __RAW_SPIN_LOCK_UNLOCKED((worker).lock), \ + .work_list = LIST_HEAD_INIT((worker).work_list), \ + .delayed_work_list = LIST_HEAD_INIT((worker).delayed_work_list),\ + } +@@ -198,14 +197,12 @@ bool kthread_cancel_delayed_work_sync(struct kthread_delayed_work *work); + + void kthread_destroy_worker(struct kthread_worker *worker); + +-#ifdef CONFIG_BLK_CGROUP +-void kthread_associate_blkcg(struct cgroup_subsys_state *css); +-struct cgroup_subsys_state *kthread_blkcg(void); +-#else +-static inline void kthread_associate_blkcg(struct cgroup_subsys_state *css) { } +-static inline struct cgroup_subsys_state *kthread_blkcg(void) ++extern struct kthread_worker kthread_global_worker; ++void kthread_init_global_worker(void); ++ ++static inline bool kthread_schedule_work(struct kthread_work *work) + { +- return NULL; ++ return kthread_queue_work(&kthread_global_worker, work); + } +-#endif ++ + #endif /* _LINUX_KTHREAD_H */ +diff --git a/init/main.c b/init/main.c +index 4a7471606e53..b0e95351c22c 100644 +--- a/init/main.c ++++ b/init/main.c +@@ -1130,6 +1130,7 @@ static noinline void __init kernel_init_freeable(void) + smp_prepare_cpus(setup_max_cpus); + + workqueue_init(); ++ kthread_init_global_worker(); + + init_mm_internals(); + +diff --git a/kernel/kthread.c b/kernel/kthread.c +index 5641b55783a6..9db017761a1f 100644 +--- a/kernel/kthread.c ++++ b/kernel/kthread.c +@@ -20,6 +20,7 @@ + #include + #include + #include ++#include + #include + + static DEFINE_SPINLOCK(kthread_create_lock); +@@ -1180,6 +1181,19 @@ void kthread_destroy_worker(struct kthread_worker *worker) + } + EXPORT_SYMBOL(kthread_destroy_worker); + ++DEFINE_KTHREAD_WORKER(kthread_global_worker); ++EXPORT_SYMBOL(kthread_global_worker); ++ ++__init void kthread_init_global_worker(void) ++{ ++ kthread_global_worker.task = kthread_create(kthread_worker_fn, ++ &kthread_global_worker, ++ "kswork"); ++ if (WARN_ON(IS_ERR(kthread_global_worker.task))) ++ return; ++ wake_up_process(kthread_global_worker.task); ++} ++ + #ifdef CONFIG_BLK_CGROUP + /** + * kthread_associate_blkcg - associate blkcg to current kthread +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0269-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch b/kernel/patches-4.19.x-rt/0269-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch new file mode 100644 index 000000000..043743e3c --- /dev/null +++ b/kernel/patches-4.19.x-rt/0269-genirq-Do-not-invoke-the-affinity-callback-via-a-wor.patch @@ -0,0 +1,100 @@ +From 1c00699faf9b42d9e365cb0a9c4f701c72089d90 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 21 Aug 2013 17:48:46 +0200 +Subject: [PATCH 269/283] genirq: Do not invoke the affinity callback via a + workqueue on RT + +[ Upstream commit 2122adbe011cdc0eb62ad62494e181005b23c76a ] + +Joe Korty reported, that __irq_set_affinity_locked() schedules a +workqueue while holding a rawlock which results in a might_sleep() +warning. +This patch uses swork_queue() instead. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + include/linux/interrupt.h | 5 ++--- + kernel/irq/manage.c | 19 ++++--------------- + 2 files changed, 6 insertions(+), 18 deletions(-) + +diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h +index 72333899f043..a9321f6429f2 100644 +--- a/include/linux/interrupt.h ++++ b/include/linux/interrupt.h +@@ -13,7 +13,7 @@ + #include + #include + #include +-#include ++#include + + #include + #include +@@ -228,7 +228,6 @@ extern void resume_device_irqs(void); + * struct irq_affinity_notify - context for notification of IRQ affinity changes + * @irq: Interrupt to which notification applies + * @kref: Reference count, for internal use +- * @swork: Swork item, for internal use + * @work: Work item, for internal use + * @notify: Function to be called on change. This will be + * called in process context. +@@ -241,7 +240,7 @@ struct irq_affinity_notify { + unsigned int irq; + struct kref kref; + #ifdef CONFIG_PREEMPT_RT_BASE +- struct swork_event swork; ++ struct kthread_work work; + #else + struct work_struct work; + #endif +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index 7f4041357d2f..381305c48a0a 100644 +--- a/kernel/irq/manage.c ++++ b/kernel/irq/manage.c +@@ -261,7 +261,7 @@ int irq_set_affinity_locked(struct irq_data *data, const struct cpumask *mask, + kref_get(&desc->affinity_notify->kref); + + #ifdef CONFIG_PREEMPT_RT_BASE +- swork_queue(&desc->affinity_notify->swork); ++ kthread_schedule_work(&desc->affinity_notify->work); + #else + schedule_work(&desc->affinity_notify->work); + #endif +@@ -326,21 +326,11 @@ static void _irq_affinity_notify(struct irq_affinity_notify *notify) + } + + #ifdef CONFIG_PREEMPT_RT_BASE +-static void init_helper_thread(void) +-{ +- static int init_sworker_once; +- +- if (init_sworker_once) +- return; +- if (WARN_ON(swork_get())) +- return; +- init_sworker_once = 1; +-} + +-static void irq_affinity_notify(struct swork_event *swork) ++static void irq_affinity_notify(struct kthread_work *work) + { + struct irq_affinity_notify *notify = +- container_of(swork, struct irq_affinity_notify, swork); ++ container_of(work, struct irq_affinity_notify, work); + _irq_affinity_notify(notify); + } + +@@ -383,8 +373,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) + notify->irq = irq; + kref_init(¬ify->kref); + #ifdef CONFIG_PREEMPT_RT_BASE +- INIT_SWORK(¬ify->swork, irq_affinity_notify); +- init_helper_thread(); ++ kthread_init_work(¬ify->work, irq_affinity_notify); + #else + INIT_WORK(¬ify->work, irq_affinity_notify); + #endif +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0270-genirq-Handle-missing-work_struct-in-irq_set_affinit.patch b/kernel/patches-4.19.x-rt/0270-genirq-Handle-missing-work_struct-in-irq_set_affinit.patch new file mode 100644 index 000000000..1596952d6 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0270-genirq-Handle-missing-work_struct-in-irq_set_affinit.patch @@ -0,0 +1,41 @@ +From 1f38c3b121feba50524996f2cceb92eb47269e52 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Tue, 28 May 2019 10:42:15 +0200 +Subject: [PATCH 270/283] genirq: Handle missing work_struct in + irq_set_affinity_notifier() + +[ Upstream commit bbc4d2a7d6ff54ba923640d9a42c7bef7185fe98 ] + +The backported stable commit + 59c39840f5abf ("genirq: Prevent use-after-free and work list corruption") + +added cancel_work_sync() on a work_struct element which is not available +in RT. + +Replace cancel_work_sync() with kthread_cancel_work_sync() on RT. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/irq/manage.c | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c +index 381305c48a0a..b2736d7d863b 100644 +--- a/kernel/irq/manage.c ++++ b/kernel/irq/manage.c +@@ -385,8 +385,9 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify) + raw_spin_unlock_irqrestore(&desc->lock, flags); + + if (old_notify) { +-#ifndef CONFIG_PREEMPT_RT_BASE +- /* Need to address this for PREEMPT_RT */ ++#ifdef CONFIG_PREEMPT_RT_BASE ++ kthread_cancel_work_sync(¬ify->work); ++#else + cancel_work_sync(&old_notify->work); + #endif + kref_put(&old_notify->kref, old_notify->release); +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0271-arm-imx6-cpuidle-Use-raw_spinlock_t.patch b/kernel/patches-4.19.x-rt/0271-arm-imx6-cpuidle-Use-raw_spinlock_t.patch new file mode 100644 index 000000000..d94e029f6 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0271-arm-imx6-cpuidle-Use-raw_spinlock_t.patch @@ -0,0 +1,51 @@ +From 17d57bbeda05b3bfe93276333b7b1db0958796d7 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Tue, 14 May 2019 17:07:44 +0200 +Subject: [PATCH 271/283] arm: imx6: cpuidle: Use raw_spinlock_t + +[ Upstream commit 40d0332ec8312e9c090f0a5414d9c90e12b13611 ] + +The idle call back is invoked with disabled interrupts and requires +raw_spinlock_t locks to work. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + arch/arm/mach-imx/cpuidle-imx6q.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/arch/arm/mach-imx/cpuidle-imx6q.c b/arch/arm/mach-imx/cpuidle-imx6q.c +index 326e870d7123..d9ac80aa1eb0 100644 +--- a/arch/arm/mach-imx/cpuidle-imx6q.c ++++ b/arch/arm/mach-imx/cpuidle-imx6q.c +@@ -17,22 +17,22 @@ + #include "hardware.h" + + static int num_idle_cpus = 0; +-static DEFINE_SPINLOCK(cpuidle_lock); ++static DEFINE_RAW_SPINLOCK(cpuidle_lock); + + static int imx6q_enter_wait(struct cpuidle_device *dev, + struct cpuidle_driver *drv, int index) + { +- spin_lock(&cpuidle_lock); ++ raw_spin_lock(&cpuidle_lock); + if (++num_idle_cpus == num_online_cpus()) + imx6_set_lpm(WAIT_UNCLOCKED); +- spin_unlock(&cpuidle_lock); ++ raw_spin_unlock(&cpuidle_lock); + + cpu_do_idle(); + +- spin_lock(&cpuidle_lock); ++ raw_spin_lock(&cpuidle_lock); + if (num_idle_cpus-- == num_online_cpus()) + imx6_set_lpm(WAIT_CLOCKED); +- spin_unlock(&cpuidle_lock); ++ raw_spin_unlock(&cpuidle_lock); + + return index; + } +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0272-rcu-Don-t-allow-to-change-rcu_normal_after_boot-on-R.patch b/kernel/patches-4.19.x-rt/0272-rcu-Don-t-allow-to-change-rcu_normal_after_boot-on-R.patch new file mode 100644 index 000000000..6128541cd --- /dev/null +++ b/kernel/patches-4.19.x-rt/0272-rcu-Don-t-allow-to-change-rcu_normal_after_boot-on-R.patch @@ -0,0 +1,35 @@ +From 8f756e565320c9c32ed9f5e964f03f939dd38379 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Mon, 24 Jun 2019 18:29:13 +0200 +Subject: [PATCH 272/283] rcu: Don't allow to change rcu_normal_after_boot on + RT + +[ Upstream commit c6c058c10577815a2491ce661876cff00a4c3b15 ] + +On RT rcu_normal_after_boot is enabled by default. +Don't allow to disable it on RT because the "expedited rcu" would +introduce latency spikes. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/rcu/update.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/kernel/rcu/update.c b/kernel/rcu/update.c +index 16d8dba23329..ed75addd3ccd 100644 +--- a/kernel/rcu/update.c ++++ b/kernel/rcu/update.c +@@ -69,7 +69,9 @@ module_param(rcu_expedited, int, 0); + extern int rcu_normal; /* from sysctl */ + module_param(rcu_normal, int, 0); + static int rcu_normal_after_boot = IS_ENABLED(CONFIG_PREEMPT_RT_FULL); ++#ifndef CONFIG_PREEMPT_RT_FULL + module_param(rcu_normal_after_boot, int, 0); ++#endif + #endif /* #ifndef CONFIG_TINY_RCU */ + + #ifdef CONFIG_DEBUG_LOCK_ALLOC +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0273-pci-switchtec-fix-stream_open.cocci-warnings.patch b/kernel/patches-4.19.x-rt/0273-pci-switchtec-fix-stream_open.cocci-warnings.patch new file mode 100644 index 000000000..9e618c1d1 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0273-pci-switchtec-fix-stream_open.cocci-warnings.patch @@ -0,0 +1,39 @@ +From 652a25fea4d424e12f2f3ad7bcf5e30f6a6efa3d Mon Sep 17 00:00:00 2001 +From: kbuild test robot +Date: Sat, 13 Apr 2019 11:22:51 +0800 +Subject: [PATCH 273/283] pci/switchtec: fix stream_open.cocci warnings + +[ Upstream commit 9462c69e29307adc95c289f50839d5d683973891 ] + +drivers/pci/switch/switchtec.c:395:1-17: ERROR: switchtec_fops: .read() can deadlock .write(); change nonseekable_open -> stream_open to fix. + +Generated by: scripts/coccinelle/api/stream_open.cocci + +Cc: Kirill Smelkov +Cc: Julia Lawall +Fixes: 8a29a3bae2a2 ("pci/switchtec: Don't use completion's wait queue") +Cc: stable-rt@vger.kernel.org # where it applies to +Link: https://lkml.kernel.org/r/alpine.DEB.2.21.1904131849350.2536@hadrien +Signed-off-by: kbuild test robot +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + drivers/pci/switch/switchtec.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c +index 77d4fb86d05b..ea70bc0b06e9 100644 +--- a/drivers/pci/switch/switchtec.c ++++ b/drivers/pci/switch/switchtec.c +@@ -360,7 +360,7 @@ static int switchtec_dev_open(struct inode *inode, struct file *filp) + return PTR_ERR(stuser); + + filp->private_data = stuser; +- nonseekable_open(inode, filp); ++ stream_open(inode, filp); + + dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser); + +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0274-sched-core-Drop-a-preempt_disable_rt-statement.patch b/kernel/patches-4.19.x-rt/0274-sched-core-Drop-a-preempt_disable_rt-statement.patch new file mode 100644 index 000000000..bc1b97ccc --- /dev/null +++ b/kernel/patches-4.19.x-rt/0274-sched-core-Drop-a-preempt_disable_rt-statement.patch @@ -0,0 +1,49 @@ +From 13885eb4d49323964f1067b3f1b9f6503f07e29e Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Mon, 24 Jun 2019 19:33:16 +0200 +Subject: [PATCH 274/283] sched/core: Drop a preempt_disable_rt() statement + +[ Upstream commit 761126efdcbe3fa3e99c9079fa0ad6eca2f251f2 ] + +The caller holds a lock which already disables preemption. +Drop the preempt_disable_rt() statement in get_nohz_timer_target(). + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/sched/core.c | 9 ++------- + 1 file changed, 2 insertions(+), 7 deletions(-) + +diff --git a/kernel/sched/core.c b/kernel/sched/core.c +index 91a9b2556fb0..1b2503b87473 100644 +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -558,14 +558,11 @@ void resched_cpu(int cpu) + */ + int get_nohz_timer_target(void) + { +- int i, cpu; ++ int i, cpu = smp_processor_id(); + struct sched_domain *sd; + +- preempt_disable_rt(); +- cpu = smp_processor_id(); +- + if (!idle_cpu(cpu) && housekeeping_cpu(cpu, HK_FLAG_TIMER)) +- goto preempt_en_rt; ++ return cpu; + + rcu_read_lock(); + for_each_domain(cpu, sd) { +@@ -584,8 +581,6 @@ int get_nohz_timer_target(void) + cpu = housekeeping_any_cpu(HK_FLAG_TIMER); + unlock: + rcu_read_unlock(); +-preempt_en_rt: +- preempt_enable_rt(); + return cpu; + } + +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0275-timers-Redo-the-notification-of-canceling-timers-on-.patch b/kernel/patches-4.19.x-rt/0275-timers-Redo-the-notification-of-canceling-timers-on-.patch new file mode 100644 index 000000000..060f08b89 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0275-timers-Redo-the-notification-of-canceling-timers-on-.patch @@ -0,0 +1,649 @@ +From dc0135054565b6bea6821540271adc3643f1098c Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Mon, 24 Jun 2019 19:39:06 +0200 +Subject: [PATCH 275/283] timers: Redo the notification of canceling timers on + -RT + +[ Upstream commit c71273154c2ad12e13333aada340ff30e826a11b ] + +Rework of the hrtimer, timer and posix-timer cancelation interface +on -RT. Instead of the swait/schedule interface we now have locks +which are taken while timer is active. During the cancellation of an +active timer the lock is acquired. The lock will then either +PI-boost the timer or block and wait until the timer completed. +The new code looks simpler and does not trigger a warning from +rcu_note_context_switch() anymore like reported by Grygorii Strashko +and Daniel Wagner. +The patches were contributed by Anna-Maria Gleixner. + +This is an all in one commit of the following patches: +| [PATCH] timers: Introduce expiry spin lock +| [PATCH] timers: Drop expiry lock after each timer invocation +| [PATCH] hrtimer: Introduce expiry spin lock +| [PATCH] posix-timers: move rcu out of union +| [PATCH] posix-timers: Add expiry lock + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + fs/timerfd.c | 5 +- + include/linux/hrtimer.h | 17 ++---- + include/linux/posix-timers.h | 1 + + kernel/time/alarmtimer.c | 2 +- + kernel/time/hrtimer.c | 36 ++++--------- + kernel/time/itimer.c | 2 +- + kernel/time/posix-cpu-timers.c | 23 ++++++++ + kernel/time/posix-timers.c | 69 ++++++++++-------------- + kernel/time/posix-timers.h | 2 + + kernel/time/timer.c | 96 ++++++++++++++++------------------ + 10 files changed, 118 insertions(+), 135 deletions(-) + +diff --git a/fs/timerfd.c b/fs/timerfd.c +index 82d0f52414a6..f845093466be 100644 +--- a/fs/timerfd.c ++++ b/fs/timerfd.c +@@ -471,10 +471,11 @@ static int do_timerfd_settime(int ufd, int flags, + break; + } + spin_unlock_irq(&ctx->wqh.lock); ++ + if (isalarm(ctx)) +- hrtimer_wait_for_timer(&ctx->t.alarm.timer); ++ hrtimer_grab_expiry_lock(&ctx->t.alarm.timer); + else +- hrtimer_wait_for_timer(&ctx->t.tmr); ++ hrtimer_grab_expiry_lock(&ctx->t.tmr); + } + + /* +diff --git a/include/linux/hrtimer.h b/include/linux/hrtimer.h +index 2bdb047c7656..6c4c38186c99 100644 +--- a/include/linux/hrtimer.h ++++ b/include/linux/hrtimer.h +@@ -22,7 +22,6 @@ + #include + #include + #include +-#include + + struct hrtimer_clock_base; + struct hrtimer_cpu_base; +@@ -193,6 +192,8 @@ enum hrtimer_base_type { + * @nr_retries: Total number of hrtimer interrupt retries + * @nr_hangs: Total number of hrtimer interrupt hangs + * @max_hang_time: Maximum time spent in hrtimer_interrupt ++ * @softirq_expiry_lock: Lock which is taken while softirq based hrtimer are ++ * expired + * @expires_next: absolute time of the next event, is required for remote + * hrtimer enqueue; it is the total first expiry time (hard + * and soft hrtimer are taken into account) +@@ -220,12 +221,10 @@ struct hrtimer_cpu_base { + unsigned short nr_hangs; + unsigned int max_hang_time; + #endif ++ spinlock_t softirq_expiry_lock; + ktime_t expires_next; + struct hrtimer *next_timer; + ktime_t softirq_expires_next; +-#ifdef CONFIG_PREEMPT_RT_BASE +- wait_queue_head_t wait; +-#endif + struct hrtimer *softirq_next_timer; + struct hrtimer_clock_base clock_base[HRTIMER_MAX_CLOCK_BASES]; + } ____cacheline_aligned; +@@ -426,6 +425,7 @@ static inline void hrtimer_start(struct hrtimer *timer, ktime_t tim, + + extern int hrtimer_cancel(struct hrtimer *timer); + extern int hrtimer_try_to_cancel(struct hrtimer *timer); ++extern void hrtimer_grab_expiry_lock(const struct hrtimer *timer); + + static inline void hrtimer_start_expires(struct hrtimer *timer, + enum hrtimer_mode mode) +@@ -443,13 +443,6 @@ static inline void hrtimer_restart(struct hrtimer *timer) + hrtimer_start_expires(timer, HRTIMER_MODE_ABS); + } + +-/* Softirq preemption could deadlock timer removal */ +-#ifdef CONFIG_PREEMPT_RT_BASE +- extern void hrtimer_wait_for_timer(const struct hrtimer *timer); +-#else +-# define hrtimer_wait_for_timer(timer) do { cpu_relax(); } while (0) +-#endif +- + /* Query timers: */ + extern ktime_t __hrtimer_get_remaining(const struct hrtimer *timer, bool adjust); + +@@ -475,7 +468,7 @@ static inline int hrtimer_is_queued(struct hrtimer *timer) + * Helper function to check, whether the timer is running the callback + * function + */ +-static inline int hrtimer_callback_running(const struct hrtimer *timer) ++static inline int hrtimer_callback_running(struct hrtimer *timer) + { + return timer->base->running == timer; + } +diff --git a/include/linux/posix-timers.h b/include/linux/posix-timers.h +index 0571b498db73..3e6c91bdf2ef 100644 +--- a/include/linux/posix-timers.h ++++ b/include/linux/posix-timers.h +@@ -15,6 +15,7 @@ struct cpu_timer_list { + u64 expires, incr; + struct task_struct *task; + int firing; ++ int firing_cpu; + }; + + /* +diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c +index 966708e8ce14..efa1e433974b 100644 +--- a/kernel/time/alarmtimer.c ++++ b/kernel/time/alarmtimer.c +@@ -436,7 +436,7 @@ int alarm_cancel(struct alarm *alarm) + int ret = alarm_try_to_cancel(alarm); + if (ret >= 0) + return ret; +- hrtimer_wait_for_timer(&alarm->timer); ++ hrtimer_grab_expiry_lock(&alarm->timer); + } + } + EXPORT_SYMBOL_GPL(alarm_cancel); +diff --git a/kernel/time/hrtimer.c b/kernel/time/hrtimer.c +index e1040b80362c..4534e7871c8c 100644 +--- a/kernel/time/hrtimer.c ++++ b/kernel/time/hrtimer.c +@@ -963,33 +963,16 @@ u64 hrtimer_forward(struct hrtimer *timer, ktime_t now, ktime_t interval) + } + EXPORT_SYMBOL_GPL(hrtimer_forward); + +-#ifdef CONFIG_PREEMPT_RT_BASE +-# define wake_up_timer_waiters(b) wake_up(&(b)->wait) +- +-/** +- * hrtimer_wait_for_timer - Wait for a running timer +- * +- * @timer: timer to wait for +- * +- * The function waits in case the timers callback function is +- * currently executed on the waitqueue of the timer base. The +- * waitqueue is woken up after the timer callback function has +- * finished execution. +- */ +-void hrtimer_wait_for_timer(const struct hrtimer *timer) ++void hrtimer_grab_expiry_lock(const struct hrtimer *timer) + { + struct hrtimer_clock_base *base = timer->base; + +- if (base && base->cpu_base && +- base->index >= HRTIMER_BASE_MONOTONIC_SOFT) +- wait_event(base->cpu_base->wait, +- !(hrtimer_callback_running(timer))); ++ if (base && base->cpu_base) { ++ spin_lock(&base->cpu_base->softirq_expiry_lock); ++ spin_unlock(&base->cpu_base->softirq_expiry_lock); ++ } + } + +-#else +-# define wake_up_timer_waiters(b) do { } while (0) +-#endif +- + /* + * enqueue_hrtimer - internal function to (re)start a timer + * +@@ -1224,7 +1207,7 @@ int hrtimer_cancel(struct hrtimer *timer) + + if (ret >= 0) + return ret; +- hrtimer_wait_for_timer(timer); ++ hrtimer_grab_expiry_lock(timer); + } + } + EXPORT_SYMBOL_GPL(hrtimer_cancel); +@@ -1528,6 +1511,7 @@ static __latent_entropy void hrtimer_run_softirq(struct softirq_action *h) + unsigned long flags; + ktime_t now; + ++ spin_lock(&cpu_base->softirq_expiry_lock); + raw_spin_lock_irqsave(&cpu_base->lock, flags); + + now = hrtimer_update_base(cpu_base); +@@ -1537,7 +1521,7 @@ static __latent_entropy void hrtimer_run_softirq(struct softirq_action *h) + hrtimer_update_softirq_timer(cpu_base, true); + + raw_spin_unlock_irqrestore(&cpu_base->lock, flags); +- wake_up_timer_waiters(cpu_base); ++ spin_unlock(&cpu_base->softirq_expiry_lock); + } + + #ifdef CONFIG_HIGH_RES_TIMERS +@@ -1947,9 +1931,7 @@ int hrtimers_prepare_cpu(unsigned int cpu) + cpu_base->softirq_next_timer = NULL; + cpu_base->expires_next = KTIME_MAX; + cpu_base->softirq_expires_next = KTIME_MAX; +-#ifdef CONFIG_PREEMPT_RT_BASE +- init_waitqueue_head(&cpu_base->wait); +-#endif ++ spin_lock_init(&cpu_base->softirq_expiry_lock); + return 0; + } + +diff --git a/kernel/time/itimer.c b/kernel/time/itimer.c +index 55b0e58368bf..a5ff222df4c7 100644 +--- a/kernel/time/itimer.c ++++ b/kernel/time/itimer.c +@@ -215,7 +215,7 @@ int do_setitimer(int which, struct itimerval *value, struct itimerval *ovalue) + /* We are sharing ->siglock with it_real_fn() */ + if (hrtimer_try_to_cancel(timer) < 0) { + spin_unlock_irq(&tsk->sighand->siglock); +- hrtimer_wait_for_timer(&tsk->signal->real_timer); ++ hrtimer_grab_expiry_lock(timer); + goto again; + } + expires = timeval_to_ktime(value->it_value); +diff --git a/kernel/time/posix-cpu-timers.c b/kernel/time/posix-cpu-timers.c +index baeeaef3b721..59ceedbb03f0 100644 +--- a/kernel/time/posix-cpu-timers.c ++++ b/kernel/time/posix-cpu-timers.c +@@ -789,6 +789,7 @@ check_timers_list(struct list_head *timers, + return t->expires; + + t->firing = 1; ++ t->firing_cpu = smp_processor_id(); + list_move_tail(&t->entry, firing); + } + +@@ -1134,6 +1135,20 @@ static inline int fastpath_timer_check(struct task_struct *tsk) + return 0; + } + ++static DEFINE_PER_CPU(spinlock_t, cpu_timer_expiry_lock) = __SPIN_LOCK_UNLOCKED(cpu_timer_expiry_lock); ++ ++void cpu_timers_grab_expiry_lock(struct k_itimer *timer) ++{ ++ int cpu = timer->it.cpu.firing_cpu; ++ ++ if (cpu >= 0) { ++ spinlock_t *expiry_lock = per_cpu_ptr(&cpu_timer_expiry_lock, cpu); ++ ++ spin_lock_irq(expiry_lock); ++ spin_unlock_irq(expiry_lock); ++ } ++} ++ + /* + * This is called from the timer interrupt handler. The irq handler has + * already updated our counts. We need to check if any timers fire now. +@@ -1144,6 +1159,7 @@ static void __run_posix_cpu_timers(struct task_struct *tsk) + LIST_HEAD(firing); + struct k_itimer *timer, *next; + unsigned long flags; ++ spinlock_t *expiry_lock; + + /* + * The fast path checks that there are no expired thread or thread +@@ -1152,6 +1168,9 @@ static void __run_posix_cpu_timers(struct task_struct *tsk) + if (!fastpath_timer_check(tsk)) + return; + ++ expiry_lock = this_cpu_ptr(&cpu_timer_expiry_lock); ++ spin_lock(expiry_lock); ++ + if (!lock_task_sighand(tsk, &flags)) + return; + /* +@@ -1186,6 +1205,7 @@ static void __run_posix_cpu_timers(struct task_struct *tsk) + list_del_init(&timer->it.cpu.entry); + cpu_firing = timer->it.cpu.firing; + timer->it.cpu.firing = 0; ++ timer->it.cpu.firing_cpu = -1; + /* + * The firing flag is -1 if we collided with a reset + * of the timer, which already reported this +@@ -1195,6 +1215,7 @@ static void __run_posix_cpu_timers(struct task_struct *tsk) + cpu_timer_fire(timer); + spin_unlock(&timer->it_lock); + } ++ spin_unlock(expiry_lock); + } + + #ifdef CONFIG_PREEMPT_RT_BASE +@@ -1460,6 +1481,8 @@ static int do_cpu_nanosleep(const clockid_t which_clock, int flags, + spin_unlock_irq(&timer.it_lock); + + while (error == TIMER_RETRY) { ++ ++ cpu_timers_grab_expiry_lock(&timer); + /* + * We need to handle case when timer was or is in the + * middle of firing. In other cases we already freed +diff --git a/kernel/time/posix-timers.c b/kernel/time/posix-timers.c +index a5ec421e3437..c7e97d421590 100644 +--- a/kernel/time/posix-timers.c ++++ b/kernel/time/posix-timers.c +@@ -821,25 +821,20 @@ static void common_hrtimer_arm(struct k_itimer *timr, ktime_t expires, + hrtimer_start_expires(timer, HRTIMER_MODE_ABS); + } + +-/* +- * Protected by RCU! +- */ +-static void timer_wait_for_callback(const struct k_clock *kc, struct k_itimer *timr) ++static int common_hrtimer_try_to_cancel(struct k_itimer *timr) + { +-#ifdef CONFIG_PREEMPT_RT_FULL +- if (kc->timer_arm == common_hrtimer_arm) +- hrtimer_wait_for_timer(&timr->it.real.timer); +- else if (kc == &alarm_clock) +- hrtimer_wait_for_timer(&timr->it.alarm.alarmtimer.timer); +- else +- /* FIXME: Whacky hack for posix-cpu-timers */ +- schedule_timeout(1); +-#endif ++ return hrtimer_try_to_cancel(&timr->it.real.timer); + } + +-static int common_hrtimer_try_to_cancel(struct k_itimer *timr) ++static void timer_wait_for_callback(const struct k_clock *kc, struct k_itimer *timer) + { +- return hrtimer_try_to_cancel(&timr->it.real.timer); ++ if (kc->timer_arm == common_hrtimer_arm) ++ hrtimer_grab_expiry_lock(&timer->it.real.timer); ++ else if (kc == &alarm_clock) ++ hrtimer_grab_expiry_lock(&timer->it.alarm.alarmtimer.timer); ++ else ++ /* posix-cpu-timers */ ++ cpu_timers_grab_expiry_lock(timer); + } + + /* Set a POSIX.1b interval timer. */ +@@ -901,21 +896,21 @@ static int do_timer_settime(timer_t timer_id, int flags, + if (!timr) + return -EINVAL; + +- rcu_read_lock(); + kc = timr->kclock; + if (WARN_ON_ONCE(!kc || !kc->timer_set)) + error = -EINVAL; + else + error = kc->timer_set(timr, flags, new_spec64, old_spec64); + +- unlock_timer(timr, flag); + if (error == TIMER_RETRY) { ++ rcu_read_lock(); ++ unlock_timer(timr, flag); + timer_wait_for_callback(kc, timr); +- old_spec64 = NULL; // We already got the old time... + rcu_read_unlock(); ++ old_spec64 = NULL; // We already got the old time... + goto retry; + } +- rcu_read_unlock(); ++ unlock_timer(timr, flag); + + return error; + } +@@ -977,13 +972,21 @@ int common_timer_del(struct k_itimer *timer) + return 0; + } + +-static inline int timer_delete_hook(struct k_itimer *timer) ++static int timer_delete_hook(struct k_itimer *timer) + { + const struct k_clock *kc = timer->kclock; ++ int ret; + + if (WARN_ON_ONCE(!kc || !kc->timer_del)) + return -EINVAL; +- return kc->timer_del(timer); ++ ret = kc->timer_del(timer); ++ if (ret == TIMER_RETRY) { ++ rcu_read_lock(); ++ spin_unlock_irq(&timer->it_lock); ++ timer_wait_for_callback(kc, timer); ++ rcu_read_unlock(); ++ } ++ return ret; + } + + /* Delete a POSIX.1b interval timer. */ +@@ -997,15 +1000,8 @@ SYSCALL_DEFINE1(timer_delete, timer_t, timer_id) + if (!timer) + return -EINVAL; + +- rcu_read_lock(); +- if (timer_delete_hook(timer) == TIMER_RETRY) { +- unlock_timer(timer, flags); +- timer_wait_for_callback(clockid_to_kclock(timer->it_clock), +- timer); +- rcu_read_unlock(); ++ if (timer_delete_hook(timer) == TIMER_RETRY) + goto retry_delete; +- } +- rcu_read_unlock(); + + spin_lock(¤t->sighand->siglock); + list_del(&timer->list); +@@ -1031,20 +1027,9 @@ static void itimer_delete(struct k_itimer *timer) + retry_delete: + spin_lock_irqsave(&timer->it_lock, flags); + +- /* On RT we can race with a deletion */ +- if (!timer->it_signal) { +- unlock_timer(timer, flags); +- return; +- } +- +- if (timer_delete_hook(timer) == TIMER_RETRY) { +- rcu_read_lock(); +- unlock_timer(timer, flags); +- timer_wait_for_callback(clockid_to_kclock(timer->it_clock), +- timer); +- rcu_read_unlock(); ++ if (timer_delete_hook(timer) == TIMER_RETRY) + goto retry_delete; +- } ++ + list_del(&timer->list); + /* + * This keeps any tasks waiting on the spin lock from thinking +diff --git a/kernel/time/posix-timers.h b/kernel/time/posix-timers.h +index ddb21145211a..725bd230a8db 100644 +--- a/kernel/time/posix-timers.h ++++ b/kernel/time/posix-timers.h +@@ -32,6 +32,8 @@ extern const struct k_clock clock_process; + extern const struct k_clock clock_thread; + extern const struct k_clock alarm_clock; + ++extern void cpu_timers_grab_expiry_lock(struct k_itimer *timer); ++ + int posix_timer_event(struct k_itimer *timr, int si_private); + + void common_timer_get(struct k_itimer *timr, struct itimerspec64 *cur_setting); +diff --git a/kernel/time/timer.c b/kernel/time/timer.c +index 781483c76b17..d6289d8df06b 100644 +--- a/kernel/time/timer.c ++++ b/kernel/time/timer.c +@@ -44,7 +44,6 @@ + #include + #include + #include +-#include + + #include + #include +@@ -198,9 +197,7 @@ EXPORT_SYMBOL(jiffies_64); + struct timer_base { + raw_spinlock_t lock; + struct timer_list *running_timer; +-#ifdef CONFIG_PREEMPT_RT_FULL +- struct swait_queue_head wait_for_running_timer; +-#endif ++ spinlock_t expiry_lock; + unsigned long clk; + unsigned long next_expiry; + unsigned int cpu; +@@ -1189,33 +1186,6 @@ void add_timer_on(struct timer_list *timer, int cpu) + } + EXPORT_SYMBOL_GPL(add_timer_on); + +-#ifdef CONFIG_PREEMPT_RT_FULL +-/* +- * Wait for a running timer +- */ +-static void wait_for_running_timer(struct timer_list *timer) +-{ +- struct timer_base *base; +- u32 tf = timer->flags; +- +- if (tf & TIMER_MIGRATING) +- return; +- +- base = get_timer_base(tf); +- swait_event_exclusive(base->wait_for_running_timer, +- base->running_timer != timer); +-} +- +-# define wakeup_timer_waiters(b) swake_up_all(&(b)->wait_for_running_timer) +-#else +-static inline void wait_for_running_timer(struct timer_list *timer) +-{ +- cpu_relax(); +-} +- +-# define wakeup_timer_waiters(b) do { } while (0) +-#endif +- + /** + * del_timer - deactivate a timer. + * @timer: the timer to be deactivated +@@ -1245,14 +1215,8 @@ int del_timer(struct timer_list *timer) + } + EXPORT_SYMBOL(del_timer); + +-/** +- * try_to_del_timer_sync - Try to deactivate a timer +- * @timer: timer to delete +- * +- * This function tries to deactivate a timer. Upon successful (ret >= 0) +- * exit the timer is not queued and the handler is not running on any CPU. +- */ +-int try_to_del_timer_sync(struct timer_list *timer) ++static int __try_to_del_timer_sync(struct timer_list *timer, ++ struct timer_base **basep) + { + struct timer_base *base; + unsigned long flags; +@@ -1260,7 +1224,7 @@ int try_to_del_timer_sync(struct timer_list *timer) + + debug_assert_init(timer); + +- base = lock_timer_base(timer, &flags); ++ *basep = base = lock_timer_base(timer, &flags); + + if (base->running_timer != timer) + ret = detach_if_pending(timer, base, true); +@@ -1269,9 +1233,42 @@ int try_to_del_timer_sync(struct timer_list *timer) + + return ret; + } ++ ++/** ++ * try_to_del_timer_sync - Try to deactivate a timer ++ * @timer: timer to delete ++ * ++ * This function tries to deactivate a timer. Upon successful (ret >= 0) ++ * exit the timer is not queued and the handler is not running on any CPU. ++ */ ++int try_to_del_timer_sync(struct timer_list *timer) ++{ ++ struct timer_base *base; ++ ++ return __try_to_del_timer_sync(timer, &base); ++} + EXPORT_SYMBOL(try_to_del_timer_sync); + + #if defined(CONFIG_SMP) || defined(CONFIG_PREEMPT_RT_FULL) ++static int __del_timer_sync(struct timer_list *timer) ++{ ++ struct timer_base *base; ++ int ret; ++ ++ for (;;) { ++ ret = __try_to_del_timer_sync(timer, &base); ++ if (ret >= 0) ++ return ret; ++ ++ /* ++ * When accessing the lock, timers of base are no longer expired ++ * and so timer is no longer running. ++ */ ++ spin_lock(&base->expiry_lock); ++ spin_unlock(&base->expiry_lock); ++ } ++} ++ + /** + * del_timer_sync - deactivate a timer and wait for the handler to finish. + * @timer: the timer to be deactivated +@@ -1327,12 +1324,8 @@ int del_timer_sync(struct timer_list *timer) + * could lead to deadlock. + */ + WARN_ON(in_irq() && !(timer->flags & TIMER_IRQSAFE)); +- for (;;) { +- int ret = try_to_del_timer_sync(timer); +- if (ret >= 0) +- return ret; +- wait_for_running_timer(timer); +- } ++ ++ return __del_timer_sync(timer); + } + EXPORT_SYMBOL(del_timer_sync); + #endif +@@ -1397,11 +1390,15 @@ static void expire_timers(struct timer_base *base, struct hlist_head *head) + raw_spin_unlock(&base->lock); + call_timer_fn(timer, fn); + base->running_timer = NULL; ++ spin_unlock(&base->expiry_lock); ++ spin_lock(&base->expiry_lock); + raw_spin_lock(&base->lock); + } else { + raw_spin_unlock_irq(&base->lock); + call_timer_fn(timer, fn); + base->running_timer = NULL; ++ spin_unlock(&base->expiry_lock); ++ spin_lock(&base->expiry_lock); + raw_spin_lock_irq(&base->lock); + } + } +@@ -1696,6 +1693,7 @@ static inline void __run_timers(struct timer_base *base) + if (!time_after_eq(jiffies, base->clk)) + return; + ++ spin_lock(&base->expiry_lock); + raw_spin_lock_irq(&base->lock); + + /* +@@ -1723,7 +1721,7 @@ static inline void __run_timers(struct timer_base *base) + expire_timers(base, heads + levels); + } + raw_spin_unlock_irq(&base->lock); +- wakeup_timer_waiters(base); ++ spin_unlock(&base->expiry_lock); + } + + /* +@@ -1970,9 +1968,7 @@ static void __init init_timer_cpu(int cpu) + base->cpu = cpu; + raw_spin_lock_init(&base->lock); + base->clk = jiffies; +-#ifdef CONFIG_PREEMPT_RT_FULL +- init_swait_queue_head(&base->wait_for_running_timer); +-#endif ++ spin_lock_init(&base->expiry_lock); + } + } + +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0276-Revert-futex-Ensure-lock-unlock-symetry-versus-pi_lo.patch b/kernel/patches-4.19.x-rt/0276-Revert-futex-Ensure-lock-unlock-symetry-versus-pi_lo.patch new file mode 100644 index 000000000..59c0d7a58 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0276-Revert-futex-Ensure-lock-unlock-symetry-versus-pi_lo.patch @@ -0,0 +1,34 @@ +From d6630ac9f4bcf1f8fd51923ea266c42e87f9d312 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 26 Jun 2019 17:44:13 +0200 +Subject: [PATCH 276/283] Revert "futex: Ensure lock/unlock symetry versus + pi_lock and hash bucket lock" + +[ Upstream commit 6a773b70cf105b46298ed3b44e77c102ce31d9ec ] + +Drop the RT fixup, the futex code will be changed to avoid the need for +the workaround. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/futex.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/kernel/futex.c b/kernel/futex.c +index fe90164aa6ec..a58af833bb77 100644 +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -918,9 +918,7 @@ void exit_pi_state_list(struct task_struct *curr) + if (head->next != next) { + /* retain curr->pi_lock for the loop invariant */ + raw_spin_unlock(&pi_state->pi_mutex.wait_lock); +- raw_spin_unlock_irq(&curr->pi_lock); + spin_unlock(&hb->lock); +- raw_spin_lock_irq(&curr->pi_lock); + put_pi_state(pi_state); + continue; + } +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0277-Revert-futex-Fix-bug-on-when-a-requeued-RT-task-time.patch b/kernel/patches-4.19.x-rt/0277-Revert-futex-Fix-bug-on-when-a-requeued-RT-task-time.patch new file mode 100644 index 000000000..4f965f5e8 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0277-Revert-futex-Fix-bug-on-when-a-requeued-RT-task-time.patch @@ -0,0 +1,82 @@ +From 9848e5129d0d928c27247ab10835cdfb2948bd60 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 26 Jun 2019 17:44:18 +0200 +Subject: [PATCH 277/283] Revert "futex: Fix bug on when a requeued RT task + times out" + +[ Upstream commit f1a170cb3289a48df26cae3c60d77608f7a988bb ] + +Drop the RT fixup, the futex code will be changed to avoid the need for +the workaround. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/locking/rtmutex.c | 31 +------------------------------ + kernel/locking/rtmutex_common.h | 1 - + 2 files changed, 1 insertion(+), 31 deletions(-) + +diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c +index 2a9bf2443acc..7f6f402e04ae 100644 +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -144,8 +144,7 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock) + + static int rt_mutex_real_waiter(struct rt_mutex_waiter *waiter) + { +- return waiter && waiter != PI_WAKEUP_INPROGRESS && +- waiter != PI_REQUEUE_INPROGRESS; ++ return waiter && waiter != PI_WAKEUP_INPROGRESS; + } + + /* +@@ -2350,34 +2349,6 @@ int __rt_mutex_start_proxy_lock(struct rt_mutex *lock, + if (try_to_take_rt_mutex(lock, task, NULL)) + return 1; + +-#ifdef CONFIG_PREEMPT_RT_FULL +- /* +- * In PREEMPT_RT there's an added race. +- * If the task, that we are about to requeue, times out, +- * it can set the PI_WAKEUP_INPROGRESS. This tells the requeue +- * to skip this task. But right after the task sets +- * its pi_blocked_on to PI_WAKEUP_INPROGRESS it can then +- * block on the spin_lock(&hb->lock), which in RT is an rtmutex. +- * This will replace the PI_WAKEUP_INPROGRESS with the actual +- * lock that it blocks on. We *must not* place this task +- * on this proxy lock in that case. +- * +- * To prevent this race, we first take the task's pi_lock +- * and check if it has updated its pi_blocked_on. If it has, +- * we assume that it woke up and we return -EAGAIN. +- * Otherwise, we set the task's pi_blocked_on to +- * PI_REQUEUE_INPROGRESS, so that if the task is waking up +- * it will know that we are in the process of requeuing it. +- */ +- raw_spin_lock(&task->pi_lock); +- if (task->pi_blocked_on) { +- raw_spin_unlock(&task->pi_lock); +- return -EAGAIN; +- } +- task->pi_blocked_on = PI_REQUEUE_INPROGRESS; +- raw_spin_unlock(&task->pi_lock); +-#endif +- + /* We enforce deadlock detection for futexes */ + ret = task_blocks_on_rt_mutex(lock, waiter, task, + RT_MUTEX_FULL_CHAINWALK); +diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h +index 546aaf058b9e..a501f3b47081 100644 +--- a/kernel/locking/rtmutex_common.h ++++ b/kernel/locking/rtmutex_common.h +@@ -133,7 +133,6 @@ enum rtmutex_chainwalk { + * PI-futex support (proxy locking functions, etc.): + */ + #define PI_WAKEUP_INPROGRESS ((struct rt_mutex_waiter *) 1) +-#define PI_REQUEUE_INPROGRESS ((struct rt_mutex_waiter *) 2) + + extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); + extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0278-Revert-rtmutex-Handle-the-various-new-futex-race-con.patch b/kernel/patches-4.19.x-rt/0278-Revert-rtmutex-Handle-the-various-new-futex-race-con.patch new file mode 100644 index 000000000..aa56b4e9a --- /dev/null +++ b/kernel/patches-4.19.x-rt/0278-Revert-rtmutex-Handle-the-various-new-futex-race-con.patch @@ -0,0 +1,257 @@ +From 0c3cb70fa05bdcb4ff249079bab804e098149371 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 26 Jun 2019 17:44:21 +0200 +Subject: [PATCH 278/283] Revert "rtmutex: Handle the various new futex race + conditions" + +[ Upstream commit 9e0265c21af4d6388d47dcd5ce20f76ec3a2e468 ] + +Drop the RT fixup, the futex code will be changed to avoid the need for +the workaround. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/futex.c | 77 +++++++-------------------------- + kernel/locking/rtmutex.c | 36 +++------------ + kernel/locking/rtmutex_common.h | 2 - + 3 files changed, 21 insertions(+), 94 deletions(-) + +diff --git a/kernel/futex.c b/kernel/futex.c +index a58af833bb77..1d9423914bf4 100644 +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -2147,16 +2147,6 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, + requeue_pi_wake_futex(this, &key2, hb2); + drop_count++; + continue; +- } else if (ret == -EAGAIN) { +- /* +- * Waiter was woken by timeout or +- * signal and has set pi_blocked_on to +- * PI_WAKEUP_INPROGRESS before we +- * tried to enqueue it on the rtmutex. +- */ +- this->pi_state = NULL; +- put_pi_state(pi_state); +- continue; + } else if (ret) { + /* + * rt_mutex_start_proxy_lock() detected a +@@ -3235,7 +3225,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + struct hrtimer_sleeper timeout, *to = NULL; + struct futex_pi_state *pi_state = NULL; + struct rt_mutex_waiter rt_waiter; +- struct futex_hash_bucket *hb, *hb2; ++ struct futex_hash_bucket *hb; + union futex_key key2 = FUTEX_KEY_INIT; + struct futex_q q = futex_q_init; + int res, ret; +@@ -3293,55 +3283,20 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + /* Queue the futex_q, drop the hb lock, wait for wakeup. */ + futex_wait_queue_me(hb, &q, to); + +- /* +- * On RT we must avoid races with requeue and trying to block +- * on two mutexes (hb->lock and uaddr2's rtmutex) by +- * serializing access to pi_blocked_on with pi_lock. +- */ +- raw_spin_lock_irq(¤t->pi_lock); +- if (current->pi_blocked_on) { +- /* +- * We have been requeued or are in the process of +- * being requeued. +- */ +- raw_spin_unlock_irq(¤t->pi_lock); +- } else { +- /* +- * Setting pi_blocked_on to PI_WAKEUP_INPROGRESS +- * prevents a concurrent requeue from moving us to the +- * uaddr2 rtmutex. After that we can safely acquire +- * (and possibly block on) hb->lock. +- */ +- current->pi_blocked_on = PI_WAKEUP_INPROGRESS; +- raw_spin_unlock_irq(¤t->pi_lock); +- +- spin_lock(&hb->lock); +- +- /* +- * Clean up pi_blocked_on. We might leak it otherwise +- * when we succeeded with the hb->lock in the fast +- * path. +- */ +- raw_spin_lock_irq(¤t->pi_lock); +- current->pi_blocked_on = NULL; +- raw_spin_unlock_irq(¤t->pi_lock); +- +- ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); +- spin_unlock(&hb->lock); +- if (ret) +- goto out_put_keys; +- } ++ spin_lock(&hb->lock); ++ ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); ++ spin_unlock(&hb->lock); ++ if (ret) ++ goto out_put_keys; + + /* +- * In order to be here, we have either been requeued, are in +- * the process of being requeued, or requeue successfully +- * acquired uaddr2 on our behalf. If pi_blocked_on was +- * non-null above, we may be racing with a requeue. Do not +- * rely on q->lock_ptr to be hb2->lock until after blocking on +- * hb->lock or hb2->lock. The futex_requeue dropped our key1 +- * reference and incremented our key2 reference count. ++ * In order for us to be here, we know our q.key == key2, and since ++ * we took the hb->lock above, we also know that futex_requeue() has ++ * completed and we no longer have to concern ourselves with a wakeup ++ * race with the atomic proxy lock acquisition by the requeue code. The ++ * futex_requeue dropped our key1 reference and incremented our key2 ++ * reference count. + */ +- hb2 = hash_futex(&key2); + + /* Check if the requeue code acquired the second futex for us. */ + if (!q.rt_waiter) { +@@ -3350,8 +3305,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * did a lock-steal - fix up the PI-state in that case. + */ + if (q.pi_state && (q.pi_state->owner != current)) { +- spin_lock(&hb2->lock); +- BUG_ON(&hb2->lock != q.lock_ptr); ++ spin_lock(q.lock_ptr); + ret = fixup_pi_state_owner(uaddr2, &q, current); + if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { + pi_state = q.pi_state; +@@ -3362,7 +3316,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * the requeue_pi() code acquired for us. + */ + put_pi_state(q.pi_state); +- spin_unlock(&hb2->lock); ++ spin_unlock(q.lock_ptr); + } + } else { + struct rt_mutex *pi_mutex; +@@ -3376,8 +3330,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + pi_mutex = &q.pi_state->pi_mutex; + ret = rt_mutex_wait_proxy_lock(pi_mutex, to, &rt_waiter); + +- spin_lock(&hb2->lock); +- BUG_ON(&hb2->lock != q.lock_ptr); ++ spin_lock(q.lock_ptr); + if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, &rt_waiter)) + ret = 0; + +diff --git a/kernel/locking/rtmutex.c b/kernel/locking/rtmutex.c +index 7f6f402e04ae..44a33057a83a 100644 +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -142,11 +142,6 @@ static void fixup_rt_mutex_waiters(struct rt_mutex *lock) + WRITE_ONCE(*p, owner & ~RT_MUTEX_HAS_WAITERS); + } + +-static int rt_mutex_real_waiter(struct rt_mutex_waiter *waiter) +-{ +- return waiter && waiter != PI_WAKEUP_INPROGRESS; +-} +- + /* + * We can speed up the acquire/release, if there's no debugging state to be + * set up. +@@ -420,8 +415,7 @@ int max_lock_depth = 1024; + + static inline struct rt_mutex *task_blocked_on_lock(struct task_struct *p) + { +- return rt_mutex_real_waiter(p->pi_blocked_on) ? +- p->pi_blocked_on->lock : NULL; ++ return p->pi_blocked_on ? p->pi_blocked_on->lock : NULL; + } + + /* +@@ -557,7 +551,7 @@ static int rt_mutex_adjust_prio_chain(struct task_struct *task, + * reached or the state of the chain has changed while we + * dropped the locks. + */ +- if (!rt_mutex_real_waiter(waiter)) ++ if (!waiter) + goto out_unlock_pi; + + /* +@@ -1327,22 +1321,6 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, + return -EDEADLK; + + raw_spin_lock(&task->pi_lock); +- /* +- * In the case of futex requeue PI, this will be a proxy +- * lock. The task will wake unaware that it is enqueueed on +- * this lock. Avoid blocking on two locks and corrupting +- * pi_blocked_on via the PI_WAKEUP_INPROGRESS +- * flag. futex_wait_requeue_pi() sets this when it wakes up +- * before requeue (due to a signal or timeout). Do not enqueue +- * the task if PI_WAKEUP_INPROGRESS is set. +- */ +- if (task != current && task->pi_blocked_on == PI_WAKEUP_INPROGRESS) { +- raw_spin_unlock(&task->pi_lock); +- return -EAGAIN; +- } +- +- BUG_ON(rt_mutex_real_waiter(task->pi_blocked_on)); +- + waiter->task = task; + waiter->lock = lock; + waiter->prio = task->prio; +@@ -1366,7 +1344,7 @@ static int task_blocks_on_rt_mutex(struct rt_mutex *lock, + rt_mutex_enqueue_pi(owner, waiter); + + rt_mutex_adjust_prio(owner); +- if (rt_mutex_real_waiter(owner->pi_blocked_on)) ++ if (owner->pi_blocked_on) + chain_walk = 1; + } else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) { + chain_walk = 1; +@@ -1466,7 +1444,7 @@ static void remove_waiter(struct rt_mutex *lock, + { + bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock)); + struct task_struct *owner = rt_mutex_owner(lock); +- struct rt_mutex *next_lock = NULL; ++ struct rt_mutex *next_lock; + + lockdep_assert_held(&lock->wait_lock); + +@@ -1492,8 +1470,7 @@ static void remove_waiter(struct rt_mutex *lock, + rt_mutex_adjust_prio(owner); + + /* Store the lock on which owner is blocked or NULL */ +- if (rt_mutex_real_waiter(owner->pi_blocked_on)) +- next_lock = task_blocked_on_lock(owner); ++ next_lock = task_blocked_on_lock(owner); + + raw_spin_unlock(&owner->pi_lock); + +@@ -1529,8 +1506,7 @@ void rt_mutex_adjust_pi(struct task_struct *task) + raw_spin_lock_irqsave(&task->pi_lock, flags); + + waiter = task->pi_blocked_on; +- if (!rt_mutex_real_waiter(waiter) || +- rt_mutex_waiter_equal(waiter, task_to_waiter(task))) { ++ if (!waiter || rt_mutex_waiter_equal(waiter, task_to_waiter(task))) { + raw_spin_unlock_irqrestore(&task->pi_lock, flags); + return; + } +diff --git a/kernel/locking/rtmutex_common.h b/kernel/locking/rtmutex_common.h +index a501f3b47081..758dc43872e5 100644 +--- a/kernel/locking/rtmutex_common.h ++++ b/kernel/locking/rtmutex_common.h +@@ -132,8 +132,6 @@ enum rtmutex_chainwalk { + /* + * PI-futex support (proxy locking functions, etc.): + */ +-#define PI_WAKEUP_INPROGRESS ((struct rt_mutex_waiter *) 1) +- + extern struct task_struct *rt_mutex_next_owner(struct rt_mutex *lock); + extern void rt_mutex_init_proxy_locked(struct rt_mutex *lock, + struct task_struct *proxy_owner); +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0279-Revert-futex-workaround-migrate_disable-enable-in-di.patch b/kernel/patches-4.19.x-rt/0279-Revert-futex-workaround-migrate_disable-enable-in-di.patch new file mode 100644 index 000000000..b88a6e49c --- /dev/null +++ b/kernel/patches-4.19.x-rt/0279-Revert-futex-workaround-migrate_disable-enable-in-di.patch @@ -0,0 +1,69 @@ +From a4c6efd8adfd48a378c579bb7bc2c1a3162ced7f Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 26 Jun 2019 17:44:27 +0200 +Subject: [PATCH 279/283] Revert "futex: workaround migrate_disable/enable in + different context" + +[ Upstream commit a71221d81cc4873891ae44f3aa02df596079b786 ] + +Drop the RT fixup, the futex code will be changed to avoid the need for +the workaround. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/futex.c | 19 ------------------- + 1 file changed, 19 deletions(-) + +diff --git a/kernel/futex.c b/kernel/futex.c +index 1d9423914bf4..54ffc25183ed 100644 +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -2875,14 +2875,6 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, + * before __rt_mutex_start_proxy_lock() is done. + */ + raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock); +- /* +- * the migrate_disable() here disables migration in the in_atomic() fast +- * path which is enabled again in the following spin_unlock(). We have +- * one migrate_disable() pending in the slow-path which is reversed +- * after the raw_spin_unlock_irq() where we leave the atomic context. +- */ +- migrate_disable(); +- + spin_unlock(q.lock_ptr); + /* + * __rt_mutex_start_proxy_lock() unconditionally enqueues the @rt_waiter +@@ -2891,7 +2883,6 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, + */ + ret = __rt_mutex_start_proxy_lock(&q.pi_state->pi_mutex, &rt_waiter, current); + raw_spin_unlock_irq(&q.pi_state->pi_mutex.wait_lock); +- migrate_enable(); + + if (ret) { + if (ret == 1) +@@ -3040,21 +3031,11 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) + * rt_waiter. Also see the WARN in wake_futex_pi(). + */ + raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); +- /* +- * Magic trickery for now to make the RT migrate disable +- * logic happy. The following spin_unlock() happens with +- * interrupts disabled so the internal migrate_enable() +- * won't undo the migrate_disable() which was issued when +- * locking hb->lock. +- */ +- migrate_disable(); + spin_unlock(&hb->lock); + + /* drops pi_state->pi_mutex.wait_lock */ + ret = wake_futex_pi(uaddr, uval, pi_state); + +- migrate_enable(); +- + put_pi_state(pi_state); + + /* +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0280-futex-Make-the-futex_hash_bucket-lock-raw.patch b/kernel/patches-4.19.x-rt/0280-futex-Make-the-futex_hash_bucket-lock-raw.patch new file mode 100644 index 000000000..779b1e191 --- /dev/null +++ b/kernel/patches-4.19.x-rt/0280-futex-Make-the-futex_hash_bucket-lock-raw.patch @@ -0,0 +1,348 @@ +From b3425a889b12c0166d2eb44b8eaab8af20a73a22 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Wed, 26 Jun 2019 11:59:44 +0200 +Subject: [PATCH 280/283] futex: Make the futex_hash_bucket lock raw + +[ Upstream commit f646521aadedab78801c9befe193e2e8a0c99298 ] + +Since commit 1a1fb985f2e2b ("futex: Handle early deadlock return +correctly") we can deadlock while we attempt to acquire the HB lock if +we fail to acquire the lock. +The RT waiter (for the futex lock) is still enqueued and acquiring the +HB lock may build up a lock chain which leads to a deadlock if the owner +of the lock futex-lock holds the HB lock. + +Make the hash bucket lock raw so it does not participate in the +lockchain. + +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/futex.c | 88 +++++++++++++++++++++++++------------------------- + 1 file changed, 44 insertions(+), 44 deletions(-) + +diff --git a/kernel/futex.c b/kernel/futex.c +index 54ffc25183ed..b02d9969330b 100644 +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -240,7 +240,7 @@ struct futex_q { + struct plist_node list; + + struct task_struct *task; +- spinlock_t *lock_ptr; ++ raw_spinlock_t *lock_ptr; + union futex_key key; + struct futex_pi_state *pi_state; + struct rt_mutex_waiter *rt_waiter; +@@ -261,7 +261,7 @@ static const struct futex_q futex_q_init = { + */ + struct futex_hash_bucket { + atomic_t waiters; +- spinlock_t lock; ++ raw_spinlock_t lock; + struct plist_head chain; + } ____cacheline_aligned_in_smp; + +@@ -908,7 +908,7 @@ void exit_pi_state_list(struct task_struct *curr) + } + raw_spin_unlock_irq(&curr->pi_lock); + +- spin_lock(&hb->lock); ++ raw_spin_lock(&hb->lock); + raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); + raw_spin_lock(&curr->pi_lock); + /* +@@ -918,7 +918,7 @@ void exit_pi_state_list(struct task_struct *curr) + if (head->next != next) { + /* retain curr->pi_lock for the loop invariant */ + raw_spin_unlock(&pi_state->pi_mutex.wait_lock); +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + put_pi_state(pi_state); + continue; + } +@@ -930,7 +930,7 @@ void exit_pi_state_list(struct task_struct *curr) + + raw_spin_unlock(&curr->pi_lock); + raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + + rt_mutex_futex_unlock(&pi_state->pi_mutex); + put_pi_state(pi_state); +@@ -1424,7 +1424,7 @@ static void __unqueue_futex(struct futex_q *q) + { + struct futex_hash_bucket *hb; + +- if (WARN_ON_SMP(!q->lock_ptr || !spin_is_locked(q->lock_ptr)) ++ if (WARN_ON_SMP(!q->lock_ptr || !raw_spin_is_locked(q->lock_ptr)) + || WARN_ON(plist_node_empty(&q->list))) + return; + +@@ -1552,21 +1552,21 @@ static inline void + double_lock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) + { + if (hb1 <= hb2) { +- spin_lock(&hb1->lock); ++ raw_spin_lock(&hb1->lock); + if (hb1 < hb2) +- spin_lock_nested(&hb2->lock, SINGLE_DEPTH_NESTING); ++ raw_spin_lock_nested(&hb2->lock, SINGLE_DEPTH_NESTING); + } else { /* hb1 > hb2 */ +- spin_lock(&hb2->lock); +- spin_lock_nested(&hb1->lock, SINGLE_DEPTH_NESTING); ++ raw_spin_lock(&hb2->lock); ++ raw_spin_lock_nested(&hb1->lock, SINGLE_DEPTH_NESTING); + } + } + + static inline void + double_unlock_hb(struct futex_hash_bucket *hb1, struct futex_hash_bucket *hb2) + { +- spin_unlock(&hb1->lock); ++ raw_spin_unlock(&hb1->lock); + if (hb1 != hb2) +- spin_unlock(&hb2->lock); ++ raw_spin_unlock(&hb2->lock); + } + + /* +@@ -1594,7 +1594,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) + if (!hb_waiters_pending(hb)) + goto out_put_key; + +- spin_lock(&hb->lock); ++ raw_spin_lock(&hb->lock); + + plist_for_each_entry_safe(this, next, &hb->chain, list) { + if (match_futex (&this->key, &key)) { +@@ -1613,7 +1613,7 @@ futex_wake(u32 __user *uaddr, unsigned int flags, int nr_wake, u32 bitset) + } + } + +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + wake_up_q(&wake_q); + out_put_key: + put_futex_key(&key); +@@ -2218,7 +2218,7 @@ static inline struct futex_hash_bucket *queue_lock(struct futex_q *q) + + q->lock_ptr = &hb->lock; + +- spin_lock(&hb->lock); /* implies smp_mb(); (A) */ ++ raw_spin_lock(&hb->lock); /* implies smp_mb(); (A) */ + return hb; + } + +@@ -2226,7 +2226,7 @@ static inline void + queue_unlock(struct futex_hash_bucket *hb) + __releases(&hb->lock) + { +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + hb_waiters_dec(hb); + } + +@@ -2265,7 +2265,7 @@ static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) + __releases(&hb->lock) + { + __queue_me(q, hb); +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + } + + /** +@@ -2281,41 +2281,41 @@ static inline void queue_me(struct futex_q *q, struct futex_hash_bucket *hb) + */ + static int unqueue_me(struct futex_q *q) + { +- spinlock_t *lock_ptr; ++ raw_spinlock_t *lock_ptr; + int ret = 0; + + /* In the common case we don't take the spinlock, which is nice. */ + retry: + /* +- * q->lock_ptr can change between this read and the following spin_lock. +- * Use READ_ONCE to forbid the compiler from reloading q->lock_ptr and +- * optimizing lock_ptr out of the logic below. ++ * q->lock_ptr can change between this read and the following ++ * raw_spin_lock. Use READ_ONCE to forbid the compiler from reloading ++ * q->lock_ptr and optimizing lock_ptr out of the logic below. + */ + lock_ptr = READ_ONCE(q->lock_ptr); + if (lock_ptr != NULL) { +- spin_lock(lock_ptr); ++ raw_spin_lock(lock_ptr); + /* + * q->lock_ptr can change between reading it and +- * spin_lock(), causing us to take the wrong lock. This ++ * raw_spin_lock(), causing us to take the wrong lock. This + * corrects the race condition. + * + * Reasoning goes like this: if we have the wrong lock, + * q->lock_ptr must have changed (maybe several times) +- * between reading it and the spin_lock(). It can +- * change again after the spin_lock() but only if it was +- * already changed before the spin_lock(). It cannot, ++ * between reading it and the raw_spin_lock(). It can ++ * change again after the raw_spin_lock() but only if it was ++ * already changed before the raw_spin_lock(). It cannot, + * however, change back to the original value. Therefore + * we can detect whether we acquired the correct lock. + */ + if (unlikely(lock_ptr != q->lock_ptr)) { +- spin_unlock(lock_ptr); ++ raw_spin_unlock(lock_ptr); + goto retry; + } + __unqueue_futex(q); + + BUG_ON(q->pi_state); + +- spin_unlock(lock_ptr); ++ raw_spin_unlock(lock_ptr); + ret = 1; + } + +@@ -2337,7 +2337,7 @@ static void unqueue_me_pi(struct futex_q *q) + put_pi_state(q->pi_state); + q->pi_state = NULL; + +- spin_unlock(q->lock_ptr); ++ raw_spin_unlock(q->lock_ptr); + } + + static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, +@@ -2470,7 +2470,7 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, + */ + handle_err: + raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); +- spin_unlock(q->lock_ptr); ++ raw_spin_unlock(q->lock_ptr); + + switch (err) { + case -EFAULT: +@@ -2488,7 +2488,7 @@ static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, + break; + } + +- spin_lock(q->lock_ptr); ++ raw_spin_lock(q->lock_ptr); + raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); + + /* +@@ -2584,7 +2584,7 @@ static void futex_wait_queue_me(struct futex_hash_bucket *hb, struct futex_q *q, + /* + * The task state is guaranteed to be set before another task can + * wake it. set_current_state() is implemented using smp_store_mb() and +- * queue_me() calls spin_unlock() upon completion, both serializing ++ * queue_me() calls raw_spin_unlock() upon completion, both serializing + * access to the hash list and forcing another memory barrier. + */ + set_current_state(TASK_INTERRUPTIBLE); +@@ -2875,7 +2875,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, + * before __rt_mutex_start_proxy_lock() is done. + */ + raw_spin_lock_irq(&q.pi_state->pi_mutex.wait_lock); +- spin_unlock(q.lock_ptr); ++ raw_spin_unlock(q.lock_ptr); + /* + * __rt_mutex_start_proxy_lock() unconditionally enqueues the @rt_waiter + * such that futex_unlock_pi() is guaranteed to observe the waiter when +@@ -2896,7 +2896,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, + ret = rt_mutex_wait_proxy_lock(&q.pi_state->pi_mutex, to, &rt_waiter); + + cleanup: +- spin_lock(q.lock_ptr); ++ raw_spin_lock(q.lock_ptr); + /* + * If we failed to acquire the lock (deadlock/signal/timeout), we must + * first acquire the hb->lock before removing the lock from the +@@ -2997,7 +2997,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) + return ret; + + hb = hash_futex(&key); +- spin_lock(&hb->lock); ++ raw_spin_lock(&hb->lock); + + /* + * Check waiters first. We do not trust user space values at +@@ -3031,7 +3031,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) + * rt_waiter. Also see the WARN in wake_futex_pi(). + */ + raw_spin_lock_irq(&pi_state->pi_mutex.wait_lock); +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + + /* drops pi_state->pi_mutex.wait_lock */ + ret = wake_futex_pi(uaddr, uval, pi_state); +@@ -3070,7 +3070,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) + * owner. + */ + if ((ret = cmpxchg_futex_value_locked(&curval, uaddr, uval, 0))) { +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + switch (ret) { + case -EFAULT: + goto pi_faulted; +@@ -3090,7 +3090,7 @@ static int futex_unlock_pi(u32 __user *uaddr, unsigned int flags) + ret = (curval == uval) ? 0 : -EAGAIN; + + out_unlock: +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + out_putkey: + put_futex_key(&key); + return ret; +@@ -3264,9 +3264,9 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + /* Queue the futex_q, drop the hb lock, wait for wakeup. */ + futex_wait_queue_me(hb, &q, to); + +- spin_lock(&hb->lock); ++ raw_spin_lock(&hb->lock); + ret = handle_early_requeue_pi_wakeup(hb, &q, &key2, to); +- spin_unlock(&hb->lock); ++ raw_spin_unlock(&hb->lock); + if (ret) + goto out_put_keys; + +@@ -3286,7 +3286,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * did a lock-steal - fix up the PI-state in that case. + */ + if (q.pi_state && (q.pi_state->owner != current)) { +- spin_lock(q.lock_ptr); ++ raw_spin_lock(q.lock_ptr); + ret = fixup_pi_state_owner(uaddr2, &q, current); + if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { + pi_state = q.pi_state; +@@ -3297,7 +3297,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * the requeue_pi() code acquired for us. + */ + put_pi_state(q.pi_state); +- spin_unlock(q.lock_ptr); ++ raw_spin_unlock(q.lock_ptr); + } + } else { + struct rt_mutex *pi_mutex; +@@ -3311,7 +3311,7 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + pi_mutex = &q.pi_state->pi_mutex; + ret = rt_mutex_wait_proxy_lock(pi_mutex, to, &rt_waiter); + +- spin_lock(q.lock_ptr); ++ raw_spin_lock(q.lock_ptr); + if (ret && !rt_mutex_cleanup_proxy_lock(pi_mutex, &rt_waiter)) + ret = 0; + +@@ -3748,7 +3748,7 @@ static int __init futex_init(void) + for (i = 0; i < futex_hashsize; i++) { + atomic_set(&futex_queues[i].waiters, 0); + plist_head_init(&futex_queues[i].chain); +- spin_lock_init(&futex_queues[i].lock); ++ raw_spin_lock_init(&futex_queues[i].lock); + } + + return 0; +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0281-futex-Delay-deallocation-of-pi_state.patch b/kernel/patches-4.19.x-rt/0281-futex-Delay-deallocation-of-pi_state.patch new file mode 100644 index 000000000..11811e0fe --- /dev/null +++ b/kernel/patches-4.19.x-rt/0281-futex-Delay-deallocation-of-pi_state.patch @@ -0,0 +1,182 @@ +From 640583a34e7d86efdc8dc382f0567af929cd2c94 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Wed, 26 Jun 2019 13:35:36 +0200 +Subject: [PATCH 281/283] futex: Delay deallocation of pi_state + +[ Upstream commit d7c7cf8cb68b7df17e6e50be1f25f35d83e686c7 ] + +On -RT we can't invoke kfree() in a non-preemptible context. + +Defer the deallocation of pi_state to preemptible context. + +Signed-off-by: Thomas Gleixner +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + kernel/futex.c | 55 ++++++++++++++++++++++++++++++++++++++++---------- + 1 file changed, 44 insertions(+), 11 deletions(-) + +diff --git a/kernel/futex.c b/kernel/futex.c +index b02d9969330b..688b6fcb79cb 100644 +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -822,13 +822,13 @@ static void get_pi_state(struct futex_pi_state *pi_state) + * Drops a reference to the pi_state object and frees or caches it + * when the last reference is gone. + */ +-static void put_pi_state(struct futex_pi_state *pi_state) ++static struct futex_pi_state *__put_pi_state(struct futex_pi_state *pi_state) + { + if (!pi_state) +- return; ++ return NULL; + + if (!atomic_dec_and_test(&pi_state->refcount)) +- return; ++ return NULL; + + /* + * If pi_state->owner is NULL, the owner is most probably dying +@@ -848,9 +848,7 @@ static void put_pi_state(struct futex_pi_state *pi_state) + raw_spin_unlock_irq(&pi_state->pi_mutex.wait_lock); + } + +- if (current->pi_state_cache) { +- kfree(pi_state); +- } else { ++ if (!current->pi_state_cache) { + /* + * pi_state->list is already empty. + * clear pi_state->owner. +@@ -859,6 +857,30 @@ static void put_pi_state(struct futex_pi_state *pi_state) + pi_state->owner = NULL; + atomic_set(&pi_state->refcount, 1); + current->pi_state_cache = pi_state; ++ pi_state = NULL; ++ } ++ return pi_state; ++} ++ ++static void put_pi_state(struct futex_pi_state *pi_state) ++{ ++ kfree(__put_pi_state(pi_state)); ++} ++ ++static void put_pi_state_atomic(struct futex_pi_state *pi_state, ++ struct list_head *to_free) ++{ ++ if (__put_pi_state(pi_state)) ++ list_add(&pi_state->list, to_free); ++} ++ ++static void free_pi_state_list(struct list_head *to_free) ++{ ++ struct futex_pi_state *p, *next; ++ ++ list_for_each_entry_safe(p, next, to_free, list) { ++ list_del(&p->list); ++ kfree(p); + } + } + +@@ -875,6 +897,7 @@ void exit_pi_state_list(struct task_struct *curr) + struct futex_pi_state *pi_state; + struct futex_hash_bucket *hb; + union futex_key key = FUTEX_KEY_INIT; ++ LIST_HEAD(to_free); + + if (!futex_cmpxchg_enabled) + return; +@@ -919,7 +942,7 @@ void exit_pi_state_list(struct task_struct *curr) + /* retain curr->pi_lock for the loop invariant */ + raw_spin_unlock(&pi_state->pi_mutex.wait_lock); + raw_spin_unlock(&hb->lock); +- put_pi_state(pi_state); ++ put_pi_state_atomic(pi_state, &to_free); + continue; + } + +@@ -938,6 +961,8 @@ void exit_pi_state_list(struct task_struct *curr) + raw_spin_lock_irq(&curr->pi_lock); + } + raw_spin_unlock_irq(&curr->pi_lock); ++ ++ free_pi_state_list(&to_free); + } + + #endif +@@ -1920,6 +1945,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, + struct futex_hash_bucket *hb1, *hb2; + struct futex_q *this, *next; + DEFINE_WAKE_Q(wake_q); ++ LIST_HEAD(to_free); + + if (nr_wake < 0 || nr_requeue < 0) + return -EINVAL; +@@ -2157,7 +2183,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, + * object. + */ + this->pi_state = NULL; +- put_pi_state(pi_state); ++ put_pi_state_atomic(pi_state, &to_free); + /* + * We stop queueing more waiters and let user + * space deal with the mess. +@@ -2174,7 +2200,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, + * in futex_proxy_trylock_atomic() or in lookup_pi_state(). We + * need to drop it here again. + */ +- put_pi_state(pi_state); ++ put_pi_state_atomic(pi_state, &to_free); + + out_unlock: + double_unlock_hb(hb1, hb2); +@@ -2195,6 +2221,7 @@ static int futex_requeue(u32 __user *uaddr1, unsigned int flags, + out_put_key1: + put_futex_key(&key1); + out: ++ free_pi_state_list(&to_free); + return ret ? ret : task_count; + } + +@@ -2331,13 +2358,16 @@ static int unqueue_me(struct futex_q *q) + static void unqueue_me_pi(struct futex_q *q) + __releases(q->lock_ptr) + { ++ struct futex_pi_state *ps; ++ + __unqueue_futex(q); + + BUG_ON(!q->pi_state); +- put_pi_state(q->pi_state); ++ ps = __put_pi_state(q->pi_state); + q->pi_state = NULL; + + raw_spin_unlock(q->lock_ptr); ++ kfree(ps); + } + + static int fixup_pi_state_owner(u32 __user *uaddr, struct futex_q *q, +@@ -3286,6 +3316,8 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * did a lock-steal - fix up the PI-state in that case. + */ + if (q.pi_state && (q.pi_state->owner != current)) { ++ struct futex_pi_state *ps_free; ++ + raw_spin_lock(q.lock_ptr); + ret = fixup_pi_state_owner(uaddr2, &q, current); + if (ret && rt_mutex_owner(&q.pi_state->pi_mutex) == current) { +@@ -3296,8 +3328,9 @@ static int futex_wait_requeue_pi(u32 __user *uaddr, unsigned int flags, + * Drop the reference to the pi state which + * the requeue_pi() code acquired for us. + */ +- put_pi_state(q.pi_state); ++ ps_free = __put_pi_state(q.pi_state); + raw_spin_unlock(q.lock_ptr); ++ kfree(ps_free); + } + } else { + struct rt_mutex *pi_mutex; +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0282-mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch b/kernel/patches-4.19.x-rt/0282-mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch new file mode 100644 index 000000000..33b99e3ef --- /dev/null +++ b/kernel/patches-4.19.x-rt/0282-mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch @@ -0,0 +1,126 @@ +From 6c3c5543f7820dca5be5c020721d30a34374ccf9 Mon Sep 17 00:00:00 2001 +From: "Luis Claudio R. Goncalves" +Date: Tue, 25 Jun 2019 11:28:04 -0300 +Subject: [PATCH 282/283] mm/zswap: Do not disable preemption in + zswap_frontswap_store() + +[ Upstream commit 4e4cf4be79635e67144632d9135286381acbc95a ] + +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 +zswap_frontswap_store() to protect the access of the zswap_dstmem percpu variable. + +Use get_locked_var() to protect the percpu zswap_dstmem variable, making the +code preemptive. + +As get_cpu_ptr() also disables preemption, replace it by this_cpu_ptr() and +remove the counterpart put_cpu_ptr(). + +Steps to Reproduce: + + 1. # grubby --args "zswap.enabled=1" --update-kernel DEFAULT + 2. # reboot + 3. Calculate the amount o memory to be used by the test: + ---> grep MemAvailable /proc/meminfo + ---> Add 25% ~ 50% to that value + 4. # stress --vm 1 --vm-bytes ${MemAvailable+25%} --timeout 240s + +Usually, in less than 5 minutes the backtrace listed below appears, followed +by a kernel panic: + +| BUG: scheduling while atomic: kswapd1/181/0x00000002 +| +| Preemption disabled at: +| [] zswap_frontswap_store+0x21a/0x6e1 +| +| Kernel panic - not syncing: scheduling while atomic +| CPU: 14 PID: 181 Comm: kswapd1 Kdump: loaded Not tainted 5.0.14-rt9 #1 +| Hardware name: AMD Pence/Pence, BIOS WPN2321X_Weekly_12_03_21 03/19/2012 +| Call Trace: +| panic+0x106/0x2a7 +| __schedule_bug.cold+0x3f/0x51 +| __schedule+0x5cb/0x6f0 +| schedule+0x43/0xd0 +| rt_spin_lock_slowlock_locked+0x114/0x2b0 +| rt_spin_lock_slowlock+0x51/0x80 +| zbud_alloc+0x1da/0x2d0 +| zswap_frontswap_store+0x31a/0x6e1 +| __frontswap_store+0xab/0x130 +| swap_writepage+0x39/0x70 +| pageout.isra.0+0xe3/0x320 +| shrink_page_list+0xa8e/0xd10 +| shrink_inactive_list+0x251/0x840 +| shrink_node_memcg+0x213/0x770 +| shrink_node+0xd9/0x450 +| balance_pgdat+0x2d5/0x510 +| kswapd+0x218/0x470 +| kthread+0xfb/0x130 +| ret_from_fork+0x27/0x50 + +Cc: stable-rt@vger.kernel.org +Reported-by: Ping Fang +Signed-off-by: Luis Claudio R. Goncalves +Reviewed-by: Daniel Bristot de Oliveira +Signed-off-by: Sebastian Andrzej Siewior +Signed-off-by: Steven Rostedt (VMware) +--- + mm/zswap.c | 12 +++++++----- + 1 file changed, 7 insertions(+), 5 deletions(-) + +diff --git a/mm/zswap.c b/mm/zswap.c +index cd91fd9d96b8..420225d3ff0b 100644 +--- a/mm/zswap.c ++++ b/mm/zswap.c +@@ -27,6 +27,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -990,6 +991,8 @@ static void zswap_fill_page(void *ptr, unsigned long value) + memset_l(page, value, PAGE_SIZE / sizeof(unsigned long)); + } + ++/* protect zswap_dstmem from concurrency */ ++static DEFINE_LOCAL_IRQ_LOCK(zswap_dstmem_lock); + /********************************* + * frontswap hooks + **********************************/ +@@ -1066,12 +1069,11 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset, + } + + /* compress */ +- dst = get_cpu_var(zswap_dstmem); +- tfm = *get_cpu_ptr(entry->pool->tfm); ++ dst = get_locked_var(zswap_dstmem_lock, zswap_dstmem); ++ tfm = *this_cpu_ptr(entry->pool->tfm); + src = kmap_atomic(page); + ret = crypto_comp_compress(tfm, src, PAGE_SIZE, dst, &dlen); + kunmap_atomic(src); +- put_cpu_ptr(entry->pool->tfm); + if (ret) { + ret = -EINVAL; + goto put_dstmem; +@@ -1094,7 +1096,7 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset, + memcpy(buf, &zhdr, hlen); + memcpy(buf + hlen, dst, dlen); + zpool_unmap_handle(entry->pool->zpool, handle); +- put_cpu_var(zswap_dstmem); ++ put_locked_var(zswap_dstmem_lock, zswap_dstmem); + + /* populate entry */ + entry->offset = offset; +@@ -1122,7 +1124,7 @@ static int zswap_frontswap_store(unsigned type, pgoff_t offset, + return 0; + + put_dstmem: +- put_cpu_var(zswap_dstmem); ++ put_locked_var(zswap_dstmem_lock, zswap_dstmem); + zswap_pool_put(entry->pool); + freepage: + zswap_entry_cache_free(entry); +-- +2.20.1 + diff --git a/kernel/patches-4.19.x-rt/0268-Linux-4.19.50-rt22-REBASE.patch b/kernel/patches-4.19.x-rt/0283-Linux-4.19.59-rt24-REBASE.patch similarity index 56% rename from kernel/patches-4.19.x-rt/0268-Linux-4.19.50-rt22-REBASE.patch rename to kernel/patches-4.19.x-rt/0283-Linux-4.19.59-rt24-REBASE.patch index c0b6c34e6..4f4e62f34 100644 --- a/kernel/patches-4.19.x-rt/0268-Linux-4.19.50-rt22-REBASE.patch +++ b/kernel/patches-4.19.x-rt/0283-Linux-4.19.59-rt24-REBASE.patch @@ -1,19 +1,19 @@ -From 5c15b7623e1aa08b31d5b4fc5db7d6b7a9b5fb78 Mon Sep 17 00:00:00 2001 +From bfbf9b36800f945fc7bd6bf934e65b59831aa03d Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (VMware)" -Date: Fri, 24 May 2019 14:22:06 -0400 -Subject: [PATCH 268/268] Linux 4.19.50-rt22 REBASE +Date: Fri, 19 Jul 2019 17:46:46 -0400 +Subject: [PATCH 283/283] Linux 4.19.59-rt24 REBASE --- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/localversion-rt b/localversion-rt -index 1199ebade17b..c29508d21914 100644 +index 1199ebade17b..b2111a212663 100644 --- a/localversion-rt +++ b/localversion-rt @@ -1 +1 @@ --rt16 -+-rt22 ++-rt24 -- 2.20.1