From 2c7f5f2710753d47b4ce31bd9c8c7967e8d7e7bb Mon Sep 17 00:00:00 2001 From: Romain Perier Date: Mon, 15 Oct 2018 21:02:34 +0200 Subject: [PATCH] Update to 4.18.12-rt7 This updates to 4.18.12-rt7 and re-enables rt --- debian/changelog | 3 + debian/config/defines | 2 +- ...M-at91-add-TCB-registers-definitions.patch | 2 +- ...d-zone-lock-while-freeing-pages-from.patch | 2 +- ..._t-for-reference-counting-instead-at.patch | 2 +- ...list_lru_walk_one-in-list_lru_walk_n.patch | 2 +- ...move-local_irq_disable-from-count_sh.patch | 2 +- ...d-zone-lock-while-freeing-pages-from.patch | 2 +- ...ers-Add-a-new-driver-for-the-Atmel-A.patch | 2 +- ...-Use-irqsave-variant-of-atomic_dec_a.patch | 2 +- ...-locking-from-__list_lru_walk_one-to.patch | 2 +- ...ke-shadow_lru_isolate-use-locking-su.patch | 2 +- ...unt_t-for-reference-counting-instead.patch | 2 +- ...drivers-atmel-pit-make-option-silent.patch | 2 +- ...-Do-not-disable-irq-on-release_inact.patch | 2 +- ...B-change-list_lock-to-raw_spinlock_t.patch | 2 +- ...-struct-list_lru_node-as-an-argument.patch | 2 +- ...at91-Implement-clocksource-selection.patch | 2 +- ...ving-back-empty-slubs-to-IRQ-enabled.patch | 2 +- ...u-Introduce-list_lru_shrink_walk_irq.patch | 2 +- ...onfigs-at91-use-new-TCB-timer-driver.patch | 2 +- ...ave-variant-of-refcount_dec_and_lock.patch | 2 +- .../0006-ARM-configs-at91-unselect-PIT.patch | 2 +- ...ave-variant-of-refcount_dec_and_lock.patch | 2 +- ...n-translation-section-permission-fau.patch | 2 +- ...mbus-include-header-for-get_irq_regs.patch | 2 +- ...intk-drop-the-logbuf_lock-more-often.patch | 2 +- ...wngrade-preempt_disable-d-region-to-.patch | 2 +- ...-replace-seqcount_t-with-a-seqlock_t.patch | 10 +- ...-remove-irq-save-in-sas_ata_qc_issue.patch | 2 +- ...2xxx-remove-irq-save-in-qla2x00_poll.patch | 2 +- debian/patches-rt/add_migrate_disable.patch | 2 +- ...-a-locallock-instead-preempt_disable.patch | 2 +- .../arch-arm64-Add-lazy-preempt-support.patch | 2 +- .../arm-convert-boot-lock-to-raw.patch | 2 +- .../arm-disable-NEON-in-kernel-mode.patch | 2 +- .../arm-enable-highmem-for-rt.patch | 2 +- .../arm-highmem-flush-tlb-on-unmap.patch | 2 +- ...arm-include-definition-for-cpumask_t.patch | 2 +- ...probe-replace-patch_lock-to-raw-lock.patch | 2 +- .../patches-rt/arm-preempt-lazy-support.patch | 2 +- .../patches-rt/arm-unwind-use_raw_lock.patch | 2 +- ...e_layout-before-altenates-are-applie.patch | 2 +- ...-preemp_disable-in-addition-to-local.patch | 2 +- .../at91_dont_enable_disable_clock.patch | 2 +- ...e-blk_queue_usage_counter_release-in.patch | 8 +- ...k-mq-don-t-complete-requests-via-IPI.patch | 6 +- .../block-mq-drop-preempt-disable.patch | 8 +- .../patches-rt/block-mq-use-cpu_light.patch | 2 +- debian/patches-rt/block-use-cpu-chill.patch | 2 +- ...ove-taking-of-spin-lock-out-of-trace.patch | 2 +- ...irqsave-in-cgroup_rstat_flush_locked.patch | 2 +- ...roups-use-simple-wait-in-css_release.patch | 2 +- ...source-tclib-allow-higher-clockrates.patch | 2 +- .../completion-use-simple-wait-queues.patch | 6 +- .../cond-resched-lock-rt-tweak.patch | 2 +- ...c-Protect-send_msg-with-a-local-lock.patch | 2 +- .../cpu-hotplug--Implement-CPU-pinning.patch | 2 +- ...rop-K8-s-driver-from-beeing-selected.patch | 2 +- .../cpumask-disable-offstack-on-rt.patch | 2 +- ...vert-callback_lock-to-raw_spinlock_t.patch | 2 +- ...-preempt-disabled-regions-more-algos.patch | 2 +- ...d-a-lock-instead-preempt_disable-loc.patch | 2 +- ...ypto-limit-more-FPU-enabled-sections.patch | 2 +- ...-serialize-RT-percpu-scratch-buffer-.patch | 2 +- debian/patches-rt/debugobjects-rt.patch | 4 +- ...rq-remove-BUG_ON-irqs_disabled-check.patch | 2 +- ...am-Replace-bit-spinlocks-with-rtmute.patch | 2 +- .../drivers-tty-fix-omap-lock-crap.patch | 2 +- ...rivers-tty-pl011-irq-disable-madness.patch | 2 +- ...-t-disable-preemption-in-zcomp_strea.patch | 2 +- ...-zcomp_stream_get-smp_processor_id-u.patch | 2 +- ...rq()_in_intel_pipe_update_startend().patch | 2 +- ...disableenable_rt()_where_recommended.patch | 2 +- debian/patches-rt/efi-Allow-efi-runtime.patch | 2 +- .../efi-Disable-runtime-services-on-RT.patch | 2 +- .../patches-rt/epoll-use-get-cpu-light.patch | 2 +- .../fs-aio-simple-simple-work.patch | 2 +- ...-back-explicit-INIT_HLIST_BL_HEAD-in.patch | 8 +- ...e-preemption-on-i_dir_seq-s-write-si.patch | 10 +- ...cache-use-cpu-chill-in-trylock-loops.patch | 2 +- ...use-swait_queue-instead-of-waitqueue.patch | 6 +- .../fs-jbd-replace-bh_state-lock.patch | 2 +- ...-nfs-turn-rmdir_sem-into-a-semaphore.patch | 2 +- .../fs-replace-bh_uptodate_lock-for-rt.patch | 2 +- ...lize-cookie-hash-table-raw-spinlocks.patch | 2 +- .../ftrace-Fix-trace-header-alignment.patch | 2 +- .../ftrace-migrate-disable-tracing.patch | 2 +- ...k-unlock-symetry-versus-pi_lock-and-.patch | 2 +- debian/patches-rt/futex-requeue-pi-fix.patch | 2 +- ...-migrate_disable-enable-in-different.patch | 2 +- .../genirq-disable-irqpoll-on-rt.patch | 2 +- ...voke-the-affinity-callback-via-a-wor.patch | 2 +- .../patches-rt/genirq-force-threading.patch | 2 +- ...-irq_set_irqchip_state-documentation.patch | 2 +- ...duct-tape-RT-rwlock-usage-for-non-RT.patch | 2 +- .../hotplug-light-get-online-cpus.patch | 6 +- ...-schedule_work-call-to-helper-thread.patch | 2 +- ...-by-default-into-the-softirq-context.patch | 6 +- ...ate-hrtimer_init-hrtimer_init_sleepe.patch | 4 +- .../hrtimers-prepare-full-preemption.patch | 16 +- ...iommu-amd-drop-irqs_disabled-warn_on.patch | 2 +- ...irq-processing-in-irq-thread-context.patch | 2 +- ...-its-Make-its_lock-a-raw_spin_lock_t.patch | 2 +- ...ts-Move-pending-table-allocation-to-.patch | 2 +- ...-push_most_work_into_softirq_context.patch | 56 ++--- debian/patches-rt/jump-label-rt.patch | 2 +- .../kconfig-disable-a-few-options-rt.patch | 2 +- .../patches-rt/kconfig-preempt-rt-full.patch | 2 +- ...n-t-try-to-print-from-IRQ-NMI-region.patch | 2 +- ...vide-a-pointer-to-the-valid-CPU-mask.patch | 40 ++-- ...e-stack-kprobe-clean-up-to-__put_tas.patch | 6 +- debian/patches-rt/kgb-serial-hackaround.patch | 2 +- ...-convert-worker-lock-to-raw-spinlock.patch | 195 ++++++++++++++++++ ...ds-trigger-disable-CPU-trigger-on-RT.patch | 2 +- ...ibata-remove-ata_sff_data_xfer_noirq.patch | 2 +- .../list_bl-fixup-bogus-lockdep-warning.patch | 2 +- ..._bl.h-make-list-head-locking-RT-safe.patch | 2 +- ...provide-get-put-_locked_ptr-variants.patch | 2 +- debian/patches-rt/localversion.patch | 4 +- .../lockdep-disable-self-test.patch | 2 +- .../lockdep-no-softirq-accounting-on-rt.patch | 2 +- ...-fix-warnings-due-to-missing-PREEMPT.patch | 2 +- ...ardirq-context-test-for-raw-spinlock.patch | 2 +- ...eck-for-__LINUX_SPINLOCK_TYPES_H-on-.patch | 2 +- ...ure-Do-NOT-include-rwlock.h-directly.patch | 2 +- ...-fix-deadlock-in-device-mapper-block.patch | 2 +- ...re-init-the-wait_lock-in-rt_mutex_in.patch | 2 +- debian/patches-rt/md-disable-bcache.patch | 2 +- .../md-raid5-percpu-handling-rt-aware.patch | 6 +- .../mips-disable-highmem-on-rt.patch | 2 +- .../mm-convert-swap-to-percpu-locked.patch | 2 +- debian/patches-rt/mm-disable-sloub-rt.patch | 2 +- debian/patches-rt/mm-enable-slub.patch | 2 +- ...ake-quarantine_lock-a-raw_spinlock_t.patch | 92 +++++++++ .../patches-rt/mm-make-vmstat-rt-aware.patch | 2 +- ...n-t-call-schedule_work_on-in-preempt.patch | 2 +- .../mm-memcontrol-do_not_disable_irq.patch | 2 +- ...page_alloc-rt-friendly-per-cpu-pages.patch | 6 +- ...m-perform-lru_add_drain_all-remotely.patch | 2 +- .../mm-protect-activate-switch-mm.patch | 2 +- .../mm-rt-kmap-atomic-scheduling.patch | 2 +- ...-scatterlist-dont-disable-irqs-on-RT.patch | 2 +- .../mm-vmalloc-use-get-cpu-light.patch | 2 +- ...oc_copy_with_get_cpu_var_and_locking.patch | 2 +- debian/patches-rt/mutex-no-spin-on-rt.patch | 2 +- ...schedule_irqoff-disable-interrupts-o.patch | 2 +- ...Qdisc-use-a-seqlock-instead-seqcount.patch | 2 +- .../net-add-a-lock-around-icmp_sk.patch | 2 +- ...-missing-serialization-in-ip_send_un.patch | 2 +- ...al-irq-disable-alloc-atomic-headache.patch | 2 +- ...-users-of-napi_alloc_cache-against-r.patch | 2 +- ...-use-local_bh_disable-in-netif_rx_ni.patch | 2 +- ...ake-qdisc-s-busylock-in-__dev_xmit_s.patch | 2 +- ...ble-xt-write-recseq-begin-rt-fallout.patch | 2 +- .../net-make-devnet_rename_seq-a-mutex.patch | 2 +- ...recursion-to-per-task-variable-on-RT.patch | 2 +- ...y-to-delegate-processing-a-softirq-t.patch | 2 +- ...activate_many-use-msleep-1-instead-o.patch | 2 +- debian/patches-rt/net-use-cpu-chill.patch | 2 +- .../net_disable_NET_RX_BUSY_POLL.patch | 2 +- ...abling-interrupts-during-kmap_atomic.patch | 2 +- ...-phandle-cache-outside-of-the-devtre.patch | 13 +- debian/patches-rt/oleg-signal-rt-fix.patch | 2 +- .../panic-disable-random-on-rt.patch | 2 +- ...ce-rcu-bh-qs-where-safe-from-softirq.patch | 2 +- ...ec-Don-t-use-completion-s-wait-queue.patch | 18 +- .../patches-rt/peter_zijlstra-frob-rcu.patch | 2 +- .../patches-rt/peterz-percpu-rwsem-rt.patch | 4 +- .../patches-rt/pid.h-include-atomic.h.patch | 2 +- ...timers-thread-posix-cpu-timers-on-rt.patch | 4 +- .../power-disable-highmem-on-rt.patch | 2 +- .../power-use-generic-rwsem-on-rt.patch | 2 +- ...ble-in-kernel-MPIC-emulation-for-PRE.patch | 2 +- .../powerpc-preempt-lazy-support.patch | 2 +- ...ce-init.c-adapt-to-completions-using.patch | 2 +- debian/patches-rt/preempt-lazy-support.patch | 36 ++-- .../patches-rt/preempt-nort-rt-variants.patch | 2 +- ...27-boot-param-to-help-with-debugging.patch | 2 +- debian/patches-rt/printk-kill.patch | 2 +- debian/patches-rt/printk-rt-aware.patch | 2 +- ...ace-fix-ptrace-vs-tasklist_lock-race.patch | 8 +- .../radix-tree-use-local-locks.patch | 2 +- ...andom-Remove-preempt-disabled-region.patch | 2 +- ...dom-avoid-preempt_disable-ed-section.patch | 2 +- .../random-make-it-work-on-rt.patch | 2 +- ...nate-softirq-processing-from-rcutree.patch | 2 +- ...d_lock-while-looking-at-cpu_online_m.patch | 2 +- .../rcu-disable-rcu-fast-no-hz-on-rt.patch | 2 +- ..._normal_after_boot-by-default-for-RT.patch | 2 +- .../rcu-make-RCU_BOOST-default-on-RT.patch | 2 +- ...merge-rcu-bh-into-rcu-preempt-for-rt.patch | 2 +- ...l-arm-coredump-fails-for-cpu-3e-3d-4.patch | 2 +- ...ease-the-nr-of-migratory-tasks-when-.patch | 8 +- .../patches-rt/rt-introduce-cpu-chill.patch | 2 +- debian/patches-rt/rt-local-irq-lock.patch | 2 +- .../patches-rt/rt-preempt-base-config.patch | 2 +- debian/patches-rt/rt-serial-warn-fix.patch | 2 +- .../rtmutex-Make-lock_killable-work.patch | 2 +- ...tex-Provide-rt_mutex_slowlock_locked.patch | 2 +- ...utex-implementation-based-on-rtmutex.patch | 2 +- ...lock-implementation-based-on-rtmutex.patch | 2 +- ...wsem-implementation-based-on-rtmutex.patch | 2 +- ...tex-add-sleeping-lock-implementation.patch | 4 +- ...utex-add-ww_mutex-addon-for-mutex-rt.patch | 2 +- ...mutex-annotate-sleeping-lock-context.patch | 4 +- .../rtmutex-avoid-include-hell.patch | 2 +- ...ockdep-less-version-of-rt_mutex-s-lo.patch | 2 +- .../patches-rt/rtmutex-futex-prepare-rt.patch | 2 +- debian/patches-rt/rtmutex-lock-killable.patch | 2 +- .../rtmutex-trylock-is-okay-on-RT.patch | 2 +- .../rtmutex-wire-up-RT-s-locking.patch | 2 +- .../patches-rt/rtmutex_dont_include_rcu.patch | 2 +- ...ed-user-tasks-to-be-awakened-to-the-.patch | 2 +- ...-core-Remove-get_cpu-from-sched_fork.patch | 2 +- debian/patches-rt/sched-delay-put-task.patch | 6 +- .../sched-disable-rt-group-sched-on-rt.patch | 2 +- .../patches-rt/sched-disable-ttwu-queue.patch | 2 +- .../patches-rt/sched-limit-nr-migrate.patch | 2 +- ...might-sleep-do-not-account-rcu-depth.patch | 4 +- ...sable-Add-export_symbol_gpl-for-__mi.patch | 32 +++ ...sable-fallback-to-preempt_disable-in.patch | 10 +- debian/patches-rt/sched-mmdrop-delayed.patch | 12 +- debian/patches-rt/sched-rt-mutex-wakeup.patch | 6 +- ...Only-wake-up-idle-workers-if-not-blo.patch | 4 +- debian/patches-rt/scsi-fcoe-rt-aware.patch | 2 +- .../seqlock-prevent-rt-starvation.patch | 2 +- debian/patches-rt/series | 5 + .../signal-revert-ptrace-preempt-magic.patch | 2 +- ...t-tasks-to-cache-one-sigqueue-struct.patch | 4 +- debian/patches-rt/skbufhead-raw-lock.patch | 2 +- .../slub-disable-SLUB_CPU_PARTIAL.patch | 2 +- .../slub-enable-irqs-for-no-wait.patch | 2 +- ...oftirq-disable-softirq-stacks-for-rt.patch | 2 +- .../patches-rt/softirq-preempt-fix-3-re.patch | 2 +- debian/patches-rt/softirq-split-locks.patch | 2 +- ...plit-timer-softirqs-out-of-ksoftirqd.patch | 2 +- .../spinlock-types-separate-raw.patch | 2 +- ...e-of-local-lock-in-multi_cpu-decompr.patch | 2 +- ...place-local_irqsave-with-a-locallock.patch | 2 +- ...-use-cpu_online-instead-custom-check.patch | 2 +- ...vc_xprt_do_enqueue-use-get_cpu_light.patch | 2 +- debian/patches-rt/sysfs-realtime-entry.patch | 2 +- ...-from-going-into-infinite-spin-in-rt.patch | 2 +- ...rmal-Defer-thermal-wakups-to-threads.patch | 2 +- ...id-schedule_work-with-interrupts-dis.patch | 2 +- .../timekeeping-split-jiffies-lock.patch | 2 +- .../timers-prepare-for-full-preemption.patch | 6 +- .../tpm_tis-fix-stall-after-iowrite-s.patch | 2 +- ...0-don-t-take-the-trylock-during-oops.patch | 2 +- ...al-pl011-warning-about-uninitialized.patch | 38 ++++ ...ove-preemption-disabling-in-netif_rx.patch | 2 +- ...o-not-disable-interrupts-in-giveback.patch | 2 +- .../patches-rt/wait.h-include-atomic.h.patch | 2 +- ...t-deferral-of-watchdogd-wakeup-on-RT.patch | 75 +++++++ ...rk-around-irqsafe-timer-optimization.patch | 2 +- ...mple-Simple-work-queue-implemenation.patch | 2 +- ...-a-shit-statement-in-SWORK_EVENT_PEN.patch | 2 +- .../workqueue-distangle-from-rq-lock.patch | 14 +- .../workqueue-prevent-deadlock-stall.patch | 6 +- .../patches-rt/workqueue-use-locallock.patch | 8 +- debian/patches-rt/workqueue-use-rcu.patch | 30 +-- ...ypto-reduce-preempt-disabled-regions.patch | 2 +- ...fi-drop-task_lock-from-efi_switch_mm.patch | 2 +- ...highmem-add-a-already-used-pte-check.patch | 2 +- ...-let-setaffinity-unmask-threaded-EOI.patch | 2 +- .../x86-kvm-require-const-tsc-for-rt.patch | 4 +- debian/patches-rt/x86-preempt-lazy.patch | 6 +- ...ignal-delay-calling-signals-on-32bit.patch | 2 +- .../x86-stackprot-no-random-on-rt.patch | 2 +- .../x86-use-gen-rwsem-spinlocks-rt.patch | 2 +- 271 files changed, 872 insertions(+), 447 deletions(-) create mode 100644 debian/patches-rt/kthread-convert-worker-lock-to-raw-spinlock.patch create mode 100644 debian/patches-rt/mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch create mode 100644 debian/patches-rt/sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch create mode 100644 debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch create mode 100644 debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch diff --git a/debian/changelog b/debian/changelog index 54626cbfb..d128edd8d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -267,6 +267,9 @@ linux (4.18.12-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * linux-perf: Fix BPF feature detection + [ Romain Perier ] + * [rt] Update to 4.18.12-rt7 + -- Ben Hutchings Mon, 08 Oct 2018 19:02:53 +0100 linux (4.18.10-2) unstable; urgency=medium diff --git a/debian/config/defines b/debian/config/defines index 65d428e93..213b38705 100644 --- a/debian/config/defines +++ b/debian/config/defines @@ -122,7 +122,7 @@ debug-info: true signed-code: false [featureset-rt_base] -enabled: false +enabled: true [description] part-long-up: This kernel is not suitable for SMP (multi-processor, diff --git a/debian/patches-rt/0001-ARM-at91-add-TCB-registers-definitions.patch b/debian/patches-rt/0001-ARM-at91-add-TCB-registers-definitions.patch index c13bd25e7..b27cbc53c 100644 --- a/debian/patches-rt/0001-ARM-at91-add-TCB-registers-definitions.patch +++ b/debian/patches-rt/0001-ARM-at91-add-TCB-registers-definitions.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:38 +0200 Subject: [PATCH 1/6] ARM: at91: add TCB registers definitions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Add registers and bits definitions for the timer counter blocks found on Atmel ARM SoCs. diff --git a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index 1eeec05d4..2b3d4f247 100644 --- a/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0001-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra Date: Mon, 28 May 2018 15:24:20 +0200 Subject: [PATCH 1/4] Split IRQ-off and zone->lock while freeing pages from PCP list #1 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch b/debian/patches-rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch index c914464de..cb4470eaa 100644 --- a/debian/patches-rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch +++ b/debian/patches-rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 7 May 2018 16:51:09 +0200 Subject: [PATCH] bdi: use refcount_t for reference counting instead atomic_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental diff --git a/debian/patches-rt/0001-mm-list_lru-use-list_lru_walk_one-in-list_lru_walk_n.patch b/debian/patches-rt/0001-mm-list_lru-use-list_lru_walk_one-in-list_lru_walk_n.patch index 4844b9577..7c5761e22 100644 --- a/debian/patches-rt/0001-mm-list_lru-use-list_lru_walk_one-in-list_lru_walk_n.patch +++ b/debian/patches-rt/0001-mm-list_lru-use-list_lru_walk_one-in-list_lru_walk_n.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 12:56:19 +0200 Subject: [PATCH 1/4] mm/list_lru: use list_lru_walk_one() in list_lru_walk_node() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz list_lru_walk_node() invokes __list_lru_walk_one() with -1 as the memcg_idx parameter. The same can be achieved by list_lru_walk_one() and diff --git a/debian/patches-rt/0001-mm-workingset-remove-local_irq_disable-from-count_sh.patch b/debian/patches-rt/0001-mm-workingset-remove-local_irq_disable-from-count_sh.patch index 6e8359113..3e8d871c1 100644 --- a/debian/patches-rt/0001-mm-workingset-remove-local_irq_disable-from-count_sh.patch +++ b/debian/patches-rt/0001-mm-workingset-remove-local_irq_disable-from-count_sh.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 22 Jun 2018 10:48:51 +0200 Subject: [PATCH 1/3] mm: workingset: remove local_irq_disable() from count_shadow_nodes() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In commit 0c7c1bed7e13 ("mm: make counting of list_lru_one::nr_items lockless") the diff --git a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch index f314ceb66..d505e189c 100644 --- a/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch +++ b/debian/patches-rt/0002-Split-IRQ-off-and-zone-lock-while-freeing-pages-from.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra Date: Mon, 28 May 2018 15:24:21 +0200 Subject: [PATCH 2/4] Split IRQ-off and zone->lock while freeing pages from PCP list #2 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. diff --git a/debian/patches-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch b/debian/patches-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch index 1c7fcd6ac..dae0b244c 100644 --- a/debian/patches-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch +++ b/debian/patches-rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch @@ -2,7 +2,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:39 +0200 Subject: [PATCH 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Add a driver for the Atmel Timer Counter Blocks. This driver provides a clocksource and two clockevent devices. diff --git a/debian/patches-rt/0002-drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch b/debian/patches-rt/0002-drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch index e1f280345..637605b44 100644 --- a/debian/patches-rt/0002-drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch +++ b/debian/patches-rt/0002-drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch @@ -2,7 +2,7 @@ From: Anna-Maria Gleixner Date: Fri, 4 May 2018 17:45:32 +0200 Subject: [PATCH 2/3] drivers/md/raid5: Use irqsave variant of atomic_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The irqsave variant of atomic_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of diff --git a/debian/patches-rt/0002-mm-list_lru-Move-locking-from-__list_lru_walk_one-to.patch b/debian/patches-rt/0002-mm-list_lru-Move-locking-from-__list_lru_walk_one-to.patch index c9c73ee8e..8a829e998 100644 --- a/debian/patches-rt/0002-mm-list_lru-Move-locking-from-__list_lru_walk_one-to.patch +++ b/debian/patches-rt/0002-mm-list_lru-Move-locking-from-__list_lru_walk_one-to.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 13:06:07 +0200 Subject: [PATCH 2/4] mm/list_lru: Move locking from __list_lru_walk_one() to its caller -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Move the locking inside __list_lru_walk_one() to its caller. This is a preparation step in order to introduce list_lru_walk_one_irq() which diff --git a/debian/patches-rt/0002-mm-workingset-make-shadow_lru_isolate-use-locking-su.patch b/debian/patches-rt/0002-mm-workingset-make-shadow_lru_isolate-use-locking-su.patch index d961adc46..1c93c4319 100644 --- a/debian/patches-rt/0002-mm-workingset-make-shadow_lru_isolate-use-locking-su.patch +++ b/debian/patches-rt/0002-mm-workingset-make-shadow_lru_isolate-use-locking-su.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 22 Jun 2018 11:43:35 +0200 Subject: [PATCH 2/3] mm: workingset: make shadow_lru_isolate() use locking suffix -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz shadow_lru_isolate() disables interrupts and acquires a lock. It could use spin_lock_irq() instead. It also uses local_irq_enable() while it diff --git a/debian/patches-rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch b/debian/patches-rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch index 0de4fb5da..95475253c 100644 --- a/debian/patches-rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch +++ b/debian/patches-rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 7 May 2018 17:09:42 +0200 Subject: [PATCH] userns: use refcount_t for reference counting instead atomic_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz refcount_t type and corresponding API should be used instead of atomic_t when the variable is used as a reference counter. This allows to avoid accidental diff --git a/debian/patches-rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch b/debian/patches-rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch index b63dd91ca..f742365c0 100644 --- a/debian/patches-rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch +++ b/debian/patches-rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:40 +0200 Subject: [PATCH 3/6] clocksource/drivers: atmel-pit: make option silent -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz To conform with the other option, make the ATMEL_PIT option silent so it can be selected from the platform diff --git a/debian/patches-rt/0003-drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch b/debian/patches-rt/0003-drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch index 4dbdfbfca..d4e46a7bb 100644 --- a/debian/patches-rt/0003-drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch +++ b/debian/patches-rt/0003-drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch @@ -2,7 +2,7 @@ From: Anna-Maria Gleixner Date: Fri, 4 May 2018 17:45:33 +0200 Subject: [PATCH 3/3] drivers/md/raid5: Do not disable irq on release_inactive_stripe_list() call -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There is no need to invoke release_inactive_stripe_list() with interrupts disabled. All call sites, except raid5_release_stripe(), unlock diff --git a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch index 3f2bcd3d1..21562b325 100644 --- a/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/0003-mm-SLxB-change-list_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Mon, 28 May 2018 15:24:22 +0200 Subject: [PATCH 3/4] mm/SLxB: change list_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The list_lock is used with used with IRQs off on RT. Make it a raw_spinlock_t otherwise the interrupts won't be disabled on -RT. The locking rules remain diff --git a/debian/patches-rt/0003-mm-list_lru-Pass-struct-list_lru_node-as-an-argument.patch b/debian/patches-rt/0003-mm-list_lru-Pass-struct-list_lru_node-as-an-argument.patch index b6732b4a7..93c920bd7 100644 --- a/debian/patches-rt/0003-mm-list_lru-Pass-struct-list_lru_node-as-an-argument.patch +++ b/debian/patches-rt/0003-mm-list_lru-Pass-struct-list_lru_node-as-an-argument.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 13:08:56 +0200 Subject: [PATCH 3/4] mm/list_lru: Pass struct list_lru_node as an argument __list_lru_walk_one() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz __list_lru_walk_one() is invoked with struct list_lru *lru, int nid as the first two argument. Those two are only used to retrieve struct diff --git a/debian/patches-rt/0004-ARM-at91-Implement-clocksource-selection.patch b/debian/patches-rt/0004-ARM-at91-Implement-clocksource-selection.patch index 7e0ea6b77..3473007e9 100644 --- a/debian/patches-rt/0004-ARM-at91-Implement-clocksource-selection.patch +++ b/debian/patches-rt/0004-ARM-at91-Implement-clocksource-selection.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:41 +0200 Subject: [PATCH 4/6] ARM: at91: Implement clocksource selection -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Allow selecting and unselecting the PIT clocksource driver so it doesn't have to be compile when unused. diff --git a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch index 556eed81c..cbe5b4099 100644 --- a/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch +++ b/debian/patches-rt/0004-mm-SLUB-delay-giving-back-empty-slubs-to-IRQ-enabled.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Thu, 21 Jun 2018 17:29:19 +0200 Subject: [PATCH 4/4] mm/SLUB: delay giving back empty slubs to IRQ enabled regions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz __free_slab() is invoked with disabled interrupts which increases the irq-off time while __free_pages() is doing the work. diff --git a/debian/patches-rt/0004-mm-list_lru-Introduce-list_lru_shrink_walk_irq.patch b/debian/patches-rt/0004-mm-list_lru-Introduce-list_lru_shrink_walk_irq.patch index b88968f63..6e16ac7fb 100644 --- a/debian/patches-rt/0004-mm-list_lru-Introduce-list_lru_shrink_walk_irq.patch +++ b/debian/patches-rt/0004-mm-list_lru-Introduce-list_lru_shrink_walk_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 13:17:27 +0200 Subject: [PATCH 4/4] mm/list_lru: Introduce list_lru_shrink_walk_irq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Provide list_lru_shrink_walk_irq() and let it behave like list_lru_walk_one() except that it locks the spinlock with diff --git a/debian/patches-rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch b/debian/patches-rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch index 8ca0704e3..80f1a1470 100644 --- a/debian/patches-rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch +++ b/debian/patches-rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:42 +0200 Subject: [PATCH 5/6] ARM: configs: at91: use new TCB timer driver -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to timer-atmel-tcb. diff --git a/debian/patches-rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch b/debian/patches-rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch index fbe585332..8e8ff7c6a 100644 --- a/debian/patches-rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch +++ b/debian/patches-rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:56 +0200 Subject: [PATCH] bdi: Use irqsave variant of refcount_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The irqsave variant of refcount_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of diff --git a/debian/patches-rt/0006-ARM-configs-at91-unselect-PIT.patch b/debian/patches-rt/0006-ARM-configs-at91-unselect-PIT.patch index e0519e731..05a21feda 100644 --- a/debian/patches-rt/0006-ARM-configs-at91-unselect-PIT.patch +++ b/debian/patches-rt/0006-ARM-configs-at91-unselect-PIT.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:43 +0200 Subject: [PATCH 6/6] ARM: configs: at91: unselect PIT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch b/debian/patches-rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch index 83535c574..4bb8e2ae8 100644 --- a/debian/patches-rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch +++ b/debian/patches-rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:57 +0200 Subject: [PATCH] userns: Use irqsave variant of refcount_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The irqsave variant of refcount_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of diff --git a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch index a3520acf6..6ff32e08e 100644 --- a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch +++ b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,7 +1,7 @@ From: "Yadi.hu" Date: Wed, 10 Dec 2014 10:32:09 +0800 Subject: ARM: enable irq in translation/section permission fault handlers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT_FULL diff --git a/debian/patches-rt/Drivers-hv-vmbus-include-header-for-get_irq_regs.patch b/debian/patches-rt/Drivers-hv-vmbus-include-header-for-get_irq_regs.patch index 3d7f84d4d..e60e1da6b 100644 --- a/debian/patches-rt/Drivers-hv-vmbus-include-header-for-get_irq_regs.patch +++ b/debian/patches-rt/Drivers-hv-vmbus-include-header-for-get_irq_regs.patch @@ -4,7 +4,7 @@ Subject: [PATCH] Drivers: hv: vmbus: include header for get_irq_regs() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On !RT the header file get_irq_regs() gets pulled in via other header files. On RT it does not and the build fails: diff --git a/debian/patches-rt/HACK-printk-drop-the-logbuf_lock-more-often.patch b/debian/patches-rt/HACK-printk-drop-the-logbuf_lock-more-often.patch index 21afee898..4e836660d 100644 --- a/debian/patches-rt/HACK-printk-drop-the-logbuf_lock-more-often.patch +++ b/debian/patches-rt/HACK-printk-drop-the-logbuf_lock-more-often.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 21 Mar 2013 19:01:05 +0100 Subject: printk: Drop the logbuf_lock more often -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index 81f8de2f7..2f1372c35 100644 --- a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +++ b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:01 -0600 Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating the vgic and timer states to prevent the calling task from migrating to diff --git a/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch b/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch index c9b5895ba..d893a5142 100644 --- a/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch +++ b/debian/patches-rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch @@ -5,7 +5,7 @@ Cc: Anna Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: NFSv4: replace seqcount_t with a seqlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 @@ -58,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c -@@ -2818,7 +2818,7 @@ static int _nfs4_open_and_get_state(stru +@@ -2822,7 +2822,7 @@ static int _nfs4_open_and_get_state(stru unsigned int seq; int ret; @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior ret = _nfs4_proc_open(opendata, ctx); if (ret != 0) -@@ -2856,7 +2856,7 @@ static int _nfs4_open_and_get_state(stru +@@ -2860,7 +2860,7 @@ static int _nfs4_open_and_get_state(stru if (d_inode(dentry) == state->inode) { nfs_inode_attach_open_context(ctx); @@ -87,7 +87,7 @@ Signed-off-by: Sebastian Andrzej Siewior mutex_init(&sp->so_delegreturn_mutex); return sp; } -@@ -1560,8 +1560,12 @@ static int nfs4_reclaim_open_state(struc +@@ -1562,8 +1562,12 @@ static int nfs4_reclaim_open_state(struc * recovering after a network partition or a reboot from a * server that doesn't support a grace period. */ @@ -101,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior restart: list_for_each_entry(state, &sp->so_states, open_states) { if (!test_and_clear_bit(ops->state_flag_bit, &state->flags)) -@@ -1630,14 +1634,20 @@ static int nfs4_reclaim_open_state(struc +@@ -1632,14 +1636,20 @@ static int nfs4_reclaim_open_state(struc spin_lock(&sp->so_lock); goto restart; } diff --git a/debian/patches-rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch b/debian/patches-rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch index 0e4033329..b2f6b65a1 100644 --- a/debian/patches-rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch +++ b/debian/patches-rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Apr 2018 09:16:22 +0200 Subject: [PATCH] [SCSI] libsas: remove irq save in sas_ata_qc_issue() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ upstream commit 2da11d4262639dc0e2fabc6a70886db57af25c43 ] diff --git a/debian/patches-rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch b/debian/patches-rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch index 560bb1edf..41968ac65 100644 --- a/debian/patches-rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch +++ b/debian/patches-rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Apr 2018 09:55:25 +0200 Subject: [PATCH] [SCSI] qla2xxx: remove irq save in qla2x00_poll() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ upstream commit b3a8aa90c46095cbad454eb068bfb5a8eb56d4e3 ] diff --git a/debian/patches-rt/add_migrate_disable.patch b/debian/patches-rt/add_migrate_disable.patch index 83322d576..64cda205b 100644 --- a/debian/patches-rt/add_migrate_disable.patch +++ b/debian/patches-rt/add_migrate_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 Subject: kernel/sched/core: add migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz --- include/linux/preempt.h | 23 ++++++++ diff --git a/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch b/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch index a3b3955c9..a8e0627e2 100644 --- a/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch +++ b/debian/patches-rt/apparmor-use-a-locallock-instead-preempt_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 11 Oct 2017 17:43:49 +0200 Subject: apparmor: use a locallock instead preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz get_buffers() disables preemption which acts as a lock for the per-CPU variable. Since we can't disable preemption here on RT, a local_lock is diff --git a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch index 4f435daed..fd9ef4cce 100644 --- a/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch +++ b/debian/patches-rt/arch-arm64-Add-lazy-preempt-support.patch @@ -1,7 +1,7 @@ From: Anders Roxell Date: Thu, 14 May 2015 17:52:17 +0200 Subject: arch/arm64: Add lazy preempt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, diff --git a/debian/patches-rt/arm-convert-boot-lock-to-raw.patch b/debian/patches-rt/arm-convert-boot-lock-to-raw.patch index 1a07273f5..a31ae9557 100644 --- a/debian/patches-rt/arm-convert-boot-lock-to-raw.patch +++ b/debian/patches-rt/arm-convert-boot-lock-to-raw.patch @@ -1,7 +1,7 @@ From: Frank Rowand Date: Mon, 19 Sep 2011 14:51:14 -0700 Subject: arm: Convert arm boot_lock to raw -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch b/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch index ac5f9b13d..0759181c8 100644 --- a/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch +++ b/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 1 Dec 2017 10:42:03 +0100 Subject: [PATCH] arm*: disable NEON in kernel mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz NEON in kernel mode is used by the crypto algorithms and raid6 code. While the raid6 code looks okay, the crypto algorithms do not: NEON diff --git a/debian/patches-rt/arm-enable-highmem-for-rt.patch b/debian/patches-rt/arm-enable-highmem-for-rt.patch index 08c92082c..3b52d350e 100644 --- a/debian/patches-rt/arm-enable-highmem-for-rt.patch +++ b/debian/patches-rt/arm-enable-highmem-for-rt.patch @@ -1,7 +1,7 @@ Subject: arm: Enable highmem for rt From: Thomas Gleixner Date: Wed, 13 Feb 2013 11:03:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz fixup highmem for ARM. diff --git a/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch b/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch index cab3f087d..7b9244f67 100644 --- a/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch +++ b/debian/patches-rt/arm-highmem-flush-tlb-on-unmap.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 21:37:27 +0100 Subject: arm/highmem: Flush tlb on unmap -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The tlb should be flushed on unmap and thus make the mapping entry invalid. This is only done in the non-debug case which does not look diff --git a/debian/patches-rt/arm-include-definition-for-cpumask_t.patch b/debian/patches-rt/arm-include-definition-for-cpumask_t.patch index 80dd10157..9d6893380 100644 --- a/debian/patches-rt/arm-include-definition-for-cpumask_t.patch +++ b/debian/patches-rt/arm-include-definition-for-cpumask_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Dec 2016 17:28:33 +0100 Subject: [PATCH] arm: include definition for cpumask_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz This definition gets pulled in by other files. With the (later) split of RCU and spinlock.h it won't compile anymore. diff --git a/debian/patches-rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch b/debian/patches-rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch index d77f412db..595f15e63 100644 --- a/debian/patches-rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch +++ b/debian/patches-rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Thu, 10 Nov 2016 16:17:55 -0800 Subject: [PATCH] arm: kprobe: replace patch_lock to raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz When running kprobe on -rt kernel, the below bug is caught: diff --git a/debian/patches-rt/arm-preempt-lazy-support.patch b/debian/patches-rt/arm-preempt-lazy-support.patch index a9ef2e96f..e22540817 100644 --- a/debian/patches-rt/arm-preempt-lazy-support.patch +++ b/debian/patches-rt/arm-preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: arm: Add support for lazy preemption From: Thomas Gleixner Date: Wed, 31 Oct 2012 12:04:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Implement the arm pieces for lazy preempt. diff --git a/debian/patches-rt/arm-unwind-use_raw_lock.patch b/debian/patches-rt/arm-unwind-use_raw_lock.patch index e9d50fb08..e59691e24 100644 --- a/debian/patches-rt/arm-unwind-use_raw_lock.patch +++ b/debian/patches-rt/arm-unwind-use_raw_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 20 Sep 2013 14:31:54 +0200 Subject: arm/unwind: use a raw_spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Mostly unwind is done with irqs enabled however SLUB may call it with irqs disabled while creating a new SLUB cache. diff --git a/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch b/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch index fdbc8d419..fbb2d242d 100644 --- a/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch +++ b/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 09:13:42 +0200 Subject: [PATCH] arm64: KVM: compute_layout before altenates are applied -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz compute_layout() is invoked as part of an alternative fixup under stop_machine() and needs a sleeping lock as part of get_random_long(). diff --git a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch index 18eb2306d..48f7b1843 100644 --- a/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch +++ b/debian/patches-rt/arm64-fpsimd-use-preemp_disable-in-addition-to-local.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 25 Jul 2018 14:02:38 +0200 Subject: [PATCH] arm64: fpsimd: use preemp_disable in addition to local_bh_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In v4.16-RT I noticed a number of warnings from task_fpsimd_load(). The code disables BH and expects that it is not preemptible. On -RT the diff --git a/debian/patches-rt/at91_dont_enable_disable_clock.patch b/debian/patches-rt/at91_dont_enable_disable_clock.patch index b2167c8d0..a4a373fae 100644 --- a/debian/patches-rt/at91_dont_enable_disable_clock.patch +++ b/debian/patches-rt/at91_dont_enable_disable_clock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 09 Mar 2016 10:51:06 +0100 Subject: arm: at91: do not disable/enable clocks in a row -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Currently the driver will disable the clock and enable it one line later if it is switching from periodic mode into one shot. diff --git a/debian/patches-rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch b/debian/patches-rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch index 52fc4239c..f3c555647 100644 --- a/debian/patches-rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch +++ b/debian/patches-rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 13 Mar 2018 13:49:16 +0100 Subject: [PATCH] block: blk-mq: move blk_queue_usage_counter_release() into process context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz | BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914 | in_atomic(): 1, irqs_disabled(): 0, pid: 255, name: kworker/u257:6 @@ -52,7 +52,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/block/blk-core.c +++ b/block/blk-core.c -@@ -965,12 +965,21 @@ void blk_queue_exit(struct request_queue +@@ -969,12 +969,21 @@ void blk_queue_exit(struct request_queue percpu_ref_put(&q->q_usage_counter); } @@ -75,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior } static void blk_rq_timed_out_timer(struct timer_list *t) -@@ -1064,6 +1073,7 @@ struct request_queue *blk_alloc_queue_no +@@ -1068,6 +1077,7 @@ struct request_queue *blk_alloc_queue_no queue_flag_set_unlocked(QUEUE_FLAG_BYPASS, q); init_waitqueue_head(&q->mq_freeze_wq); @@ -83,7 +83,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * Init percpu_ref in atomic mode so that it's faster to shutdown. -@@ -3948,6 +3958,8 @@ int __init blk_dev_init(void) +@@ -3957,6 +3967,8 @@ int __init blk_dev_init(void) if (!kblockd_workqueue) panic("Failed to create kblockd\n"); diff --git a/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch b/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch index 3cf363281..a4964948d 100644 --- a/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch +++ b/debian/patches-rt/block-mq-don-t-complete-requests-via-IPI.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 15:10:08 +0100 Subject: block/mq: don't complete requests via IPI -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The IPI runs in hardirq context and there are sleeping locks. This patch moves the completion into a workqueue. @@ -38,7 +38,7 @@ Signed-off-by: Sebastian Andrzej Siewior INIT_LIST_HEAD(&rq->timeout_list); rq->timeout = 0; -@@ -545,12 +548,24 @@ void blk_mq_end_request(struct request * +@@ -547,12 +550,24 @@ void blk_mq_end_request(struct request * } EXPORT_SYMBOL(blk_mq_end_request); @@ -63,7 +63,7 @@ Signed-off-by: Sebastian Andrzej Siewior static void __blk_mq_complete_request(struct request *rq) { -@@ -573,10 +588,18 @@ static void __blk_mq_complete_request(st +@@ -575,10 +590,18 @@ static void __blk_mq_complete_request(st shared = cpus_share_cache(cpu, ctx->cpu); if (cpu != ctx->cpu && !shared && cpu_online(ctx->cpu)) { diff --git a/debian/patches-rt/block-mq-drop-preempt-disable.patch b/debian/patches-rt/block-mq-drop-preempt-disable.patch index 48097f5bf..916ef8e36 100644 --- a/debian/patches-rt/block-mq-drop-preempt-disable.patch +++ b/debian/patches-rt/block-mq-drop-preempt-disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: block/mq: do not invoke preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -568,7 +568,7 @@ static void __blk_mq_complete_request(st +@@ -570,7 +570,7 @@ static void __blk_mq_complete_request(st return; } @@ -23,7 +23,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (!test_bit(QUEUE_FLAG_SAME_FORCE, &rq->q->queue_flags)) shared = cpus_share_cache(cpu, ctx->cpu); -@@ -580,7 +580,7 @@ static void __blk_mq_complete_request(st +@@ -582,7 +582,7 @@ static void __blk_mq_complete_request(st } else { rq->q->softirq_done_fn(rq); } @@ -32,7 +32,7 @@ Signed-off-by: Sebastian Andrzej Siewior } static void hctx_unlock(struct blk_mq_hw_ctx *hctx, int srcu_idx) -@@ -1324,14 +1324,14 @@ static void __blk_mq_delay_run_hw_queue( +@@ -1328,14 +1328,14 @@ static void __blk_mq_delay_run_hw_queue( return; if (!async && !(hctx->flags & BLK_MQ_F_BLOCKING)) { diff --git a/debian/patches-rt/block-mq-use-cpu_light.patch b/debian/patches-rt/block-mq-use-cpu_light.patch index 6f2c4dc0c..67db4a162 100644 --- a/debian/patches-rt/block-mq-use-cpu_light.patch +++ b/debian/patches-rt/block-mq-use-cpu_light.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 9 Apr 2014 10:37:23 +0200 Subject: block: mq: use cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/block-use-cpu-chill.patch b/debian/patches-rt/block-use-cpu-chill.patch index 092a0bdae..34f4f3b0c 100644 --- a/debian/patches-rt/block-use-cpu-chill.patch +++ b/debian/patches-rt/block-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: block: Use cpu_chill() for retry loops From: Thomas Gleixner Date: Thu, 20 Dec 2012 18:28:26 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Steven also observed a live lock when there was a diff --git a/debian/patches-rt/cgroup-tracing-Move-taking-of-spin-lock-out-of-trace.patch b/debian/patches-rt/cgroup-tracing-Move-taking-of-spin-lock-out-of-trace.patch index b94d6fafa..b2b1b5d43 100644 --- a/debian/patches-rt/cgroup-tracing-Move-taking-of-spin-lock-out-of-trace.patch +++ b/debian/patches-rt/cgroup-tracing-Move-taking-of-spin-lock-out-of-trace.patch @@ -2,7 +2,7 @@ From: "Steven Rostedt (VMware)" Date: Mon, 9 Jul 2018 17:48:54 -0400 Subject: [PATCH] cgroup/tracing: Move taking of spin lock out of trace event handlers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ Upstream commit e4f8d81c738db6d3ffdabfb8329aa2feaa310699 ] diff --git a/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch b/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch index 4b5b61e78..c07aeddcd 100644 --- a/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch +++ b/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 18:19:48 +0200 Subject: [PATCH] cgroup: use irqsave in cgroup_rstat_flush_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz All callers of cgroup_rstat_flush_locked() acquire cgroup_rstat_lock either with spin_lock_irq() or spin_lock_irqsave(). diff --git a/debian/patches-rt/cgroups-use-simple-wait-in-css_release.patch b/debian/patches-rt/cgroups-use-simple-wait-in-css_release.patch index 2486ee8ee..c385532f2 100644 --- a/debian/patches-rt/cgroups-use-simple-wait-in-css_release.patch +++ b/debian/patches-rt/cgroups-use-simple-wait-in-css_release.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 13 Feb 2015 15:52:24 +0100 Subject: cgroups: use simple wait in css_release() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz To avoid: |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914 diff --git a/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch b/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch index f15e3b1e2..91ae1d424 100644 --- a/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch +++ b/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch @@ -1,7 +1,7 @@ From: Benedikt Spranger Date: Mon, 8 Mar 2010 18:57:04 +0100 Subject: clocksource: TCLIB: Allow higher clock rates for clock events -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz As default the TCLIB uses the 32KiHz base clock rate for clock events. Add a compile time selection to allow higher clock resulution. diff --git a/debian/patches-rt/completion-use-simple-wait-queues.patch b/debian/patches-rt/completion-use-simple-wait-queues.patch index 42b2ff85f..8754f0bbf 100644 --- a/debian/patches-rt/completion-use-simple-wait-queues.patch +++ b/debian/patches-rt/completion-use-simple-wait-queues.patch @@ -1,7 +1,7 @@ Subject: completion: Use simple wait queues From: Thomas Gleixner Date: Fri, 11 Jan 2013 11:23:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the @@ -282,7 +282,7 @@ Signed-off-by: Thomas Gleixner EXPORT_SYMBOL(completion_done); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7124,7 +7124,10 @@ void migrate_disable(void) +@@ -7125,7 +7125,10 @@ void migrate_disable(void) return; } #ifdef CONFIG_SCHED_DEBUG @@ -294,7 +294,7 @@ Signed-off-by: Thomas Gleixner #endif if (p->migrate_disable) { -@@ -7154,7 +7157,10 @@ void migrate_enable(void) +@@ -7155,7 +7158,10 @@ void migrate_enable(void) } #ifdef CONFIG_SCHED_DEBUG diff --git a/debian/patches-rt/cond-resched-lock-rt-tweak.patch b/debian/patches-rt/cond-resched-lock-rt-tweak.patch index ff9af3288..53d8ab4a1 100644 --- a/debian/patches-rt/cond-resched-lock-rt-tweak.patch +++ b/debian/patches-rt/cond-resched-lock-rt-tweak.patch @@ -1,7 +1,7 @@ Subject: sched: Use the proper LOCK_OFFSET for cond_resched() From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:51:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz RT does not increment preempt count when a 'sleeping' spinlock is locked. Update PREEMPT_LOCK_OFFSET for that case. diff --git a/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch b/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch index a44e8c90d..fa7ece866 100644 --- a/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch +++ b/debian/patches-rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Sun, 16 Oct 2016 05:11:54 +0200 Subject: [PATCH] connector/cn_proc: Protect send_msg() with a local lock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 |in_atomic(): 1, irqs_disabled(): 0, pid: 31807, name: sleep diff --git a/debian/patches-rt/cpu-hotplug--Implement-CPU-pinning.patch b/debian/patches-rt/cpu-hotplug--Implement-CPU-pinning.patch index d9a70b7f4..4673bb113 100644 --- a/debian/patches-rt/cpu-hotplug--Implement-CPU-pinning.patch +++ b/debian/patches-rt/cpu-hotplug--Implement-CPU-pinning.patch @@ -1,7 +1,7 @@ Subject: cpu/hotplug: Implement CPU pinning From: Thomas Gleixner Date: Wed, 19 Jul 2017 17:31:20 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches-rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch b/debian/patches-rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch index 81ee462d5..cc27193ca 100644 --- a/debian/patches-rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch +++ b/debian/patches-rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 9 Apr 2015 15:23:01 +0200 Subject: cpufreq: drop K8's driver from beeing selected -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Ralf posted a picture of a backtrace from diff --git a/debian/patches-rt/cpumask-disable-offstack-on-rt.patch b/debian/patches-rt/cpumask-disable-offstack-on-rt.patch index d4f17b4b8..c8f461a24 100644 --- a/debian/patches-rt/cpumask-disable-offstack-on-rt.patch +++ b/debian/patches-rt/cpumask-disable-offstack-on-rt.patch @@ -1,7 +1,7 @@ Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT From: Thomas Gleixner Date: Wed, 14 Dec 2011 01:03:49 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There are "valid" GFP_ATOMIC allocations such as diff --git a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch index b12fca43e..feba7ee25 100644 --- a/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch +++ b/debian/patches-rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Sun, 8 Jan 2017 09:32:25 +0100 Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The two commits below add up to a cpuset might_sleep() splat for RT: diff --git a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch index d656e65fa..3a45bc74a 100644 --- a/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/debian/patches-rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() diff --git a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch index d13b4530b..ebcd466d3 100644 --- a/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch +++ b/debian/patches-rt/crypto-cryptd-add-a-lock-instead-preempt_disable-loc.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 18:52:00 +0200 Subject: [PATCH] crypto: cryptd - add a lock instead preempt_disable/local_bh_disable -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz cryptd has a per-CPU lock which protected with local_bh_disable() and preempt_disable(). diff --git a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch index ad646c3af..b3c335434 100644 --- a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch +++ b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Those crypto drivers use SSE/AVX/… for their crypto work and in order to do so in kernel they need to enable the "FPU" in kernel mode which diff --git a/debian/patches-rt/crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch b/debian/patches-rt/crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch index 3afc6c0bf..cb669f20c 100644 --- a/debian/patches-rt/crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch +++ b/debian/patches-rt/crypto-scompress-serialize-RT-percpu-scratch-buffer-.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Wed, 11 Jul 2018 17:14:47 +0200 Subject: [PATCH] crypto: scompress - serialize RT percpu scratch buffer access with a local lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz | BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:974 | in_atomic(): 1, irqs_disabled(): 0, pid: 1401, name: cryptomgr_test diff --git a/debian/patches-rt/debugobjects-rt.patch b/debian/patches-rt/debugobjects-rt.patch index ace4838f3..40cfe637b 100644 --- a/debian/patches-rt/debugobjects-rt.patch +++ b/debian/patches-rt/debugobjects-rt.patch @@ -1,7 +1,7 @@ Subject: debugobjects: Make RT aware From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:41:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Avoid filling the pool / allocating memory with irqs off(). @@ -12,7 +12,7 @@ Signed-off-by: Thomas Gleixner --- a/lib/debugobjects.c +++ b/lib/debugobjects.c -@@ -374,7 +374,10 @@ static void +@@ -377,7 +377,10 @@ static void struct debug_obj *obj; unsigned long flags; diff --git a/debian/patches-rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch b/debian/patches-rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch index 31c96a291..013cb37bb 100644 --- a/debian/patches-rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch +++ b/debian/patches-rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 27 Mar 2018 16:24:15 +0200 Subject: [PATCH] dm rq: remove BUG_ON(!irqs_disabled) check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index 33ca88e55..a27b9dae0 100644 --- a/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +++ b/debian/patches-rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Thu, 31 Mar 2016 04:08:28 +0200 Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz They're nondeterministic, and lead to ___might_sleep() splats in -rt. OTOH, they're a lot less wasteful than an rtmutex per page. diff --git a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch index f19a88acc..2854a9652 100644 --- a/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch +++ b/debian/patches-rt/drivers-tty-fix-omap-lock-crap.patch @@ -1,7 +1,7 @@ Subject: tty/serial/omap: Make the locking RT aware From: Thomas Gleixner Date: Thu, 28 Jul 2011 13:32:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and diff --git a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch index b98c1cec2..225c9c5f1 100644 --- a/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch +++ b/debian/patches-rt/drivers-tty-pl011-irq-disable-madness.patch @@ -1,7 +1,7 @@ Subject: tty/serial/pl011: Make the locking work on RT From: Thomas Gleixner Date: Tue, 08 Jan 2013 21:36:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. diff --git a/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch b/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch index 4004dbc33..02ece1cf7 100644 --- a/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch +++ b/debian/patches-rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Thu, 20 Oct 2016 11:15:22 +0200 Subject: [PATCH] drivers/zram: Don't disable preemption in zcomp_stream_get/put() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In v4.7, the driver switched to percpu compression streams, disabling preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We diff --git a/debian/patches-rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch b/debian/patches-rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch index b3d3072b3..20e89703b 100644 --- a/debian/patches-rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch +++ b/debian/patches-rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Wed, 23 Aug 2017 11:57:29 +0200 Subject: [PATCH] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Use get_local_ptr() instead this_cpu_ptr() to avoid a warning regarding smp_processor_id() in preemptible code. diff --git a/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch b/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch index 86636667b..575446863 100644 --- a/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch +++ b/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch @@ -1,7 +1,7 @@ Subject: drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end() From: Mike Galbraith Date: Sat, 27 Feb 2016 09:01:42 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ 8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918 diff --git a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch index 3ee483efe..85255b2c6 100644 --- a/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch +++ b/debian/patches-rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch @@ -1,7 +1,7 @@ Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended From: Mike Galbraith Date: Sat, 27 Feb 2016 08:09:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz DRM folks identified the spots, so use them. diff --git a/debian/patches-rt/efi-Allow-efi-runtime.patch b/debian/patches-rt/efi-Allow-efi-runtime.patch index 0ef8d4e1c..540d8e089 100644 --- a/debian/patches-rt/efi-Allow-efi-runtime.patch +++ b/debian/patches-rt/efi-Allow-efi-runtime.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 15:06:10 +0200 Subject: [PATCH] efi: Allow efi=runtime -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch index df75857a8..fab172c19 100644 --- a/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch +++ b/debian/patches-rt/efi-Disable-runtime-services-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 26 Jul 2018 15:03:16 +0200 Subject: [PATCH] efi: Disable runtime services on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Based on meassurements the EFI functions get_variable / get_next_variable take up to 2us which looks okay. diff --git a/debian/patches-rt/epoll-use-get-cpu-light.patch b/debian/patches-rt/epoll-use-get-cpu-light.patch index 2f3111471..8287f0fa6 100644 --- a/debian/patches-rt/epoll-use-get-cpu-light.patch +++ b/debian/patches-rt/epoll-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: fs/epoll: Do not disable preemption on RT From: Thomas Gleixner Date: Fri, 08 Jul 2011 16:35:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz ep_call_nested() takes a sleeping lock so we can't disable preemption. The light version is enough since ep_call_nested() doesn't mind beeing diff --git a/debian/patches-rt/fs-aio-simple-simple-work.patch b/debian/patches-rt/fs-aio-simple-simple-work.patch index c5d7c2f06..e850aa6ce 100644 --- a/debian/patches-rt/fs-aio-simple-simple-work.patch +++ b/debian/patches-rt/fs-aio-simple-simple-work.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 16 Feb 2015 18:49:10 +0100 Subject: fs/aio: simple simple work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz |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/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch b/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch index ed1dee255..7e2b5c8d5 100644 --- a/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch +++ b/debian/patches-rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 12:32:34 +0200 Subject: [PATCH] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However @@ -15,7 +15,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -3115,6 +3115,8 @@ static int __init set_dhash_entries(char +@@ -3116,6 +3116,8 @@ static int __init set_dhash_entries(char static void __init dcache_init_early(void) { @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* If hashes are distributed across NUMA nodes, defer * hash allocation until vmalloc space is available. */ -@@ -3131,11 +3133,16 @@ static void __init dcache_init_early(voi +@@ -3132,11 +3134,16 @@ static void __init dcache_init_early(voi NULL, 0, 0); @@ -41,7 +41,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * A constructor could be added for stable state like the lists, * but it is probably not worth it because of the cache nature -@@ -3159,6 +3166,10 @@ static void __init dcache_init(void) +@@ -3160,6 +3167,10 @@ static void __init dcache_init(void) NULL, 0, 0); diff --git a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index deae6de4f..afcba3918 100644 --- a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 20 Oct 2017 11:29:53 +0200 Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -2430,9 +2430,10 @@ EXPORT_SYMBOL(d_rehash); +@@ -2431,9 +2431,10 @@ EXPORT_SYMBOL(d_rehash); static inline unsigned start_dir_add(struct inode *dir) { @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior return n; cpu_relax(); } -@@ -2440,7 +2441,8 @@ static inline unsigned start_dir_add(str +@@ -2441,7 +2442,8 @@ static inline unsigned start_dir_add(str static inline void end_dir_add(struct inode *dir, unsigned n) { @@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior } static void d_wait_lookup(struct dentry *dentry) -@@ -2473,7 +2475,7 @@ struct dentry *d_alloc_parallel(struct d +@@ -2474,7 +2476,7 @@ struct dentry *d_alloc_parallel(struct d retry: rcu_read_lock(); @@ -56,7 +56,7 @@ Signed-off-by: Sebastian Andrzej Siewior r_seq = read_seqbegin(&rename_lock); dentry = __d_lookup_rcu(parent, name, &d_seq); if (unlikely(dentry)) { -@@ -2501,7 +2503,7 @@ struct dentry *d_alloc_parallel(struct d +@@ -2502,7 +2504,7 @@ struct dentry *d_alloc_parallel(struct d } hlist_bl_lock(b); diff --git a/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch b/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch index 853bd7ef4..ae7e17aad 100644 --- a/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch +++ b/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch @@ -1,7 +1,7 @@ Subject: fs: dcache: Use cpu_chill() in trylock loops From: Thomas Gleixner Date: Wed, 07 Mar 2012 21:00:34 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch index 0ba18fd53..da454207b 100644 --- a/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch +++ b/debian/patches-rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 14:35:49 +0200 Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. @@ -34,7 +34,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/fs/dcache.c +++ b/fs/dcache.c -@@ -2447,21 +2447,24 @@ static inline void end_dir_add(struct in +@@ -2448,21 +2448,24 @@ static inline void end_dir_add(struct in static void d_wait_lookup(struct dentry *dentry) { @@ -70,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior { unsigned int hash = name->hash; struct hlist_bl_head *b = in_lookup_hash(parent, hash); -@@ -2576,7 +2579,7 @@ void __d_lookup_done(struct dentry *dent +@@ -2577,7 +2580,7 @@ void __d_lookup_done(struct dentry *dent hlist_bl_lock(b); dentry->d_flags &= ~DCACHE_PAR_LOOKUP; __hlist_bl_del(&dentry->d_u.d_in_lookup_hash); diff --git a/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch b/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch index c6a40b2a5..3662e926f 100644 --- a/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch +++ b/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 18 Mar 2011 10:11:25 +0100 Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz bit_spin_locks break under RT. diff --git a/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch b/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch index 3ba4f5f59..fe3f64d92 100644 --- a/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch +++ b/debian/patches-rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 15 Sep 2016 10:51:27 +0200 Subject: [PATCH] fs/nfs: turn rmdir_sem into a semaphore -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The RW semaphore had a reader side which used the _non_owner version because it most likely took the reader lock in one thread and released it diff --git a/debian/patches-rt/fs-replace-bh_uptodate_lock-for-rt.patch b/debian/patches-rt/fs-replace-bh_uptodate_lock-for-rt.patch index 7ac15e4c5..b0ada607f 100644 --- a/debian/patches-rt/fs-replace-bh_uptodate_lock-for-rt.patch +++ b/debian/patches-rt/fs-replace-bh_uptodate_lock-for-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 18 Mar 2011 09:18:52 +0100 Subject: buffer_head: Replace bh_uptodate_lock for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Wrap the bit_spin_lock calls into a separate inline and add the RT replacements with a real spinlock. diff --git a/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch b/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch index 926cb415c..cbfbe3bb0 100644 --- a/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch +++ b/debian/patches-rt/fscache-initialize-cookie-hash-table-raw-spinlocks.patch @@ -1,7 +1,7 @@ From: Clark Williams Date: Tue, 3 Jul 2018 13:34:30 -0500 Subject: [PATCH] fscache: initialize cookie hash table raw spinlocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The fscache cookie mechanism uses a hash table of hlist_bl_head structures. The PREEMPT_RT patcheset adds a raw spinlock to this structure and so on PREEMPT_RT diff --git a/debian/patches-rt/ftrace-Fix-trace-header-alignment.patch b/debian/patches-rt/ftrace-Fix-trace-header-alignment.patch index 7b7b34fb1..4419adfd1 100644 --- a/debian/patches-rt/ftrace-Fix-trace-header-alignment.patch +++ b/debian/patches-rt/ftrace-Fix-trace-header-alignment.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Sun, 16 Oct 2016 05:08:30 +0200 Subject: [PATCH] ftrace: Fix trace header alignment -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Line up helper arrows to the right column. diff --git a/debian/patches-rt/ftrace-migrate-disable-tracing.patch b/debian/patches-rt/ftrace-migrate-disable-tracing.patch index 26d63f49c..4f34216ea 100644 --- a/debian/patches-rt/ftrace-migrate-disable-tracing.patch +++ b/debian/patches-rt/ftrace-migrate-disable-tracing.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:56:42 +0200 Subject: trace: Add migrate-disabled counter to tracing output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch index c682c2820..2c0fdd95d 100644 --- a/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch +++ b/debian/patches-rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 1 Mar 2013 11:17:42 +0100 Subject: futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In exit_pi_state_list() we have the following locking construct: diff --git a/debian/patches-rt/futex-requeue-pi-fix.patch b/debian/patches-rt/futex-requeue-pi-fix.patch index 25e3e472a..1e650143b 100644 --- a/debian/patches-rt/futex-requeue-pi-fix.patch +++ b/debian/patches-rt/futex-requeue-pi-fix.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: futex: Fix bug on when a requeued RT task times out -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Requeue with timeout causes a bug with PREEMPT_RT_FULL. diff --git a/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch b/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch index 6f6ab69af..64984ee55 100644 --- a/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch +++ b/debian/patches-rt/futex-workaround-migrate_disable-enable-in-different.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 8 Mar 2017 14:23:35 +0100 Subject: [PATCH] futex: workaround migrate_disable/enable in different context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz migrate_disable()/migrate_enable() takes a different path in atomic() vs !atomic() context. These little hacks ensure that we don't underflow / overflow diff --git a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch index 857321c57..e58bca0e0 100644 --- a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch +++ b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:57 -0500 Subject: genirq: Disable irqpoll on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Creates long latencies for no value diff --git a/debian/patches-rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch b/debian/patches-rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch index 7db9d9d03..196283f47 100644 --- a/debian/patches-rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch +++ b/debian/patches-rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 21 Aug 2013 17:48:46 +0200 Subject: genirq: Do not invoke the affinity callback via a workqueue on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Joe Korty reported, that __irq_set_affinity_locked() schedules a workqueue while holding a rawlock which results in a might_sleep() diff --git a/debian/patches-rt/genirq-force-threading.patch b/debian/patches-rt/genirq-force-threading.patch index 778334a4e..eb24f2580 100644 --- a/debian/patches-rt/genirq-force-threading.patch +++ b/debian/patches-rt/genirq-force-threading.patch @@ -1,7 +1,7 @@ Subject: genirq: Force interrupt thread on RT From: Thomas Gleixner Date: Sun, 03 Apr 2011 11:57:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Force threaded_irqs and optimize the code (force_irqthreads) in regard to this. diff --git a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch index 842ae2167..609ed2e30 100644 --- a/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch +++ b/debian/patches-rt/genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:00 -0600 Subject: genirq: update irq_set_irqchip_state documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On -rt kernels, the use of migrate_disable()/migrate_enable() is sufficient to guarantee a task isn't moved to another CPU. Update the diff --git a/debian/patches-rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch b/debian/patches-rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch index e2d3eefb0..95e1ae598 100644 --- a/debian/patches-rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch +++ b/debian/patches-rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 18:31:00 +0200 Subject: [PATCH] hotplug: duct-tape RT-rwlock usage for non-RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 diff --git a/debian/patches-rt/hotplug-light-get-online-cpus.patch b/debian/patches-rt/hotplug-light-get-online-cpus.patch index 945f71d91..1c28f034f 100644 --- a/debian/patches-rt/hotplug-light-get-online-cpus.patch +++ b/debian/patches-rt/hotplug-light-get-online-cpus.patch @@ -1,7 +1,7 @@ Subject: hotplug: Lightweight get online cpus From: Thomas Gleixner Date: Wed, 15 Jun 2011 12:36:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz get_online_cpus() is a heavy weight function which involves a global mutex. migrate_disable() wants a simpler construct which prevents only @@ -65,7 +65,7 @@ Signed-off-by: Thomas Gleixner void cpus_read_lock(void) --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7219,6 +7219,7 @@ void migrate_disable(void) +@@ -7220,6 +7220,7 @@ void migrate_disable(void) } preempt_disable(); @@ -73,7 +73,7 @@ Signed-off-by: Thomas Gleixner migrate_disable_update_cpus_allowed(p); p->migrate_disable = 1; -@@ -7284,12 +7285,15 @@ void migrate_enable(void) +@@ -7285,12 +7286,15 @@ void migrate_enable(void) arg.task = p; arg.dest_cpu = dest_cpu; diff --git a/debian/patches-rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch b/debian/patches-rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch index c6b5f0459..6a91dce7a 100644 --- a/debian/patches-rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch +++ b/debian/patches-rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Mon, 16 Sep 2013 14:09:19 -0700 Subject: hrtimer: Move schedule_work call to helper thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz When run ltp leapsec_timer test, the following call trace is caught: diff --git a/debian/patches-rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch b/debian/patches-rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch index 529711c6c..1ad6f2ea7 100644 --- a/debian/patches-rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch +++ b/debian/patches-rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 3 Jul 2009 08:44:31 -0500 Subject: hrtimer: by timers by default into the softirq context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz We can't have hrtimers callbacks running in hardirq context on RT. Therefore the timers are deferred to the softirq context by default. @@ -70,7 +70,7 @@ Signed-off-by: Sebastian Andrzej Siewior timer->function = perf_mux_hrtimer_handler; } -@@ -9166,7 +9166,7 @@ static void perf_swevent_init_hrtimer(st +@@ -9170,7 +9170,7 @@ static void perf_swevent_init_hrtimer(st if (!is_sampling_event(event)) return; @@ -103,7 +103,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -5182,9 +5182,9 @@ void init_cfs_bandwidth(struct cfs_bandw +@@ -5184,9 +5184,9 @@ void init_cfs_bandwidth(struct cfs_bandw cfs_b->period = ns_to_ktime(default_cfs_period()); INIT_LIST_HEAD(&cfs_b->throttled_cfs_rq); diff --git a/debian/patches-rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch b/debian/patches-rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch index ec0e300ec..3b05e66a9 100644 --- a/debian/patches-rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch +++ b/debian/patches-rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Jul 2018 11:25:41 +0200 Subject: [PATCH v2] hrtimer: consolidate hrtimer_init() + hrtimer_init_sleeper() calls -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz hrtimer_init_sleeper() calls require a prior initialisation of the hrtimer object with hrtimer_init(). Lets make the initialisation of @@ -27,7 +27,7 @@ Signed-off-by: Anna-Maria Gleixner --- a/block/blk-mq.c +++ b/block/blk-mq.c -@@ -2982,10 +2982,9 @@ static bool blk_mq_poll_hybrid_sleep(str +@@ -2986,10 +2986,9 @@ static bool blk_mq_poll_hybrid_sleep(str kt = nsecs; mode = HRTIMER_MODE_REL; diff --git a/debian/patches-rt/hrtimers-prepare-full-preemption.patch b/debian/patches-rt/hrtimers-prepare-full-preemption.patch index 558a7c987..d525acee0 100644 --- a/debian/patches-rt/hrtimers-prepare-full-preemption.patch +++ b/debian/patches-rt/hrtimers-prepare-full-preemption.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 Subject: hrtimers: Prepare full preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Make cancellation of a running callback in softirq context safe against preemption. @@ -174,7 +174,7 @@ Signed-off-by: Thomas Gleixner expires = timeval_to_ktime(value->it_value); --- a/kernel/time/posix-timers.c +++ b/kernel/time/posix-timers.c -@@ -469,7 +469,7 @@ static struct k_itimer * alloc_posix_tim +@@ -478,7 +478,7 @@ static struct k_itimer * alloc_posix_tim static void k_itimer_rcu_free(struct rcu_head *head) { @@ -183,7 +183,7 @@ Signed-off-by: Thomas Gleixner kmem_cache_free(posix_timers_cache, tmr); } -@@ -486,7 +486,7 @@ static void release_posix_timer(struct k +@@ -495,7 +495,7 @@ static void release_posix_timer(struct k } put_pid(tmr->it_pid); sigqueue_free(tmr->sigq); @@ -192,7 +192,7 @@ Signed-off-by: Thomas Gleixner } static int common_timer_create(struct k_itimer *new_timer) -@@ -825,6 +825,22 @@ static void common_hrtimer_arm(struct k_ +@@ -834,6 +834,22 @@ static void common_hrtimer_arm(struct k_ hrtimer_start_expires(timer, HRTIMER_MODE_ABS); } @@ -215,7 +215,7 @@ Signed-off-by: Thomas Gleixner static int common_hrtimer_try_to_cancel(struct k_itimer *timr) { return hrtimer_try_to_cancel(&timr->it.real.timer); -@@ -889,6 +905,7 @@ static int do_timer_settime(timer_t time +@@ -898,6 +914,7 @@ static int do_timer_settime(timer_t time if (!timr) return -EINVAL; @@ -223,7 +223,7 @@ Signed-off-by: Thomas Gleixner kc = timr->kclock; if (WARN_ON_ONCE(!kc || !kc->timer_set)) error = -EINVAL; -@@ -897,9 +914,12 @@ static int do_timer_settime(timer_t time +@@ -906,9 +923,12 @@ static int do_timer_settime(timer_t time unlock_timer(timr, flag); if (error == TIMER_RETRY) { @@ -236,7 +236,7 @@ Signed-off-by: Thomas Gleixner return error; } -@@ -981,10 +1001,15 @@ SYSCALL_DEFINE1(timer_delete, timer_t, t +@@ -990,10 +1010,15 @@ SYSCALL_DEFINE1(timer_delete, timer_t, t if (!timer) return -EINVAL; @@ -252,7 +252,7 @@ Signed-off-by: Thomas Gleixner spin_lock(¤t->sighand->siglock); list_del(&timer->list); -@@ -1010,8 +1035,18 @@ static void itimer_delete(struct k_itime +@@ -1019,8 +1044,18 @@ static void itimer_delete(struct k_itime retry_delete: spin_lock_irqsave(&timer->it_lock, flags); diff --git a/debian/patches-rt/iommu-amd-drop-irqs_disabled-warn_on.patch b/debian/patches-rt/iommu-amd-drop-irqs_disabled-warn_on.patch index 07a3549d3..14ef39351 100644 --- a/debian/patches-rt/iommu-amd-drop-irqs_disabled-warn_on.patch +++ b/debian/patches-rt/iommu-amd-drop-irqs_disabled-warn_on.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Subject: [PATCH] iommu/amd: Remove redundant WARN_ON() Date: Fri, 20 Jul 2018 10:45:45 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The WARN_ON() was introduced in commit 272e4f99e966 ("iommu/amd: WARN when __[attach|detach]_device are called with irqs enabled") to ensure diff --git a/debian/patches-rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch b/debian/patches-rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch index 750907c84..290c4d0ca 100644 --- a/debian/patches-rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch +++ b/debian/patches-rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch @@ -1,7 +1,7 @@ Subject: genirq: Allow disabling of softirq processing in irq thread context From: Thomas Gleixner Date: Tue, 31 Jan 2012 13:01:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The processing of softirqs in irq thread context is a performance gain for the non-rt workloads of a system, but it's counterproductive for diff --git a/debian/patches-rt/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch b/debian/patches-rt/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch index 32a17c83d..eedf58973 100644 --- a/debian/patches-rt/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch +++ b/debian/patches-rt/irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 18 Jul 2018 17:42:04 +0200 Subject: [PATCH] irqchip/gic-v3-its: Make its_lock a raw_spin_lock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ Upstream commit a8db74564b0c634667e1722264bde303d296f566 ] diff --git a/debian/patches-rt/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch b/debian/patches-rt/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch index 42f790702..c630b4cdf 100644 --- a/debian/patches-rt/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch +++ b/debian/patches-rt/irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch @@ -2,7 +2,7 @@ From: Marc Zyngier Date: Fri, 27 Jul 2018 13:38:54 +0100 Subject: [PATCH] irqchip/gic-v3-its: Move pending table allocation to init time -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Marc Zyngier Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch index bc5432f46..a204ff7be 100644 --- a/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch +++ b/debian/patches-rt/irqwork-push_most_work_into_softirq_context.patch @@ -1,7 +1,7 @@ Subject: irqwork: push most work into softirq context From: Sebastian Andrzej Siewior Date: Tue, 23 Jun 2015 15:32:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Initially we defered all irqwork into softirq because we didn't want the latency spikes if perf or another user was busy and delayed the RT task. @@ -22,16 +22,14 @@ Mike Galbraith, hard and soft variant] Signed-off-by: Sebastian Andrzej Siewior --- - include/linux/irq_work.h | 8 ++++++ - kernel/irq_work.c | 59 ++++++++++++++++++++++++++++++++-------- - kernel/rcu/tree.c | 1 + - kernel/sched/topology.c | 1 + - kernel/time/tick-sched.c | 1 + - kernel/time/timer.c | 2 ++ - 6 files changed, 60 insertions(+), 12 deletions(-) + include/linux/irq_work.h | 8 ++++++ + kernel/irq_work.c | 60 ++++++++++++++++++++++++++++++++++++----------- + kernel/rcu/tree.c | 1 + kernel/sched/topology.c | 1 + kernel/time/tick-sched.c | 1 + kernel/time/timer.c | 2 + + 6 files changed, 60 insertions(+), 13 deletions(-) -diff --git a/include/linux/irq_work.h b/include/linux/irq_work.h -index b11fcdfd0770..c1afbba27902 100644 --- a/include/linux/irq_work.h +++ b/include/linux/irq_work.h @@ -18,6 +18,8 @@ @@ -43,7 +41,7 @@ index b11fcdfd0770..c1afbba27902 100644 #define IRQ_WORK_CLAIMED (IRQ_WORK_PENDING | IRQ_WORK_BUSY) -@@ -52,4 +54,10 @@ static inline bool irq_work_needs_cpu(void) { return false; } +@@ -52,4 +54,10 @@ static inline bool irq_work_needs_cpu(vo static inline void irq_work_run(void) { } #endif @@ -54,8 +52,6 @@ index b11fcdfd0770..c1afbba27902 100644 +#endif + #endif /* _LINUX_IRQ_WORK_H */ -diff --git a/kernel/irq_work.c b/kernel/irq_work.c -index 6b7cdf17ccf8..e765a79ef48b 100644 --- a/kernel/irq_work.c +++ b/kernel/irq_work.c @@ -17,6 +17,7 @@ @@ -75,7 +71,7 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 /* All work should have been flushed before going offline */ WARN_ON_ONCE(cpu_is_offline(cpu)); -@@ -76,7 +79,12 @@ bool irq_work_queue_on(struct irq_work *work, int cpu) +@@ -76,7 +79,12 @@ bool irq_work_queue_on(struct irq_work * if (!irq_work_claim(work)) return false; @@ -89,7 +85,7 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 arch_send_call_function_single_ipi(cpu); #else /* #ifdef CONFIG_SMP */ -@@ -89,6 +97,9 @@ bool irq_work_queue_on(struct irq_work *work, int cpu) +@@ -89,6 +97,9 @@ bool irq_work_queue_on(struct irq_work * /* Enqueue the irq work @work on the current CPU */ bool irq_work_queue(struct irq_work *work) { @@ -99,7 +95,7 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 /* Only queue if not already pending */ if (!irq_work_claim(work)) return false; -@@ -96,13 +107,15 @@ bool irq_work_queue(struct irq_work *work) +@@ -96,13 +107,15 @@ bool irq_work_queue(struct irq_work *wor /* Queue the entry and raise the IPI if needed. */ preempt_disable(); @@ -134,7 +130,7 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 /* All work should have been flushed before going offline */ WARN_ON_ONCE(cpu_is_offline(smp_processor_id())); -@@ -135,7 +147,12 @@ static void irq_work_run_list(struct llist_head *list) +@@ -135,8 +147,12 @@ static void irq_work_run_list(struct lli struct llist_node *llnode; unsigned long flags; @@ -143,11 +139,12 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 + * nort: On RT IRQ-work may run in SOFTIRQ context. + */ BUG_ON(!irqs_disabled()); +- +#endif - if (llist_empty(list)) return; -@@ -168,7 +185,16 @@ static void irq_work_run_list(struct llist_head *list) + +@@ -168,7 +184,16 @@ static void irq_work_run_list(struct lli void irq_work_run(void) { irq_work_run_list(this_cpu_ptr(&raised_list)); @@ -165,7 +162,7 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 } EXPORT_SYMBOL_GPL(irq_work_run); -@@ -178,8 +204,17 @@ void irq_work_tick(void) +@@ -178,8 +203,17 @@ void irq_work_tick(void) if (!llist_empty(raised) && !arch_irq_work_has_interrupt()) irq_work_run_list(raised); @@ -183,11 +180,9 @@ index 6b7cdf17ccf8..e765a79ef48b 100644 /* * Synchronize against the irq_work @entry, ensures the entry is not -diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c -index aa7cade1b9f3..131fe93756c4 100644 --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c -@@ -1259,6 +1259,7 @@ static int rcu_implicit_dynticks_qs(struct rcu_data *rdp) +@@ -1294,6 +1294,7 @@ static int rcu_implicit_dynticks_qs(stru !rdp->rcu_iw_pending && rdp->rcu_iw_gpnum != rnp->gpnum && (rnp->ffmask & rdp->grpmask)) { init_irq_work(&rdp->rcu_iw, rcu_iw_handler); @@ -195,11 +190,9 @@ index aa7cade1b9f3..131fe93756c4 100644 rdp->rcu_iw_pending = true; rdp->rcu_iw_gpnum = rnp->gpnum; irq_work_queue_on(&rdp->rcu_iw, rdp->cpu); -diff --git a/kernel/sched/topology.c b/kernel/sched/topology.c -index 56a0fed30c0a..dc7fd09d66fa 100644 --- a/kernel/sched/topology.c +++ b/kernel/sched/topology.c -@@ -279,6 +279,7 @@ static int init_rootdomain(struct root_domain *rd) +@@ -279,6 +279,7 @@ static int init_rootdomain(struct root_d rd->rto_cpu = -1; raw_spin_lock_init(&rd->rto_lock); init_irq_work(&rd->rto_push_work, rto_push_irq_work_func); @@ -207,11 +200,9 @@ index 56a0fed30c0a..dc7fd09d66fa 100644 #endif init_dl_bw(&rd->dl_bw); -diff --git a/kernel/time/tick-sched.c b/kernel/time/tick-sched.c -index 5b33e2f5c0ed..2fd4a37ffdc2 100644 --- a/kernel/time/tick-sched.c +++ b/kernel/time/tick-sched.c -@@ -227,6 +227,7 @@ static void nohz_full_kick_func(struct irq_work *work) +@@ -232,6 +232,7 @@ static void nohz_full_kick_func(struct i static DEFINE_PER_CPU(struct irq_work, nohz_full_kick_work) = { .func = nohz_full_kick_func, @@ -219,11 +210,9 @@ index 5b33e2f5c0ed..2fd4a37ffdc2 100644 }; /* -diff --git a/kernel/time/timer.c b/kernel/time/timer.c -index 786f8c014e7e..6c996ba08e0a 100644 --- a/kernel/time/timer.c +++ b/kernel/time/timer.c -@@ -1692,6 +1692,8 @@ static __latent_entropy void run_timer_softirq(struct softirq_action *h) +@@ -1733,6 +1733,8 @@ static __latent_entropy void run_timer_s { struct timer_base *base = this_cpu_ptr(&timer_bases[BASE_STD]); @@ -232,6 +221,3 @@ index 786f8c014e7e..6c996ba08e0a 100644 __run_timers(base); if (IS_ENABLED(CONFIG_NO_HZ_COMMON)) __run_timers(this_cpu_ptr(&timer_bases[BASE_DEF])); --- -2.19.0 - diff --git a/debian/patches-rt/jump-label-rt.patch b/debian/patches-rt/jump-label-rt.patch index 6ca56a367..32be31ca7 100644 --- a/debian/patches-rt/jump-label-rt.patch +++ b/debian/patches-rt/jump-label-rt.patch @@ -1,7 +1,7 @@ Subject: jump-label: disable if stop_machine() is used From: Thomas Gleixner Date: Wed, 08 Jul 2015 17:14:48 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. diff --git a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch index 1612a0da5..fd664f85f 100644 --- a/debian/patches-rt/kconfig-disable-a-few-options-rt.patch +++ b/debian/patches-rt/kconfig-disable-a-few-options-rt.patch @@ -1,7 +1,7 @@ Subject: kconfig: Disable config options which are not RT compatible From: Thomas Gleixner Date: Sun, 24 Jul 2011 12:11:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Disable stuff which is known to have issues on RT diff --git a/debian/patches-rt/kconfig-preempt-rt-full.patch b/debian/patches-rt/kconfig-preempt-rt-full.patch index c7f6cbfc6..f2efbfbe5 100644 --- a/debian/patches-rt/kconfig-preempt-rt-full.patch +++ b/debian/patches-rt/kconfig-preempt-rt-full.patch @@ -1,7 +1,7 @@ Subject: kconfig: Add PREEMPT_RT_FULL From: Thomas Gleixner Date: Wed, 29 Jun 2011 14:58:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Introduce the final symbol for PREEMPT_RT_FULL. diff --git a/debian/patches-rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch b/debian/patches-rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch index 01cafe6ae..229aff6de 100644 --- a/debian/patches-rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch +++ b/debian/patches-rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 19 May 2016 17:45:27 +0200 Subject: [PATCH] kernel/printk: Don't try to print from IRQ/NMI region -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch b/debian/patches-rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch index 340087384..ee82d9c5c 100644 --- a/debian/patches-rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch +++ b/debian/patches-rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch @@ -4,7 +4,7 @@ Subject: [PATCH] kernel: sched: Provide a pointer to the valid CPU mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In commit 4b53a3412d66 ("sched/core: Remove the tsk_nr_cpus_allowed() wrapper") the tsk_nr_cpus_allowed() wrapper was removed. There was not @@ -154,7 +154,7 @@ Signed-off-by: Sebastian Andrzej Siewior ctx->last_ran = raw_smp_processor_id(); --- a/drivers/infiniband/hw/hfi1/affinity.c +++ b/drivers/infiniband/hw/hfi1/affinity.c -@@ -1019,7 +1019,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1037,7 +1037,7 @@ int hfi1_get_proc_affinity(int node) struct hfi1_affinity_node *entry; cpumask_var_t diff, hw_thread_mask, available_mask, intrs_mask; const struct cpumask *node_mask, @@ -163,7 +163,7 @@ Signed-off-by: Sebastian Andrzej Siewior struct hfi1_affinity_node_list *affinity = &node_affinity; struct cpu_mask_set *set = &affinity->proc; -@@ -1027,7 +1027,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1045,7 +1045,7 @@ int hfi1_get_proc_affinity(int node) * check whether process/context affinity has already * been set */ @@ -172,7 +172,7 @@ Signed-off-by: Sebastian Andrzej Siewior hfi1_cdbg(PROC, "PID %u %s affinity set to CPU %*pbl", current->pid, current->comm, cpumask_pr_args(proc_mask)); -@@ -1038,7 +1038,7 @@ int hfi1_get_proc_affinity(int node) +@@ -1056,7 +1056,7 @@ int hfi1_get_proc_affinity(int node) cpu = cpumask_first(proc_mask); cpumask_set_cpu(cpu, &set->used); goto done; @@ -282,7 +282,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -845,6 +845,8 @@ static struct task_struct *dup_task_stru +@@ -844,6 +844,8 @@ static struct task_struct *dup_task_stru #ifdef CONFIG_STACKPROTECTOR tsk->stack_canary = get_random_canary(); #endif @@ -524,7 +524,7 @@ Signed-off-by: Sebastian Andrzej Siewior !task_on_rq_queued(task))) { --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -1614,7 +1614,7 @@ static void task_numa_compare(struct tas +@@ -1616,7 +1616,7 @@ static void task_numa_compare(struct tas */ if (cur) { /* Skip this swap candidate if cannot move to the source CPU: */ @@ -533,7 +533,7 @@ Signed-off-by: Sebastian Andrzej Siewior goto unlock; /* -@@ -1724,7 +1724,7 @@ static void task_numa_find_cpu(struct ta +@@ -1726,7 +1726,7 @@ static void task_numa_find_cpu(struct ta for_each_cpu(cpu, cpumask_of_node(env->dst_nid)) { /* Skip this CPU if the source task cannot migrate */ @@ -542,7 +542,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; env->dst_cpu = cpu; -@@ -6016,7 +6016,7 @@ find_idlest_group(struct sched_domain *s +@@ -6018,7 +6018,7 @@ find_idlest_group(struct sched_domain *s /* Skip over this group if it has no CPUs allowed */ if (!cpumask_intersects(sched_group_span(group), @@ -551,7 +551,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; local_group = cpumask_test_cpu(this_cpu, -@@ -6148,7 +6148,7 @@ find_idlest_group_cpu(struct sched_group +@@ -6150,7 +6150,7 @@ find_idlest_group_cpu(struct sched_group return cpumask_first(sched_group_span(group)); /* Traverse only the allowed CPUs */ @@ -560,7 +560,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (available_idle_cpu(i)) { struct rq *rq = cpu_rq(i); struct cpuidle_state *idle = idle_get_state(rq); -@@ -6188,7 +6188,7 @@ static inline int find_idlest_cpu(struct +@@ -6190,7 +6190,7 @@ static inline int find_idlest_cpu(struct { int new_cpu = cpu; @@ -569,7 +569,7 @@ Signed-off-by: Sebastian Andrzej Siewior return prev_cpu; /* -@@ -6304,7 +6304,7 @@ static int select_idle_core(struct task_ +@@ -6306,7 +6306,7 @@ static int select_idle_core(struct task_ if (!test_idle_cores(target, false)) return -1; @@ -578,7 +578,7 @@ Signed-off-by: Sebastian Andrzej Siewior for_each_cpu_wrap(core, cpus, target) { bool idle = true; -@@ -6338,7 +6338,7 @@ static int select_idle_smt(struct task_s +@@ -6340,7 +6340,7 @@ static int select_idle_smt(struct task_s return -1; for_each_cpu(cpu, cpu_smt_mask(target)) { @@ -587,7 +587,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; if (available_idle_cpu(cpu)) return cpu; -@@ -6401,7 +6401,7 @@ static int select_idle_cpu(struct task_s +@@ -6403,7 +6403,7 @@ static int select_idle_cpu(struct task_s for_each_cpu_wrap(cpu, sched_domain_span(sd), target) { if (!--nr) return -1; @@ -596,7 +596,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; if (available_idle_cpu(cpu)) break; -@@ -6438,7 +6438,7 @@ static int select_idle_sibling(struct ta +@@ -6440,7 +6440,7 @@ static int select_idle_sibling(struct ta recent_used_cpu != target && cpus_share_cache(recent_used_cpu, target) && available_idle_cpu(recent_used_cpu) && @@ -605,7 +605,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * Replace recent_used_cpu with prev as it is a potential * candidate for the next wake: -@@ -6622,7 +6622,7 @@ select_task_rq_fair(struct task_struct * +@@ -6624,7 +6624,7 @@ select_task_rq_fair(struct task_struct * if (sd_flag & SD_BALANCE_WAKE) { record_wakee(p); want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) @@ -614,7 +614,7 @@ Signed-off-by: Sebastian Andrzej Siewior } rcu_read_lock(); -@@ -7358,14 +7358,14 @@ int can_migrate_task(struct task_struct +@@ -7360,14 +7360,14 @@ int can_migrate_task(struct task_struct /* * We do not migrate tasks that are: * 1) throttled_lb_pair, or @@ -631,7 +631,7 @@ Signed-off-by: Sebastian Andrzej Siewior int cpu; schedstat_inc(p->se.statistics.nr_failed_migrations_affine); -@@ -7385,7 +7385,7 @@ int can_migrate_task(struct task_struct +@@ -7387,7 +7387,7 @@ int can_migrate_task(struct task_struct /* Prevent to re-select dst_cpu via env's CPUs: */ for_each_cpu_and(cpu, env->dst_grpmask, env->cpus) { @@ -640,7 +640,7 @@ Signed-off-by: Sebastian Andrzej Siewior env->flags |= LBF_DST_PINNED; env->new_dst_cpu = cpu; break; -@@ -7982,7 +7982,7 @@ check_cpu_capacity(struct rq *rq, struct +@@ -7984,7 +7984,7 @@ check_cpu_capacity(struct rq *rq, struct /* * Group imbalance indicates (and tries to solve) the problem where balancing @@ -649,7 +649,7 @@ Signed-off-by: Sebastian Andrzej Siewior * * Imagine a situation of two groups of 4 CPUs each and 4 tasks each with a * cpumask covering 1 CPU of the first group and 3 CPUs of the second group. -@@ -8597,7 +8597,7 @@ static struct sched_group *find_busiest_ +@@ -8599,7 +8599,7 @@ static struct sched_group *find_busiest_ /* * If the busiest group is imbalanced the below checks don't * work because they assume all things are equal, which typically @@ -658,7 +658,7 @@ Signed-off-by: Sebastian Andrzej Siewior */ if (busiest->group_type == group_imbalanced) goto force_balance; -@@ -8993,7 +8993,7 @@ static int load_balance(int this_cpu, st +@@ -8995,7 +8995,7 @@ static int load_balance(int this_cpu, st * if the curr task on busiest CPU can't be * moved to this_cpu: */ diff --git a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch index b09b5c872..f61e857ab 100644 --- a/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch +++ b/debian/patches-rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 21 Nov 2016 19:31:08 +0100 Subject: [PATCH] kernel/sched: move stack + kprobe clean up to __put_task_struct() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There is no need to free the stack before the task struct (except for reasons mentioned in commit 68f24b08ee89 ("sched/core: Free the stack early if @@ -26,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior #include #include #include -@@ -693,6 +694,15 @@ void __put_task_struct(struct task_struc +@@ -692,6 +693,15 @@ void __put_task_struct(struct task_struc WARN_ON(atomic_read(&tsk->usage)); WARN_ON(tsk == current); @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior security_task_free(tsk); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2764,15 +2764,6 @@ static struct rq *finish_task_switch(str +@@ -2765,15 +2765,6 @@ static struct rq *finish_task_switch(str if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); diff --git a/debian/patches-rt/kgb-serial-hackaround.patch b/debian/patches-rt/kgb-serial-hackaround.patch index cef946181..41e7c29f1 100644 --- a/debian/patches-rt/kgb-serial-hackaround.patch +++ b/debian/patches-rt/kgb-serial-hackaround.patch @@ -1,7 +1,7 @@ From: Jason Wessel Date: Thu, 28 Jul 2011 12:42:23 -0500 Subject: kgdb/serial: Short term workaround -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On 07/27/2011 04:37 PM, Thomas Gleixner wrote: > - KGDB (not yet disabled) is reportedly unusable on -rt right now due diff --git a/debian/patches-rt/kthread-convert-worker-lock-to-raw-spinlock.patch b/debian/patches-rt/kthread-convert-worker-lock-to-raw-spinlock.patch new file mode 100644 index 000000000..3b0194207 --- /dev/null +++ b/debian/patches-rt/kthread-convert-worker-lock-to-raw-spinlock.patch @@ -0,0 +1,195 @@ +From: Julia Cartwright +Date: Fri, 28 Sep 2018 21:03:51 +0000 +Subject: [PATCH] kthread: convert worker lock to raw spinlock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz + +In order to enable the queuing of kthread work items from hardirq +context even when PREEMPT_RT_FULL is enabled, convert the worker +spin_lock to a raw_spin_lock. + +This is only acceptable to do because the work performed under the lock +is well-bounded and minimal. + +Cc: Sebastian Andrzej Siewior +Cc: Guenter Roeck +Reported-and-tested-by: Steffen Trumtrar +Reported-by: Tim Sander +Signed-off-by: Julia Cartwright +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/kthread.h | 2 +- + kernel/kthread.c | 42 +++++++++++++++++++++--------------------- + 2 files changed, 22 insertions(+), 22 deletions(-) + +--- a/include/linux/kthread.h ++++ b/include/linux/kthread.h +@@ -85,7 +85,7 @@ enum { + + struct kthread_worker { + unsigned int flags; +- spinlock_t lock; ++ raw_spinlock_t lock; + struct list_head work_list; + struct list_head delayed_work_list; + struct task_struct *task; +--- a/kernel/kthread.c ++++ b/kernel/kthread.c +@@ -597,7 +597,7 @@ void __kthread_init_worker(struct kthrea + struct lock_class_key *key) + { + memset(worker, 0, sizeof(struct kthread_worker)); +- spin_lock_init(&worker->lock); ++ raw_spin_lock_init(&worker->lock); + lockdep_set_class_and_name(&worker->lock, key, name); + INIT_LIST_HEAD(&worker->work_list); + INIT_LIST_HEAD(&worker->delayed_work_list); +@@ -639,21 +639,21 @@ int kthread_worker_fn(void *worker_ptr) + + if (kthread_should_stop()) { + __set_current_state(TASK_RUNNING); +- spin_lock_irq(&worker->lock); ++ raw_spin_lock_irq(&worker->lock); + worker->task = NULL; +- spin_unlock_irq(&worker->lock); ++ raw_spin_unlock_irq(&worker->lock); + return 0; + } + + work = NULL; +- spin_lock_irq(&worker->lock); ++ raw_spin_lock_irq(&worker->lock); + if (!list_empty(&worker->work_list)) { + work = list_first_entry(&worker->work_list, + struct kthread_work, node); + list_del_init(&work->node); + } + worker->current_work = work; +- spin_unlock_irq(&worker->lock); ++ raw_spin_unlock_irq(&worker->lock); + + if (work) { + __set_current_state(TASK_RUNNING); +@@ -810,12 +810,12 @@ bool kthread_queue_work(struct kthread_w + bool ret = false; + unsigned long flags; + +- spin_lock_irqsave(&worker->lock, flags); ++ raw_spin_lock_irqsave(&worker->lock, flags); + if (!queuing_blocked(worker, work)) { + kthread_insert_work(worker, work, &worker->work_list); + ret = true; + } +- spin_unlock_irqrestore(&worker->lock, flags); ++ raw_spin_unlock_irqrestore(&worker->lock, flags); + return ret; + } + EXPORT_SYMBOL_GPL(kthread_queue_work); +@@ -841,7 +841,7 @@ void kthread_delayed_work_timer_fn(struc + if (WARN_ON_ONCE(!worker)) + return; + +- spin_lock(&worker->lock); ++ raw_spin_lock(&worker->lock); + /* Work must not be used with >1 worker, see kthread_queue_work(). */ + WARN_ON_ONCE(work->worker != worker); + +@@ -850,7 +850,7 @@ void kthread_delayed_work_timer_fn(struc + list_del_init(&work->node); + kthread_insert_work(worker, work, &worker->work_list); + +- spin_unlock(&worker->lock); ++ raw_spin_unlock(&worker->lock); + } + EXPORT_SYMBOL(kthread_delayed_work_timer_fn); + +@@ -906,14 +906,14 @@ bool kthread_queue_delayed_work(struct k + unsigned long flags; + bool ret = false; + +- spin_lock_irqsave(&worker->lock, flags); ++ raw_spin_lock_irqsave(&worker->lock, flags); + + if (!queuing_blocked(worker, work)) { + __kthread_queue_delayed_work(worker, dwork, delay); + ret = true; + } + +- spin_unlock_irqrestore(&worker->lock, flags); ++ raw_spin_unlock_irqrestore(&worker->lock, flags); + return ret; + } + EXPORT_SYMBOL_GPL(kthread_queue_delayed_work); +@@ -949,7 +949,7 @@ void kthread_flush_work(struct kthread_w + if (!worker) + return; + +- spin_lock_irq(&worker->lock); ++ raw_spin_lock_irq(&worker->lock); + /* Work must not be used with >1 worker, see kthread_queue_work(). */ + WARN_ON_ONCE(work->worker != worker); + +@@ -961,7 +961,7 @@ void kthread_flush_work(struct kthread_w + else + noop = true; + +- spin_unlock_irq(&worker->lock); ++ raw_spin_unlock_irq(&worker->lock); + + if (!noop) + wait_for_completion(&fwork.done); +@@ -994,9 +994,9 @@ static bool __kthread_cancel_work(struct + * any queuing is blocked by setting the canceling counter. + */ + work->canceling++; +- spin_unlock_irqrestore(&worker->lock, *flags); ++ raw_spin_unlock_irqrestore(&worker->lock, *flags); + del_timer_sync(&dwork->timer); +- spin_lock_irqsave(&worker->lock, *flags); ++ raw_spin_lock_irqsave(&worker->lock, *flags); + work->canceling--; + } + +@@ -1043,7 +1043,7 @@ bool kthread_mod_delayed_work(struct kth + unsigned long flags; + int ret = false; + +- spin_lock_irqsave(&worker->lock, flags); ++ raw_spin_lock_irqsave(&worker->lock, flags); + + /* Do not bother with canceling when never queued. */ + if (!work->worker) +@@ -1060,7 +1060,7 @@ bool kthread_mod_delayed_work(struct kth + fast_queue: + __kthread_queue_delayed_work(worker, dwork, delay); + out: +- spin_unlock_irqrestore(&worker->lock, flags); ++ raw_spin_unlock_irqrestore(&worker->lock, flags); + return ret; + } + EXPORT_SYMBOL_GPL(kthread_mod_delayed_work); +@@ -1074,7 +1074,7 @@ static bool __kthread_cancel_work_sync(s + if (!worker) + goto out; + +- spin_lock_irqsave(&worker->lock, flags); ++ raw_spin_lock_irqsave(&worker->lock, flags); + /* Work must not be used with >1 worker, see kthread_queue_work(). */ + WARN_ON_ONCE(work->worker != worker); + +@@ -1088,13 +1088,13 @@ static bool __kthread_cancel_work_sync(s + * In the meantime, block any queuing by setting the canceling counter. + */ + work->canceling++; +- spin_unlock_irqrestore(&worker->lock, flags); ++ raw_spin_unlock_irqrestore(&worker->lock, flags); + kthread_flush_work(work); +- spin_lock_irqsave(&worker->lock, flags); ++ raw_spin_lock_irqsave(&worker->lock, flags); + work->canceling--; + + out_fast: +- spin_unlock_irqrestore(&worker->lock, flags); ++ raw_spin_unlock_irqrestore(&worker->lock, flags); + out: + return ret; + } diff --git a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch index 422e8951f..bc4be8f58 100644 --- a/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch +++ b/debian/patches-rt/leds-trigger-disable-CPU-trigger-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 23 Jan 2014 14:45:59 +0100 Subject: leds: trigger: disable CPU trigger on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 diff --git a/debian/patches-rt/libata-remove-ata_sff_data_xfer_noirq.patch b/debian/patches-rt/libata-remove-ata_sff_data_xfer_noirq.patch index 045d9bc85..2a5799c08 100644 --- a/debian/patches-rt/libata-remove-ata_sff_data_xfer_noirq.patch +++ b/debian/patches-rt/libata-remove-ata_sff_data_xfer_noirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 19 Apr 2018 12:55:14 +0200 Subject: [PATCH] libata: remove ata_sff_data_xfer_noirq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz ata_sff_data_xfer_noirq() is invoked via the ->sff_data_xfer hook. The latter is invoked by ata_pio_sector(), atapi_send_cdb() and diff --git a/debian/patches-rt/list_bl-fixup-bogus-lockdep-warning.patch b/debian/patches-rt/list_bl-fixup-bogus-lockdep-warning.patch index 658afe790..2a39850ef 100644 --- a/debian/patches-rt/list_bl-fixup-bogus-lockdep-warning.patch +++ b/debian/patches-rt/list_bl-fixup-bogus-lockdep-warning.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 31 Mar 2016 00:04:25 -0500 Subject: [PATCH] list_bl: fixup bogus lockdep warning -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz At first glance, the use of 'static inline' seems appropriate for INIT_HLIST_BL_HEAD(). diff --git a/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch b/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch index 53f2853e8..705376d3b 100644 --- a/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch +++ b/debian/patches-rt/list_bl.h-make-list-head-locking-RT-safe.patch @@ -1,7 +1,7 @@ From: Paul Gortmaker Date: Fri, 21 Jun 2013 15:07:25 -0400 Subject: list_bl: Make list head locking RT safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz As per changes in include/linux/jbd_common.h for avoiding the bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal diff --git a/debian/patches-rt/locallock-provide-get-put-_locked_ptr-variants.patch b/debian/patches-rt/locallock-provide-get-put-_locked_ptr-variants.patch index be67e78d3..11e9f4221 100644 --- a/debian/patches-rt/locallock-provide-get-put-_locked_ptr-variants.patch +++ b/debian/patches-rt/locallock-provide-get-put-_locked_ptr-variants.patch @@ -1,7 +1,7 @@ From: Julia Cartwright Date: Mon, 7 May 2018 08:58:56 -0500 Subject: [PATCH] locallock: provide {get,put}_locked_ptr() variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/localversion.patch b/debian/patches-rt/localversion.patch index cf758ace9..74438264c 100644 --- a/debian/patches-rt/localversion.patch +++ b/debian/patches-rt/localversion.patch @@ -1,7 +1,7 @@ Subject: Add localversion for -RT release From: Thomas Gleixner Date: Fri, 08 Jul 2011 20:25:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner --- @@ -11,4 +11,4 @@ Signed-off-by: Thomas Gleixner --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt5 ++-rt7 diff --git a/debian/patches-rt/lockdep-disable-self-test.patch b/debian/patches-rt/lockdep-disable-self-test.patch index e0578ff09..364d330bd 100644 --- a/debian/patches-rt/lockdep-disable-self-test.patch +++ b/debian/patches-rt/lockdep-disable-self-test.patch @@ -4,7 +4,7 @@ Subject: [PATCH] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The self-test wasn't always 100% accurate for RT. We disabled a few tests which failed because they had a different semantic for RT. Some diff --git a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch index fb87b82b3..f7af49945 100644 --- a/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch +++ b/debian/patches-rt/lockdep-no-softirq-accounting-on-rt.patch @@ -1,7 +1,7 @@ Subject: lockdep: Make it RT aware From: Thomas Gleixner Date: Sun, 17 Jul 2011 18:51:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz teach lockdep that we don't really do softirqs on -RT. diff --git a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch index 79cd40e47..2bdebf80a 100644 --- a/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch +++ b/debian/patches-rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Wed, 28 Jan 2015 13:08:45 -0600 Subject: lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz "lockdep: Selftest: Only do hardirq context test for raw spinlock" disabled the execution of certain tests with PREEMPT_RT_FULL, but did diff --git a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch index e4bdfe7d8..c8d26d680 100644 --- a/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch +++ b/debian/patches-rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch @@ -1,7 +1,7 @@ Subject: lockdep: selftest: Only do hardirq context test for raw spinlock From: Yong Zhang Date: Mon, 16 Apr 2012 15:01:56 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz From: Yong Zhang diff --git a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch index 534ccfb25..b91c575a8 100644 --- a/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch +++ b/debian/patches-rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 17:40:42 +0200 Subject: [PATCH 1/2] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Upstream uses arch_spinlock_t within spinlock_t and requests that spinlock_types.h header file is included first. diff --git a/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch b/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch index 8a9c4b9fd..a5c0637e4 100644 --- a/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch +++ b/debian/patches-rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch @@ -1,7 +1,7 @@ From: "Wolfgang M. Reimer" Date: Tue, 21 Jul 2015 16:20:07 +0200 Subject: locking: locktorture: Do NOT include rwlock.h directly -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Including rwlock.h directly will cause kernel builds to fail if CONFIG_PREEMPT_RT_FULL is defined. The correct header file diff --git a/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch b/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch index d82a845a4..96c67f32a 100644 --- a/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch +++ b/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch @@ -1,7 +1,7 @@ From: Mikulas Patocka Date: Mon, 13 Nov 2017 12:56:53 -0500 Subject: [PATCH] locking/rt-mutex: fix deadlock in device mapper / block-IO -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz When some block device driver creates a bio and submits it to another block device driver, the bio is added to current->bio_list (in order to diff --git a/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch b/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch index b7213f293..e602dc7d5 100644 --- a/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch +++ b/debian/patches-rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 16 Nov 2017 16:48:48 +0100 Subject: [PATCH] locking/rtmutex: re-init the wait_lock in rt_mutex_init_proxy_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz We could provide a key-class for the lockdep (and fixup all callers) or move the init to all callers (like it was) in order to avoid lockdep diff --git a/debian/patches-rt/md-disable-bcache.patch b/debian/patches-rt/md-disable-bcache.patch index 0f20c4217..5f90d172e 100644 --- a/debian/patches-rt/md-disable-bcache.patch +++ b/debian/patches-rt/md-disable-bcache.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 11:48:57 +0200 Subject: md: disable bcache -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz It uses anon semaphores |drivers/md/bcache/request.c: In function ‘cached_dev_write_complete’: diff --git a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch index 532a13acd..7b081e9cc 100644 --- a/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch +++ b/debian/patches-rt/md-raid5-percpu-handling-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 6 Apr 2010 16:51:31 +0200 Subject: md: raid5: Make raid5_percpu handling RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic @@ -42,7 +42,7 @@ Tested-by: Udo van den Heuvel } static void free_stripe(struct kmem_cache *sc, struct stripe_head *sh) -@@ -6793,6 +6795,7 @@ static int raid456_cpu_up_prepare(unsign +@@ -6799,6 +6801,7 @@ static int raid456_cpu_up_prepare(unsign __func__, cpu); return -ENOMEM; } @@ -50,7 +50,7 @@ Tested-by: Udo van den Heuvel return 0; } -@@ -6803,7 +6806,6 @@ static int raid5_alloc_percpu(struct r5c +@@ -6809,7 +6812,6 @@ static int raid5_alloc_percpu(struct r5c conf->percpu = alloc_percpu(struct raid5_percpu); if (!conf->percpu) return -ENOMEM; diff --git a/debian/patches-rt/mips-disable-highmem-on-rt.patch b/debian/patches-rt/mips-disable-highmem-on-rt.patch index 740f90fd9..a115cea1d 100644 --- a/debian/patches-rt/mips-disable-highmem-on-rt.patch +++ b/debian/patches-rt/mips-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: mips: Disable highmem on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:10:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches-rt/mm-convert-swap-to-percpu-locked.patch b/debian/patches-rt/mm-convert-swap-to-percpu-locked.patch index 67b96c248..dbb07fc38 100644 --- a/debian/patches-rt/mm-convert-swap-to-percpu-locked.patch +++ b/debian/patches-rt/mm-convert-swap-to-percpu-locked.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:51 -0500 Subject: mm/swap: Convert to percpu locked -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Replace global locks (get_cpu + local_irq_save) with "local_locks()". Currently there is one of for "rotate" and one for "swap". diff --git a/debian/patches-rt/mm-disable-sloub-rt.patch b/debian/patches-rt/mm-disable-sloub-rt.patch index 809ea7ba4..d0ff60a0f 100644 --- a/debian/patches-rt/mm-disable-sloub-rt.patch +++ b/debian/patches-rt/mm-disable-sloub-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:03 -0500 Subject: mm: Allow only slub on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs. diff --git a/debian/patches-rt/mm-enable-slub.patch b/debian/patches-rt/mm-enable-slub.patch index 908ad73f5..3dadee404 100644 --- a/debian/patches-rt/mm-enable-slub.patch +++ b/debian/patches-rt/mm-enable-slub.patch @@ -1,7 +1,7 @@ Subject: mm: Enable SLUB for RT From: Thomas Gleixner Date: Thu, 25 Oct 2012 10:32:35 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Avoid the memory allocation in IRQ section diff --git a/debian/patches-rt/mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch b/debian/patches-rt/mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch new file mode 100644 index 000000000..5b439b215 --- /dev/null +++ b/debian/patches-rt/mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch @@ -0,0 +1,92 @@ +From: Clark Williams +Date: Tue, 18 Sep 2018 10:29:31 -0500 +Subject: [PATCH] mm/kasan: make quarantine_lock a raw_spinlock_t +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz + +The static lock quarantine_lock is used in quarantine.c to protect the +quarantine queue datastructures. It is taken inside quarantine queue +manipulation routines (quarantine_put(), quarantine_reduce() and +quarantine_remove_cache()), with IRQs disabled. +This is not a problem on a stock kernel but is problematic on an RT +kernel where spin locks are sleeping spinlocks, which can sleep and can +not be acquired with disabled interrupts. + +Convert the quarantine_lock to a raw spinlock_t. The usage of +quarantine_lock is confined to quarantine.c and the work performed while +the lock is held is limited. + +Signed-off-by: Clark Williams +Signed-off-by: Sebastian Andrzej Siewior +--- + mm/kasan/quarantine.c | 18 +++++++++--------- + 1 file changed, 9 insertions(+), 9 deletions(-) + +--- a/mm/kasan/quarantine.c ++++ b/mm/kasan/quarantine.c +@@ -103,7 +103,7 @@ static int quarantine_head; + static int quarantine_tail; + /* Total size of all objects in global_quarantine across all batches. */ + static unsigned long quarantine_size; +-static DEFINE_SPINLOCK(quarantine_lock); ++static DEFINE_RAW_SPINLOCK(quarantine_lock); + DEFINE_STATIC_SRCU(remove_cache_srcu); + + /* Maximum size of the global queue. */ +@@ -190,7 +190,7 @@ void quarantine_put(struct kasan_free_me + if (unlikely(q->bytes > QUARANTINE_PERCPU_SIZE)) { + qlist_move_all(q, &temp); + +- spin_lock(&quarantine_lock); ++ raw_spin_lock(&quarantine_lock); + WRITE_ONCE(quarantine_size, quarantine_size + temp.bytes); + qlist_move_all(&temp, &global_quarantine[quarantine_tail]); + if (global_quarantine[quarantine_tail].bytes >= +@@ -203,7 +203,7 @@ void quarantine_put(struct kasan_free_me + if (new_tail != quarantine_head) + quarantine_tail = new_tail; + } +- spin_unlock(&quarantine_lock); ++ raw_spin_unlock(&quarantine_lock); + } + + local_irq_restore(flags); +@@ -230,7 +230,7 @@ void quarantine_reduce(void) + * expected case). + */ + srcu_idx = srcu_read_lock(&remove_cache_srcu); +- spin_lock_irqsave(&quarantine_lock, flags); ++ raw_spin_lock_irqsave(&quarantine_lock, flags); + + /* + * Update quarantine size in case of hotplug. Allocate a fraction of +@@ -254,7 +254,7 @@ void quarantine_reduce(void) + quarantine_head = 0; + } + +- spin_unlock_irqrestore(&quarantine_lock, flags); ++ raw_spin_unlock_irqrestore(&quarantine_lock, flags); + + qlist_free_all(&to_free, NULL); + srcu_read_unlock(&remove_cache_srcu, srcu_idx); +@@ -310,17 +310,17 @@ void quarantine_remove_cache(struct kmem + */ + on_each_cpu(per_cpu_remove_cache, cache, 1); + +- spin_lock_irqsave(&quarantine_lock, flags); ++ raw_spin_lock_irqsave(&quarantine_lock, flags); + for (i = 0; i < QUARANTINE_BATCHES; i++) { + if (qlist_empty(&global_quarantine[i])) + continue; + qlist_move_cache(&global_quarantine[i], &to_free, cache); + /* Scanning whole quarantine can take a while. */ +- spin_unlock_irqrestore(&quarantine_lock, flags); ++ raw_spin_unlock_irqrestore(&quarantine_lock, flags); + cond_resched(); +- spin_lock_irqsave(&quarantine_lock, flags); ++ raw_spin_lock_irqsave(&quarantine_lock, flags); + } +- spin_unlock_irqrestore(&quarantine_lock, flags); ++ raw_spin_unlock_irqrestore(&quarantine_lock, flags); + + qlist_free_all(&to_free, cache); + diff --git a/debian/patches-rt/mm-make-vmstat-rt-aware.patch b/debian/patches-rt/mm-make-vmstat-rt-aware.patch index 1d62b36b9..4b78f2d98 100644 --- a/debian/patches-rt/mm-make-vmstat-rt-aware.patch +++ b/debian/patches-rt/mm-make-vmstat-rt-aware.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:13 -0500 Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Disable preemption on -RT for the vmstat code. On vanila the code runs in IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the diff --git a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch index 475addcf1..70736c615 100644 --- a/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch +++ b/debian/patches-rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch @@ -1,7 +1,7 @@ From: Yang Shi Subject: mm/memcontrol: Don't call schedule_work_on in preemption disabled context Date: Wed, 30 Oct 2013 11:48:33 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The following trace is triggered when running ltp oom test cases: diff --git a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch index b9d050677..3108b5200 100644 --- a/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch +++ b/debian/patches-rt/mm-memcontrol-do_not_disable_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Subject: mm/memcontrol: Replace local_irq_disable with local locks Date: Wed, 28 Jan 2015 17:14:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. diff --git a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch index ddbca964a..d6fd74814 100644 --- a/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/debian/patches-rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:37 -0500 Subject: mm: page_alloc: rt-friendly per-cpu pages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. @@ -213,7 +213,7 @@ Signed-off-by: Thomas Gleixner return NULL; } -@@ -8011,7 +8034,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8015,7 +8038,7 @@ void zone_pcp_reset(struct zone *zone) struct per_cpu_pageset *pset; /* avoid races with drain_pages() */ @@ -222,7 +222,7 @@ Signed-off-by: Thomas Gleixner if (zone->pageset != &boot_pageset) { for_each_online_cpu(cpu) { pset = per_cpu_ptr(zone->pageset, cpu); -@@ -8020,7 +8043,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8024,7 +8047,7 @@ void zone_pcp_reset(struct zone *zone) free_percpu(zone->pageset); zone->pageset = &boot_pageset; } diff --git a/debian/patches-rt/mm-perform-lru_add_drain_all-remotely.patch b/debian/patches-rt/mm-perform-lru_add_drain_all-remotely.patch index 5c86d2dd6..2a7b4a267 100644 --- a/debian/patches-rt/mm-perform-lru_add_drain_all-remotely.patch +++ b/debian/patches-rt/mm-perform-lru_add_drain_all-remotely.patch @@ -1,7 +1,7 @@ From: Luiz Capitulino Date: Fri, 27 May 2016 15:03:28 +0200 Subject: [PATCH] mm: perform lru_add_drain_all() remotely -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/mm-protect-activate-switch-mm.patch b/debian/patches-rt/mm-protect-activate-switch-mm.patch index 06724d9cc..a55a112fa 100644 --- a/debian/patches-rt/mm-protect-activate-switch-mm.patch +++ b/debian/patches-rt/mm-protect-activate-switch-mm.patch @@ -1,7 +1,7 @@ From: Yong Zhang Date: Tue, 15 May 2012 13:53:56 +0800 Subject: mm: Protect activate_mm() by preempt_[disable&enable]_rt() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz User preempt_*_rt instead of local_irq_*_rt or otherwise there will be warning on ARM like below: diff --git a/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch b/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch index ff117af10..e51b5be0f 100644 --- a/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch +++ b/debian/patches-rt/mm-rt-kmap-atomic-scheduling.patch @@ -1,7 +1,7 @@ Subject: mm, rt: kmap_atomic scheduling From: Peter Zijlstra Date: Thu, 28 Jul 2011 10:43:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In fact, with migrate_disable() existing one could play games with kmap_atomic. You could save/restore the kmap_atomic slots on context diff --git a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index 3f5e3d371..268fbb283 100644 --- a/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch +++ b/debian/patches-rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:34 -0500 Subject: mm/scatterlist: Do not disable irqs on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz For -RT it is enough to keep pagefault disabled (which is currently handled by kmap_atomic()). diff --git a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch index 5e2e83923..2f93156ef 100644 --- a/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch +++ b/debian/patches-rt/mm-vmalloc-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: mm/vmalloc: Another preempt disable region which sucks From: Thomas Gleixner Date: Tue, 12 Jul 2011 11:39:36 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. diff --git a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch index 8205440c5..5c647811f 100644 --- a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch +++ b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Tue, 22 Mar 2016 11:16:09 +0100 Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz get_cpu_var() disables preemption and triggers a might_sleep() splat later. This is replaced with get_locked_var(). diff --git a/debian/patches-rt/mutex-no-spin-on-rt.patch b/debian/patches-rt/mutex-no-spin-on-rt.patch index b9442841a..b2034c279 100644 --- a/debian/patches-rt/mutex-no-spin-on-rt.patch +++ b/debian/patches-rt/mutex-no-spin-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:51:45 +0200 Subject: locking: Disable spin on owner for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Drop spin on owner for mutex / rwsem. We are most likely not using it but… diff --git a/debian/patches-rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch b/debian/patches-rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch index 15dd860a7..cffdec876 100644 --- a/debian/patches-rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch +++ b/debian/patches-rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch @@ -2,7 +2,7 @@ From: Steven Rostedt Date: Tue, 6 Dec 2016 17:50:30 -0500 Subject: [PATCH] net: Have __napi_schedule_irqoff() disable interrupts on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz A customer hit a crash where the napi sd->poll_list became corrupted. The customer had the bnx2x driver, which does a diff --git a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch index b6f43a9a6..65fbd33d7 100644 --- a/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/debian/patches-rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 17:36:35 +0200 Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The seqcount disables preemption on -RT while it is held which can't remove. Also we don't want the reader to spin for ages if the writer is diff --git a/debian/patches-rt/net-add-a-lock-around-icmp_sk.patch b/debian/patches-rt/net-add-a-lock-around-icmp_sk.patch index b96ff98a1..f41246f86 100644 --- a/debian/patches-rt/net-add-a-lock-around-icmp_sk.patch +++ b/debian/patches-rt/net-add-a-lock-around-icmp_sk.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 31 Aug 2016 17:54:09 +0200 Subject: [PATCH] net: add a lock around icmp_sk() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/net-add-back-the-missing-serialization-in-ip_send_un.patch b/debian/patches-rt/net-add-back-the-missing-serialization-in-ip_send_un.patch index ebcb75262..ddf1ee662 100644 --- a/debian/patches-rt/net-add-back-the-missing-serialization-in-ip_send_un.patch +++ b/debian/patches-rt/net-add-back-the-missing-serialization-in-ip_send_un.patch @@ -5,7 +5,7 @@ Subject: [PATCH] net: add back the missing serialization in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Some time ago Sami Pietikäinen reported a crash on -RT in ip_send_unicast_reply() which was later fixed by Nicholas Mc Guire diff --git a/debian/patches-rt/net-another-local-irq-disable-alloc-atomic-headache.patch b/debian/patches-rt/net-another-local-irq-disable-alloc-atomic-headache.patch index b9894b3b6..70c0649d0 100644 --- a/debian/patches-rt/net-another-local-irq-disable-alloc-atomic-headache.patch +++ b/debian/patches-rt/net-another-local-irq-disable-alloc-atomic-headache.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 26 Sep 2012 16:21:08 +0200 Subject: net: Another local_irq_disable/kmalloc headache -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Replace it by a local lock. Though that's pretty inefficient :( diff --git a/debian/patches-rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch b/debian/patches-rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch index 461ec58a1..ec2f9b262 100644 --- a/debian/patches-rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch +++ b/debian/patches-rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 15 Jan 2016 16:33:34 +0100 Subject: net/core: protect users of napi_alloc_cache against reentrance -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On -RT the code running in BH can not be moved to another CPU so CPU local variable remain local. However the code can be preempted diff --git a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch index 2c4ed9061..8012c4f8d 100644 --- a/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch +++ b/debian/patches-rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 16 Jun 2017 19:03:16 +0200 Subject: [PATCH] net/core: use local_bh_disable() in netif_rx_ni() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In 2004 netif_rx_ni() gained a preempt_disable() section around netif_rx() and its do_softirq() + testing for it. The do_softirq() part diff --git a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index ce390323b..9308511ac 100644 --- a/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +++ b/debian/patches-rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 30 Mar 2016 13:36:29 +0200 Subject: [PATCH] net: dev: always take qdisc's busylock in __dev_xmit_skb() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The root-lock is dropped before dev_hard_start_xmit() is invoked and after setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away diff --git a/debian/patches-rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch b/debian/patches-rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch index 319577d73..388ac5cf5 100644 --- a/debian/patches-rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch +++ b/debian/patches-rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch @@ -1,7 +1,7 @@ Subject: net: netfilter: Serialize xt_write_recseq sections on RT From: Thomas Gleixner Date: Sun, 28 Oct 2012 11:18:08 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The netfilter code relies only on the implicit semantics of local_bh_disable() for serializing wt_write_recseq sections. RT breaks diff --git a/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch b/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch index 367ea1d68..0e8e61e88 100644 --- a/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch +++ b/debian/patches-rt/net-make-devnet_rename_seq-a-mutex.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Mar 2013 18:06:20 +0100 Subject: net: Add a mutex around devnet_rename_seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On RT write_seqcount_begin() disables preemption and device_rename() allocates memory with GFP_KERNEL and grabs later the sysfs_mutex diff --git a/debian/patches-rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch b/debian/patches-rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch index 5c246015d..29412914b 100644 --- a/debian/patches-rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch +++ b/debian/patches-rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Jan 2016 15:55:02 +0100 Subject: net: move xmit_recursion to per-task variable on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz A softirq on -RT can be preempted. That means one task is in __dev_queue_xmit(), gets preempted and another task may enter diff --git a/debian/patches-rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch b/debian/patches-rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch index 8f67c0e13..0f85321a0 100644 --- a/debian/patches-rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch +++ b/debian/patches-rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 15:39:05 +0100 Subject: net: provide a way to delegate processing a softirq to ksoftirqd -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz If the NET_RX uses up all of his budget it moves the following NAPI invocations into the `ksoftirqd`. On -RT it does not do so. Instead it diff --git a/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch b/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch index 5abbd0a73..4d0723dff 100644 --- a/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch +++ b/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch @@ -1,7 +1,7 @@ From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 Subject: net: sched: Use msleep() instead of yield() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50 (by default). If a high priority userspace process tries to shut down a busy diff --git a/debian/patches-rt/net-use-cpu-chill.patch b/debian/patches-rt/net-use-cpu-chill.patch index 088ed22b2..574067c18 100644 --- a/debian/patches-rt/net-use-cpu-chill.patch +++ b/debian/patches-rt/net-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: net: Use cpu_chill() instead of cpu_relax() From: Thomas Gleixner Date: Wed, 07 Mar 2012 21:10:04 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch index 810a66a4a..7921ccf79 100644 --- a/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch +++ b/debian/patches-rt/net_disable_NET_RX_BUSY_POLL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 Subject: net/core: disable NET_RX_BUSY_POLL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz sk_busy_loop() does preempt_disable() followed by a few operations which can take sleeping locks and may get long. diff --git a/debian/patches-rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch b/debian/patches-rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch index 889ae343e..d6ced4c71 100644 --- a/debian/patches-rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch +++ b/debian/patches-rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 10 Apr 2018 17:54:32 +0200 Subject: [PATCH] ntfs: don't disable interrupts during kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz ntfs_end_buffer_async_read() disables interrupts around kmap_atomic(). This is a leftover from the old kmap_atomic() implementation which relied on fixed diff --git a/debian/patches-rt/of-allocate-free-phandle-cache-outside-of-the-devtre.patch b/debian/patches-rt/of-allocate-free-phandle-cache-outside-of-the-devtre.patch index 42bd68531..fa4b4f4a1 100644 --- a/debian/patches-rt/of-allocate-free-phandle-cache-outside-of-the-devtre.patch +++ b/debian/patches-rt/of-allocate-free-phandle-cache-outside-of-the-devtre.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 31 Aug 2018 14:16:30 +0200 Subject: [PATCH] of: allocate / free phandle cache outside of the devtree_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The phandle cache code allocates memory while holding devtree_lock which is a raw_spinlock_t. Memory allocation (and free()) is not possible on @@ -13,7 +13,7 @@ Cc: Frank Rowand Cc: devicetree@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior --- - drivers/of/base.c | 22 ++++++++++++++-------- + drivers/of/base.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) --- a/drivers/of/base.c @@ -25,7 +25,7 @@ Signed-off-by: Sebastian Andrzej Siewior + struct device_node **shadow; raw_spin_lock_irqsave(&devtree_lock, flags); -- + - kfree(phandle_cache); + shadow = phandle_cache; phandle_cache = NULL; @@ -33,9 +33,9 @@ Signed-off-by: Sebastian Andrzej Siewior for_each_of_allnodes(np) if (np->phandle && np->phandle != OF_PHANDLE_ILLEGAL) phandles++; - + raw_spin_unlock_irqrestore(&devtree_lock, flags); -+ ++ kfree(shadow); + if (!phandles) - goto out; + return; @@ -47,11 +47,10 @@ Signed-off-by: Sebastian Andrzej Siewior - GFP_ATOMIC); - if (!phandle_cache) - goto out; -+ kfree(shadow); + shadow = kcalloc(cache_entries, sizeof(*phandle_cache), GFP_KERNEL); -+ + if (!shadow) + return; ++ + raw_spin_lock_irqsave(&devtree_lock, flags); + phandle_cache = shadow; diff --git a/debian/patches-rt/oleg-signal-rt-fix.patch b/debian/patches-rt/oleg-signal-rt-fix.patch index 38ae98bd4..79a1156d6 100644 --- a/debian/patches-rt/oleg-signal-rt-fix.patch +++ b/debian/patches-rt/oleg-signal-rt-fix.patch @@ -1,7 +1,7 @@ From: Oleg Nesterov Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: signal/x86: Delay calling signals in atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using diff --git a/debian/patches-rt/panic-disable-random-on-rt.patch b/debian/patches-rt/panic-disable-random-on-rt.patch index 8c42306aa..671486092 100644 --- a/debian/patches-rt/panic-disable-random-on-rt.patch +++ b/debian/patches-rt/panic-disable-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. diff --git a/debian/patches-rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch b/debian/patches-rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch index 12ab16ae9..426b4f3c0 100644 --- a/debian/patches-rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch +++ b/debian/patches-rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch @@ -1,7 +1,7 @@ Subject: rcu: Make ksoftirqd do RCU quiescent states From: "Paul E. McKenney" Date: Wed, 5 Oct 2011 11:45:18 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch b/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch index 0ba1936e3..711b9c5d2 100644 --- a/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch +++ b/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 4 Oct 2017 10:24:23 +0200 Subject: [PATCH] pci/switchtec: Don't use completion's wait queue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The poll callback is using completion's wait_queue_head_t member and puts it in poll_wait() so the poll() caller gets a wakeup after command @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/drivers/pci/switch/switchtec.c +++ b/drivers/pci/switch/switchtec.c -@@ -41,10 +41,11 @@ struct switchtec_user { +@@ -43,10 +43,11 @@ struct switchtec_user { enum mrpc_state state; @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior u32 cmd; u32 status; u32 return_code; -@@ -66,7 +67,7 @@ static struct switchtec_user *stuser_cre +@@ -68,7 +69,7 @@ static struct switchtec_user *stuser_cre stuser->stdev = stdev; kref_init(&stuser->kref); INIT_LIST_HEAD(&stuser->list); @@ -46,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior stuser->event_cnt = atomic_read(&stdev->event_cnt); dev_dbg(&stdev->dev, "%s: %p\n", __func__, stuser); -@@ -149,7 +150,7 @@ static int mrpc_queue_cmd(struct switcht +@@ -151,7 +152,7 @@ static int mrpc_queue_cmd(struct switcht kref_get(&stuser->kref); stuser->read_len = sizeof(stuser->data); stuser_set_state(stuser, MRPC_QUEUED); @@ -55,7 +55,7 @@ Signed-off-by: Sebastian Andrzej Siewior list_add_tail(&stuser->list, &stdev->mrpc_queue); mrpc_cmd_submit(stdev); -@@ -186,7 +187,8 @@ static void mrpc_complete_cmd(struct swi +@@ -188,7 +189,8 @@ static void mrpc_complete_cmd(struct swi stuser->read_len); out: @@ -65,7 +65,7 @@ Signed-off-by: Sebastian Andrzej Siewior list_del_init(&stuser->list); stuser_put(stuser); stdev->mrpc_busy = 0; -@@ -456,10 +458,11 @@ static ssize_t switchtec_dev_read(struct +@@ -458,10 +460,11 @@ static ssize_t switchtec_dev_read(struct mutex_unlock(&stdev->mrpc_mutex); if (filp->f_flags & O_NONBLOCK) { @@ -79,7 +79,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (rc < 0) return rc; } -@@ -507,7 +510,7 @@ static __poll_t switchtec_dev_poll(struc +@@ -509,7 +512,7 @@ static __poll_t switchtec_dev_poll(struc struct switchtec_dev *stdev = stuser->stdev; __poll_t ret = 0; @@ -88,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior poll_wait(filp, &stdev->event_wq, wait); if (lock_mutex_and_test_alive(stdev)) -@@ -515,7 +518,7 @@ static __poll_t switchtec_dev_poll(struc +@@ -517,7 +520,7 @@ static __poll_t switchtec_dev_poll(struc mutex_unlock(&stdev->mrpc_mutex); @@ -97,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior ret |= EPOLLIN | EPOLLRDNORM; if (stuser->event_cnt != atomic_read(&stdev->event_cnt)) -@@ -1034,7 +1037,8 @@ static void stdev_kill(struct switchtec_ +@@ -1038,7 +1041,8 @@ static void stdev_kill(struct switchtec_ /* Wake up and kill any users waiting on an MRPC request */ list_for_each_entry_safe(stuser, tmpuser, &stdev->mrpc_queue, list) { diff --git a/debian/patches-rt/peter_zijlstra-frob-rcu.patch b/debian/patches-rt/peter_zijlstra-frob-rcu.patch index cdfbc4247..ff9f622ac 100644 --- a/debian/patches-rt/peter_zijlstra-frob-rcu.patch +++ b/debian/patches-rt/peter_zijlstra-frob-rcu.patch @@ -1,7 +1,7 @@ Subject: rcu: Frob softirq test From: Peter Zijlstra Date: Sat Aug 13 00:23:17 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz With RT_FULL we get the below wreckage: diff --git a/debian/patches-rt/peterz-percpu-rwsem-rt.patch b/debian/patches-rt/peterz-percpu-rwsem-rt.patch index 92d5b2fa7..2132563c6 100644 --- a/debian/patches-rt/peterz-percpu-rwsem-rt.patch +++ b/debian/patches-rt/peterz-percpu-rwsem-rt.patch @@ -1,7 +1,7 @@ Subject: locking/percpu-rwsem: Remove preempt_disable variants From: Peter Zijlstra Date: Wed Nov 23 16:29:32 CET 2016 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Effective revert commit: @@ -143,7 +143,7 @@ Signed-off-by: Peter Zijlstra (Intel) locks_dispose_list(&dispose); return error; } -@@ -2533,13 +2533,13 @@ locks_remove_lease(struct file *filp, st +@@ -2540,13 +2540,13 @@ locks_remove_lease(struct file *filp, st if (list_empty(&ctx->flc_lease)) return; diff --git a/debian/patches-rt/pid.h-include-atomic.h.patch b/debian/patches-rt/pid.h-include-atomic.h.patch index 83c25da79..5362d53ac 100644 --- a/debian/patches-rt/pid.h-include-atomic.h.patch +++ b/debian/patches-rt/pid.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Grygorii Strashko Date: Tue, 21 Jul 2015 19:43:56 +0300 Subject: pid.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz This patch fixes build error: CC kernel/pid_namespace.o diff --git a/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch b/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch index b35530498..0fee0a6b4 100644 --- a/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch +++ b/debian/patches-rt/posix-timers-thread-posix-cpu-timers-on-rt.patch @@ -1,7 +1,7 @@ From: John Stultz Date: Fri, 3 Jul 2009 08:29:58 -0500 Subject: posix-timers: Thread posix-cpu-timers on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. @@ -55,7 +55,7 @@ Signed-off-by: Thomas Gleixner [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -1563,6 +1563,9 @@ static void rt_mutex_init_task(struct ta +@@ -1564,6 +1564,9 @@ static void rt_mutex_init_task(struct ta */ static void posix_cpu_timers_init(struct task_struct *tsk) { diff --git a/debian/patches-rt/power-disable-highmem-on-rt.patch b/debian/patches-rt/power-disable-highmem-on-rt.patch index e0c073adf..de55edcb0 100644 --- a/debian/patches-rt/power-disable-highmem-on-rt.patch +++ b/debian/patches-rt/power-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: powerpc: Disable highmem on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:08:34 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches-rt/power-use-generic-rwsem-on-rt.patch b/debian/patches-rt/power-use-generic-rwsem-on-rt.patch index 6238f917b..8a9dd60c8 100644 --- a/debian/patches-rt/power-use-generic-rwsem-on-rt.patch +++ b/debian/patches-rt/power-use-generic-rwsem-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: powerpc: Use generic rwsem on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Use generic code which uses rtmutex diff --git a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index d9cc7e358..4e5ba9de0 100644 --- a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +++ b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,7 +1,7 @@ From: Bogdan Purcareata Date: Fri, 24 Apr 2015 15:53:13 +0000 Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz While converting the openpic emulation code to use a raw_spinlock_t enables guests to run on RT, there's still a performance issue. For interrupts sent in diff --git a/debian/patches-rt/powerpc-preempt-lazy-support.patch b/debian/patches-rt/powerpc-preempt-lazy-support.patch index e825ba274..f520b0162 100644 --- a/debian/patches-rt/powerpc-preempt-lazy-support.patch +++ b/debian/patches-rt/powerpc-preempt-lazy-support.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 1 Nov 2012 10:14:11 +0100 Subject: powerpc: Add support for lazy preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Implement the powerpc pieces for lazy preempt. diff --git a/debian/patches-rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch b/debian/patches-rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch index 60125dfa2..7759097d3 100644 --- a/debian/patches-rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch +++ b/debian/patches-rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch @@ -1,7 +1,7 @@ From: Paul Gortmaker Date: Sun, 31 May 2015 14:44:42 -0400 Subject: powerpc: ps3/device-init.c - adapt to completions using swait vs wait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz To fix: diff --git a/debian/patches-rt/preempt-lazy-support.patch b/debian/patches-rt/preempt-lazy-support.patch index 080e17013..b83c63073 100644 --- a/debian/patches-rt/preempt-lazy-support.patch +++ b/debian/patches-rt/preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: sched: Add support for lazy preemption From: Thomas Gleixner Date: Fri, 26 Oct 2012 18:50:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -283,7 +283,7 @@ Signed-off-by: Thomas Gleixner void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); -@@ -2428,6 +2470,9 @@ int sched_fork(unsigned long clone_flags +@@ -2429,6 +2471,9 @@ int sched_fork(unsigned long clone_flags p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -293,7 +293,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -3493,6 +3538,7 @@ static void __sched notrace __schedule(b +@@ -3494,6 +3539,7 @@ static void __sched notrace __schedule(b next = pick_next_task(rq, prev, &rf); clear_tsk_need_resched(prev); @@ -301,7 +301,7 @@ Signed-off-by: Thomas Gleixner clear_preempt_need_resched(); if (likely(prev != next)) { -@@ -3673,6 +3719,30 @@ static void __sched notrace preempt_sche +@@ -3674,6 +3720,30 @@ static void __sched notrace preempt_sche } while (need_resched()); } @@ -332,7 +332,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_PREEMPT /* * this is the entry point to schedule() from in-kernel preemption -@@ -3687,7 +3757,8 @@ asmlinkage __visible void __sched notrac +@@ -3688,7 +3758,8 @@ asmlinkage __visible void __sched notrac */ if (likely(!preemptible())) return; @@ -342,7 +342,7 @@ Signed-off-by: Thomas Gleixner preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); -@@ -3714,6 +3785,9 @@ asmlinkage __visible void __sched notrac +@@ -3715,6 +3786,9 @@ asmlinkage __visible void __sched notrac if (likely(!preemptible())) return; @@ -352,7 +352,7 @@ Signed-off-by: Thomas Gleixner do { /* * Because the function tracer can trace preempt_count_sub() -@@ -5482,7 +5556,9 @@ void init_idle(struct task_struct *idle, +@@ -5483,7 +5557,9 @@ void init_idle(struct task_struct *idle, /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); @@ -363,7 +363,7 @@ Signed-off-by: Thomas Gleixner /* * The idle tasks have their own, simple scheduling class: */ -@@ -7198,6 +7274,7 @@ void migrate_disable(void) +@@ -7199,6 +7275,7 @@ void migrate_disable(void) } preempt_disable(); @@ -371,7 +371,7 @@ Signed-off-by: Thomas Gleixner pin_current_cpu(); migrate_disable_update_cpus_allowed(p); -@@ -7265,6 +7342,7 @@ void migrate_enable(void) +@@ -7266,6 +7343,7 @@ void migrate_enable(void) arg.dest_cpu = dest_cpu; unpin_current_cpu(); @@ -379,7 +379,7 @@ Signed-off-by: Thomas Gleixner preempt_enable(); stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg); tlb_migrate_finish(p->mm); -@@ -7273,6 +7351,7 @@ void migrate_enable(void) +@@ -7274,6 +7352,7 @@ void migrate_enable(void) } } unpin_current_cpu(); @@ -389,7 +389,7 @@ Signed-off-by: Thomas Gleixner EXPORT_SYMBOL(migrate_enable); --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4336,7 +4336,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4338,7 +4338,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq ideal_runtime = sched_slice(cfs_rq, curr); delta_exec = curr->sum_exec_runtime - curr->prev_sum_exec_runtime; if (delta_exec > ideal_runtime) { @@ -398,7 +398,7 @@ Signed-off-by: Thomas Gleixner /* * The current task ran long enough, ensure it doesn't get * re-elected due to buddy favours. -@@ -4360,7 +4360,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq +@@ -4362,7 +4362,7 @@ check_preempt_tick(struct cfs_rq *cfs_rq return; if (delta > ideal_runtime) @@ -407,7 +407,7 @@ Signed-off-by: Thomas Gleixner } static void -@@ -4502,7 +4502,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc +@@ -4504,7 +4504,7 @@ entity_tick(struct cfs_rq *cfs_rq, struc * validating it and just reschedule. */ if (queued) { @@ -416,7 +416,7 @@ Signed-off-by: Thomas Gleixner return; } /* -@@ -4686,7 +4686,7 @@ static void __account_cfs_rq_runtime(str +@@ -4688,7 +4688,7 @@ static void __account_cfs_rq_runtime(str * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -425,7 +425,7 @@ Signed-off-by: Thomas Gleixner } static __always_inline -@@ -5340,7 +5340,7 @@ static void hrtick_start_fair(struct rq +@@ -5342,7 +5342,7 @@ static void hrtick_start_fair(struct rq if (delta < 0) { if (rq->curr == p) @@ -434,7 +434,7 @@ Signed-off-by: Thomas Gleixner return; } hrtick_start(rq, delta); -@@ -6881,7 +6881,7 @@ static void check_preempt_wakeup(struct +@@ -6883,7 +6883,7 @@ static void check_preempt_wakeup(struct return; preempt: @@ -443,7 +443,7 @@ Signed-off-by: Thomas Gleixner /* * Only set the backward buddy when the current task is still * on the rq. This can happen when a wakeup gets interleaved -@@ -9967,7 +9967,7 @@ static void task_fork_fair(struct task_s +@@ -9969,7 +9969,7 @@ static void task_fork_fair(struct task_s * 'current' within the tree based on its new key value. */ swap(curr->vruntime, se->vruntime); @@ -452,7 +452,7 @@ Signed-off-by: Thomas Gleixner } se->vruntime -= cfs_rq->min_vruntime; -@@ -9991,7 +9991,7 @@ prio_changed_fair(struct rq *rq, struct +@@ -9993,7 +9993,7 @@ prio_changed_fair(struct rq *rq, struct */ if (rq->curr == p) { if (p->prio > oldprio) diff --git a/debian/patches-rt/preempt-nort-rt-variants.patch b/debian/patches-rt/preempt-nort-rt-variants.patch index e1f9bc37f..c8e3b0496 100644 --- a/debian/patches-rt/preempt-nort-rt-variants.patch +++ b/debian/patches-rt/preempt-nort-rt-variants.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 24 Jul 2009 12:38:56 +0200 Subject: preempt: Provide preempt_*_(no)rt variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/debian/patches-rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch b/debian/patches-rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch index ec4369f53..f342a74d3 100644 --- a/debian/patches-rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch +++ b/debian/patches-rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch @@ -1,7 +1,7 @@ Subject: printk: Add "force_early_printk" boot param to help with debugging From: Peter Zijlstra Date: Fri, 02 Sep 2011 14:41:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Gives me an option to screw printk and actually see what the machine says. diff --git a/debian/patches-rt/printk-kill.patch b/debian/patches-rt/printk-kill.patch index 7199c5489..60b507cd7 100644 --- a/debian/patches-rt/printk-kill.patch +++ b/debian/patches-rt/printk-kill.patch @@ -1,7 +1,7 @@ Subject: printk: Add a printk kill switch From: Ingo Molnar Date: Fri, 22 Jul 2011 17:58:40 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/printk-rt-aware.patch b/debian/patches-rt/printk-rt-aware.patch index bf4458afe..c62b41722 100644 --- a/debian/patches-rt/printk-rt-aware.patch +++ b/debian/patches-rt/printk-rt-aware.patch @@ -1,7 +1,7 @@ Subject: printk: Make rt aware From: Thomas Gleixner Date: Wed, 19 Sep 2012 14:50:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Drop the lock before calling the console driver and do not disable interrupts while printing to a serial console. diff --git a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch index 43359a829..9a1422668 100644 --- a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch +++ b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 18:21:04 +0200 Subject: ptrace: fix ptrace vs tasklist_lock race -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz As explained by Alexander Fyodorov : @@ -116,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior spin_unlock_irq(&task->sighand->siglock); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1367,6 +1367,18 @@ int migrate_swap(struct task_struct *cur +@@ -1368,6 +1368,18 @@ int migrate_swap(struct task_struct *cur return ret; } @@ -135,7 +135,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * wait_task_inactive - wait for a thread to unschedule. * -@@ -1411,7 +1423,7 @@ unsigned long wait_task_inactive(struct +@@ -1412,7 +1424,7 @@ unsigned long wait_task_inactive(struct * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -144,7 +144,7 @@ Signed-off-by: Sebastian Andrzej Siewior return 0; cpu_relax(); } -@@ -1426,7 +1438,8 @@ unsigned long wait_task_inactive(struct +@@ -1427,7 +1439,8 @@ unsigned long wait_task_inactive(struct running = task_running(rq, p); queued = task_on_rq_queued(p); ncsw = 0; diff --git a/debian/patches-rt/radix-tree-use-local-locks.patch b/debian/patches-rt/radix-tree-use-local-locks.patch index 685246ff7..7356a12c7 100644 --- a/debian/patches-rt/radix-tree-use-local-locks.patch +++ b/debian/patches-rt/radix-tree-use-local-locks.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 25 Jan 2017 16:34:27 +0100 Subject: [PATCH] radix-tree: use local locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The preload functionality uses per-CPU variables and preempt-disable to ensure that it does not switch CPUs during its usage. This patch adds diff --git a/debian/patches-rt/random-Remove-preempt-disabled-region.patch b/debian/patches-rt/random-Remove-preempt-disabled-region.patch index 02d880c12..a51590aed 100644 --- a/debian/patches-rt/random-Remove-preempt-disabled-region.patch +++ b/debian/patches-rt/random-Remove-preempt-disabled-region.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:30 -0500 Subject: [PATCH] random: Remove preempt disabled region -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz No need to keep preemption disabled across the whole function. diff --git a/debian/patches-rt/random-avoid-preempt_disable-ed-section.patch b/debian/patches-rt/random-avoid-preempt_disable-ed-section.patch index 91762b3bc..b7c578bb0 100644 --- a/debian/patches-rt/random-avoid-preempt_disable-ed-section.patch +++ b/debian/patches-rt/random-avoid-preempt_disable-ed-section.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 12 May 2017 15:46:17 +0200 Subject: [PATCH] random: avoid preempt_disable()ed section -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz extract_crng() will use sleeping locks while in a preempt_disable() section due to get_cpu_var(). diff --git a/debian/patches-rt/random-make-it-work-on-rt.patch b/debian/patches-rt/random-make-it-work-on-rt.patch index 98f37b15f..12e71ae66 100644 --- a/debian/patches-rt/random-make-it-work-on-rt.patch +++ b/debian/patches-rt/random-make-it-work-on-rt.patch @@ -1,7 +1,7 @@ Subject: random: Make it work on rt From: Thomas Gleixner Date: Tue, 21 Aug 2012 20:38:50 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq diff --git a/debian/patches-rt/rcu-Eliminate-softirq-processing-from-rcutree.patch b/debian/patches-rt/rcu-Eliminate-softirq-processing-from-rcutree.patch index 4dfac63ca..f32c3bf2e 100644 --- a/debian/patches-rt/rcu-Eliminate-softirq-processing-from-rcutree.patch +++ b/debian/patches-rt/rcu-Eliminate-softirq-processing-from-rcutree.patch @@ -1,7 +1,7 @@ From: "Paul E. McKenney" Date: Mon, 4 Nov 2013 13:21:10 -0800 Subject: rcu: Eliminate softirq processing from rcutree -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch b/debian/patches-rt/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch index 7e41f3fe9..b1ef60f20 100644 --- a/debian/patches-rt/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch +++ b/debian/patches-rt/rcu-Use-cpus_read_lock-while-looking-at-cpu_online_m.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 10 Sep 2018 14:58:37 +0200 Subject: [PATCH] rcu: Use cpus_read_lock() while looking at cpu_online_mask -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz It was possible that sync_rcu_exp_select_cpus() enqueued something on CPU0 while CPU0 was offline. Such a work item wouldn't be processed diff --git a/debian/patches-rt/rcu-disable-rcu-fast-no-hz-on-rt.patch b/debian/patches-rt/rcu-disable-rcu-fast-no-hz-on-rt.patch index e639a2b0b..37e807145 100644 --- a/debian/patches-rt/rcu-disable-rcu-fast-no-hz-on-rt.patch +++ b/debian/patches-rt/rcu-disable-rcu-fast-no-hz-on-rt.patch @@ -1,7 +1,7 @@ Subject: rcu: Disable RCU_FAST_NO_HZ on RT From: Thomas Gleixner Date: Sun, 28 Oct 2012 13:26:09 +0000 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch b/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch index 883a0c92c..10b881a65 100644 --- a/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch +++ b/debian/patches-rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch @@ -1,7 +1,7 @@ From: Julia Cartwright Date: Wed, 12 Oct 2016 11:21:14 -0500 Subject: [PATCH] rcu: enable rcu_normal_after_boot by default for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The forcing of an expedited grace period is an expensive and very RT-application unfriendly operation, as it forcibly preempts all running diff --git a/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch b/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch index 673193257..065a0cdb6 100644 --- a/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch +++ b/debian/patches-rt/rcu-make-RCU_BOOST-default-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 21 Mar 2014 20:19:05 +0100 Subject: rcu: make RCU_BOOST default on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Since it is no longer invoked from the softirq people run into OOM more often if the priority of the RCU thread is too low. Making boosting diff --git a/debian/patches-rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch b/debian/patches-rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch index 6dff2f248..55ce124b8 100644 --- a/debian/patches-rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch +++ b/debian/patches-rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch @@ -1,7 +1,7 @@ Subject: rcu: Merge RCU-bh into RCU-preempt Date: Wed, 5 Oct 2011 11:59:38 -0700 From: Thomas Gleixner -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch b/debian/patches-rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch index ff3caa4ca..b8caef691 100644 --- a/debian/patches-rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch +++ b/debian/patches-rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch @@ -1,7 +1,7 @@ Subject: ARM: Initialize split page table locks for vector page From: Frank Rowand Date: Sat, 1 Oct 2011 18:58:13 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Without this patch, ARM can not use SPLIT_PTLOCK_CPUS if PREEMPT_RT_FULL=y because vectors_user_mapping() creates a diff --git a/debian/patches-rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch b/debian/patches-rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch index e824529f3..3be4b216d 100644 --- a/debian/patches-rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch +++ b/debian/patches-rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch @@ -1,7 +1,7 @@ From: Daniel Bristot de Oliveira Date: Mon, 26 Jun 2017 17:07:15 +0200 Subject: rt: Increase/decrease the nr of migratory tasks when enabling/disabling migration -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There is a problem in the migrate_disable()/enable() implementation regarding the number of migratory tasks in the rt/dl RQs. The problem @@ -81,7 +81,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7155,6 +7155,47 @@ const u32 sched_prio_to_wmult[40] = { +@@ -7156,6 +7156,47 @@ const u32 sched_prio_to_wmult[40] = { #if defined(CONFIG_PREEMPT_COUNT) && defined(CONFIG_SMP) @@ -129,7 +129,7 @@ Signed-off-by: Sebastian Andrzej Siewior void migrate_disable(void) { struct task_struct *p = current; -@@ -7178,10 +7219,9 @@ void migrate_disable(void) +@@ -7179,10 +7220,9 @@ void migrate_disable(void) } preempt_disable(); @@ -142,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior preempt_enable(); } -@@ -7213,9 +7253,8 @@ void migrate_enable(void) +@@ -7214,9 +7254,8 @@ void migrate_enable(void) preempt_disable(); diff --git a/debian/patches-rt/rt-introduce-cpu-chill.patch b/debian/patches-rt/rt-introduce-cpu-chill.patch index fb9d3dbe3..21038496e 100644 --- a/debian/patches-rt/rt-introduce-cpu-chill.patch +++ b/debian/patches-rt/rt-introduce-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: rt: Introduce cpu_chill() From: Thomas Gleixner Date: Wed, 07 Mar 2012 20:51:03 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() diff --git a/debian/patches-rt/rt-local-irq-lock.patch b/debian/patches-rt/rt-local-irq-lock.patch index 3b341c697..b16fa32e2 100644 --- a/debian/patches-rt/rt-local-irq-lock.patch +++ b/debian/patches-rt/rt-local-irq-lock.patch @@ -1,7 +1,7 @@ Subject: rt: Add local irq locks From: Thomas Gleixner Date: Mon, 20 Jun 2011 09:03:47 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Introduce locallock. For !RT this maps to preempt_disable()/ local_irq_disable() so there is not much that changes. For RT this will diff --git a/debian/patches-rt/rt-preempt-base-config.patch b/debian/patches-rt/rt-preempt-base-config.patch index 387a3336c..6a09c9766 100644 --- a/debian/patches-rt/rt-preempt-base-config.patch +++ b/debian/patches-rt/rt-preempt-base-config.patch @@ -1,7 +1,7 @@ Subject: rt: Provide PREEMPT_RT_BASE config switch From: Thomas Gleixner Date: Fri, 17 Jun 2011 12:39:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Introduce PREEMPT_RT_BASE which enables parts of PREEMPT_RT_FULL. Forces interrupt threading and enables some of the RT diff --git a/debian/patches-rt/rt-serial-warn-fix.patch b/debian/patches-rt/rt-serial-warn-fix.patch index 55060473b..4e17d7159 100644 --- a/debian/patches-rt/rt-serial-warn-fix.patch +++ b/debian/patches-rt/rt-serial-warn-fix.patch @@ -1,7 +1,7 @@ Subject: rt: Improve the serial console PASS_LIMIT From: Ingo Molnar Date: Wed Dec 14 13:05:54 CET 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Beyond the warning: diff --git a/debian/patches-rt/rtmutex-Make-lock_killable-work.patch b/debian/patches-rt/rtmutex-Make-lock_killable-work.patch index 989afc41d..fc7685cc0 100644 --- a/debian/patches-rt/rtmutex-Make-lock_killable-work.patch +++ b/debian/patches-rt/rtmutex-Make-lock_killable-work.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sat, 1 Apr 2017 12:50:59 +0200 Subject: [PATCH] rtmutex: Make lock_killable work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Locking an rt mutex killable does not work because signal handling is restricted to TASK_INTERRUPTIBLE. diff --git a/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch b/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch index b5e5ccf82..662448754 100644 --- a/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch +++ b/debian/patches-rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:14:22 +0200 Subject: rtmutex: Provide rt_mutex_slowlock_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz This is the inner-part of rt_mutex_slowlock(), required for rwsem-rt. diff --git a/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch index 3dcb6fbdb..3abc64553 100644 --- a/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:17:03 +0200 Subject: rtmutex: add mutex implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch index 63a13cd5c..6160903bf 100644 --- a/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:18:06 +0200 Subject: rtmutex: add rwlock implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The implementation is bias-based, similar to the rwsem implementation. diff --git a/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch b/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch index fcff1ce99..bd233369c 100644 --- a/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch +++ b/debian/patches-rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:28:34 +0200 Subject: rtmutex: add rwsem implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The RT specific R/W semaphore implementation restricts the number of readers to one because a writer cannot block on multiple readers and inherit its diff --git a/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch b/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch index 753147609..20fbe3e6a 100644 --- a/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch +++ b/debian/patches-rt/rtmutex-add-sleeping-lock-implementation.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:11:19 +0200 Subject: rtmutex: add sleeping lock implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior @@ -382,7 +382,7 @@ Signed-off-by: Sebastian Andrzej Siewior +#endif --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -895,6 +895,7 @@ static struct task_struct *dup_task_stru +@@ -894,6 +894,7 @@ static struct task_struct *dup_task_stru tsk->splice_pipe = NULL; tsk->task_frag.page = NULL; tsk->wake_q.next = NULL; diff --git a/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch b/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch index 2e9679a5f..11164802a 100644 --- a/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch +++ b/debian/patches-rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 17:34:38 +0200 Subject: rtmutex: add ww_mutex addon for mutex-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- diff --git a/debian/patches-rt/rtmutex-annotate-sleeping-lock-context.patch b/debian/patches-rt/rtmutex-annotate-sleeping-lock-context.patch index 55783fb2e..909d30c13 100644 --- a/debian/patches-rt/rtmutex-annotate-sleeping-lock-context.patch +++ b/debian/patches-rt/rtmutex-annotate-sleeping-lock-context.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2017 14:25:13 +0200 Subject: [PATCH] rtmutex: annotate sleeping lock context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 @@ -240,7 +240,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7324,4 +7324,49 @@ void migrate_enable(void) +@@ -7325,4 +7325,49 @@ void migrate_enable(void) preempt_enable(); } EXPORT_SYMBOL(migrate_enable); diff --git a/debian/patches-rt/rtmutex-avoid-include-hell.patch b/debian/patches-rt/rtmutex-avoid-include-hell.patch index 867fb3bf4..f5a846ffa 100644 --- a/debian/patches-rt/rtmutex-avoid-include-hell.patch +++ b/debian/patches-rt/rtmutex-avoid-include-hell.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Avoid include hell From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:06:39 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Include only the required raw types. This avoids pulling in the complete spinlock header which in turn requires rtmutex.h at some point. diff --git a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch index a5897533b..b395e685b 100644 --- a/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch +++ b/debian/patches-rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:36:39 +0200 Subject: rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Required for lock implementation ontop of rtmutex. diff --git a/debian/patches-rt/rtmutex-futex-prepare-rt.patch b/debian/patches-rt/rtmutex-futex-prepare-rt.patch index 056ee7b4d..6658ad7a6 100644 --- a/debian/patches-rt/rtmutex-futex-prepare-rt.patch +++ b/debian/patches-rt/rtmutex-futex-prepare-rt.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Handle the various new futex race conditions From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:04:15 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz RT opens a few new interesting race conditions in the rtmutex/futex combo due to futex hash bucket lock being a 'sleeping' spinlock and diff --git a/debian/patches-rt/rtmutex-lock-killable.patch b/debian/patches-rt/rtmutex-lock-killable.patch index 8539f38b9..b993f522c 100644 --- a/debian/patches-rt/rtmutex-lock-killable.patch +++ b/debian/patches-rt/rtmutex-lock-killable.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Add rtmutex_lock_killable() From: Thomas Gleixner Date: Thu, 09 Jun 2011 11:43:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Add "killable" type to rtmutex. We need this since rtmutex are used as "normal" mutexes which do use this type. diff --git a/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch b/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch index 2444a6880..720bab4f3 100644 --- a/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch +++ b/debian/patches-rt/rtmutex-trylock-is-okay-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed 02 Dec 2015 11:34:07 +0100 Subject: rtmutex: trylock is okay on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz non-RT kernel could deadlock on rt_mutex_trylock() in softirq context. On -RT we don't run softirqs in IRQ context but in thread context so it is diff --git a/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch b/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch index 5fc242572..b68462d4d 100644 --- a/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch +++ b/debian/patches-rt/rtmutex-wire-up-RT-s-locking.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:31:14 +0200 Subject: rtmutex: wire up RT's locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches-rt/rtmutex_dont_include_rcu.patch b/debian/patches-rt/rtmutex_dont_include_rcu.patch index 194dd279b..92e203715 100644 --- a/debian/patches-rt/rtmutex_dont_include_rcu.patch +++ b/debian/patches-rt/rtmutex_dont_include_rcu.patch @@ -1,6 +1,6 @@ From: Sebastian Andrzej Siewior Subject: rbtree: don't include the rcu header -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The RCU header pulls in spinlock.h and fails due not yet defined types: diff --git a/debian/patches-rt/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch b/debian/patches-rt/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch index 3f3c5c2c7..a82205ab8 100644 --- a/debian/patches-rt/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch +++ b/debian/patches-rt/sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Sun, 19 Aug 2018 08:28:35 +0200 Subject: [PATCH] sched: Allow pinned user tasks to be awakened to the CPU they pinned -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Since commit 7af443ee16976 ("sched/core: Require cpu_active() in select_task_rq(), for user tasks") select_fallback_rq() will BUG() if diff --git a/debian/patches-rt/sched-core-Remove-get_cpu-from-sched_fork.patch b/debian/patches-rt/sched-core-Remove-get_cpu-from-sched_fork.patch index fba3d93eb..0c2b48eeb 100644 --- a/debian/patches-rt/sched-core-Remove-get_cpu-from-sched_fork.patch +++ b/debian/patches-rt/sched-core-Remove-get_cpu-from-sched_fork.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 6 Jul 2018 15:06:15 +0200 Subject: [PATCH] sched/core: Remove get_cpu() from sched_fork() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [ Upstream commit af0fffd9300b97d8875aa745bc78e2f6fdb3c1f0 ] diff --git a/debian/patches-rt/sched-delay-put-task.patch b/debian/patches-rt/sched-delay-put-task.patch index 0ae790527..1257e7319 100644 --- a/debian/patches-rt/sched-delay-put-task.patch +++ b/debian/patches-rt/sched-delay-put-task.patch @@ -1,7 +1,7 @@ Subject: sched: Move task_struct cleanup to RCU From: Thomas Gleixner Date: Tue, 31 May 2011 16:59:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz __put_task_struct() does quite some expensive work. We don't want to burden random tasks with that. @@ -54,7 +54,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -671,7 +671,9 @@ static inline void put_signal_struct(str +@@ -670,7 +670,9 @@ static inline void put_signal_struct(str if (atomic_dec_and_test(&sig->sigcnt)) free_signal_struct(sig); } @@ -65,7 +65,7 @@ Signed-off-by: Thomas Gleixner void __put_task_struct(struct task_struct *tsk) { WARN_ON(!tsk->exit_state); -@@ -688,7 +690,18 @@ void __put_task_struct(struct task_struc +@@ -687,7 +689,18 @@ void __put_task_struct(struct task_struc if (!profile_handoff_task(tsk)) free_task(tsk); } diff --git a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch index 8fff26331..f6f971260 100644 --- a/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch +++ b/debian/patches-rt/sched-disable-rt-group-sched-on-rt.patch @@ -1,7 +1,7 @@ Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:03:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Carsten reported problems when running: diff --git a/debian/patches-rt/sched-disable-ttwu-queue.patch b/debian/patches-rt/sched-disable-ttwu-queue.patch index 7da8c2a4e..b3ac7d77a 100644 --- a/debian/patches-rt/sched-disable-ttwu-queue.patch +++ b/debian/patches-rt/sched-disable-ttwu-queue.patch @@ -1,7 +1,7 @@ Subject: sched: Disable TTWU_QUEUE on RT From: Thomas Gleixner Date: Tue, 13 Sep 2011 16:42:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The queued remote wakeup mechanism can introduce rather large latencies if the number of migrated tasks is high. Disable it for RT. diff --git a/debian/patches-rt/sched-limit-nr-migrate.patch b/debian/patches-rt/sched-limit-nr-migrate.patch index d2e53bb97..c12f71572 100644 --- a/debian/patches-rt/sched-limit-nr-migrate.patch +++ b/debian/patches-rt/sched-limit-nr-migrate.patch @@ -1,7 +1,7 @@ Subject: sched: Limit the number of task migrations per batch From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:12:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. diff --git a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch index 73b9ac57b..dd8bed2d0 100644 --- a/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch +++ b/debian/patches-rt/sched-might-sleep-do-not-account-rcu-depth.patch @@ -1,7 +1,7 @@ Subject: sched: Do not account rcu_preempt_depth on RT in might_sleep() From: Thomas Gleixner Date: Tue, 07 Jun 2011 09:19:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz RT changes the rcu_preempt_depth semantics, so we cannot check for it in might_sleep(). @@ -37,7 +37,7 @@ Signed-off-by: Thomas Gleixner /* Internal to kernel */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -6181,7 +6181,7 @@ void __init sched_init(void) +@@ -6182,7 +6182,7 @@ void __init sched_init(void) #ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { diff --git a/debian/patches-rt/sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch b/debian/patches-rt/sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch new file mode 100644 index 000000000..67b62118e --- /dev/null +++ b/debian/patches-rt/sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch @@ -0,0 +1,32 @@ +From: Sebastian Andrzej Siewior +Date: Tue, 9 Oct 2018 17:34:50 +0200 +Subject: [PATCH] sched/migrate_disable: Add export_symbol_gpl for + __migrate_disabled +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz + +Jonathan reported that lttng/modules can't use __migrate_disabled(). +This function is only used by sched/core itself and the tracing +infrastructure to report the migrate counter (lttng does probably the +same). Since the rework migrate_disable() it moved from sched.h to +preempt.h and is became an exported function instead of a "static +inline" due to the header recursion of preempt vs sched. + +Since the compiler inlines the function for sched/core usage, add a +EXPORT_SYMBOL_GPL to allow the module/LTTNG usage. + +Reported-by: Jonathan Rajott +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/core.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -1035,6 +1035,7 @@ int __migrate_disabled(struct task_struc + { + return p->migrate_disable; + } ++EXPORT_SYMBOL_GPL(__migrate_disabled); + #endif + + static void __do_set_cpus_allowed_tail(struct task_struct *p, diff --git a/debian/patches-rt/sched-migrate_disable-fallback-to-preempt_disable-in.patch b/debian/patches-rt/sched-migrate_disable-fallback-to-preempt_disable-in.patch index 0554eeee1..56ce24a37 100644 --- a/debian/patches-rt/sched-migrate_disable-fallback-to-preempt_disable-in.patch +++ b/debian/patches-rt/sched-migrate_disable-fallback-to-preempt_disable-in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 5 Jul 2018 14:44:51 +0200 Subject: [PATCH] sched/migrate_disable: fallback to preempt_disable() instead barrier() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On SMP + !RT migrate_disable() is still around. It is not part of spin_lock() anymore so it has almost no users. However the futex code has a workaround for @@ -99,7 +99,7 @@ Signed-off-by: Sebastian Andrzej Siewior int __migrate_disabled(struct task_struct *p) { return p->migrate_disable; -@@ -1092,7 +1092,7 @@ static void __do_set_cpus_allowed_tail(s +@@ -1093,7 +1093,7 @@ static void __do_set_cpus_allowed_tail(s void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -108,7 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (__migrate_disabled(p)) { lockdep_assert_held(&p->pi_lock); -@@ -1165,7 +1165,7 @@ static int __set_cpus_allowed_ptr(struct +@@ -1166,7 +1166,7 @@ static int __set_cpus_allowed_ptr(struct if (cpumask_test_cpu(task_cpu(p), new_mask) || __migrate_disabled(p)) goto out; @@ -117,7 +117,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (__migrate_disabled(p)) { p->migrate_disable_update = 1; goto out; -@@ -7180,7 +7180,7 @@ const u32 sched_prio_to_wmult[40] = { +@@ -7181,7 +7181,7 @@ const u32 sched_prio_to_wmult[40] = { #undef CREATE_TRACE_POINTS @@ -126,7 +126,7 @@ Signed-off-by: Sebastian Andrzej Siewior static inline void update_nr_migratory(struct task_struct *p, long delta) -@@ -7328,45 +7328,44 @@ EXPORT_SYMBOL(migrate_enable); +@@ -7329,45 +7329,44 @@ EXPORT_SYMBOL(migrate_enable); #elif !defined(CONFIG_SMP) && defined(CONFIG_PREEMPT_RT_BASE) void migrate_disable(void) { diff --git a/debian/patches-rt/sched-mmdrop-delayed.patch b/debian/patches-rt/sched-mmdrop-delayed.patch index 368e95235..b2c7dca1c 100644 --- a/debian/patches-rt/sched-mmdrop-delayed.patch +++ b/debian/patches-rt/sched-mmdrop-delayed.patch @@ -1,7 +1,7 @@ Subject: sched: Move mmdrop to RCU on RT From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:20:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. @@ -56,7 +56,7 @@ Signed-off-by: Thomas Gleixner * @mm: The address space to pin. --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -637,6 +637,19 @@ void __mmdrop(struct mm_struct *mm) +@@ -636,6 +636,19 @@ void __mmdrop(struct mm_struct *mm) } EXPORT_SYMBOL_GPL(__mmdrop); @@ -78,7 +78,7 @@ Signed-off-by: Thomas Gleixner struct mm_struct *mm; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2752,9 +2752,13 @@ static struct rq *finish_task_switch(str +@@ -2753,9 +2753,13 @@ static struct rq *finish_task_switch(str * provided by mmdrop(), * - a sync_core for SYNC_CORE. */ @@ -93,7 +93,7 @@ Signed-off-by: Thomas Gleixner } if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) -@@ -5580,6 +5584,8 @@ void sched_setnuma(struct task_struct *p +@@ -5581,6 +5585,8 @@ void sched_setnuma(struct task_struct *p #endif /* CONFIG_NUMA_BALANCING */ #ifdef CONFIG_HOTPLUG_CPU @@ -102,7 +102,7 @@ Signed-off-by: Thomas Gleixner /* * Ensure that the idle task is using init_mm right before its CPU goes * offline. -@@ -5595,7 +5601,11 @@ void idle_task_exit(void) +@@ -5596,7 +5602,11 @@ void idle_task_exit(void) current->active_mm = &init_mm; finish_arch_post_lock_switch(); } @@ -115,7 +115,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -5912,6 +5922,10 @@ int sched_cpu_dying(unsigned int cpu) +@@ -5913,6 +5923,10 @@ int sched_cpu_dying(unsigned int cpu) update_max_interval(); nohz_balance_exit_idle(rq); hrtick_clear(rq); diff --git a/debian/patches-rt/sched-rt-mutex-wakeup.patch b/debian/patches-rt/sched-rt-mutex-wakeup.patch index 7f82cf9b1..7691ac85c 100644 --- a/debian/patches-rt/sched-rt-mutex-wakeup.patch +++ b/debian/patches-rt/sched-rt-mutex-wakeup.patch @@ -1,7 +1,7 @@ Subject: sched: Add saved_state for tasks blocked on sleeping locks From: Thomas Gleixner Date: Sat, 25 Jun 2011 09:21:04 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Spinlocks are state preserving in !RT. RT changes the state when a task gets blocked on a lock. So we need to remember the state before @@ -37,7 +37,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SMP --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2022,8 +2022,27 @@ try_to_wake_up(struct task_struct *p, un +@@ -2023,8 +2023,27 @@ try_to_wake_up(struct task_struct *p, un */ raw_spin_lock_irqsave(&p->pi_lock, flags); smp_mb__after_spinlock(); @@ -66,7 +66,7 @@ Signed-off-by: Thomas Gleixner trace_sched_waking(p); -@@ -2187,6 +2206,18 @@ int wake_up_process(struct task_struct * +@@ -2188,6 +2207,18 @@ int wake_up_process(struct task_struct * } EXPORT_SYMBOL(wake_up_process); diff --git a/debian/patches-rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch b/debian/patches-rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch index b0396b124..c1a7a4842 100644 --- a/debian/patches-rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch +++ b/debian/patches-rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Mon, 18 Mar 2013 15:12:49 -0400 Subject: sched/workqueue: Only wake up idle workers if not blocked on sleeping spin lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz In -rt, most spin_locks() turn into mutexes. One of these spin_lock conversions is performed on the workqueue gcwq->lock. When the idle @@ -24,7 +24,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3519,8 +3519,10 @@ static void __sched notrace __schedule(b +@@ -3520,8 +3520,10 @@ static void __sched notrace __schedule(b * If a worker went to sleep, notify and ask workqueue * whether it wants to wake up a task to maintain * concurrency. diff --git a/debian/patches-rt/scsi-fcoe-rt-aware.patch b/debian/patches-rt/scsi-fcoe-rt-aware.patch index 839bad417..2b3a14410 100644 --- a/debian/patches-rt/scsi-fcoe-rt-aware.patch +++ b/debian/patches-rt/scsi-fcoe-rt-aware.patch @@ -1,7 +1,7 @@ Subject: scsi/fcoe: Make RT aware. From: Thomas Gleixner Date: Sat, 12 Nov 2011 14:00:48 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. diff --git a/debian/patches-rt/seqlock-prevent-rt-starvation.patch b/debian/patches-rt/seqlock-prevent-rt-starvation.patch index 855c6f803..a3cad28cf 100644 --- a/debian/patches-rt/seqlock-prevent-rt-starvation.patch +++ b/debian/patches-rt/seqlock-prevent-rt-starvation.patch @@ -1,7 +1,7 @@ Subject: seqlock: Prevent rt starvation From: Thomas Gleixner Date: Wed, 22 Feb 2012 12:03:30 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. diff --git a/debian/patches-rt/series b/debian/patches-rt/series index 41df8ad05..1a1217951 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -45,6 +45,7 @@ irqchip-gic-v3-its-Make-its_lock-a-raw_spin_lock_t.patch 0006-ARM-configs-at91-unselect-PIT.patch irqchip-gic-v3-its-Move-pending-table-allocation-to-.patch +kthread-convert-worker-lock-to-raw-spinlock.patch ############################################################ # POSTED @@ -73,6 +74,7 @@ efi-Allow-efi-runtime.patch x86-efi-drop-task_lock-from-efi_switch_mm.patch arm64-KVM-compute_layout-before-altenates-are-applie.patch of-allocate-free-phandle-cache-outside-of-the-devtre.patch +mm-kasan-make-quarantine_lock-a-raw_spinlock_t.patch ############################################################### # Stuff broken upstream and upstream wants something different @@ -80,6 +82,7 @@ of-allocate-free-phandle-cache-outside-of-the-devtre.patch NFSv4-replace-seqcount_t-with-a-seqlock_t.patch kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch add_migrate_disable.patch +sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch # Those two should vanish soon (not use PIT during bootup) at91_dont_enable_disable_clock.patch @@ -283,6 +286,7 @@ rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch # DRIVERS SERIAL drivers-tty-fix-omap-lock-crap.patch drivers-tty-pl011-irq-disable-madness.patch +tty-serial-pl011-warning-about-uninitialized.patch rt-serial-warn-fix.patch tty-serial-8250-don-t-take-the-trylock-during-oops.patch @@ -416,6 +420,7 @@ drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch tpm_tis-fix-stall-after-iowrite-s.patch +watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch # I915 drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch diff --git a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch index ca74e90c0..a683e8ecc 100644 --- a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch +++ b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch @@ -1,7 +1,7 @@ Subject: signal: Revert ptrace preempt magic From: Thomas Gleixner Date: Wed, 21 Sep 2011 19:57:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a diff --git a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch index 9285a4d98..7c9f63d4a 100644 --- a/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/debian/patches-rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:56 -0500 Subject: signals: Allow rt tasks to cache one sigqueue struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. @@ -50,7 +50,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -1759,6 +1759,7 @@ static __latent_entropy struct task_stru +@@ -1760,6 +1760,7 @@ static __latent_entropy struct task_stru spin_lock_init(&p->alloc_lock); init_sigpending(&p->pending); diff --git a/debian/patches-rt/skbufhead-raw-lock.patch b/debian/patches-rt/skbufhead-raw-lock.patch index 54991d06c..a503b583b 100644 --- a/debian/patches-rt/skbufhead-raw-lock.patch +++ b/debian/patches-rt/skbufhead-raw-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 12 Jul 2011 15:38:34 +0200 Subject: net: Use skbufhead with raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Use the rps lock as rawlock so we can keep irq-off regions. It looks low latency. However we can't kfree() from this context therefore we defer this diff --git a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch index 4a96191ae..163d49fd8 100644 --- a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch +++ b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 15 Apr 2015 19:00:47 +0200 Subject: slub: Disable SLUB_CPU_PARTIAL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7 diff --git a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch index 22ac8836e..c7343815c 100644 --- a/debian/patches-rt/slub-enable-irqs-for-no-wait.patch +++ b/debian/patches-rt/slub-enable-irqs-for-no-wait.patch @@ -1,7 +1,7 @@ Subject: slub: Enable irqs for __GFP_WAIT From: Thomas Gleixner Date: Wed, 09 Jan 2013 12:08:15 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz SYSTEM_RUNNING might be too late for enabling interrupts. Allocations with GFP_WAIT can happen before that. So use this as an indicator. diff --git a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch index 2e79144f4..2605398d9 100644 --- a/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch +++ b/debian/patches-rt/softirq-disable-softirq-stacks-for-rt.patch @@ -1,7 +1,7 @@ Subject: softirq: Disable softirq stacks for RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 13:59:17 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Disable extra stacks for softirqs. We want to preempt softirqs and having them on special IRQ-stack does not make this easier. diff --git a/debian/patches-rt/softirq-preempt-fix-3-re.patch b/debian/patches-rt/softirq-preempt-fix-3-re.patch index 389850f4f..ae08da7d9 100644 --- a/debian/patches-rt/softirq-preempt-fix-3-re.patch +++ b/debian/patches-rt/softirq-preempt-fix-3-re.patch @@ -1,7 +1,7 @@ Subject: softirq: Check preemption after reenabling interrupts From: Thomas Gleixner Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, diff --git a/debian/patches-rt/softirq-split-locks.patch b/debian/patches-rt/softirq-split-locks.patch index 3bc79ab2c..0aa54c625 100644 --- a/debian/patches-rt/softirq-split-locks.patch +++ b/debian/patches-rt/softirq-split-locks.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 04 Oct 2012 14:20:47 +0100 Subject: softirq: Split softirq locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch b/debian/patches-rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch index c623ba452..e14839e1b 100644 --- a/debian/patches-rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch +++ b/debian/patches-rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 16:34:17 +0100 Subject: softirq: split timer softirqs out of ksoftirqd -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/spinlock-types-separate-raw.patch b/debian/patches-rt/spinlock-types-separate-raw.patch index 0fc4424cc..80263f673 100644 --- a/debian/patches-rt/spinlock-types-separate-raw.patch +++ b/debian/patches-rt/spinlock-types-separate-raw.patch @@ -1,7 +1,7 @@ Subject: spinlock: Split the lock types header From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:34:01 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Split raw_spinlock into its own file and the remaining spinlock_t into its own non-RT header. The non-RT header will be replaced later by sleeping diff --git a/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch b/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch index e0c01e18c..e0f329a7a 100644 --- a/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch +++ b/debian/patches-rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch @@ -2,7 +2,7 @@ From: Julia Cartwright Date: Mon, 7 May 2018 08:58:57 -0500 Subject: [PATCH] squashfs: make use of local lock in multi_cpu decompressor -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Currently, the squashfs multi_cpu decompressor makes use of get_cpu_ptr()/put_cpu_ptr(), which unconditionally disable preemption diff --git a/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch b/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch index 4e3519209..51b3eec0d 100644 --- a/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch +++ b/debian/patches-rt/srcu-replace-local_irqsave-with-a-locallock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 18:37:12 +0200 Subject: [PATCH] srcu: replace local_irqsave() with a locallock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There are two instances which disable interrupts in order to become a stable this_cpu_ptr() pointer. The restore part is coupled with diff --git a/debian/patches-rt/srcu-use-cpu_online-instead-custom-check.patch b/debian/patches-rt/srcu-use-cpu_online-instead-custom-check.patch index aaf78b324..0beb35740 100644 --- a/debian/patches-rt/srcu-use-cpu_online-instead-custom-check.patch +++ b/debian/patches-rt/srcu-use-cpu_online-instead-custom-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 14:43:41 +0200 Subject: [PATCH] srcu: use cpu_online() instead custom check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch index f071bf123..f98c5ad88 100644 --- a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch +++ b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Wed, 18 Feb 2015 16:05:28 +0100 Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd diff --git a/debian/patches-rt/sysfs-realtime-entry.patch b/debian/patches-rt/sysfs-realtime-entry.patch index 12dac1a9d..1f9cd9220 100644 --- a/debian/patches-rt/sysfs-realtime-entry.patch +++ b/debian/patches-rt/sysfs-realtime-entry.patch @@ -1,7 +1,7 @@ Subject: sysfs: Add /sys/kernel/realtime entry From: Clark Williams Date: Sat Jul 30 21:55:53 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/debian/patches-rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch b/debian/patches-rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch index 83687c284..4525e7f51 100644 --- a/debian/patches-rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch +++ b/debian/patches-rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch @@ -1,7 +1,7 @@ Subject: tasklet: Prevent tasklets from going into infinite spin in RT From: Ingo Molnar Date: Tue Nov 29 20:18:22 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz When CONFIG_PREEMPT_RT_FULL is enabled, tasklets run as threads, and spinlocks turn are mutexes. But this can cause issues with diff --git a/debian/patches-rt/thermal-Defer-thermal-wakups-to-threads.patch b/debian/patches-rt/thermal-Defer-thermal-wakups-to-threads.patch index a36a5a057..1a587c27b 100644 --- a/debian/patches-rt/thermal-Defer-thermal-wakups-to-threads.patch +++ b/debian/patches-rt/thermal-Defer-thermal-wakups-to-threads.patch @@ -1,7 +1,7 @@ From: Daniel Wagner Date: Tue, 17 Feb 2015 09:37:44 +0100 Subject: thermal: Defer thermal wakups to threads -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz On RT the spin lock in pkg_temp_thermal_platfrom_thermal_notify will call schedule while we run in irq context. diff --git a/debian/patches-rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch b/debian/patches-rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch index 1c29d4328..f204b6f6d 100644 --- a/debian/patches-rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch +++ b/debian/patches-rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 15 Nov 2017 17:29:51 +0100 Subject: [PATCH] time/hrtimer: avoid schedule_work() with interrupts disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz The NOHZ code tries to schedule a workqueue with interrupts disabled. Since this does not work -RT I am switching it to swork instead. diff --git a/debian/patches-rt/timekeeping-split-jiffies-lock.patch b/debian/patches-rt/timekeeping-split-jiffies-lock.patch index b03927926..fb8243a72 100644 --- a/debian/patches-rt/timekeeping-split-jiffies-lock.patch +++ b/debian/patches-rt/timekeeping-split-jiffies-lock.patch @@ -1,7 +1,7 @@ Subject: timekeeping: Split jiffies seqlock From: Thomas Gleixner Date: Thu, 14 Feb 2013 22:36:59 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so it can be taken in atomic context on RT. diff --git a/debian/patches-rt/timers-prepare-for-full-preemption.patch b/debian/patches-rt/timers-prepare-for-full-preemption.patch index 4e4acc3f7..2a5c5a2d0 100644 --- a/debian/patches-rt/timers-prepare-for-full-preemption.patch +++ b/debian/patches-rt/timers-prepare-for-full-preemption.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 Subject: timers: Prepare for full preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 @@ -145,7 +145,7 @@ Signed-off-by: Thomas Gleixner raw_spin_lock_irq(&base->lock); } } -@@ -1665,8 +1699,8 @@ static inline void __run_timers(struct t +@@ -1681,8 +1715,8 @@ static inline void __run_timers(struct t while (levels--) expire_timers(base, heads + levels); } @@ -155,7 +155,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -1924,6 +1958,9 @@ static void __init init_timer_cpu(int cp +@@ -1927,6 +1961,9 @@ static void __init init_timer_cpu(int cp base->cpu = cpu; raw_spin_lock_init(&base->lock); base->clk = jiffies; diff --git a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch index 2044208db..376c90726 100644 --- a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch +++ b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,7 +1,7 @@ From: Haris Okanovic Date: Tue, 15 Aug 2017 15:13:08 -0500 Subject: [PATCH] tpm_tis: fix stall after iowrite*()s -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. diff --git a/debian/patches-rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch b/debian/patches-rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch index 86c5aa614..462323427 100644 --- a/debian/patches-rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch +++ b/debian/patches-rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Apr 2016 16:55:02 +0200 Subject: [PATCH] tty: serial: 8250: don't take the trylock during oops -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 diff --git a/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch new file mode 100644 index 000000000..2b80c2e46 --- /dev/null +++ b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch @@ -0,0 +1,38 @@ +From: Kurt Kanzenbach +Date: Mon, 24 Sep 2018 10:29:01 +0200 +Subject: [PATCH] tty: serial: pl011: explicitly initialize the flags variable +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz + +Silence the following gcc warning: + +drivers/tty/serial/amba-pl011.c: In function ‘pl011_console_write’: +./include/linux/spinlock.h:260:3: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] + _raw_spin_unlock_irqrestore(lock, flags); \ + ^~~~~~~~~~~~~~~~~~~~~~~~~~~ +drivers/tty/serial/amba-pl011.c:2214:16: note: ‘flags’ was declared here + unsigned long flags; + ^~~~~ + +The code is correct. Thus, initializing flags to zero doesn't change the +behavior and resolves the warning. + +Signed-off-by: Kurt Kanzenbach +Signed-off-by: Sebastian Andrzej Siewior +--- + drivers/tty/serial/amba-pl011.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/drivers/tty/serial/amba-pl011.c ++++ b/drivers/tty/serial/amba-pl011.c +@@ -2211,7 +2211,7 @@ pl011_console_write(struct console *co, + { + struct uart_amba_port *uap = amba_ports[co->index]; + unsigned int old_cr = 0, new_cr; +- unsigned long flags; ++ unsigned long flags = 0; + int locked = 1; + + clk_enable(uap->clk); diff --git a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch index e9a251bbc..b36c257be 100644 --- a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch +++ b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -1,7 +1,7 @@ Subject: net: Remove preemption disabling in netif_rx() From: Priyanka Jain Date: Thu, 17 May 2012 09:35:11 +0530 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by diff --git a/debian/patches-rt/usb-do-not-disable-interrupts-in-giveback.patch b/debian/patches-rt/usb-do-not-disable-interrupts-in-giveback.patch index 592898613..992224482 100644 --- a/debian/patches-rt/usb-do-not-disable-interrupts-in-giveback.patch +++ b/debian/patches-rt/usb-do-not-disable-interrupts-in-giveback.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 8 Nov 2013 17:34:54 +0100 Subject: usb: do no disable interrupts in giveback -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet context") the USB code disables interrupts before invoking the complete diff --git a/debian/patches-rt/wait.h-include-atomic.h.patch b/debian/patches-rt/wait.h-include-atomic.h.patch index 695b6ba36..82aac7830 100644 --- a/debian/patches-rt/wait.h-include-atomic.h.patch +++ b/debian/patches-rt/wait.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 28 Oct 2013 12:19:57 +0100 Subject: wait.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz | CC init/main.o |In file included from include/linux/mmzone.h:9:0, diff --git a/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch new file mode 100644 index 000000000..3489365e2 --- /dev/null +++ b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch @@ -0,0 +1,75 @@ +From: Julia Cartwright +Date: Fri, 28 Sep 2018 21:03:51 +0000 +Subject: [PATCH] watchdog: prevent deferral of watchdogd wakeup on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz + +When PREEMPT_RT_FULL is enabled, all hrtimer expiry functions are +deferred for execution into the context of ktimersoftd unless otherwise +annotated. + +Deferring the expiry of the hrtimer used by the watchdog core, however, +is a waste, as the callback does nothing but queue a kthread work item +and wakeup watchdogd. + +It's worst then that, too: the deferral through ktimersoftd also means +that for correct behavior a user must adjust the scheduling parameters +of both watchdogd _and_ ktimersoftd, which is unnecessary and has other +side effects (like causing unrelated expiry functions to execute at +potentially elevated priority). + +Instead, mark the hrtimer used by the watchdog core as being _HARD to +allow it's execution directly from hardirq context. The work done in +this expiry function is well-bounded and minimal. + +A user still must adjust the scheduling parameters of the watchdogd +to be correct w.r.t. their application needs. + +Cc: Guenter Roeck +Reported-and-tested-by: Steffen Trumtrar +Reported-by: Tim Sander +Signed-off-by: Julia Cartwright +Acked-by: Guenter Roeck +[bigeasy: use only HRTIMER_MODE_REL_HARD] +Signed-off-by: Sebastian Andrzej Siewior +--- + drivers/watchdog/watchdog_dev.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +--- a/drivers/watchdog/watchdog_dev.c ++++ b/drivers/watchdog/watchdog_dev.c +@@ -147,7 +147,7 @@ static inline void watchdog_update_worke + ktime_t t = watchdog_next_keepalive(wdd); + + if (t > 0) +- hrtimer_start(&wd_data->timer, t, HRTIMER_MODE_REL); ++ hrtimer_start(&wd_data->timer, t, HRTIMER_MODE_REL_HARD); + } else { + hrtimer_cancel(&wd_data->timer); + } +@@ -166,7 +166,7 @@ static int __watchdog_ping(struct watchd + if (ktime_after(earliest_keepalive, now)) { + hrtimer_start(&wd_data->timer, + ktime_sub(earliest_keepalive, now), +- HRTIMER_MODE_REL); ++ HRTIMER_MODE_REL_HARD); + return 0; + } + +@@ -945,7 +945,7 @@ static int watchdog_cdev_register(struct + return -ENODEV; + + kthread_init_work(&wd_data->work, watchdog_ping_work); +- hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ hrtimer_init(&wd_data->timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); + wd_data->timer.function = watchdog_timer_expired; + + if (wdd->id == 0) { +@@ -992,7 +992,7 @@ static int watchdog_cdev_register(struct + __module_get(wdd->ops->owner); + kref_get(&wd_data->kref); + if (handle_boot_enabled) +- hrtimer_start(&wd_data->timer, 0, HRTIMER_MODE_REL); ++ hrtimer_start(&wd_data->timer, 0, HRTIMER_MODE_REL_HARD); + else + pr_info("watchdog%d running and kernel based pre-userspace handler disabled\n", + wdd->id); diff --git a/debian/patches-rt/work-queue-work-around-irqsafe-timer-optimization.patch b/debian/patches-rt/work-queue-work-around-irqsafe-timer-optimization.patch index 7b11a595c..de7a5fd5a 100644 --- a/debian/patches-rt/work-queue-work-around-irqsafe-timer-optimization.patch +++ b/debian/patches-rt/work-queue-work-around-irqsafe-timer-optimization.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Mon, 01 Jul 2013 11:02:42 +0200 Subject: workqueue: Prevent workqueue versus ata-piix livelock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/work-simple-Simple-work-queue-implemenation.patch b/debian/patches-rt/work-simple-Simple-work-queue-implemenation.patch index 0cfde959d..6ef2a0407 100644 --- a/debian/patches-rt/work-simple-Simple-work-queue-implemenation.patch +++ b/debian/patches-rt/work-simple-Simple-work-queue-implemenation.patch @@ -1,7 +1,7 @@ From: Daniel Wagner Date: Fri, 11 Jul 2014 15:26:11 +0200 Subject: work-simple: Simple work queue implemenation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Provides a framework for enqueuing callbacks from irq context PREEMPT_RT_FULL safe. The callbacks are executed in kthread context. diff --git a/debian/patches-rt/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch b/debian/patches-rt/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch index 5fef466a0..9bc1daa35 100644 --- a/debian/patches-rt/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch +++ b/debian/patches-rt/work-simple-drop-a-shit-statement-in-SWORK_EVENT_PEN.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 10 Sep 2018 18:00:31 +0200 Subject: [PATCH] work-simple: drop a shit statement in SWORK_EVENT_PENDING -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Dan Carpenter reported | smatch warnings: diff --git a/debian/patches-rt/workqueue-distangle-from-rq-lock.patch b/debian/patches-rt/workqueue-distangle-from-rq-lock.patch index 160598852..316c0f22b 100644 --- a/debian/patches-rt/workqueue-distangle-from-rq-lock.patch +++ b/debian/patches-rt/workqueue-distangle-from-rq-lock.patch @@ -22,7 +22,7 @@ Cc: Jens Axboe Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de Signed-off-by: Thomas Gleixner -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz [bigeasy: preempt_disable() around wq_worker_sleeping() by Daniel Bristot de Oliveira] @@ -35,7 +35,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1722,10 +1722,6 @@ static inline void ttwu_activate(struct +@@ -1723,10 +1723,6 @@ static inline void ttwu_activate(struct { activate_task(rq, p, en_flags); p->on_rq = TASK_ON_RQ_QUEUED; @@ -46,7 +46,7 @@ Signed-off-by: Sebastian Andrzej Siewior } /* -@@ -2166,56 +2162,6 @@ try_to_wake_up(struct task_struct *p, un +@@ -2167,56 +2163,6 @@ try_to_wake_up(struct task_struct *p, un } /** @@ -103,7 +103,7 @@ Signed-off-by: Sebastian Andrzej Siewior * wake_up_process - Wake up a specific process * @p: The process to be woken up. * -@@ -3541,21 +3487,6 @@ static void __sched notrace __schedule(b +@@ -3542,21 +3488,6 @@ static void __sched notrace __schedule(b atomic_inc(&rq->nr_iowait); delayacct_blkio_start(); } @@ -125,7 +125,7 @@ Signed-off-by: Sebastian Andrzej Siewior } switch_count = &prev->nvcsw; } -@@ -3615,6 +3546,20 @@ static inline void sched_submit_work(str +@@ -3616,6 +3547,20 @@ static inline void sched_submit_work(str { if (!tsk->state || tsk_is_pi_blocked(tsk)) return; @@ -146,7 +146,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * If we are going to sleep and we have plugged IO queued, * make sure to submit it to avoid deadlocks. -@@ -3623,6 +3568,12 @@ static inline void sched_submit_work(str +@@ -3624,6 +3569,12 @@ static inline void sched_submit_work(str blk_schedule_flush_plug(tsk); } @@ -159,7 +159,7 @@ Signed-off-by: Sebastian Andrzej Siewior asmlinkage __visible void __sched schedule(void) { struct task_struct *tsk = current; -@@ -3633,6 +3584,7 @@ asmlinkage __visible void __sched schedu +@@ -3634,6 +3585,7 @@ asmlinkage __visible void __sched schedu __schedule(false); sched_preempt_enable_no_resched(); } while (need_resched()); diff --git a/debian/patches-rt/workqueue-prevent-deadlock-stall.patch b/debian/patches-rt/workqueue-prevent-deadlock-stall.patch index 9b209d6c2..d7edfefee 100644 --- a/debian/patches-rt/workqueue-prevent-deadlock-stall.patch +++ b/debian/patches-rt/workqueue-prevent-deadlock-stall.patch @@ -1,7 +1,7 @@ Subject: workqueue: Prevent deadlock/stall on RT From: Thomas Gleixner Date: Fri, 27 Jun 2014 16:24:52 +0200 (CEST) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Austin reported a XFS deadlock/stall on RT where scheduled work gets never exececuted and tasks are waiting for each other for ever. @@ -44,7 +44,7 @@ Cc: Steven Rostedt --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -3590,9 +3590,8 @@ void __noreturn do_task_dead(void) +@@ -3591,9 +3591,8 @@ void __noreturn do_task_dead(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -55,7 +55,7 @@ Cc: Steven Rostedt /* * If a worker went to sleep, notify and ask workqueue whether * it wants to wake up a task to maintain concurrency. -@@ -3606,6 +3605,9 @@ static inline void sched_submit_work(str +@@ -3607,6 +3606,9 @@ static inline void sched_submit_work(str preempt_enable_no_resched(); } diff --git a/debian/patches-rt/workqueue-use-locallock.patch b/debian/patches-rt/workqueue-use-locallock.patch index 0f4806a28..c057cc4e1 100644 --- a/debian/patches-rt/workqueue-use-locallock.patch +++ b/debian/patches-rt/workqueue-use-locallock.patch @@ -1,7 +1,7 @@ Subject: workqueue: Use local irq lock instead of irq disable regions From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:42:26 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Use a local_irq_lock as a replacement for irq off regions. We keep the semantic of irq-off in regard to the pool->lock and remain preemptible. @@ -146,7 +146,7 @@ Signed-off-by: Thomas Gleixner } /** -@@ -2984,7 +2999,7 @@ static bool __cancel_work_timer(struct w +@@ -2999,7 +3014,7 @@ static bool __cancel_work_timer(struct w /* tell other tasks trying to grab @work to back off */ mark_work_canceling(work); @@ -155,7 +155,7 @@ Signed-off-by: Thomas Gleixner /* * This allows canceling during early boot. We know that @work -@@ -3045,10 +3060,10 @@ EXPORT_SYMBOL_GPL(cancel_work_sync); +@@ -3060,10 +3075,10 @@ EXPORT_SYMBOL_GPL(cancel_work_sync); */ bool flush_delayed_work(struct delayed_work *dwork) { @@ -168,7 +168,7 @@ Signed-off-by: Thomas Gleixner return flush_work(&dwork->work); } EXPORT_SYMBOL(flush_delayed_work); -@@ -3086,7 +3101,7 @@ static bool __cancel_work(struct work_st +@@ -3101,7 +3116,7 @@ static bool __cancel_work(struct work_st return false; set_work_pool_and_clear_pending(work, get_work_pool_id(work)); diff --git a/debian/patches-rt/workqueue-use-rcu.patch b/debian/patches-rt/workqueue-use-rcu.patch index 4441f0443..c69cbbb8f 100644 --- a/debian/patches-rt/workqueue-use-rcu.patch +++ b/debian/patches-rt/workqueue-use-rcu.patch @@ -1,7 +1,7 @@ Subject: workqueue: Use normal rcu From: Thomas Gleixner Date: Wed, 24 Jul 2013 15:26:54 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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 @@ -177,7 +177,7 @@ Signed-off-by: Thomas Gleixner } /** -@@ -2851,14 +2855,14 @@ static bool start_flush_work(struct work +@@ -2855,14 +2859,14 @@ static bool start_flush_work(struct work might_sleep(); @@ -195,7 +195,7 @@ Signed-off-by: Thomas Gleixner /* see the comment in try_to_grab_pending() with the same code */ pwq = get_work_pwq(work); if (pwq) { -@@ -2889,10 +2893,11 @@ static bool start_flush_work(struct work +@@ -2894,10 +2898,11 @@ static bool start_flush_work(struct work lock_map_acquire(&pwq->wq->lockdep_map); lock_map_release(&pwq->wq->lockdep_map); } @@ -208,7 +208,7 @@ Signed-off-by: Thomas Gleixner return false; } -@@ -3326,7 +3331,7 @@ static void rcu_free_pool(struct rcu_hea +@@ -3341,7 +3346,7 @@ static void rcu_free_pool(struct rcu_hea * put_unbound_pool - put a worker_pool * @pool: worker_pool to put * @@ -217,7 +217,7 @@ Signed-off-by: Thomas Gleixner * safe manner. get_unbound_pool() calls this function on its failure path * and this function should be able to release pools which went through, * successfully or not, init_worker_pool(). -@@ -3380,8 +3385,8 @@ static void put_unbound_pool(struct work +@@ -3395,8 +3400,8 @@ static void put_unbound_pool(struct work del_timer_sync(&pool->idle_timer); del_timer_sync(&pool->mayday_timer); @@ -228,7 +228,7 @@ Signed-off-by: Thomas Gleixner } /** -@@ -3488,14 +3493,14 @@ static void pwq_unbound_release_workfn(s +@@ -3503,14 +3508,14 @@ static void pwq_unbound_release_workfn(s put_unbound_pool(pool); mutex_unlock(&wq_pool_mutex); @@ -245,7 +245,7 @@ Signed-off-by: Thomas Gleixner } /** -@@ -4180,7 +4185,7 @@ void destroy_workqueue(struct workqueue_ +@@ -4195,7 +4200,7 @@ void destroy_workqueue(struct workqueue_ * The base ref is never dropped on per-cpu pwqs. Directly * schedule RCU free. */ @@ -254,7 +254,7 @@ Signed-off-by: Thomas Gleixner } else { /* * We're the sole accessor of @wq at this point. Directly -@@ -4290,7 +4295,8 @@ bool workqueue_congested(int cpu, struct +@@ -4305,7 +4310,8 @@ bool workqueue_congested(int cpu, struct struct pool_workqueue *pwq; bool ret; @@ -264,7 +264,7 @@ Signed-off-by: Thomas Gleixner if (cpu == WORK_CPU_UNBOUND) cpu = smp_processor_id(); -@@ -4301,7 +4307,8 @@ bool workqueue_congested(int cpu, struct +@@ -4316,7 +4322,8 @@ bool workqueue_congested(int cpu, struct pwq = unbound_pwq_by_node(wq, cpu_to_node(cpu)); ret = !list_empty(&pwq->delayed_works); @@ -274,7 +274,7 @@ Signed-off-by: Thomas Gleixner return ret; } -@@ -4327,15 +4334,15 @@ unsigned int work_busy(struct work_struc +@@ -4342,15 +4349,15 @@ unsigned int work_busy(struct work_struc if (work_pending(work)) ret |= WORK_BUSY_PENDING; @@ -294,7 +294,7 @@ Signed-off-by: Thomas Gleixner return ret; } -@@ -4519,7 +4526,7 @@ void show_workqueue_state(void) +@@ -4534,7 +4541,7 @@ void show_workqueue_state(void) unsigned long flags; int pi; @@ -303,7 +303,7 @@ Signed-off-by: Thomas Gleixner pr_info("Showing busy workqueues and worker pools:\n"); -@@ -4584,7 +4591,7 @@ void show_workqueue_state(void) +@@ -4599,7 +4606,7 @@ void show_workqueue_state(void) touch_nmi_watchdog(); } @@ -312,7 +312,7 @@ Signed-off-by: Thomas Gleixner } /* used to show worker information through /proc/PID/{comm,stat,status} */ -@@ -4971,16 +4978,16 @@ bool freeze_workqueues_busy(void) +@@ -4986,16 +4993,16 @@ bool freeze_workqueues_busy(void) * nr_active is monotonically decreasing. It's safe * to peek without lock. */ @@ -332,7 +332,7 @@ Signed-off-by: Thomas Gleixner } out_unlock: mutex_unlock(&wq_pool_mutex); -@@ -5175,7 +5182,8 @@ static ssize_t wq_pool_ids_show(struct d +@@ -5190,7 +5197,8 @@ static ssize_t wq_pool_ids_show(struct d const char *delim = ""; int node, written = 0; @@ -342,7 +342,7 @@ Signed-off-by: Thomas Gleixner for_each_node(node) { written += scnprintf(buf + written, PAGE_SIZE - written, "%s%d:%d", delim, node, -@@ -5183,7 +5191,8 @@ static ssize_t wq_pool_ids_show(struct d +@@ -5198,7 +5206,8 @@ static ssize_t wq_pool_ids_show(struct d delim = " "; } written += scnprintf(buf + written, PAGE_SIZE - written, "\n"); diff --git a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch index a1ca156c1..19fb9e59c 100644 --- a/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch +++ b/debian/patches-rt/x86-crypto-reduce-preempt-disabled-regions.patch @@ -1,7 +1,7 @@ Subject: x86: crypto: Reduce preempt disabled regions From: Peter Zijlstra Date: Mon, 14 Nov 2011 18:19:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/debian/patches-rt/x86-efi-drop-task_lock-from-efi_switch_mm.patch b/debian/patches-rt/x86-efi-drop-task_lock-from-efi_switch_mm.patch index c40150476..564e21d4d 100644 --- a/debian/patches-rt/x86-efi-drop-task_lock-from-efi_switch_mm.patch +++ b/debian/patches-rt/x86-efi-drop-task_lock-from-efi_switch_mm.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 24 Jul 2018 14:48:55 +0200 Subject: [PATCH] x86/efi: drop task_lock() from efi_switch_mm() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz 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/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch b/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch index 6eb5221e2..95f892891 100644 --- a/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch +++ b/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 17:09:55 +0100 Subject: x86/highmem: Add a "already used pte" check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz This is a copy from kmap_atomic_prot(). diff --git a/debian/patches-rt/x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch b/debian/patches-rt/x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch index 920336f1a..87b074e39 100644 --- a/debian/patches-rt/x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch +++ b/debian/patches-rt/x86-ioapic-Don-t-let-setaffinity-unmask-threaded-EOI.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Tue, 17 Jul 2018 18:25:31 +0200 Subject: [PATCH] x86/ioapic: Don't let setaffinity unmask threaded EOI interrupt too early -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz There is an issue with threaded interrupts which are marked ONESHOT and using the fasteoi handler. diff --git a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch index 0b4a2d772..2a7a040ce 100644 --- a/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch +++ b/debian/patches-rt/x86-kvm-require-const-tsc-for-rt.patch @@ -1,7 +1,7 @@ Subject: x86: kvm Require const tsc for RT From: Thomas Gleixner Date: Sun, 06 Nov 2011 12:26:18 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds @@ -15,7 +15,7 @@ Signed-off-by: Thomas Gleixner --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c -@@ -6597,6 +6597,13 @@ int kvm_arch_init(void *opaque) +@@ -6605,6 +6605,13 @@ int kvm_arch_init(void *opaque) goto out; } diff --git a/debian/patches-rt/x86-preempt-lazy.patch b/debian/patches-rt/x86-preempt-lazy.patch index b5aaf316c..e9d0930ab 100644 --- a/debian/patches-rt/x86-preempt-lazy.patch +++ b/debian/patches-rt/x86-preempt-lazy.patch @@ -1,7 +1,7 @@ Subject: x86: Support for lazy preemption From: Thomas Gleixner Date: Thu, 01 Nov 2012 11:03:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Implement the x86 pieces for lazy preempt. @@ -77,7 +77,7 @@ Signed-off-by: Thomas Gleixner --- a/arch/x86/entry/entry_64.S +++ b/arch/x86/entry/entry_64.S @@ -704,7 +704,23 @@ GLOBAL(swapgs_restore_regs_and_return_to - bt $9, EFLAGS(%rsp) /* were interrupts off? */ + btl $9, EFLAGS(%rsp) /* were interrupts off? */ jnc 1f 0: cmpl $0, PER_CPU_VAR(__preempt_count) +#ifndef CONFIG_PREEMPT_LAZY @@ -93,7 +93,7 @@ Signed-off-by: Thomas Gleixner + cmpl $0, TASK_TI_preempt_lazy_count(%rcx) + jnz 1f + -+ bt $TIF_NEED_RESCHED_LAZY,TASK_TI_flags(%rcx) ++ btl $TIF_NEED_RESCHED_LAZY,TASK_TI_flags(%rcx) + jnc 1f +do_preempt_schedule_irq: +#endif diff --git a/debian/patches-rt/x86-signal-delay-calling-signals-on-32bit.patch b/debian/patches-rt/x86-signal-delay-calling-signals-on-32bit.patch index 5e2e9e2ad..206dc4cb2 100644 --- a/debian/patches-rt/x86-signal-delay-calling-signals-on-32bit.patch +++ b/debian/patches-rt/x86-signal-delay-calling-signals-on-32bit.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Thu, 10 Dec 2015 10:58:51 -0800 Subject: x86/signal: delay calling signals on 32bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz When running some ptrace single step tests on x86-32 machine, the below problem is triggered: diff --git a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch index 64ab72689..d91c98857 100644 --- a/debian/patches-rt/x86-stackprot-no-random-on-rt.patch +++ b/debian/patches-rt/x86-stackprot-no-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 16 Dec 2010 14:25:18 +0100 Subject: x86: stackprotector: Avoid random pool on rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep diff --git a/debian/patches-rt/x86-use-gen-rwsem-spinlocks-rt.patch b/debian/patches-rt/x86-use-gen-rwsem-spinlocks-rt.patch index 516aa5ce3..2a5f02c69 100644 --- a/debian/patches-rt/x86-use-gen-rwsem-spinlocks-rt.patch +++ b/debian/patches-rt/x86-use-gen-rwsem-spinlocks-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 26 Jul 2009 02:21:32 +0200 Subject: x86: Use generic rwsem_spinlocks on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.7-rt5.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.18/older/patches-4.18.12-rt7.tar.xz Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt.