From b6800da4de986ccf34ad668fd19cb3d3357e61bf Mon Sep 17 00:00:00 2001 From: Romain Perier Date: Mon, 30 Sep 2019 16:10:02 +0200 Subject: [PATCH] [rt] Update to 5.2.17-rt9 --- debian/changelog | 6 + ...d-zone-lock-while-freeing-pages-from.patch | 8 +- ..._ONCE-to-access-timer-base-in-hrimer.patch | 2 +- ...add-printk-ring-buffer-documentation.patch | 2 +- ...d-zone-lock-while-freeing-pages-from.patch | 18 +- ...ab-the-expiry-lock-for-non-soft-hrti.patch | 2 +- ...-printk-rb-add-prb-locking-functions.patch | 2 +- ...using-hrtimer_grab_expiry_lock-on-mi.patch | 2 +- ...B-change-list_lock-to-raw_spinlock_t.patch | 2 +- ...e-ring-buffer-struct-and-initializer.patch | 2 +- ...ving-back-empty-slubs-to-IRQ-enabled.patch | 2 +- .../0004-printk-rb-add-writer-interface.patch | 2 +- ...basic-non-blocking-reading-interface.patch | 2 +- ...rintk-rb-add-blocking-reader-support.patch | 2 +- ...add-functionality-required-by-printk.patch | 2 +- ...8-printk-add-ring-buffer-and-kthread.patch | 2 +- ...printk-remove-exclusive-console-hack.patch | 2 +- ...edirect-emit-store-to-new-ringbuffer.patch | 2 +- ...-printk_safe-remove-printk-safe-code.patch | 2 +- ...imize-console-locking-implementation.patch | 2 +- .../0013-printk-track-seq-per-console.patch | 2 +- ...-boot_delay_msec-inside-printk_delay.patch | 2 +- ...rintk-print-history-for-new-consoles.patch | 2 +- ...016-printk-implement-CON_PRINTBUFFER.patch | 2 +- ...rintk-add-processor-number-to-output.patch | 2 +- ...8-console-add-write_atomic-interface.patch | 2 +- ...-printk-introduce-emergency-messages.patch | 2 +- ...0-serial-8250-implement-write_atomic.patch | 2 +- .../0021-printk-implement-KERN_CONT.patch | 2 +- .../0022-printk-implement-dev-kmsg.patch | 2 +- .../0023-printk-implement-syslog.patch | 2 +- .../0024-printk-implement-kmsg_dump.patch | 2 +- .../0025-printk-remove-unused-code.patch | 2 +- ...n-translation-section-permission-fau.patch | 2 +- ...mbus-include-header-for-get_irq_regs.patch | 2 +- ...t-the-timer-expire-in-hardirq-contex.patch | 2 +- ...wngrade-preempt_disable-d-region-to-.patch | 2 +- ...-replace-seqcount_t-with-a-seqlock_t.patch | 10 +- debian/patches-rt/add_migrate_disable.patch | 2 +- ...-a-locallock-instead-preempt_disable.patch | 2 +- .../arch-arm64-Add-lazy-preempt-support.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-imx6-cpuidle-Use-raw_spinlock_t.patch | 2 +- ...arm-include-definition-for-cpumask_t.patch | 2 +- .../patches-rt/arm-preempt-lazy-support.patch | 2 +- .../patches-rt/arm-remove-printk_nmi_.patch | 2 +- ...e_layout-before-altenates-are-applie.patch | 2 +- ...-preemp_disable-in-addition-to-local.patch | 2 +- ...eck-preemption-level-before-looking-.patch | 2 +- .../arm64-preempt-Fixup-lazy-preempt.patch | 2 +- .../at91_dont_enable_disable_clock.patch | 2 +- ...e-blk_queue_usage_counter_release-in.patch | 2 +- ...k-mq-don-t-complete-requests-via-IPI.patch | 2 +- .../block-mq-drop-preempt-disable.patch | 2 +- .../patches-rt/block-mq-use-cpu_light.patch | 2 +- debian/patches-rt/block-use-cpu-chill.patch | 2 +- ...irqsave-in-cgroup_rstat_flush_locked.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 +- debian/patches-rt/debugobjects-rt.patch | 2 +- ...lock_t-instread-disabling-preemption.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 +- ...isable-interrupts-for-intel_engine_b.patch | 116 +++++++++++ ...isable-interrupts-independently-of-t.patch | 2 +- .../drm-i915-Drop-the-IRQ-off-asserts.patch | 46 +++++ .../drm-i915-disable-tracing-on-RT.patch | 2 +- ...M_I915_LOW_LEVEL_TRACEPOINTS-with-NO.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 | 2 +- ...e-preemption-on-i_dir_seq-s-write-si.patch | 2 +- ...cache-use-cpu-chill-in-trylock-loops.patch | 2 +- ...use-swait_queue-instead-of-waitqueue.patch | 2 +- .../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 +- ...futex-Delay-deallocation-of-pi_state.patch | 2 +- ...-Make-the-futex_hash_bucket-lock-raw.patch | 2 +- .../genirq-disable-irqpoll-on-rt.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 +- ...ssing-bracket-and-hide-migration_bas.patch | 2 +- .../hrtimer-Introduce-expiry-spin-lock.patch | 2 +- ...-by-default-into-the-softirq-context.patch | 6 +- ...ate-hrtimer_init-hrtimer_init_sleepe.patch | 2 +- ...te-change-before-hrtimer_cancel-in-d.patch | 2 +- .../i2c-exynos5-Remove-IRQF_ONESHOT.patch | 2 +- .../i2c-hix5hd2-Remove-IRQF_ONESHOT.patch | 2 +- ...-push_most_work_into_softirq_context.patch | 4 +- debian/patches-rt/jump-label-rt.patch | 2 +- .../kconfig-disable-a-few-options-rt.patch | 2 +- .../patches-rt/kconfig-preempt-rt-full.patch | 2 +- ...vide-a-pointer-to-the-valid-CPU-mask.patch | 30 +-- ...e-stack-kprobe-clean-up-to-__put_tas.patch | 4 +- ...-kmemleak_lock-to-raw-spinlock-on-RT.patch | 2 +- ...ds-trigger-disable-CPU-trigger-on-RT.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 +- ...Don-t-complain-about-incorrect-name-.patch | 2 +- ...ure-Do-NOT-include-rwlock.h-directly.patch | 2 +- ...utex-Flush-block-plug-on-__down_read.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 | 2 +- .../mips-disable-highmem-on-rt.patch | 2 +- .../mm-convert-swap-to-percpu-locked.patch | 4 +- debian/patches-rt/mm-disable-sloub-rt.patch | 2 +- debian/patches-rt/mm-enable-slub.patch | 2 +- .../patches-rt/mm-make-vmstat-rt-aware.patch | 2 +- ...n-t-call-schedule_work_on-in-preempt.patch | 6 +- .../mm-memcontrol-do_not_disable_irq.patch | 16 +- ...page_alloc-rt-friendly-per-cpu-pages.patch | 36 ++-- ...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 +- ...place-IRQ-off-check-with-a-lockdep-a.patch | 2 +- ...disable-preemption-in-zswap_frontswa.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 | 6 +- ...Qdisc-use-a-seqlock-instead-seqcount.patch | 6 +- ...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 | 4 +- ...ake-qdisc-s-busylock-in-__dev_xmit_s.patch | 4 +- ...ble-xt-write-recseq-begin-rt-fallout.patch | 2 +- .../net-make-devnet_rename_seq-a-mutex.patch | 2 +- ...activate_many-use-msleep-1-instead-o.patch | 4 +- debian/patches-rt/net-use-cpu-chill.patch | 2 +- .../net_disable_NET_RX_BUSY_POLL.patch | 2 +- ...-phandle-cache-outside-of-the-devtre.patch | 2 +- debian/patches-rt/oleg-signal-rt-fix.patch | 2 +- .../panic-disable-random-on-rt.patch | 2 +- ...ec-Don-t-use-completion-s-wait-queue.patch | 2 +- ...de-irqflags.h-for-raw_local_irq_save.patch | 2 +- .../patches-rt/pid.h-include-atomic.h.patch | 2 +- ...lock-expiry-lock-in-the-early-return.patch | 32 +++ .../patches-rt/posix-timers-expiry-lock.patch | 2 +- .../posix-timers-move-rcu-out-of-union.patch | 2 +- ...timers-thread-posix-cpu-timers-on-rt.patch | 4 +- .../power-disable-highmem-on-rt.patch | 2 +- ...ble-in-kernel-MPIC-emulation-for-PRE.patch | 2 +- .../powerpc-preempt-lazy-support.patch | 2 +- ...mmu-Use-a-locallock-instead-local_ir.patch | 2 +- ...tector-work-around-stack-guard-init-.patch | 2 +- debian/patches-rt/preempt-lazy-support.patch | 39 ++-- .../patches-rt/preempt-nort-rt-variants.patch | 2 +- ...msg-llseek-reset-clear-if-it-is-lost.patch | 2 +- ...ead-Return-EPIPE-when-the-first-mess.patch | 44 ++++ .../printk-kmsg_dump-remove-mutex-usage.patch | 2 +- ...ly-allow-kernel-to-emergency-message.patch | 2 +- ...-print-rate-limitted-message-as-info.patch | 2 +- ...red-to-default-loglevel-enforce-mask.patch | 2 +- ...ace-fix-ptrace-vs-tasklist_lock-race.patch | 8 +- .../radix-tree-use-local-locks.patch | 2 +- .../random-make-it-work-on-rt.patch | 2 +- ...-Acquire-RCU-lock-when-disabling-BHs.patch | 57 ++++++ ...nate-softirq-processing-from-rcutree.patch | 2 +- ...rcuc-threads-on-PREEMPT_RT-as-we-did.patch | 30 +++ ..._normal_after_boot-by-default-for-RT.patch | 2 +- .../rcu-make-RCU_BOOST-default-on-RT.patch | 2 +- ...-problematic-critical-section-nestin.patch | 189 ++++++++++++++++++ ...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 | 4 +- 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 | 2 +- ...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 +- 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 +- ...Remove-dead-__migrate_disabled-check.patch | 30 +++ ..._allowed_ptr-Check-cpus_mask-not-cpu.patch | 30 +++ ...-Fix-a-lockup-in-wait_for_completion.patch | 2 +- ...nsure-inactive_timer-runs-in-hardirq.patch | 2 +- debian/patches-rt/sched-delay-put-task.patch | 2 +- .../sched-disable-rt-group-sched-on-rt.patch | 2 +- .../patches-rt/sched-disable-ttwu-queue.patch | 2 +- ...air-Make-the-hrtimers-non-hard-again.patch | 4 +- .../patches-rt/sched-limit-nr-migrate.patch | 2 +- ...might-sleep-do-not-account-rcu-depth.patch | 4 +- ...e-disable-Protect-cpus_ptr-with-lock.patch | 38 ++++ ...s-enable-Use-sleeping_lock-to-annota.patch | 47 +++++ ...sable-Add-export_symbol_gpl-for-__mi.patch | 2 +- ...sable-fallback-to-preempt_disable-in.patch | 19 +- debian/patches-rt/sched-mmdrop-delayed.patch | 10 +- debian/patches-rt/sched-rt-mutex-wakeup.patch | 6 +- ...sched-swait-Add-swait_event_lock_irq.patch | 2 +- debian/patches-rt/scsi-fcoe-rt-aware.patch | 2 +- .../seqlock-prevent-rt-starvation.patch | 2 +- ...rt-symbols-which-are-used-by-symbols.patch | 2 +- ...ve-that-trylock-in-serial8250_consol.patch | 2 +- debian/patches-rt/series | 11 + .../signal-revert-ptrace-preempt-magic.patch | 2 +- ...t-tasks-to-cache-one-sigqueue-struct.patch | 2 +- debian/patches-rt/skbufhead-raw-lock.patch | 16 +- .../slub-disable-SLUB_CPU_PARTIAL.patch | 2 +- .../slub-enable-irqs-for-no-wait.patch | 2 +- .../softirq-Add-preemptible-softirq.patch | 2 +- ...cancel-dead-lock-in-tasklet-handling.patch | 4 +- ...oftirq-disable-softirq-stacks-for-rt.patch | 2 +- .../patches-rt/softirq-preempt-fix-3-re.patch | 10 +- .../spinlock-types-separate-raw.patch | 2 +- ...e-of-local-lock-in-multi_cpu-decompr.patch | 2 +- ...place-local_irqsave-with-a-locallock.patch | 2 +- ...vc_xprt_do_enqueue-use-get_cpu_light.patch | 2 +- debian/patches-rt/sysfs-realtime-entry.patch | 2 +- ...temp-make-pkg_temp_lock-a-raw-spinlo.patch | 2 +- .../timekeeping-split-jiffies-lock.patch | 2 +- ...iry-lock-after-each-timer-invocation.patch | 2 +- .../timers-Introduce-expiry-spin-lock.patch | 2 +- .../timers-prepare-for-full-preemption.patch | 2 +- .../tpm-remove-tpm_dev_wq_lock.patch | 2 +- .../tpm_tis-fix-stall-after-iowrite-s.patch | 2 +- ...al-pl011-warning-about-uninitialized.patch | 2 +- ...ove-preemption-disabling-in-netif_rx.patch | 6 +- .../patches-rt/wait.h-include-atomic.h.patch | 2 +- ...t-deferral-of-watchdogd-wakeup-on-RT.patch | 2 +- ...kqueue-Convert-the-locks-to-raw-type.patch | 2 +- ...lloc-apply-free_workqueue_attrs-stat.patch | 2 +- ...-GPF-argument-from-alloc_workqueue_a.patch | 2 +- .../x86-Disable-HAVE_ARCH_JUMP_LABEL.patch | 2 +- ...ypto-reduce-preempt-disabled-regions.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 +- ...tialize-the-context-lock-for-init_mm.patch | 2 +- ...k-preemption-level-before-looking-at.patch | 2 +- debian/patches-rt/x86-preempt-lazy.patch | 2 +- ...ignal-delay-calling-signals-on-32bit.patch | 2 +- .../x86-stackprot-no-random-on-rt.patch | 2 +- 276 files changed, 1067 insertions(+), 397 deletions(-) create mode 100644 debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch create mode 100644 debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch create mode 100644 debian/patches-rt/posix-timers-Unlock-expiry-lock-in-the-early-return.patch create mode 100644 debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch create mode 100644 debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch create mode 100644 debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch create mode 100644 debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch create mode 100644 debian/patches-rt/sched-Remove-dead-__migrate_disabled-check.patch create mode 100644 debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch create mode 100644 debian/patches-rt/sched-migrate-disable-Protect-cpus_ptr-with-lock.patch create mode 100644 debian/patches-rt/sched-migrate_dis-enable-Use-sleeping_lock-to-annota.patch diff --git a/debian/changelog b/debian/changelog index 09746c1fe747..f67b0d1fcd6c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux (5.2.17-2) UNRELEASED; urgency=medium + + * [rt] Update to 5.2.17-rt9 + + -- Romain Perier Mon, 30 Sep 2019 16:09:14 +0200 + linux (5.2.17-1) unstable; urgency=medium * New upstream stable update: 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 594f43481318..99315d5cf2c0 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. @@ -109,7 +109,7 @@ Signed-off-by: Sebastian Andrzej Siewior } static void free_one_page(struct zone *zone, -@@ -2724,13 +2731,18 @@ void drain_zone_pages(struct zone *zone, +@@ -2713,13 +2720,18 @@ void drain_zone_pages(struct zone *zone, { unsigned long flags; int to_drain, batch; @@ -129,7 +129,7 @@ Signed-off-by: Sebastian Andrzej Siewior } #endif -@@ -2746,14 +2758,21 @@ static void drain_pages_zone(unsigned in +@@ -2735,14 +2747,21 @@ static void drain_pages_zone(unsigned in unsigned long flags; struct per_cpu_pageset *pset; struct per_cpu_pages *pcp; @@ -153,7 +153,7 @@ Signed-off-by: Sebastian Andrzej Siewior } /* -@@ -2981,7 +3000,10 @@ static void free_unref_page_commit(struc +@@ -2970,7 +2989,10 @@ static void free_unref_page_commit(struc pcp->count++; if (pcp->count >= pcp->high) { unsigned long batch = READ_ONCE(pcp->batch); diff --git a/debian/patches-rt/0001-hrtimer-Use-READ_ONCE-to-access-timer-base-in-hrimer.patch b/debian/patches-rt/0001-hrtimer-Use-READ_ONCE-to-access-timer-base-in-hrimer.patch index a4f5c7fbf892..8911788e28da 100644 --- a/debian/patches-rt/0001-hrtimer-Use-READ_ONCE-to-access-timer-base-in-hrimer.patch +++ b/debian/patches-rt/0001-hrtimer-Use-READ_ONCE-to-access-timer-base-in-hrimer.patch @@ -2,7 +2,7 @@ From: Julien Grall Date: Wed, 21 Aug 2019 10:24:07 +0100 Subject: [PATCH 1/3] hrtimer: Use READ_ONCE to access timer->base in hrimer_grab_expiry_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The update to timer->base is protected by the base->cpu_base->lock(). However, hrtimer_grab_expirty_lock() does not access it with the lock. diff --git a/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch b/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch index 15f82cb9eb08..f217a40e18a2 100644 --- a/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch +++ b/debian/patches-rt/0001-printk-rb-add-printk-ring-buffer-documentation.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:39 +0100 Subject: [PATCH 01/25] printk-rb: add printk ring buffer documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The full documentation file for the printk ring buffer. 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 c8dd67f38288..85a7315dcdc2 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Split the IRQ-off section while accessing the PCP list from zone->lock while freeing pages. @@ -57,7 +57,7 @@ Signed-off-by: Sebastian Andrzej Siewior __free_one_page(page, page_to_pfn(page), zone, 0, mt); trace_mm_page_pcpu_drain(page, 0, mt); } -@@ -2742,7 +2757,7 @@ void drain_zone_pages(struct zone *zone, +@@ -2731,7 +2746,7 @@ void drain_zone_pages(struct zone *zone, local_irq_restore(flags); if (to_drain > 0) @@ -66,7 +66,7 @@ Signed-off-by: Sebastian Andrzej Siewior } #endif -@@ -2772,7 +2787,7 @@ static void drain_pages_zone(unsigned in +@@ -2761,7 +2776,7 @@ static void drain_pages_zone(unsigned in local_irq_restore(flags); if (count) @@ -75,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior } /* -@@ -2971,7 +2986,8 @@ static bool free_unref_page_prepare(stru +@@ -2960,7 +2975,8 @@ static bool free_unref_page_prepare(stru return true; } @@ -85,7 +85,7 @@ Signed-off-by: Sebastian Andrzej Siewior { struct zone *zone = page_zone(page); struct per_cpu_pages *pcp; -@@ -3000,10 +3016,8 @@ static void free_unref_page_commit(struc +@@ -2989,10 +3005,8 @@ static void free_unref_page_commit(struc pcp->count++; if (pcp->count >= pcp->high) { unsigned long batch = READ_ONCE(pcp->batch); @@ -97,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior } } -@@ -3014,13 +3028,17 @@ void free_unref_page(struct page *page) +@@ -3003,13 +3017,17 @@ void free_unref_page(struct page *page) { unsigned long flags; unsigned long pfn = page_to_pfn(page); @@ -116,7 +116,7 @@ Signed-off-by: Sebastian Andrzej Siewior } /* -@@ -3031,6 +3049,11 @@ void free_unref_page_list(struct list_he +@@ -3020,6 +3038,11 @@ void free_unref_page_list(struct list_he struct page *page, *next; unsigned long flags, pfn; int batch_count = 0; @@ -128,7 +128,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* Prepare pages for freeing */ list_for_each_entry_safe(page, next, list, lru) { -@@ -3043,10 +3066,12 @@ void free_unref_page_list(struct list_he +@@ -3032,10 +3055,12 @@ void free_unref_page_list(struct list_he local_irq_save(flags); list_for_each_entry_safe(page, next, list, lru) { unsigned long pfn = page_private(page); @@ -142,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * Guard against excessive IRQ disabled times when we get -@@ -3059,6 +3084,21 @@ void free_unref_page_list(struct list_he +@@ -3048,6 +3073,21 @@ void free_unref_page_list(struct list_he } } local_irq_restore(flags); diff --git a/debian/patches-rt/0002-hrtimer-Don-t-grab-the-expiry-lock-for-non-soft-hrti.patch b/debian/patches-rt/0002-hrtimer-Don-t-grab-the-expiry-lock-for-non-soft-hrti.patch index c3b8958a2fa9..63f20d98a53b 100644 --- a/debian/patches-rt/0002-hrtimer-Don-t-grab-the-expiry-lock-for-non-soft-hrti.patch +++ b/debian/patches-rt/0002-hrtimer-Don-t-grab-the-expiry-lock-for-non-soft-hrti.patch @@ -1,7 +1,7 @@ From: Julien Grall Date: Wed, 21 Aug 2019 10:24:08 +0100 Subject: [PATCH 2/3] hrtimer: Don't grab the expiry lock for non-soft hrtimer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Acquiring the lock in hrtimer_grab_expiry_lock() is designed for sleeping-locks and should not be used with disabled interrupts. diff --git a/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch b/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch index a6f8c08936fe..191c249760ab 100644 --- a/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch +++ b/debian/patches-rt/0002-printk-rb-add-prb-locking-functions.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:40 +0100 Subject: [PATCH 02/25] printk-rb: add prb locking functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add processor-reentrant spin locking functions. These allow restricting the number of possible contexts to 2, which can simplify diff --git a/debian/patches-rt/0003-hrtimer-Prevent-using-hrtimer_grab_expiry_lock-on-mi.patch b/debian/patches-rt/0003-hrtimer-Prevent-using-hrtimer_grab_expiry_lock-on-mi.patch index a848a620c5d0..2de1f5080b61 100644 --- a/debian/patches-rt/0003-hrtimer-Prevent-using-hrtimer_grab_expiry_lock-on-mi.patch +++ b/debian/patches-rt/0003-hrtimer-Prevent-using-hrtimer_grab_expiry_lock-on-mi.patch @@ -2,7 +2,7 @@ From: Julien Grall Date: Wed, 21 Aug 2019 10:24:09 +0100 Subject: [PATCH 3/3] hrtimer: Prevent using hrtimer_grab_expiry_lock() on migration_base -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz As tglx puts it: |If base == migration_base then there is no point to lock soft_expiry_lock 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 388ab1be7f7f..0d8834b94a00 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-printk-rb-define-ring-buffer-struct-and-initializer.patch b/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch index d50b07a4788e..7a2a6730bcc8 100644 --- a/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch +++ b/debian/patches-rt/0003-printk-rb-define-ring-buffer-struct-and-initializer.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:41 +0100 Subject: [PATCH 03/25] printk-rb: define ring buffer struct and initializer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz See Documentation/printk-ringbuffer.txt for details about the initializer arguments. 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 3a7e89289977..3d59a230bb31 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-printk-rb-add-writer-interface.patch b/debian/patches-rt/0004-printk-rb-add-writer-interface.patch index b7649d7c62cd..4117a4c9a195 100644 --- a/debian/patches-rt/0004-printk-rb-add-writer-interface.patch +++ b/debian/patches-rt/0004-printk-rb-add-writer-interface.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:42 +0100 Subject: [PATCH 04/25] printk-rb: add writer interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add the writer functions prb_reserve() and prb_commit(). These make use of processor-reentrant spin locks to limit the number of possible diff --git a/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch b/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch index 05354e5d7d91..d999b88dbfc9 100644 --- a/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch +++ b/debian/patches-rt/0005-printk-rb-add-basic-non-blocking-reading-interface.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:43 +0100 Subject: [PATCH 05/25] printk-rb: add basic non-blocking reading interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add reader iterator static declaration/initializer, dynamic initializer, and functions to iterate and retrieve ring buffer data. diff --git a/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch b/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch index 34c46e6727a7..00bdb21b7197 100644 --- a/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch +++ b/debian/patches-rt/0006-printk-rb-add-blocking-reader-support.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:44 +0100 Subject: [PATCH 06/25] printk-rb: add blocking reader support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add a blocking read function for readers. An irq_work function is used to signal the wait queue so that write notification can diff --git a/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch b/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch index dd0cf0cb4e6f..5a55f5de56dd 100644 --- a/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch +++ b/debian/patches-rt/0007-printk-rb-add-functionality-required-by-printk.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:45 +0100 Subject: [PATCH 07/25] printk-rb: add functionality required by printk -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The printk subsystem needs to be able to query the size of the ring buffer, seek to specific entries within the ring buffer, and track diff --git a/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch b/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch index 99ffdb933278..471f5a9c7e00 100644 --- a/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch +++ b/debian/patches-rt/0008-printk-add-ring-buffer-and-kthread.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:46 +0100 Subject: [PATCH 08/25] printk: add ring buffer and kthread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The printk ring buffer provides an NMI-safe interface for writing messages to a ring buffer. Using such a buffer for alleviates printk diff --git a/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch b/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch index 302ec50a3544..12aa27ef2bc7 100644 --- a/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch +++ b/debian/patches-rt/0009-printk-remove-exclusive-console-hack.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:47 +0100 Subject: [PATCH 09/25] printk: remove exclusive console hack -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz In order to support printing the printk log history when new consoles are registered, a global exclusive_console variable is diff --git a/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch b/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch index a236f8828872..9ff16c781627 100644 --- a/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch +++ b/debian/patches-rt/0010-printk-redirect-emit-store-to-new-ringbuffer.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:48 +0100 Subject: [PATCH 10/25] printk: redirect emit/store to new ringbuffer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz vprintk_emit and vprintk_store are the main functions that all printk variants eventually go through. Change these to store the message in diff --git a/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch b/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch index f991ee199516..2c59b07e72ea 100644 --- a/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch +++ b/debian/patches-rt/0011-printk_safe-remove-printk-safe-code.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:49 +0100 Subject: [PATCH 11/25] printk_safe: remove printk safe code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz vprintk variants are now NMI-safe so there is no longer a need for the "safe" calls. diff --git a/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch b/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch index fd8cf9b4531a..3510c1d16277 100644 --- a/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch +++ b/debian/patches-rt/0012-printk-minimize-console-locking-implementation.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:50 +0100 Subject: [PATCH 12/25] printk: minimize console locking implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since printing of the printk buffer is now handled by the printk kthread, minimize the console locking functions to just handle diff --git a/debian/patches-rt/0013-printk-track-seq-per-console.patch b/debian/patches-rt/0013-printk-track-seq-per-console.patch index 208ce5e84bb4..0d28978f9cc6 100644 --- a/debian/patches-rt/0013-printk-track-seq-per-console.patch +++ b/debian/patches-rt/0013-printk-track-seq-per-console.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:51 +0100 Subject: [PATCH 13/25] printk: track seq per console -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Allow each console to track which seq record was last printed. This simplifies identifying dropped records. diff --git a/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch b/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch index bd83e2184813..f1aabfa37b57 100644 --- a/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch +++ b/debian/patches-rt/0014-printk-do-boot_delay_msec-inside-printk_delay.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:52 +0100 Subject: [PATCH 14/25] printk: do boot_delay_msec inside printk_delay -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Both functions needed to be called one after the other, so just integrate boot_delay_msec into printk_delay for simplification. diff --git a/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch b/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch index 5a5ab986f75a..68ca49ca8699 100644 --- a/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch +++ b/debian/patches-rt/0015-printk-print-history-for-new-consoles.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:53 +0100 Subject: [PATCH 15/25] printk: print history for new consoles -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz When new consoles register, they currently print how many messages they have missed. However, many (or all) of those messages may still diff --git a/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch b/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch index 446e1eaf4871..1d026433a96e 100644 --- a/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch +++ b/debian/patches-rt/0016-printk-implement-CON_PRINTBUFFER.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:54 +0100 Subject: [PATCH 16/25] printk: implement CON_PRINTBUFFER -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz If the CON_PRINTBUFFER flag is not set, do not replay the history for that console. diff --git a/debian/patches-rt/0017-printk-add-processor-number-to-output.patch b/debian/patches-rt/0017-printk-add-processor-number-to-output.patch index 7430423f2f16..1d9996f077a6 100644 --- a/debian/patches-rt/0017-printk-add-processor-number-to-output.patch +++ b/debian/patches-rt/0017-printk-add-processor-number-to-output.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:55 +0100 Subject: [PATCH 17/25] printk: add processor number to output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz It can be difficult to sort printk out if multiple processors are printing simultaneously. Add the processor number to the printk diff --git a/debian/patches-rt/0018-console-add-write_atomic-interface.patch b/debian/patches-rt/0018-console-add-write_atomic-interface.patch index 1a1120fcdd0c..bdbaa69822e1 100644 --- a/debian/patches-rt/0018-console-add-write_atomic-interface.patch +++ b/debian/patches-rt/0018-console-add-write_atomic-interface.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:56 +0100 Subject: [PATCH 18/25] console: add write_atomic interface -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add a write_atomic callback to the console. This is an optional function for console drivers. The function must be atomic (including diff --git a/debian/patches-rt/0019-printk-introduce-emergency-messages.patch b/debian/patches-rt/0019-printk-introduce-emergency-messages.patch index 12fe372145f5..b7c0233bf6fb 100644 --- a/debian/patches-rt/0019-printk-introduce-emergency-messages.patch +++ b/debian/patches-rt/0019-printk-introduce-emergency-messages.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:57 +0100 Subject: [PATCH 19/25] printk: introduce emergency messages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Console messages are generally either critical or non-critical. Critical messages are messages such as crashes or sysrq output. diff --git a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch index 917cf0e48222..f4617e3a2e1f 100644 --- a/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch +++ b/debian/patches-rt/0020-serial-8250-implement-write_atomic.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:58 +0100 Subject: [PATCH 20/25] serial: 8250: implement write_atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Implement a non-sleeping NMI-safe write_atomic console function in order to support emergency printk messages. diff --git a/debian/patches-rt/0021-printk-implement-KERN_CONT.patch b/debian/patches-rt/0021-printk-implement-KERN_CONT.patch index 886b7b0ca268..02fc632e4a3b 100644 --- a/debian/patches-rt/0021-printk-implement-KERN_CONT.patch +++ b/debian/patches-rt/0021-printk-implement-KERN_CONT.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:29:59 +0100 Subject: [PATCH 21/25] printk: implement KERN_CONT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Implement KERN_CONT based on the printing CPU rather than on the printing task. As long as the KERN_CONT messages are coming from the diff --git a/debian/patches-rt/0022-printk-implement-dev-kmsg.patch b/debian/patches-rt/0022-printk-implement-dev-kmsg.patch index 1ca12151fefb..44b6b2834271 100644 --- a/debian/patches-rt/0022-printk-implement-dev-kmsg.patch +++ b/debian/patches-rt/0022-printk-implement-dev-kmsg.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:30:00 +0100 Subject: [PATCH 22/25] printk: implement /dev/kmsg -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since printk messages are now logged to a new ring buffer, update the /dev/kmsg functions to pull the messages from there. diff --git a/debian/patches-rt/0023-printk-implement-syslog.patch b/debian/patches-rt/0023-printk-implement-syslog.patch index 7a44baa23dc8..898adc5d05ce 100644 --- a/debian/patches-rt/0023-printk-implement-syslog.patch +++ b/debian/patches-rt/0023-printk-implement-syslog.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:30:01 +0100 Subject: [PATCH 23/25] printk: implement syslog -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since printk messages are now logged to a new ring buffer, update the syslog functions to pull the messages from there. diff --git a/debian/patches-rt/0024-printk-implement-kmsg_dump.patch b/debian/patches-rt/0024-printk-implement-kmsg_dump.patch index d71cf3099d7c..17a5ac306767 100644 --- a/debian/patches-rt/0024-printk-implement-kmsg_dump.patch +++ b/debian/patches-rt/0024-printk-implement-kmsg_dump.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:30:02 +0100 Subject: [PATCH 24/25] printk: implement kmsg_dump -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since printk messages are now logged to a new ring buffer, update the kmsg_dump functions to pull the messages from there. diff --git a/debian/patches-rt/0025-printk-remove-unused-code.patch b/debian/patches-rt/0025-printk-remove-unused-code.patch index b1817cbf8131..c244b7d02a21 100644 --- a/debian/patches-rt/0025-printk-remove-unused-code.patch +++ b/debian/patches-rt/0025-printk-remove-unused-code.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Tue, 12 Feb 2019 15:30:03 +0100 Subject: [PATCH 25/25] printk: remove unused code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Code relating to the safe context and anything dealing with the previous log buffer implementation is no longer in use. Remove it. diff --git a/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches-rt/ARM-enable-irq-in-translation-section-permission-fau.patch index ad9c22cb6d22..d3dfb44b4cce 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 500eda159ec3..d8ef4d85902b 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch b/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch index 5830c2ffb2bc..b7063f5cbca7 100644 --- a/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch +++ b/debian/patches-rt/KVM-arm-arm64-Let-the-timer-expire-in-hardirq-contex.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Tue, 13 Aug 2019 14:29:41 +0200 Subject: [PATCH] KVM: arm/arm64: Let the timer expire in hardirq context on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The timers are canceled from an preempt-notifier which is invoked with disabled preemption which is not allowed on PREEMPT_RT. diff --git a/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches-rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index 2ecfe50e1ea9..2446e55d8868 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e11ea923cd67..e270b7b413e3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -2914,7 +2914,7 @@ static int _nfs4_open_and_get_state(stru +@@ -2926,7 +2926,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) -@@ -2955,7 +2955,7 @@ static int _nfs4_open_and_get_state(stru +@@ -2967,7 +2967,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; } -@@ -1616,8 +1616,12 @@ static int nfs4_reclaim_open_state(struc +@@ -1633,8 +1633,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)) -@@ -1670,14 +1674,20 @@ static int nfs4_reclaim_open_state(struc +@@ -1695,14 +1699,20 @@ static int nfs4_reclaim_open_state(struc spin_lock(&sp->so_lock); goto restart; } diff --git a/debian/patches-rt/add_migrate_disable.patch b/debian/patches-rt/add_migrate_disable.patch index 1d48bb27374f..6f618be9c88c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 1544a95e13fc..17e306fdb058 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 eadc7818e8c3..70a94e1365f7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, diff --git a/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch b/debian/patches-rt/arm-disable-NEON-in-kernel-mode.patch index ed4e7a272e3d..56c08e0f982d 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2da4989750a0..99a2d388f4df 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2cab24a527d9..97afe0eeb63c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-imx6-cpuidle-Use-raw_spinlock_t.patch b/debian/patches-rt/arm-imx6-cpuidle-Use-raw_spinlock_t.patch index bb3a643475fd..fd14557cf0ce 100644 --- a/debian/patches-rt/arm-imx6-cpuidle-Use-raw_spinlock_t.patch +++ b/debian/patches-rt/arm-imx6-cpuidle-Use-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 14 May 2019 17:07:44 +0200 Subject: [PATCH] arm: imx6: cpuidle: Use raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The idle call back is invoked with disabled interrupts and requires raw_spinlock_t locks to work. 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 6d21b6c82319..3929976ae611 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz This definition gets pulled in by other files. With the (later) split of RCU and spinlock.h it won't compile anymore. diff --git a/debian/patches-rt/arm-preempt-lazy-support.patch b/debian/patches-rt/arm-preempt-lazy-support.patch index 8d62afa320cf..f5a764c8ab87 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Implement the arm pieces for lazy preempt. diff --git a/debian/patches-rt/arm-remove-printk_nmi_.patch b/debian/patches-rt/arm-remove-printk_nmi_.patch index 69d8361cddc7..580977a5fce9 100644 --- a/debian/patches-rt/arm-remove-printk_nmi_.patch +++ b/debian/patches-rt/arm-remove-printk_nmi_.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 15 Feb 2019 14:34:20 +0100 Subject: [PATCH] arm: remove printk_nmi_.*() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz It is no longer provided by the printk core code. diff --git a/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch b/debian/patches-rt/arm64-KVM-compute_layout-before-altenates-are-applie.patch index ef4fa292f2f9..2f50fa1f3db9 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 01c306d0a814..fc914a91bf07 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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/arm64-preempt-Check-preemption-level-before-looking-.patch b/debian/patches-rt/arm64-preempt-Check-preemption-level-before-looking-.patch index 76641f94ad34..19e6bb2deec8 100644 --- a/debian/patches-rt/arm64-preempt-Check-preemption-level-before-looking-.patch +++ b/debian/patches-rt/arm64-preempt-Check-preemption-level-before-looking-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Aug 2019 17:08:58 +0200 Subject: [PATCH] arm64: preempt: Check preemption level before looking at lazy-preempt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Before evaluating the lazy-preempt state it must be ensure that the preempt-count is zero. diff --git a/debian/patches-rt/arm64-preempt-Fixup-lazy-preempt.patch b/debian/patches-rt/arm64-preempt-Fixup-lazy-preempt.patch index 4fd1fbfd062a..cf1dceb0a9b8 100644 --- a/debian/patches-rt/arm64-preempt-Fixup-lazy-preempt.patch +++ b/debian/patches-rt/arm64-preempt-Fixup-lazy-preempt.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 13 Aug 2019 11:53:23 +0200 Subject: [PATCH] arm64: preempt: Fixup lazy preempt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The irq-exit assmebly checks preempt count and need-resched flag followed by lazy-preempt status. This is a bug. It should schedule if diff --git a/debian/patches-rt/at91_dont_enable_disable_clock.patch b/debian/patches-rt/at91_dont_enable_disable_clock.patch index 0ff31276f58d..1b24e75d2c85 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 40a0805b80c3..9705f2fc7994 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 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 bbd966d49cc0..da39325ce9ec 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The IPI runs in hardirq context and there are sleeping locks. Assume caches are shared and complete them on the local CPU. diff --git a/debian/patches-rt/block-mq-drop-preempt-disable.patch b/debian/patches-rt/block-mq-drop-preempt-disable.patch index ec9fca0d6504..401459684286 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. diff --git a/debian/patches-rt/block-mq-use-cpu_light.patch b/debian/patches-rt/block-mq-use-cpu_light.patch index 79e7f5c31b74..990a13788152 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 164b84bd830d..467e427fdc8c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-use-irqsave-in-cgroup_rstat_flush_locked.patch b/debian/patches-rt/cgroup-use-irqsave-in-cgroup_rstat_flush_locked.patch index ea89bbb738b9..67a433009ad6 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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/clocksource-tclib-allow-higher-clockrates.patch b/debian/patches-rt/clocksource-tclib-allow-higher-clockrates.patch index b6bb80ee84c2..09d07f8ef760 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 ab948b1a19dc..b7e55778ed47 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the @@ -300,7 +300,7 @@ Signed-off-by: Thomas Gleixner EXPORT_SYMBOL(completion_done); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7130,7 +7130,10 @@ void migrate_disable(void) +@@ -7123,7 +7123,10 @@ void migrate_disable(void) return; } #ifdef CONFIG_SCHED_DEBUG @@ -312,7 +312,7 @@ Signed-off-by: Thomas Gleixner #endif if (p->migrate_disable) { -@@ -7160,7 +7163,10 @@ void migrate_enable(void) +@@ -7153,7 +7156,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 964a8a7c98ef..fe86949a0aab 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 9a9f64499ae4..71a730f2d6d9 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 51f9af66b897..49230a771ce2 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2140f3c69cf4..b85ad5cf5d0c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 ff8a02cae65c..e2edc5470f4d 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 69e4dde1bffc..5cf67afda117 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 d080affe3a7a..43cd09b7b08f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 13379748698d..bbd5e26f16e6 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 0c142c1e23a8..935833ce8c75 100644 --- a/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch +++ b/debian/patches-rt/crypto-limit-more-FPU-enabled-sections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Those crypto drivers use SSE/AVX/… for their crypto work and in order to do so in kernel they need to enable the "FPU" in kernel mode which diff --git a/debian/patches-rt/debugobjects-rt.patch b/debian/patches-rt/debugobjects-rt.patch index 741ad6d5fc10..1658d88e183f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Avoid filling the pool / allocating memory with irqs off(). diff --git a/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch b/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch index 61eb5503aa58..ef03b75ac0d4 100644 --- a/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch +++ b/debian/patches-rt/dma-buf-Use-seqlock_t-instread-disabling-preemption.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Aug 2019 16:38:43 +0200 Subject: [PATCH] dma-buf: Use seqlock_t instread disabling preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz "dma reservation" disables preemption while acquiring the write access for "seqcount" and then may acquire a spinlock_t. 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 c02e83050cb1..f29c915f3886 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 7c8159bc5d3b..8841f827ba7a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 98b2ff6b7bb9..0a45ead46550 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 959afc15b097..2b6aadcfb896 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz In v4.7, the driver switched to percpu compression streams, disabling preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We diff --git a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch new file mode 100644 index 000000000000..a54bf1710f99 --- /dev/null +++ b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch @@ -0,0 +1,116 @@ +From: Sebastian Andrzej Siewior +Date: Wed, 25 Sep 2019 16:04:11 +0200 +Subject: [PATCH] drm/i915: Don't disable interrupts for + intel_engine_breadcrumbs_irq() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +The function intel_engine_breadcrumbs_irq() is always invoked from an interrupt +handler and for that reason it invokes (as an optimisation) only spin_lock() +for locking assuming that the interrupts are already disabled. The +function intel_engine_signal_breadcrumbs() is provided to disable +interrupts while the former function is invoked so that assumption is +also true for callers from preemptible context. + +On PREEMPT_RT local_irq_disable() really disables interrupts and this +forbids to acquire spin_lock() which becomes a sleeping spinlock. + +This is also problematic with `threadirqs' in conjunction with +irq_work. With force threading the interrupt handler, the handler is +invoked with disabled BH but with interrupts enabled. This is okay and +the lock itself is never acquired in IRQ context. This changes with +irq_work (signal_irq_work()) which _still_ invokes +intel_engine_breadcrumbs_irq() from IRQ context. Lockdep should see this +and complain. + +Acquire the locks in intel_engine_breadcrumbs_irq() with _irqsave() +suffix and let all callers invoke intel_engine_breadcrumbs_irq() +directly instead using intel_engine_signal_breadcrumbs(). + +Reported-by: Clark Williams +Signed-off-by: Sebastian Andrzej Siewior +--- + drivers/gpu/drm/i915/i915_reset.c | 2 +- + drivers/gpu/drm/i915/intel_breadcrumbs.c | 16 +++++----------- + drivers/gpu/drm/i915/intel_hangcheck.c | 2 +- + drivers/gpu/drm/i915/intel_ringbuffer.h | 1 - + 4 files changed, 7 insertions(+), 14 deletions(-) + +--- a/drivers/gpu/drm/i915/i915_reset.c ++++ b/drivers/gpu/drm/i915/i915_reset.c +@@ -804,7 +804,7 @@ static void reset_finish(struct drm_i915 + + for_each_engine(engine, i915, id) { + reset_finish_engine(engine); +- intel_engine_signal_breadcrumbs(engine); ++ intel_engine_breadcrumbs_irq(engine); + } + } + +--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c ++++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c +@@ -116,9 +116,10 @@ void intel_engine_breadcrumbs_irq(struct + const ktime_t timestamp = ktime_get(); + struct intel_context *ce, *cn; + struct list_head *pos, *next; ++ unsigned long flags; + LIST_HEAD(signal); + +- spin_lock(&b->irq_lock); ++ spin_lock_irqsave(&b->irq_lock, flags); + + if (b->irq_armed && list_empty(&b->signalers)) + __intel_breadcrumbs_disarm_irq(b); +@@ -162,7 +163,7 @@ void intel_engine_breadcrumbs_irq(struct + } + } + +- spin_unlock(&b->irq_lock); ++ spin_unlock_irqrestore(&b->irq_lock, flags); + + list_for_each_safe(pos, next, &signal) { + struct i915_request *rq = +@@ -170,21 +171,14 @@ void intel_engine_breadcrumbs_irq(struct + + __dma_fence_signal__timestamp(&rq->fence, timestamp); + +- spin_lock(&rq->lock); ++ spin_lock_irqsave(&rq->lock, flags); + __dma_fence_signal__notify(&rq->fence); +- spin_unlock(&rq->lock); ++ spin_unlock_irqrestore(&rq->lock, flags); + + i915_request_put(rq); + } + } + +-void intel_engine_signal_breadcrumbs(struct intel_engine_cs *engine) +-{ +- local_irq_disable(); +- intel_engine_breadcrumbs_irq(engine); +- local_irq_enable(); +-} +- + static void signal_irq_work(struct irq_work *work) + { + struct intel_engine_cs *engine = +--- a/drivers/gpu/drm/i915/intel_hangcheck.c ++++ b/drivers/gpu/drm/i915/intel_hangcheck.c +@@ -275,7 +275,7 @@ static void i915_hangcheck_elapsed(struc + for_each_engine(engine, dev_priv, id) { + struct hangcheck hc; + +- intel_engine_signal_breadcrumbs(engine); ++ intel_engine_breadcrumbs_irq(engine); + + hangcheck_load_sample(engine, &hc); + hangcheck_accumulate_sample(engine, &hc); +--- a/drivers/gpu/drm/i915/intel_ringbuffer.h ++++ b/drivers/gpu/drm/i915/intel_ringbuffer.h +@@ -388,7 +388,6 @@ void intel_engine_fini_breadcrumbs(struc + void intel_engine_pin_breadcrumbs_irq(struct intel_engine_cs *engine); + void intel_engine_unpin_breadcrumbs_irq(struct intel_engine_cs *engine); + +-void intel_engine_signal_breadcrumbs(struct intel_engine_cs *engine); + void intel_engine_disarm_breadcrumbs(struct intel_engine_cs *engine); + + static inline void diff --git a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch index f682e20cce36..d03217e4d454 100644 --- a/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch +++ b/debian/patches-rt/drm-i915-Don-t-disable-interrupts-independently-of-t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 10 Apr 2019 11:01:37 +0200 Subject: [PATCH] drm/i915: Don't disable interrupts independently of the lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The locks (timeline->lock and rq->lock) need to be taken with disabled interrupts. This is done in __retire_engine_request() by disabling the diff --git a/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch b/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch new file mode 100644 index 000000000000..17af1141947b --- /dev/null +++ b/debian/patches-rt/drm-i915-Drop-the-IRQ-off-asserts.patch @@ -0,0 +1,46 @@ +From: Sebastian Andrzej Siewior +Date: Thu, 26 Sep 2019 09:31:06 +0200 +Subject: [PATCH] drm/i915: Drop the IRQ-off asserts +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +The lockdep_assert_irqs_disabled() check is needless. The previous +lockdep_assert_held() check ensures that the lock is acquired and that +time lockdep also prints a warning if the interrupts are not disabled if +they have to be. +These IRQ-off asserts trigger on PREEMPT_RT because the locks become +sleeping locks and do not really disable interrupts. + +Remove lockdep_assert_irqs_disabled(). + +Reported-by: Clark Williams +Signed-off-by: Sebastian Andrzej Siewior +--- + drivers/gpu/drm/i915/intel_breadcrumbs.c | 3 --- + 1 file changed, 3 deletions(-) + +--- a/drivers/gpu/drm/i915/intel_breadcrumbs.c ++++ b/drivers/gpu/drm/i915/intel_breadcrumbs.c +@@ -101,7 +101,6 @@ static void + struct dma_fence_cb *cur, *tmp; + + lockdep_assert_held(fence->lock); +- lockdep_assert_irqs_disabled(); + + list_for_each_entry_safe(cur, tmp, &fence->cb_list, node) { + INIT_LIST_HEAD(&cur->node); +@@ -270,7 +269,6 @@ void intel_engine_fini_breadcrumbs(struc + bool i915_request_enable_breadcrumb(struct i915_request *rq) + { + lockdep_assert_held(&rq->lock); +- lockdep_assert_irqs_disabled(); + + if (test_bit(I915_FENCE_FLAG_ACTIVE, &rq->fence.flags)) { + struct intel_breadcrumbs *b = &rq->engine->breadcrumbs; +@@ -319,7 +317,6 @@ void i915_request_cancel_breadcrumb(stru + struct intel_breadcrumbs *b = &rq->engine->breadcrumbs; + + lockdep_assert_held(&rq->lock); +- lockdep_assert_irqs_disabled(); + + /* + * We must wait for b->irq_lock so that we know the interrupt handler diff --git a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch index f187c208a97c..fc788947a161 100644 --- a/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch +++ b/debian/patches-rt/drm-i915-disable-tracing-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 6 Dec 2018 09:52:20 +0100 Subject: [PATCH] drm/i915: disable tracing on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Luca Abeni reported this: | BUG: scheduling while atomic: kworker/u8:2/15203/0x00000003 diff --git a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch index b9ce1a963d43..b0eda8903e79 100644 --- a/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +++ b/debian/patches-rt/drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 19 Dec 2018 10:47:02 +0100 Subject: [PATCH] drm/i915: skip DRM_I915_LOW_LEVEL_TRACEPOINTS with NOTRACE -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The order of the header files is important. If this header file is included after tracepoint.h was included then the NOTRACE here becomes a diff --git a/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch b/debian/patches-rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch index 95bb577a30d7..73cbfb2567c1 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 16db1be70a88..0978a960ffd3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e1fcf8e0ae60..cd14028f6a6f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 31998aaca8cd..1b2e9574ff53 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 c1c6d9c355a3..d9595c8fc046 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 086ec4c9d279..379a19c54051 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 9965a8a7bb46..bd18fb8be918 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However diff --git a/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches-rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index c75ebf326271..1201ce1f7476 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is diff --git a/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch b/debian/patches-rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch index c006a19b6a18..011e31f1e670 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 1b3c45f464af..498032a37fa0 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. diff --git a/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch b/debian/patches-rt/fs-jbd-replace-bh_state-lock.patch index eab08db5f267..117b3d7cafd2 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e9b31ed96f92..dc780fb77a5a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 3d96faec08c2..d641875b9494 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 34d555a7eea1..8288facd4808 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 0e51f781e064..9a8156d613ba 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 536cfb036d20..5c286f99db18 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches-rt/futex-Delay-deallocation-of-pi_state.patch b/debian/patches-rt/futex-Delay-deallocation-of-pi_state.patch index dcef5fa176ba..507a015a3452 100644 --- a/debian/patches-rt/futex-Delay-deallocation-of-pi_state.patch +++ b/debian/patches-rt/futex-Delay-deallocation-of-pi_state.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 26 Jun 2019 13:35:36 +0200 Subject: [PATCH] futex: Delay deallocation of pi_state -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz On -RT we can't invoke kfree() in a non-preemptible context. diff --git a/debian/patches-rt/futex-Make-the-futex_hash_bucket-lock-raw.patch b/debian/patches-rt/futex-Make-the-futex_hash_bucket-lock-raw.patch index 1db036e7ebda..9a9dd403ae77 100644 --- a/debian/patches-rt/futex-Make-the-futex_hash_bucket-lock-raw.patch +++ b/debian/patches-rt/futex-Make-the-futex_hash_bucket-lock-raw.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 26 Jun 2019 11:59:44 +0200 Subject: [PATCH] futex: Make the futex_hash_bucket lock raw -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since commit 1a1fb985f2e2b ("futex: Handle early deadlock return correctly") we can deadlock while we attempt to acquire the HB lock if diff --git a/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches-rt/genirq-disable-irqpoll-on-rt.patch index ff29c09e47de..30db096a3a76 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Creates long latencies for no value diff --git a/debian/patches-rt/genirq-force-threading.patch b/debian/patches-rt/genirq-force-threading.patch index 0aa10497b19b..f692e5c9262e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 3a8fb3fcd8b6..b02cb536a0ce 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 cd834e9533b0..2b023a452157 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 dc06b29ce094..71ad8e5eba36 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -7223,6 +7223,7 @@ void migrate_disable(void) +@@ -7214,6 +7214,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; -@@ -7288,11 +7289,13 @@ void migrate_enable(void) +@@ -7279,11 +7280,13 @@ void migrate_enable(void) arg.task = p; arg.dest_cpu = dest_cpu; diff --git a/debian/patches-rt/hrtimer-Add-a-missing-bracket-and-hide-migration_bas.patch b/debian/patches-rt/hrtimer-Add-a-missing-bracket-and-hide-migration_bas.patch index 051b3653cb48..37a918c00757 100644 --- a/debian/patches-rt/hrtimer-Add-a-missing-bracket-and-hide-migration_bas.patch +++ b/debian/patches-rt/hrtimer-Add-a-missing-bracket-and-hide-migration_bas.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 4 Sep 2019 16:55:27 +0200 Subject: [PATCH] hrtimer: Add a missing bracket and hide `migration_base' on !SMP -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz [ Upstream commit 5d2295f3a93b04986d069ebeaf5b07725f9096c1 ] diff --git a/debian/patches-rt/hrtimer-Introduce-expiry-spin-lock.patch b/debian/patches-rt/hrtimer-Introduce-expiry-spin-lock.patch index 9aefe580a188..f33cfe91852c 100644 --- a/debian/patches-rt/hrtimer-Introduce-expiry-spin-lock.patch +++ b/debian/patches-rt/hrtimer-Introduce-expiry-spin-lock.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Mon, 27 May 2019 16:54:04 +0200 Subject: [PATCH] hrtimer: Introduce expiry spin lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz When deleting a hrtimer, it is possible, that the CPU has to spin, because the hrtimer is marked as running. This is done via cpu_relax() and repeating trying to 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 6c3e23c2319b..cddacda2c689 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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. @@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c -@@ -2308,7 +2308,7 @@ int kvm_create_lapic(struct kvm_vcpu *vc +@@ -2313,7 +2313,7 @@ int kvm_create_lapic(struct kvm_vcpu *vc apic->vcpu = vcpu; hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC, @@ -103,7 +103,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4999,9 +4999,9 @@ void init_cfs_bandwidth(struct cfs_bandw +@@ -5004,9 +5004,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 886e2ecd7472..7d620ef729b1 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz hrtimer_init_sleeper() calls require a prior initialisation of the hrtimer object with hrtimer_init(). Lets make the initialisation of diff --git a/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch b/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch index f7266d83cf6d..96bc0635ca00 100644 --- a/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch +++ b/debian/patches-rt/hrtimer-move-state-change-before-hrtimer_cancel-in-d.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 6 Dec 2018 10:15:13 +0100 Subject: [PATCH] hrtimer: move state change before hrtimer_cancel in do_nanosleep() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz There is a small window between setting t->task to NULL and waking the task up (which would set TASK_RUNNING). So the timer would fire, run and diff --git a/debian/patches-rt/i2c-exynos5-Remove-IRQF_ONESHOT.patch b/debian/patches-rt/i2c-exynos5-Remove-IRQF_ONESHOT.patch index 2c472fbd4ba7..a5274806514d 100644 --- a/debian/patches-rt/i2c-exynos5-Remove-IRQF_ONESHOT.patch +++ b/debian/patches-rt/i2c-exynos5-Remove-IRQF_ONESHOT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 13 Aug 2019 12:30:12 +0200 Subject: [PATCH] i2c: exynos5: Remove IRQF_ONESHOT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The drivers sets IRQF_ONESHOT and passes only a primary handler. The IRQ is masked while the primary is handler is invoked independently of diff --git a/debian/patches-rt/i2c-hix5hd2-Remove-IRQF_ONESHOT.patch b/debian/patches-rt/i2c-hix5hd2-Remove-IRQF_ONESHOT.patch index 16562e4b4796..1a38b622dba1 100644 --- a/debian/patches-rt/i2c-hix5hd2-Remove-IRQF_ONESHOT.patch +++ b/debian/patches-rt/i2c-hix5hd2-Remove-IRQF_ONESHOT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 13 Aug 2019 12:30:37 +0200 Subject: [PATCH] i2c: hix5hd2: Remove IRQF_ONESHOT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The drivers sets IRQF_ONESHOT and passes only a primary handler. The IRQ is masked while the primary is handler is invoked independently of 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 d0d6a2ad2175..d8094dafb17c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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. @@ -170,7 +170,7 @@ Signed-off-by: Sebastian Andrzej Siewior * Synchronize against the irq_work @entry, ensures the entry is not --- a/kernel/rcu/tree.c +++ b/kernel/rcu/tree.c -@@ -1074,6 +1074,7 @@ static int rcu_implicit_dynticks_qs(stru +@@ -1076,6 +1076,7 @@ static int rcu_implicit_dynticks_qs(stru !rdp->rcu_iw_pending && rdp->rcu_iw_gp_seq != rnp->gp_seq && (rnp->ffmask & rdp->grpmask)) { init_irq_work(&rdp->rcu_iw, rcu_iw_handler); diff --git a/debian/patches-rt/jump-label-rt.patch b/debian/patches-rt/jump-label-rt.patch index 04faa7ddad40..086368c23556 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 18d5aa0a40da..f836056f61b6 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 1a670c9fef18..979b8d0ae466 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Introduce the final symbol for PREEMPT_RT_FULL. 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 b95f967a1688..b155453e0e01 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -554,7 +554,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; env->dst_cpu = cpu; -@@ -5885,7 +5885,7 @@ find_idlest_group(struct sched_domain *s +@@ -5890,7 +5890,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), @@ -563,7 +563,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; local_group = cpumask_test_cpu(this_cpu, -@@ -6017,7 +6017,7 @@ find_idlest_group_cpu(struct sched_group +@@ -6022,7 +6022,7 @@ find_idlest_group_cpu(struct sched_group return cpumask_first(sched_group_span(group)); /* Traverse only the allowed CPUs */ @@ -572,7 +572,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); -@@ -6057,7 +6057,7 @@ static inline int find_idlest_cpu(struct +@@ -6062,7 +6062,7 @@ static inline int find_idlest_cpu(struct { int new_cpu = cpu; @@ -581,7 +581,7 @@ Signed-off-by: Sebastian Andrzej Siewior return prev_cpu; /* -@@ -6174,7 +6174,7 @@ static int select_idle_core(struct task_ +@@ -6179,7 +6179,7 @@ static int select_idle_core(struct task_ if (!test_idle_cores(target, false)) return -1; @@ -590,7 +590,7 @@ Signed-off-by: Sebastian Andrzej Siewior for_each_cpu_wrap(core, cpus, target) { bool idle = true; -@@ -6208,7 +6208,7 @@ static int select_idle_smt(struct task_s +@@ -6213,7 +6213,7 @@ static int select_idle_smt(struct task_s return -1; for_each_cpu(cpu, cpu_smt_mask(target)) { @@ -599,7 +599,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; if (available_idle_cpu(cpu)) return cpu; -@@ -6271,7 +6271,7 @@ static int select_idle_cpu(struct task_s +@@ -6276,7 +6276,7 @@ static int select_idle_cpu(struct task_s for_each_cpu_wrap(cpu, sched_domain_span(sd), target) { if (!--nr) return -1; @@ -608,7 +608,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; if (available_idle_cpu(cpu)) break; -@@ -6308,7 +6308,7 @@ static int select_idle_sibling(struct ta +@@ -6313,7 +6313,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) && @@ -617,7 +617,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * Replace recent_used_cpu with prev as it is a potential * candidate for the next wake: -@@ -6654,7 +6654,7 @@ static int find_energy_efficient_cpu(str +@@ -6659,7 +6659,7 @@ static int find_energy_efficient_cpu(str int max_spare_cap_cpu = -1; for_each_cpu_and(cpu, perf_domain_span(pd), sched_domain_span(sd)) { @@ -626,7 +626,7 @@ Signed-off-by: Sebastian Andrzej Siewior continue; /* Skip CPUs that will be overutilized. */ -@@ -6743,7 +6743,7 @@ select_task_rq_fair(struct task_struct * +@@ -6748,7 +6748,7 @@ select_task_rq_fair(struct task_struct * } want_affine = !wake_wide(p) && !wake_cap(p, cpu, prev_cpu) && @@ -635,7 +635,7 @@ Signed-off-by: Sebastian Andrzej Siewior } rcu_read_lock(); -@@ -7499,14 +7499,14 @@ int can_migrate_task(struct task_struct +@@ -7504,14 +7504,14 @@ int can_migrate_task(struct task_struct /* * We do not migrate tasks that are: * 1) throttled_lb_pair, or @@ -652,7 +652,7 @@ Signed-off-by: Sebastian Andrzej Siewior int cpu; schedstat_inc(p->se.statistics.nr_failed_migrations_affine); -@@ -7526,7 +7526,7 @@ int can_migrate_task(struct task_struct +@@ -7531,7 +7531,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) { @@ -661,7 +661,7 @@ Signed-off-by: Sebastian Andrzej Siewior env->flags |= LBF_DST_PINNED; env->new_dst_cpu = cpu; break; -@@ -8153,7 +8153,7 @@ static inline int check_misfit_status(st +@@ -8158,7 +8158,7 @@ static inline int check_misfit_status(st /* * Group imbalance indicates (and tries to solve) the problem where balancing @@ -670,7 +670,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. -@@ -8822,7 +8822,7 @@ static struct sched_group *find_busiest_ +@@ -8827,7 +8827,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 @@ -679,7 +679,7 @@ Signed-off-by: Sebastian Andrzej Siewior */ if (busiest->group_type == group_imbalanced) goto force_balance; -@@ -9264,7 +9264,7 @@ static int load_balance(int this_cpu, st +@@ -9269,7 +9269,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 647ab3bafdf3..ebf2e4db067a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -44,7 +44,7 @@ Signed-off-by: Sebastian Andrzej Siewior security_task_free(tsk); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2728,15 +2728,6 @@ static struct rq *finish_task_switch(str +@@ -2721,15 +2721,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/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch b/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch index 877ef99e7706..8a0ef0032359 100644 --- a/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch +++ b/debian/patches-rt/kmemleak-Turn-kmemleak_lock-to-raw-spinlock-on-RT.patch @@ -1,7 +1,7 @@ From: He Zhe Date: Wed, 19 Dec 2018 16:30:57 +0100 Subject: [PATCH] kmemleak: Turn kmemleak_lock to raw spinlock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz kmemleak_lock, as a rwlock on RT, can possibly be held in atomic context and causes the follow BUG. 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 7da8127f5ac1..1266d4147b2c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 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 c3dd826af025..1938c0b32ca7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 425e137a9975..086240430918 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 ac2a2681d0da..7a42c1d66d5e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 062bfee4a70b..0701644d330e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Signed-off-by: Thomas Gleixner --- @@ -11,4 +11,4 @@ Signed-off-by: Thomas Gleixner --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt7 ++-rt9 diff --git a/debian/patches-rt/lockdep-disable-self-test.patch b/debian/patches-rt/lockdep-disable-self-test.patch index 05969375983e..9adf49e69bfd 100644 --- a/debian/patches-rt/lockdep-disable-self-test.patch +++ b/debian/patches-rt/lockdep-disable-self-test.patch @@ -4,7 +4,7 @@ Subject: [PATCH] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 8a919d3bbece..310213ab77da 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 65da324b19be..5963aa4e3706 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 280057ba0832..e058a0ac2263 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 4380b0059ca9..68c04c95780a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-lockdep-Don-t-complain-about-incorrect-name-.patch b/debian/patches-rt/locking-lockdep-Don-t-complain-about-incorrect-name-.patch index c204550d5370..28d605fb6e44 100644 --- a/debian/patches-rt/locking-lockdep-Don-t-complain-about-incorrect-name-.patch +++ b/debian/patches-rt/locking-lockdep-Don-t-complain-about-incorrect-name-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 17 May 2019 23:22:34 +0200 Subject: [PATCH] locking/lockdep: Don't complain about incorrect name for no validate class -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz [ Upstream commit 978315462d3ea3cf6cfacd34c563ec1eb02a3aa5 ] 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 02001168d780..be0bfbeb0b13 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-Flush-block-plug-on-__down_read.patch b/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch index e50be1196ab7..091c7dc58777 100644 --- a/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch +++ b/debian/patches-rt/locking-rt-mutex-Flush-block-plug-on-__down_read.patch @@ -1,7 +1,7 @@ From: Scott Wood Date: Fri, 4 Jan 2019 15:33:21 -0500 Subject: [PATCH] locking/rt-mutex: Flush block plug on __down_read() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz __down_read() bypasses the rtmutex frontend to call rt_mutex_slowlock_locked() directly, and thus it needs to call diff --git a/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch b/debian/patches-rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch index 07cd33c3aaf6..6dd43e679a72 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 74245b2000fe..366c51406d18 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 29b5e1fe5e31..648bbb653bb2 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 ddff4c506e68..3cff171ae2d7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic diff --git a/debian/patches-rt/mips-disable-highmem-on-rt.patch b/debian/patches-rt/mips-disable-highmem-on-rt.patch index e6e6c93d1b33..eef5064a6f26 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 5d8d58e09b1e..6bf831e999d6 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Replace global locks (get_cpu + local_irq_save) with "local_locks()". Currently there is one of for "rotate" and one for "swap". @@ -53,7 +53,7 @@ Signed-off-by: Thomas Gleixner } --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -7583,8 +7583,9 @@ void __init free_area_init(unsigned long +@@ -7572,8 +7572,9 @@ void __init free_area_init(unsigned long static int page_alloc_cpu_dead(unsigned int cpu) { diff --git a/debian/patches-rt/mm-disable-sloub-rt.patch b/debian/patches-rt/mm-disable-sloub-rt.patch index ad3547ccef97..2fdf588116a3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 fc1be808639a..907653714718 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Avoid the memory allocation in IRQ section diff --git a/debian/patches-rt/mm-make-vmstat-rt-aware.patch b/debian/patches-rt/mm-make-vmstat-rt-aware.patch index 1db784afd66d..b0f2c11d70fc 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 a4e57e5c8c2c..ac750759943a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The following trace is triggered when running ltp oom test cases: @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/mm/memcontrol.c +++ b/mm/memcontrol.c -@@ -2186,7 +2186,7 @@ static void drain_all_stock(struct mem_c +@@ -2184,7 +2184,7 @@ static void drain_all_stock(struct mem_c * as well as workers from this path always operate on the local * per-cpu data. CPU up doesn't touch memcg_stock at all. */ @@ -58,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior for_each_online_cpu(cpu) { struct memcg_stock_pcp *stock = &per_cpu(memcg_stock, cpu); struct mem_cgroup *memcg; -@@ -2206,7 +2206,7 @@ static void drain_all_stock(struct mem_c +@@ -2204,7 +2204,7 @@ static void drain_all_stock(struct mem_c } css_put(&memcg->css); } 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 c493319e1650..7329c0c4e5eb 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. @@ -30,7 +30,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* Whether legacy memory+swap accounting is active */ static bool do_memsw_account(void) { -@@ -4995,12 +4998,12 @@ static int mem_cgroup_move_account(struc +@@ -5053,12 +5056,12 @@ static int mem_cgroup_move_account(struc ret = 0; @@ -45,7 +45,7 @@ Signed-off-by: Sebastian Andrzej Siewior out_unlock: unlock_page(page); out: -@@ -6114,10 +6117,10 @@ void mem_cgroup_commit_charge(struct pag +@@ -6172,10 +6175,10 @@ void mem_cgroup_commit_charge(struct pag commit_charge(page, memcg, lrucare); @@ -58,7 +58,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (do_memsw_account() && PageSwapCache(page)) { swp_entry_t entry = { .val = page_private(page) }; -@@ -6186,7 +6189,7 @@ static void uncharge_batch(const struct +@@ -6244,7 +6247,7 @@ static void uncharge_batch(const struct memcg_oom_recover(ug->memcg); } @@ -67,7 +67,7 @@ Signed-off-by: Sebastian Andrzej Siewior __mod_memcg_state(ug->memcg, MEMCG_RSS, -ug->nr_anon); __mod_memcg_state(ug->memcg, MEMCG_CACHE, -ug->nr_file); __mod_memcg_state(ug->memcg, MEMCG_RSS_HUGE, -ug->nr_huge); -@@ -6194,7 +6197,7 @@ static void uncharge_batch(const struct +@@ -6252,7 +6255,7 @@ static void uncharge_batch(const struct __count_memcg_events(ug->memcg, PGPGOUT, ug->pgpgout); __this_cpu_add(ug->memcg->vmstats_percpu->nr_page_events, nr_pages); memcg_check_events(ug->memcg, ug->dummy_page); @@ -76,7 +76,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (!mem_cgroup_is_root(ug->memcg)) css_put_many(&ug->memcg->css, nr_pages); -@@ -6357,10 +6360,10 @@ void mem_cgroup_migrate(struct page *old +@@ -6415,10 +6418,10 @@ void mem_cgroup_migrate(struct page *old commit_charge(newpage, memcg, false); @@ -89,7 +89,7 @@ Signed-off-by: Sebastian Andrzej Siewior } DEFINE_STATIC_KEY_FALSE(memcg_sockets_enabled_key); -@@ -6552,6 +6555,7 @@ void mem_cgroup_swapout(struct page *pag +@@ -6610,6 +6613,7 @@ void mem_cgroup_swapout(struct page *pag struct mem_cgroup *memcg, *swap_memcg; unsigned int nr_entries; unsigned short oldid; @@ -97,7 +97,7 @@ Signed-off-by: Sebastian Andrzej Siewior VM_BUG_ON_PAGE(PageLRU(page), page); VM_BUG_ON_PAGE(page_count(page), page); -@@ -6597,13 +6601,17 @@ void mem_cgroup_swapout(struct page *pag +@@ -6655,13 +6659,17 @@ void mem_cgroup_swapout(struct page *pag * important here to have the interrupts disabled because it is the * only synchronisation we have for updating the per-CPU variables. */ 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 a35ca5db50ab..cedce16d267d 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. @@ -58,7 +58,7 @@ Signed-off-by: Thomas Gleixner } void __free_pages_core(struct page *page, unsigned int order) -@@ -2748,13 +2761,13 @@ void drain_zone_pages(struct zone *zone, +@@ -2737,13 +2750,13 @@ void drain_zone_pages(struct zone *zone, int to_drain, batch; LIST_HEAD(dst); @@ -74,7 +74,7 @@ Signed-off-by: Thomas Gleixner if (to_drain > 0) free_pcppages_bulk(zone, &dst, false); -@@ -2776,7 +2789,7 @@ static void drain_pages_zone(unsigned in +@@ -2765,7 +2778,7 @@ static void drain_pages_zone(unsigned in LIST_HEAD(dst); int count; @@ -83,7 +83,7 @@ Signed-off-by: Thomas Gleixner pset = per_cpu_ptr(zone->pageset, cpu); pcp = &pset->pcp; -@@ -2784,7 +2797,7 @@ static void drain_pages_zone(unsigned in +@@ -2773,7 +2786,7 @@ static void drain_pages_zone(unsigned in if (count) isolate_pcp_pages(count, pcp, &dst); @@ -92,7 +92,7 @@ Signed-off-by: Thomas Gleixner if (count) free_pcppages_bulk(zone, &dst, false); -@@ -2822,6 +2835,7 @@ void drain_local_pages(struct zone *zone +@@ -2811,6 +2824,7 @@ void drain_local_pages(struct zone *zone drain_pages(cpu); } @@ -100,7 +100,7 @@ Signed-off-by: Thomas Gleixner static void drain_local_pages_wq(struct work_struct *work) { struct pcpu_drain *drain; -@@ -2839,6 +2853,7 @@ static void drain_local_pages_wq(struct +@@ -2828,6 +2842,7 @@ static void drain_local_pages_wq(struct drain_local_pages(drain->zone); preempt_enable(); } @@ -108,7 +108,7 @@ Signed-off-by: Thomas Gleixner /* * Spill all the per-cpu pages from all CPUs back into the buddy allocator. -@@ -2906,6 +2921,14 @@ void drain_all_pages(struct zone *zone) +@@ -2895,6 +2910,14 @@ void drain_all_pages(struct zone *zone) cpumask_clear_cpu(cpu, &cpus_with_pcps); } @@ -123,7 +123,7 @@ Signed-off-by: Thomas Gleixner for_each_cpu(cpu, &cpus_with_pcps) { struct pcpu_drain *drain = per_cpu_ptr(&pcpu_drain, cpu); -@@ -2915,6 +2938,7 @@ void drain_all_pages(struct zone *zone) +@@ -2904,6 +2927,7 @@ void drain_all_pages(struct zone *zone) } for_each_cpu(cpu, &cpus_with_pcps) flush_work(&per_cpu_ptr(&pcpu_drain, cpu)->work); @@ -131,7 +131,7 @@ Signed-off-by: Thomas Gleixner mutex_unlock(&pcpu_drain_mutex); } -@@ -3034,9 +3058,9 @@ void free_unref_page(struct page *page) +@@ -3023,9 +3047,9 @@ void free_unref_page(struct page *page) if (!free_unref_page_prepare(page, pfn)) return; @@ -143,7 +143,7 @@ Signed-off-by: Thomas Gleixner if (!list_empty(&dst)) free_pcppages_bulk(zone, &dst, false); } -@@ -3063,7 +3087,7 @@ void free_unref_page_list(struct list_he +@@ -3052,7 +3076,7 @@ void free_unref_page_list(struct list_he set_page_private(page, pfn); } @@ -152,7 +152,7 @@ Signed-off-by: Thomas Gleixner list_for_each_entry_safe(page, next, list, lru) { unsigned long pfn = page_private(page); enum zone_type type; -@@ -3078,12 +3102,12 @@ void free_unref_page_list(struct list_he +@@ -3067,12 +3091,12 @@ void free_unref_page_list(struct list_he * a large list of pages to free. */ if (++batch_count == SWAP_CLUSTER_MAX) { @@ -168,7 +168,7 @@ Signed-off-by: Thomas Gleixner for (i = 0; i < __MAX_NR_ZONES; ) { struct page *page; -@@ -3233,7 +3257,7 @@ static struct page *rmqueue_pcplist(stru +@@ -3222,7 +3246,7 @@ static struct page *rmqueue_pcplist(stru struct page *page; unsigned long flags; @@ -177,7 +177,7 @@ Signed-off-by: Thomas Gleixner pcp = &this_cpu_ptr(zone->pageset)->pcp; list = &pcp->lists[migratetype]; page = __rmqueue_pcplist(zone, migratetype, alloc_flags, pcp, list); -@@ -3241,7 +3265,7 @@ static struct page *rmqueue_pcplist(stru +@@ -3230,7 +3254,7 @@ static struct page *rmqueue_pcplist(stru __count_zid_vm_events(PGALLOC, page_zonenum(page), 1); zone_statistics(preferred_zone, zone); } @@ -186,7 +186,7 @@ Signed-off-by: Thomas Gleixner return page; } -@@ -3268,7 +3292,7 @@ struct page *rmqueue(struct zone *prefer +@@ -3257,7 +3281,7 @@ struct page *rmqueue(struct zone *prefer * allocate greater than order-1 page units with __GFP_NOFAIL. */ WARN_ON_ONCE((gfp_flags & __GFP_NOFAIL) && (order > 1)); @@ -195,7 +195,7 @@ Signed-off-by: Thomas Gleixner do { page = NULL; -@@ -3288,7 +3312,7 @@ struct page *rmqueue(struct zone *prefer +@@ -3277,7 +3301,7 @@ struct page *rmqueue(struct zone *prefer __count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); zone_statistics(preferred_zone, zone); @@ -204,7 +204,7 @@ Signed-off-by: Thomas Gleixner out: /* Separate test+clear to avoid unnecessary atomics */ -@@ -3301,7 +3325,7 @@ struct page *rmqueue(struct zone *prefer +@@ -3290,7 +3314,7 @@ struct page *rmqueue(struct zone *prefer return page; failed: @@ -213,7 +213,7 @@ Signed-off-by: Thomas Gleixner return NULL; } -@@ -8490,7 +8514,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8479,7 +8503,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); -@@ -8499,7 +8523,7 @@ void zone_pcp_reset(struct zone *zone) +@@ -8488,7 +8512,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 86ee446dd881..4006bc3ac7c5 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 fe0409fe2483..afad8f532adb 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 cd459b54325d..8c1f1597bbae 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e521947cc3b2..124ccf215249 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 570d1b6b5819..10ea368fb8ea 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. diff --git a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch index 68b7c13fd5a8..306e35bffd5d 100644 --- a/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch +++ b/debian/patches-rt/mm-workingset-replace-IRQ-off-check-with-a-lockdep-a.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Feb 2019 10:40:46 +0100 Subject: [PATCH] mm: workingset: replace IRQ-off check with a lockdep assert. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Commit diff --git a/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch b/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch index 60608c1b43e7..6381d3f029ad 100644 --- a/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch +++ b/debian/patches-rt/mm-zswap-Do-not-disable-preemption-in-zswap_frontswa.patch @@ -2,7 +2,7 @@ From: "Luis Claudio R. Goncalves" Date: Tue, 25 Jun 2019 11:28:04 -0300 Subject: [PATCH] mm/zswap: Do not disable preemption in zswap_frontswap_store() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Zswap causes "BUG: scheduling while atomic" by blocking on a rt_spin_lock() with preemption disabled. The preemption is disabled by get_cpu_var() in diff --git a/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches-rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch index 1499207d09cf..a44519a60908 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 14fc1ca0fc52..a1e14e56f263 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 181fa851db67..b0822e46dd7e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz A customer hit a crash where the napi sd->poll_list became corrupted. The customer had the bnx2x driver, which does a @@ -51,7 +51,7 @@ Signed-off-by: Sebastian Andrzej Siewior { --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -6031,6 +6031,7 @@ bool napi_schedule_prep(struct napi_stru +@@ -6035,6 +6035,7 @@ bool napi_schedule_prep(struct napi_stru } EXPORT_SYMBOL(napi_schedule_prep); @@ -59,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior /** * __napi_schedule_irqoff - schedule for receive * @n: entry to schedule -@@ -6042,6 +6043,7 @@ void __napi_schedule_irqoff(struct napi_ +@@ -6046,6 +6047,7 @@ void __napi_schedule_irqoff(struct napi_ ____napi_schedule(this_cpu_ptr(&softnet_data), n); } EXPORT_SYMBOL(__napi_schedule_irqoff); 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 6decbfc67dd5..16d930b52c1e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -260,7 +260,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (sch->flags & TCQ_F_MQROOT) { --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -552,7 +552,11 @@ struct Qdisc noop_qdisc = { +@@ -557,7 +557,11 @@ struct Qdisc noop_qdisc = { .ops = &noop_qdisc_ops, .q.lock = __SPIN_LOCK_UNLOCKED(noop_qdisc.q.lock), .dev_queue = &noop_netdev_queue, @@ -272,7 +272,7 @@ Signed-off-by: Sebastian Andrzej Siewior .busylock = __SPIN_LOCK_UNLOCKED(noop_qdisc.busylock), .gso_skb = { .next = (struct sk_buff *)&noop_qdisc.gso_skb, -@@ -850,9 +854,17 @@ struct Qdisc *qdisc_alloc(struct netdev_ +@@ -862,9 +866,17 @@ struct Qdisc *qdisc_alloc(struct netdev_ lockdep_set_class(&sch->busylock, dev->qdisc_tx_busylock ?: &qdisc_tx_busylock); 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 fced16c5b117..d8011cf61fce 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 5f4ce7400284..6bd4ad6407ca 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 0de27a852b03..6758ae0c8635 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -19,7 +19,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4567,11 +4567,9 @@ int netif_rx_ni(struct sk_buff *skb) +@@ -4571,11 +4571,9 @@ int netif_rx_ni(struct sk_buff *skb) trace_netif_rx_ni_entry(skb); 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 654c9939b25b..a21605ca0d5c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -21,7 +21,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -3505,7 +3505,11 @@ static inline int __dev_xmit_skb(struct +@@ -3509,7 +3509,11 @@ static inline int __dev_xmit_skb(struct * This permits qdisc->running owner to get the lock more * often and dequeue packets faster. */ 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 f255d98da9b5..2bc6eb0c1bef 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 67d445653b07..e644585729da 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz On RT write_seqcount_begin() disables preemption and device_rename() allocates memory with GFP_KERNEL and grabs later the sysfs_mutex diff --git a/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch b/debian/patches-rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch index 95973c52bf3b..62f8391866d4 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -47,7 +47,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c -@@ -1203,7 +1203,7 @@ void dev_deactivate_many(struct list_hea +@@ -1218,7 +1218,7 @@ void dev_deactivate_many(struct list_hea /* Wait for outstanding qdisc_run calls. */ list_for_each_entry(dev, head, close_list) { while (some_qdisc_is_busy(dev)) diff --git a/debian/patches-rt/net-use-cpu-chill.patch b/debian/patches-rt/net-use-cpu-chill.patch index bfd606a81013..a5981d616afd 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 8838e93356be..f59cd5be4bbe 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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/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 651d92dfe69b..7469e4fea602 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 diff --git a/debian/patches-rt/oleg-signal-rt-fix.patch b/debian/patches-rt/oleg-signal-rt-fix.patch index ce2c33f43ad3..0c62e304dcde 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 7b4735f0afd7..28e300c45e9c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. diff --git a/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch b/debian/patches-rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch index 34da716532d7..08254768775c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The poll callback is using completion's wait_queue_head_t member and puts it in poll_wait() so the poll() caller gets a wakeup after command diff --git a/debian/patches-rt/percpu-include-irqflags.h-for-raw_local_irq_save.patch b/debian/patches-rt/percpu-include-irqflags.h-for-raw_local_irq_save.patch index aff006b0f5db..608bd02589e5 100644 --- a/debian/patches-rt/percpu-include-irqflags.h-for-raw_local_irq_save.patch +++ b/debian/patches-rt/percpu-include-irqflags.h-for-raw_local_irq_save.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 11 Oct 2018 16:39:59 +0200 Subject: [PATCH] percpu: include irqflags.h for raw_local_irq_save() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The header percpu.h header file is using raw_local_irq_save() but does not include irqflags.h for its definition. It compiles because the diff --git a/debian/patches-rt/pid.h-include-atomic.h.patch b/debian/patches-rt/pid.h-include-atomic.h.patch index 1eb2d36bd277..a0ee8f5a8b3e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz This patch fixes build error: CC kernel/pid_namespace.o diff --git a/debian/patches-rt/posix-timers-Unlock-expiry-lock-in-the-early-return.patch b/debian/patches-rt/posix-timers-Unlock-expiry-lock-in-the-early-return.patch new file mode 100644 index 000000000000..fd640cb734ca --- /dev/null +++ b/debian/patches-rt/posix-timers-Unlock-expiry-lock-in-the-early-return.patch @@ -0,0 +1,32 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 16 Sep 2019 12:33:59 +0200 +Subject: [PATCH] posix-timers: Unlock expiry lock in the early return +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +Patch ("posix-timers: Add expiry lock") acquired a lock in +run_posix_cpu_timers() but didn't drop the lock in the early return. + +Unlock the lock in the early return path. + +Reported-by: kbuild test robot +Reported-by: Dan Carpenter +Reviewed-by: Thomas Gleixner +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/time/posix-cpu-timers.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/kernel/time/posix-cpu-timers.c ++++ b/kernel/time/posix-cpu-timers.c +@@ -1166,8 +1166,10 @@ void run_posix_cpu_timers(struct task_st + expiry_lock = this_cpu_ptr(&cpu_timer_expiry_lock); + spin_lock(expiry_lock); + +- if (!lock_task_sighand(tsk, &flags)) ++ if (!lock_task_sighand(tsk, &flags)) { ++ spin_unlock(expiry_lock); + return; ++ } + /* + * Here we take off tsk->signal->cpu_timers[N] and + * tsk->cpu_timers[N] all the timers that are firing, and diff --git a/debian/patches-rt/posix-timers-expiry-lock.patch b/debian/patches-rt/posix-timers-expiry-lock.patch index 1c3474914514..126b10fcdf84 100644 --- a/debian/patches-rt/posix-timers-expiry-lock.patch +++ b/debian/patches-rt/posix-timers-expiry-lock.patch @@ -4,7 +4,7 @@ Subject: [PATCH] posix-timers: Add expiry lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz If a about to be removed posix timer is active then the code will retry the delete operation until it succeeds / the timer callback completes. diff --git a/debian/patches-rt/posix-timers-move-rcu-out-of-union.patch b/debian/patches-rt/posix-timers-move-rcu-out-of-union.patch index 0d690fb0e653..a9c533dfe298 100644 --- a/debian/patches-rt/posix-timers-move-rcu-out-of-union.patch +++ b/debian/patches-rt/posix-timers-move-rcu-out-of-union.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 27 May 2019 16:54:05 +0200 Subject: [PATCH] posix-timers: move rcu out of union -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz On RT the timer can be preempted while running and therefore we wait with timer_wait_for_callback() for the timer to complete (instead of 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 4b8c0c8ad510..84581ac96276 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. @@ -103,7 +103,7 @@ Signed-off-by: Thomas Gleixner /* * The fast path checks that there are no expired thread or thread * group timers. If that's so, just return. -@@ -1213,6 +1214,153 @@ void run_posix_cpu_timers(struct task_st +@@ -1215,6 +1216,153 @@ void run_posix_cpu_timers(struct task_st spin_unlock(expiry_lock); } diff --git a/debian/patches-rt/power-disable-highmem-on-rt.patch b/debian/patches-rt/power-disable-highmem-on-rt.patch index 2e7b842aa6cf..a8f39ece80a8 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches-rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index fe4a380c3a61..38d55f4f764b 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 7866fb4b7e3e..774244975ea1 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Implement the powerpc pieces for lazy preempt. diff --git a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch index 671190d62ebb..6bc9a44f007a 100644 --- a/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch +++ b/debian/patches-rt/powerpc-pseries-iommu-Use-a-locallock-instead-local_ir.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 26 Mar 2019 18:31:54 +0100 Subject: [PATCH] powerpc/pseries/iommu: Use a locallock instead local_irq_save() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The locallock protects the per-CPU variable tce_page. The function attempts to allocate memory while tce_page is protected (by disabling diff --git a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch index 91e9587bee47..f40eff5ffeb4 100644 --- a/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch +++ b/debian/patches-rt/powerpc-stackprotector-work-around-stack-guard-init-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 26 Mar 2019 18:31:29 +0100 Subject: [PATCH ] powerpc/stackprotector: work around stack-guard init from atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz This is invoked from the secondary CPU in atomic context. On x86 we use tsc instead. On Power we XOR it against mftb() so lets use stack address diff --git a/debian/patches-rt/preempt-lazy-support.patch b/debian/patches-rt/preempt-lazy-support.patch index f7f0cf8b1a25..086b4ceeaa3e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -235,14 +235,16 @@ Signed-off-by: Thomas Gleixner default PREEMPT_NONE --- a/kernel/cpu.c +++ b/kernel/cpu.c -@@ -305,11 +305,13 @@ void pin_current_cpu(void) +@@ -305,6 +305,7 @@ void pin_current_cpu(void) return; } cpu = smp_processor_id(); + preempt_lazy_enable(); preempt_enable(); - __read_rt_lock(cpuhp_pin); + sleeping_lock_inc(); +@@ -312,6 +313,7 @@ void pin_current_cpu(void) + sleeping_lock_dec(); preempt_disable(); + preempt_lazy_disable(); @@ -300,7 +302,7 @@ Signed-off-by: Thomas Gleixner void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); -@@ -2456,6 +2498,9 @@ int sched_fork(unsigned long clone_flags +@@ -2449,6 +2491,9 @@ int sched_fork(unsigned long clone_flags p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -310,7 +312,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -3514,6 +3559,7 @@ static void __sched notrace __schedule(b +@@ -3507,6 +3552,7 @@ static void __sched notrace __schedule(b next = pick_next_task(rq, prev, &rf); clear_tsk_need_resched(prev); @@ -318,7 +320,7 @@ Signed-off-by: Thomas Gleixner clear_preempt_need_resched(); if (likely(prev != next)) { -@@ -3697,6 +3743,30 @@ static void __sched notrace preempt_sche +@@ -3690,6 +3736,30 @@ static void __sched notrace preempt_sche } while (need_resched()); } @@ -349,7 +351,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_PREEMPT /* * this is the entry point to schedule() from in-kernel preemption -@@ -3711,7 +3781,8 @@ asmlinkage __visible void __sched notrac +@@ -3704,7 +3774,8 @@ asmlinkage __visible void __sched notrac */ if (likely(!preemptible())) return; @@ -359,7 +361,7 @@ Signed-off-by: Thomas Gleixner preempt_schedule_common(); } NOKPROBE_SYMBOL(preempt_schedule); -@@ -3738,6 +3809,9 @@ asmlinkage __visible void __sched notrac +@@ -3731,6 +3802,9 @@ asmlinkage __visible void __sched notrac if (likely(!preemptible())) return; @@ -369,7 +371,7 @@ Signed-off-by: Thomas Gleixner do { /* * Because the function tracer can trace preempt_count_sub() -@@ -5503,7 +5577,9 @@ void init_idle(struct task_struct *idle, +@@ -5496,7 +5570,9 @@ void init_idle(struct task_struct *idle, /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); @@ -380,7 +382,7 @@ Signed-off-by: Thomas Gleixner /* * The idle tasks have their own, simple scheduling class: */ -@@ -7259,6 +7335,7 @@ void migrate_disable(void) +@@ -7250,6 +7326,7 @@ void migrate_disable(void) } preempt_disable(); @@ -388,14 +390,15 @@ Signed-off-by: Thomas Gleixner pin_current_cpu(); migrate_disable_update_cpus_allowed(p); -@@ -7326,12 +7403,14 @@ void migrate_enable(void) +@@ -7317,6 +7394,7 @@ void migrate_enable(void) arg.dest_cpu = dest_cpu; unpin_current_cpu(); + preempt_lazy_enable(); preempt_enable(); - stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg); - return; + + sleeping_lock_inc(); +@@ -7326,6 +7404,7 @@ void migrate_enable(void) } } unpin_current_cpu(); @@ -432,7 +435,7 @@ Signed-off-by: Thomas Gleixner return; } /* -@@ -4454,7 +4454,7 @@ static void __account_cfs_rq_runtime(str +@@ -4456,7 +4456,7 @@ static void __account_cfs_rq_runtime(str * hierarchy can be throttled */ if (!assign_cfs_rq_runtime(cfs_rq) && likely(cfs_rq->curr)) @@ -441,7 +444,7 @@ Signed-off-by: Thomas Gleixner } static __always_inline -@@ -5164,7 +5164,7 @@ static void hrtick_start_fair(struct rq +@@ -5169,7 +5169,7 @@ static void hrtick_start_fair(struct rq if (delta < 0) { if (rq->curr == p) @@ -450,7 +453,7 @@ Signed-off-by: Thomas Gleixner return; } hrtick_start(rq, delta); -@@ -7004,7 +7004,7 @@ static void check_preempt_wakeup(struct +@@ -7009,7 +7009,7 @@ static void check_preempt_wakeup(struct return; preempt: @@ -459,7 +462,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 -@@ -10276,7 +10276,7 @@ static void task_fork_fair(struct task_s +@@ -10281,7 +10281,7 @@ static void task_fork_fair(struct task_s * 'current' within the tree based on its new key value. */ swap(curr->vruntime, se->vruntime); @@ -468,7 +471,7 @@ Signed-off-by: Thomas Gleixner } se->vruntime -= cfs_rq->min_vruntime; -@@ -10300,7 +10300,7 @@ prio_changed_fair(struct rq *rq, struct +@@ -10305,7 +10305,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 bff8339b85fe..d0eaf7bbc395 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch b/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch index 2d6dfcd6dd53..1af907707f0c 100644 --- a/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch +++ b/debian/patches-rt/printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Fri, 22 Feb 2019 23:02:44 +0100 Subject: [PATCH] printk: devkmsg: llseek: reset clear if it is lost -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz SEEK_DATA will seek to the last clear record. If this clear record is no longer in the ring buffer, devkmsg_llseek() will go into an diff --git a/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch b/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch new file mode 100644 index 000000000000..e87d48c1865d --- /dev/null +++ b/debian/patches-rt/printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch @@ -0,0 +1,44 @@ +From: He Zhe +Date: Tue, 24 Sep 2019 15:26:39 +0800 +Subject: [PATCH] printk: devkmsg: read: Return EPIPE when the first + message user-space wants has gone +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +When user-space wants to read the first message, that is when user->seq +is 0, and that message has gone, it currently automatically resets +user->seq to current first seq. This mis-aligns with mainline kernel. + +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/ABI/testing/dev-kmsg#n39 +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/printk/printk.c#n899 + +We should inform user-space that what it wants has gone by returning EPIPE +in such scenario. + +Link: https://lore.kernel.org/r/20190924072639.25986-1-zhe.he@windriver.com +Signed-off-by: He Zhe +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/printk/printk.c | 12 ++++-------- + 1 file changed, 4 insertions(+), 8 deletions(-) + +--- a/kernel/printk/printk.c ++++ b/kernel/printk/printk.c +@@ -703,14 +703,10 @@ static ssize_t devkmsg_read(struct file + goto out; + } + +- if (user->seq == 0) { +- user->seq = seq; +- } else { +- user->seq++; +- if (user->seq < seq) { +- ret = -EPIPE; +- goto restore_out; +- } ++ user->seq++; ++ if (user->seq < seq) { ++ ret = -EPIPE; ++ goto restore_out; + } + + msg = (struct printk_log *)&user->msgbuf[0]; diff --git a/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch b/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch index 81675d9e6201..a70ee6b0d13b 100644 --- a/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch +++ b/debian/patches-rt/printk-kmsg_dump-remove-mutex-usage.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Wed, 24 Apr 2019 16:36:04 +0200 Subject: [PATCH] printk: kmsg_dump: remove mutex usage -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The kmsg dumper can be called from any context, but the dumping helpers were using a mutex to synchronize the iterator against diff --git a/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch b/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch index 4b7307ba86e8..d66f015447f4 100644 --- a/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch +++ b/debian/patches-rt/printk-only-allow-kernel-to-emergency-message.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Sun, 17 Feb 2019 03:11:20 +0100 Subject: [PATCH] printk: only allow kernel to emergency message -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Emergency messages exist as a mechanism for the kernel to communicate critical information to users. It is not meant for diff --git a/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch b/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch index 60e2bc836af8..829ca0282001 100644 --- a/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch +++ b/debian/patches-rt/printk-print-rate-limitted-message-as-info.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 22 Feb 2019 12:47:13 +0100 Subject: [PATCH] printk: print "rate-limitted" message as info -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz If messages which are injected via kmsg are dropped then they don't need to be printed as warnings. This is to avoid latency spikes if the diff --git a/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch b/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch index 4121b8b2d8d8..f5ca99539e16 100644 --- a/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch +++ b/debian/patches-rt/printk-set-deferred-to-default-loglevel-enforce-mask.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Thu, 14 Feb 2019 23:13:30 +0100 Subject: [PATCH] printk: set deferred to default loglevel, enforce mask -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz All messages printed via vpritnk_deferred() were being automatically treated as emergency messages. diff --git a/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches-rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch index 6342e094a627..de53ca53de2c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -1402,6 +1402,18 @@ int migrate_swap(struct task_struct *cur +@@ -1395,6 +1395,18 @@ int migrate_swap(struct task_struct *cur } #endif /* CONFIG_NUMA_BALANCING */ @@ -135,7 +135,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * wait_task_inactive - wait for a thread to unschedule. * -@@ -1446,7 +1458,7 @@ unsigned long wait_task_inactive(struct +@@ -1439,7 +1451,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(); } -@@ -1461,7 +1473,8 @@ unsigned long wait_task_inactive(struct +@@ -1454,7 +1466,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 ac22472d995a..0a9be54a652a 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The preload functionality uses per-CPU variables and preempt-disable to ensure that it does not switch CPUs during its usage. This patch adds diff --git a/debian/patches-rt/random-make-it-work-on-rt.patch b/debian/patches-rt/random-make-it-work-on-rt.patch index 1c1385b3bb3e..52c093ca992d 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-Acquire-RCU-lock-when-disabling-BHs.patch b/debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch new file mode 100644 index 000000000000..2999947963c5 --- /dev/null +++ b/debian/patches-rt/rcu-Acquire-RCU-lock-when-disabling-BHs.patch @@ -0,0 +1,57 @@ +From: Scott Wood +Date: Wed, 11 Sep 2019 17:57:25 +0100 +Subject: [PATCH] rcu: Acquire RCU lock when disabling BHs +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +A plain local_bh_disable() is documented as creating an RCU critical +section, and (at least) rcutorture expects this to be the case. However, +in_softirq() doesn't block a grace period on PREEMPT_RT, since RCU checks +preempt_count() directly. Even if RCU were changed to check +in_softirq(), that wouldn't allow blocked BH disablers to be boosted. + +Fix this by calling rcu_read_lock() from local_bh_disable(). + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/softirq.c | 12 +++++++++--- + 1 file changed, 9 insertions(+), 3 deletions(-) + +--- a/kernel/softirq.c ++++ b/kernel/softirq.c +@@ -115,8 +115,10 @@ void __local_bh_disable_ip(unsigned long + long soft_cnt; + + WARN_ON_ONCE(in_irq()); +- if (!in_atomic()) ++ if (!in_atomic()) { + local_lock(bh_lock); ++ rcu_read_lock(); ++ } + soft_cnt = this_cpu_inc_return(softirq_counter); + WARN_ON_ONCE(soft_cnt == 0); + current->softirq_count += SOFTIRQ_DISABLE_OFFSET; +@@ -151,8 +153,10 @@ void _local_bh_enable(void) + #endif + + current->softirq_count -= SOFTIRQ_DISABLE_OFFSET; +- if (!in_atomic()) ++ if (!in_atomic()) { ++ rcu_read_unlock(); + local_unlock(bh_lock); ++ } + } + + void _local_bh_enable_rt(void) +@@ -185,8 +189,10 @@ void __local_bh_enable_ip(unsigned long + WARN_ON_ONCE(count < 0); + local_irq_enable(); + +- if (!in_atomic()) ++ if (!in_atomic()) { ++ rcu_read_unlock(); + local_unlock(bh_lock); ++ } + + current->softirq_count -= SOFTIRQ_DISABLE_OFFSET; + preempt_check_resched(); 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 1bda9c944faa..ee370efddd67 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: Sebastian Andrzej Siewior Date: Wed, 20 Mar 2019 22:13:33 +0100 Subject: [PATCH] rcu: Enable elimination of Tree-RCU softirq processing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Some workloads need to change kthread priority for RCU core processing without affecting other softirq work. This commit therefore introduces diff --git a/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch b/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch new file mode 100644 index 000000000000..57c6d2d395e8 --- /dev/null +++ b/debian/patches-rt/rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch @@ -0,0 +1,30 @@ +From: Scott Wood +Date: Wed, 11 Sep 2019 17:57:28 +0100 +Subject: [PATCH] rcu: Use rcuc threads on PREEMPT_RT as we did +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +While switching to the reworked RCU-thread code, it has been forgotten +to enable the thread processing on -RT. +Besides restoring behavior that used to be default on RT, this avoids +a deadlock on scheduler locks. + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/rcu/tree.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +--- a/kernel/rcu/tree.c ++++ b/kernel/rcu/tree.c +@@ -99,8 +99,10 @@ struct rcu_state rcu_state = { + static bool dump_tree; + module_param(dump_tree, bool, 0444); + /* By default, use RCU_SOFTIRQ instead of rcuc kthreads. */ +-static bool use_softirq = 1; ++static bool use_softirq = !IS_ENABLED(CONFIG_PREEMPT_RT_FULL); ++#ifndef CONFIG_PREEMPT_RT_FULL + module_param(use_softirq, bool, 0444); ++#endif + /* Control rcu_node-tree auto-balancing at boot time. */ + static bool rcu_fanout_exact; + module_param(rcu_fanout_exact, bool, 0444); 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 d8e437b4182b..8d113c775180 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 82f1b6a8a2b4..7a5cfd0f7758 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since it is no longer invoked from the softirq people run into OOM more often if the priority of the RCU thread is too low. Making boosting diff --git a/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch new file mode 100644 index 000000000000..de03e4ca387c --- /dev/null +++ b/debian/patches-rt/rcutorture-Avoid-problematic-critical-section-nestin.patch @@ -0,0 +1,189 @@ +From: Scott Wood +Date: Wed, 11 Sep 2019 17:57:29 +0100 +Subject: [PATCH] rcutorture: Avoid problematic critical section nesting + on RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +rcutorture was generating some nesting scenarios that are not +reasonable. Constrain the state selection to avoid them. + +Example #1: + +1. preempt_disable() +2. local_bh_disable() +3. preempt_enable() +4. local_bh_enable() + +On PREEMPT_RT, BH disabling takes a local lock only when called in +non-atomic context. Thus, atomic context must be retained until after BH +is re-enabled. Likewise, if BH is initially disabled in non-atomic +context, it cannot be re-enabled in atomic context. + +Example #2: + +1. rcu_read_lock() +2. local_irq_disable() +3. rcu_read_unlock() +4. local_irq_enable() + +If the thread is preempted between steps 1 and 2, +rcu_read_unlock_special.b.blocked will be set, but it won't be +acted on in step 3 because IRQs are disabled. Thus, reporting of the +quiescent state will be delayed beyond the local_irq_enable(). + +For now, these scenarios will continue to be tested on non-PREEMPT_RT +kernels, until debug checks are added to ensure that they are not +happening elsewhere. + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/rcu/rcutorture.c | 96 +++++++++++++++++++++++++++++++++++++++++------- + 1 file changed, 82 insertions(+), 14 deletions(-) + +--- a/kernel/rcu/rcutorture.c ++++ b/kernel/rcu/rcutorture.c +@@ -60,10 +60,13 @@ MODULE_AUTHOR("Paul E. McKenney > RCUTORTURE_RDR_SHIFT) > 1); + rtrsp->rt_readstate = newstate; + +- /* First, put new protection in place to avoid critical-section gap. */ ++ /* ++ * First, put new protection in place to avoid critical-section gap. ++ * Disable preemption around the ATOM disables to ensure that ++ * in_atomic() is true. ++ */ + if (statesnew & RCUTORTURE_RDR_BH) + local_bh_disable(); ++ if (statesnew & RCUTORTURE_RDR_RBH) ++ rcu_read_lock_bh(); + if (statesnew & RCUTORTURE_RDR_IRQ) + local_irq_disable(); + if (statesnew & RCUTORTURE_RDR_PREEMPT) + preempt_disable(); +- if (statesnew & RCUTORTURE_RDR_RBH) +- rcu_read_lock_bh(); + if (statesnew & RCUTORTURE_RDR_SCHED) + rcu_read_lock_sched(); ++ preempt_disable(); ++ if (statesnew & RCUTORTURE_RDR_ATOM_BH) ++ local_bh_disable(); ++ if (statesnew & RCUTORTURE_RDR_ATOM_RBH) ++ rcu_read_lock_bh(); ++ preempt_enable(); + if (statesnew & RCUTORTURE_RDR_RCU) + idxnew = cur_ops->readlock() << RCUTORTURE_RDR_SHIFT; + +- /* Next, remove old protection, irq first due to bh conflict. */ ++ /* ++ * Next, remove old protection, in decreasing order of strength ++ * to avoid unlock paths that aren't safe in the stronger ++ * context. Disable preemption around the ATOM enables in ++ * case the context was only atomic due to IRQ disabling. ++ */ ++ preempt_disable(); + if (statesold & RCUTORTURE_RDR_IRQ) + local_irq_enable(); +- if (statesold & RCUTORTURE_RDR_BH) ++ if (statesold & RCUTORTURE_RDR_ATOM_BH) + local_bh_enable(); ++ if (statesold & RCUTORTURE_RDR_ATOM_RBH) ++ rcu_read_unlock_bh(); ++ preempt_enable(); + if (statesold & RCUTORTURE_RDR_PREEMPT) + preempt_enable(); +- if (statesold & RCUTORTURE_RDR_RBH) +- rcu_read_unlock_bh(); + if (statesold & RCUTORTURE_RDR_SCHED) + rcu_read_unlock_sched(); ++ if (statesold & RCUTORTURE_RDR_BH) ++ local_bh_enable(); ++ if (statesold & RCUTORTURE_RDR_RBH) ++ rcu_read_unlock_bh(); + if (statesold & RCUTORTURE_RDR_RCU) + cur_ops->readunlock(idxold >> RCUTORTURE_RDR_SHIFT); + +@@ -1152,6 +1176,12 @@ rcutorture_extend_mask(int oldmask, stru + int mask = rcutorture_extend_mask_max(); + unsigned long randmask1 = torture_random(trsp) >> 8; + unsigned long randmask2 = randmask1 >> 3; ++ unsigned long preempts = RCUTORTURE_RDR_PREEMPT | RCUTORTURE_RDR_SCHED; ++ unsigned long preempts_irq = preempts | RCUTORTURE_RDR_IRQ; ++ unsigned long nonatomic_bhs = RCUTORTURE_RDR_BH | RCUTORTURE_RDR_RBH; ++ unsigned long atomic_bhs = RCUTORTURE_RDR_ATOM_BH | ++ RCUTORTURE_RDR_ATOM_RBH; ++ unsigned long tmp; + + WARN_ON_ONCE(mask >> RCUTORTURE_RDR_SHIFT); + /* Mostly only one bit (need preemption!), sometimes lots of bits. */ +@@ -1159,11 +1189,49 @@ rcutorture_extend_mask(int oldmask, stru + mask = mask & randmask2; + else + mask = mask & (1 << (randmask2 % RCUTORTURE_RDR_NBITS)); +- /* Can't enable bh w/irq disabled. */ +- if ((mask & RCUTORTURE_RDR_IRQ) && +- ((!(mask & RCUTORTURE_RDR_BH) && (oldmask & RCUTORTURE_RDR_BH)) || +- (!(mask & RCUTORTURE_RDR_RBH) && (oldmask & RCUTORTURE_RDR_RBH)))) +- mask |= RCUTORTURE_RDR_BH | RCUTORTURE_RDR_RBH; ++ ++ /* ++ * Can't enable bh w/irq disabled. ++ */ ++ tmp = atomic_bhs | nonatomic_bhs; ++ if (mask & RCUTORTURE_RDR_IRQ) ++ mask |= oldmask & tmp; ++ ++ /* ++ * Ideally these sequences would be detected in debug builds ++ * (regardless of RT), but until then don't stop testing ++ * them on non-RT. ++ */ ++ if (IS_ENABLED(CONFIG_PREEMPT_RT_FULL)) { ++ /* ++ * Can't release the outermost rcu lock in an irq disabled ++ * section without preemption also being disabled, if irqs ++ * had ever been enabled during this RCU critical section ++ * (could leak a special flag and delay reporting the qs). ++ */ ++ if ((oldmask & RCUTORTURE_RDR_RCU) && ++ (mask & RCUTORTURE_RDR_IRQ) && ++ !(mask & preempts)) ++ mask |= RCUTORTURE_RDR_RCU; ++ ++ /* Can't modify atomic bh in non-atomic context */ ++ if ((oldmask & atomic_bhs) && (mask & atomic_bhs) && ++ !(mask & preempts_irq)) { ++ mask |= oldmask & preempts_irq; ++ if (mask & RCUTORTURE_RDR_IRQ) ++ mask |= oldmask & tmp; ++ } ++ if ((mask & atomic_bhs) && !(mask & preempts_irq)) ++ mask |= RCUTORTURE_RDR_PREEMPT; ++ ++ /* Can't modify non-atomic bh in atomic context */ ++ tmp = nonatomic_bhs; ++ if (oldmask & preempts_irq) ++ mask &= ~tmp; ++ if ((oldmask | mask) & preempts_irq) ++ mask |= oldmask & tmp; ++ } ++ + return mask ?: RCUTORTURE_RDR_RCU; + } + 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 b7c468604d87..9374743dbe43 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 b8da47bbfefd..28c93480a5c7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -7159,6 +7159,47 @@ const u32 sched_prio_to_wmult[40] = { +@@ -7152,6 +7152,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; -@@ -7182,10 +7223,9 @@ void migrate_disable(void) +@@ -7175,10 +7216,9 @@ void migrate_disable(void) } preempt_disable(); @@ -142,7 +142,7 @@ Signed-off-by: Sebastian Andrzej Siewior preempt_enable(); } -@@ -7217,9 +7257,8 @@ void migrate_enable(void) +@@ -7210,9 +7250,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 939d824d4646..44dead0e2fa9 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() @@ -75,7 +75,7 @@ Signed-off-by: Sebastian Andrzej Siewior #endif /* defined(_LINUX_DELAY_H) */ --- a/kernel/time/hrtimer.c +++ b/kernel/time/hrtimer.c -@@ -1845,6 +1845,38 @@ SYSCALL_DEFINE2(nanosleep_time32, struct +@@ -1855,6 +1855,38 @@ SYSCALL_DEFINE2(nanosleep_time32, struct } #endif diff --git a/debian/patches-rt/rt-local-irq-lock.patch b/debian/patches-rt/rt-local-irq-lock.patch index 41782ca04d80..f42dc869a3a6 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 5db67af8667d..be2c59557700 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e9db29e815f5..8aac64d81915 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 333abcbfa0b4..a5cbaef9cb30 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 feb699898c00..5415b991f5d9 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 92b2360f2290..958b10c60829 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2fdca7c0e574..00d820c4dfe5 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 33719dd7545a..2f43b2206d9c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 29c198daf9c4..cee55a3e2f1c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior 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 a48da2ef8a0c..a65963895496 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 d7ab15536b2d..765d7f10b82c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -242,7 +242,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7335,4 +7335,49 @@ void migrate_enable(void) +@@ -7326,4 +7326,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 a13186b6ab38..2c7cf6995329 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 f9b8cf10fbe7..2d4031d6bad1 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Required for lock implementation ontop of rtmutex. diff --git a/debian/patches-rt/rtmutex-lock-killable.patch b/debian/patches-rt/rtmutex-lock-killable.patch index daa1f43f1e70..be067b5092b7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 a6cffae8b5dc..2cde367e7ad2 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 b30e567f4915..01f1d9b70ece 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 f6784ae3e101..d26834adfe4b 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 4861009852b7..4ce50cd2131c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-Remove-dead-__migrate_disabled-check.patch b/debian/patches-rt/sched-Remove-dead-__migrate_disabled-check.patch new file mode 100644 index 000000000000..82f9eb6e5621 --- /dev/null +++ b/debian/patches-rt/sched-Remove-dead-__migrate_disabled-check.patch @@ -0,0 +1,30 @@ +From: Scott Wood +Date: Sat, 27 Jul 2019 00:56:33 -0500 +Subject: [PATCH] sched: Remove dead __migrate_disabled() check +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +This code was unreachable given the __migrate_disabled() branch +to "out" immediately beforehand. + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/core.c | 7 ------- + 1 file changed, 7 deletions(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -1173,13 +1173,6 @@ static int __set_cpus_allowed_ptr(struct + if (cpumask_test_cpu(task_cpu(p), new_mask) || __migrate_disabled(p)) + goto out; + +-#if defined(CONFIG_PREEMPT_COUNT) && defined(CONFIG_SMP) +- if (__migrate_disabled(p)) { +- p->migrate_disable_update = 1; +- goto out; +- } +-#endif +- + dest_cpu = cpumask_any_and(cpu_valid_mask, new_mask); + if (task_running(rq, p) || p->state == TASK_WAKING) { + struct migration_arg arg = { p, dest_cpu }; diff --git a/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch b/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch new file mode 100644 index 000000000000..d9aeebab7d33 --- /dev/null +++ b/debian/patches-rt/sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch @@ -0,0 +1,30 @@ +From: Scott Wood +Date: Sat, 27 Jul 2019 00:56:32 -0500 +Subject: [PATCH] sched: __set_cpus_allowed_ptr: Check cpus_mask, not + cpus_ptr +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +This function is concerned with the long-term cpu mask, not the +transitory mask the task might have while migrate disabled. Before +this patch, if a task was migrate disabled at the time +__set_cpus_allowed_ptr() was called, and the new mask happened to be +equal to the cpu that the task was running on, then the mask update +would be lost. + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/core.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -1126,7 +1126,7 @@ static int __set_cpus_allowed_ptr(struct + goto out; + } + +- if (cpumask_equal(p->cpus_ptr, new_mask)) ++ if (cpumask_equal(&p->cpus_mask, new_mask)) + goto out; + + if (!cpumask_intersects(new_mask, cpu_valid_mask)) { diff --git a/debian/patches-rt/sched-completion-Fix-a-lockup-in-wait_for_completion.patch b/debian/patches-rt/sched-completion-Fix-a-lockup-in-wait_for_completion.patch index 120d79d14b86..053dc7f67a50 100644 --- a/debian/patches-rt/sched-completion-Fix-a-lockup-in-wait_for_completion.patch +++ b/debian/patches-rt/sched-completion-Fix-a-lockup-in-wait_for_completion.patch @@ -1,7 +1,7 @@ From: Corey Minyard Date: Thu, 9 May 2019 14:33:20 -0500 Subject: [PATCH] sched/completion: Fix a lockup in wait_for_completion() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Consider following race: diff --git a/debian/patches-rt/sched-deadline-Ensure-inactive_timer-runs-in-hardirq.patch b/debian/patches-rt/sched-deadline-Ensure-inactive_timer-runs-in-hardirq.patch index e183f0f9f1e9..12c03de10c21 100644 --- a/debian/patches-rt/sched-deadline-Ensure-inactive_timer-runs-in-hardirq.patch +++ b/debian/patches-rt/sched-deadline-Ensure-inactive_timer-runs-in-hardirq.patch @@ -2,7 +2,7 @@ From: Juri Lelli Date: Wed, 31 Jul 2019 12:37:15 +0200 Subject: [PATCH] sched/deadline: Ensure inactive_timer runs in hardirq context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz SCHED_DEADLINE inactive timer needs to run in hardirq context (as dl_task_timer already does) on PREEMPT_RT diff --git a/debian/patches-rt/sched-delay-put-task.patch b/debian/patches-rt/sched-delay-put-task.patch index f7877b6803de..d4460d64fc20 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz __put_task_struct() does quite some expensive work. We don't want to burden random tasks with that. 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 fea3c2be2483..bb29ad241f78 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 d79aeea0524d..ac2572d50120 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-fair-Make-the-hrtimers-non-hard-again.patch b/debian/patches-rt/sched-fair-Make-the-hrtimers-non-hard-again.patch index 7d3a481fabfe..0d6ba8b080fa 100644 --- a/debian/patches-rt/sched-fair-Make-the-hrtimers-non-hard-again.patch +++ b/debian/patches-rt/sched-fair-Make-the-hrtimers-non-hard-again.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 8 Jan 2019 12:31:06 +0100 Subject: [PATCH] sched/fair: Make the hrtimers non-hard again -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Since commit "sched/fair: Robustify CFS-bandwidth timer locking" both hrtimer can run in softirq context because now interrupts are disabled @@ -14,7 +14,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/fair.c +++ b/kernel/sched/fair.c -@@ -4999,9 +4999,9 @@ void init_cfs_bandwidth(struct cfs_bandw +@@ -5004,9 +5004,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/sched-limit-nr-migrate.patch b/debian/patches-rt/sched-limit-nr-migrate.patch index a8aaf8d3c526..5bb9d2dddf59 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 ac072981e3ac..d43b6fb86a4f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -6142,7 +6142,7 @@ void __init sched_init(void) +@@ -6135,7 +6135,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-Protect-cpus_ptr-with-lock.patch b/debian/patches-rt/sched-migrate-disable-Protect-cpus_ptr-with-lock.patch new file mode 100644 index 000000000000..d36822234c9b --- /dev/null +++ b/debian/patches-rt/sched-migrate-disable-Protect-cpus_ptr-with-lock.patch @@ -0,0 +1,38 @@ +From: Scott Wood +Date: Sat, 27 Jul 2019 00:56:34 -0500 +Subject: [PATCH] sched: migrate disable: Protect cpus_ptr with lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +Various places assume that cpus_ptr is protected by rq/pi locks, +so don't change it before grabbing those locks. + +Signed-off-by: Scott Wood +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/core.c | 6 ++---- + 1 file changed, 2 insertions(+), 4 deletions(-) + +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -7171,9 +7171,8 @@ migrate_disable_update_cpus_allowed(stru + struct rq *rq; + struct rq_flags rf; + +- p->cpus_ptr = cpumask_of(smp_processor_id()); +- + rq = task_rq_lock(p, &rf); ++ p->cpus_ptr = cpumask_of(smp_processor_id()); + update_nr_migratory(p, -1); + p->nr_cpus_allowed = 1; + task_rq_unlock(rq, p, &rf); +@@ -7185,9 +7184,8 @@ migrate_enable_update_cpus_allowed(struc + struct rq *rq; + struct rq_flags rf; + +- p->cpus_ptr = &p->cpus_mask; +- + rq = task_rq_lock(p, &rf); ++ p->cpus_ptr = &p->cpus_mask; + p->nr_cpus_allowed = cpumask_weight(&p->cpus_mask); + update_nr_migratory(p, 1); + task_rq_unlock(rq, p, &rf); diff --git a/debian/patches-rt/sched-migrate_dis-enable-Use-sleeping_lock-to-annota.patch b/debian/patches-rt/sched-migrate_dis-enable-Use-sleeping_lock-to-annota.patch new file mode 100644 index 000000000000..b969262c38b9 --- /dev/null +++ b/debian/patches-rt/sched-migrate_dis-enable-Use-sleeping_lock-to-annota.patch @@ -0,0 +1,47 @@ +From: Scott Wood +Date: Tue, 24 Sep 2019 14:36:41 +0200 +Subject: [PATCH] =?UTF-8?q?sched:=20migrate=5Fdis/enable:=20Use=20sl?= + =?UTF-8?q?eeping=5Flock=E2=80=A6()=20to=20annotate=20sleeping=20points?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz + +Without this, rcu_note_context_switch() will complain if an RCU read lock +is held when migrate_enable() calls stop_one_cpu(). Likewise when +migrate_disable() calls pin_current_cpu() which calls __read_rt_lock() -- +which bypasses the part of the mutex code that calls sleeping_lock_inc(). + +Signed-off-by: Scott Wood +[bigeasy: use sleeping_lock_…() ] +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/cpu.c | 2 ++ + kernel/sched/core.c | 3 +++ + 2 files changed, 5 insertions(+) + +--- a/kernel/cpu.c ++++ b/kernel/cpu.c +@@ -307,7 +307,9 @@ void pin_current_cpu(void) + cpu = smp_processor_id(); + preempt_enable(); + ++ sleeping_lock_inc(); + __read_rt_lock(cpuhp_pin); ++ sleeping_lock_dec(); + + preempt_disable(); + if (cpu != smp_processor_id()) { +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -7318,7 +7318,10 @@ void migrate_enable(void) + + unpin_current_cpu(); + preempt_enable(); ++ ++ sleeping_lock_inc(); + stop_one_cpu(task_cpu(p), migration_cpu_stop, &arg); ++ sleeping_lock_dec(); + return; + } + } 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 index 98f12a9b1cf8..2ab8540112f9 100644 --- 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 @@ -2,7 +2,7 @@ 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Jonathan reported that lttng/modules can't use __migrate_disabled(). This function is only used by sched/core itself and the tracing 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 b8ba4db82263..b18d0effb7d3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -41,9 +41,9 @@ Signed-off-by: Sebastian Andrzej Siewior --- include/linux/preempt.h | 6 +++--- include/linux/sched.h | 4 ++-- - kernel/sched/core.c | 23 +++++++++++------------ + kernel/sched/core.c | 21 ++++++++++----------- kernel/sched/debug.c | 2 +- - 4 files changed, 17 insertions(+), 18 deletions(-) + 4 files changed, 16 insertions(+), 17 deletions(-) --- a/include/linux/preempt.h +++ b/include/linux/preempt.h @@ -108,16 +108,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (__migrate_disabled(p)) { lockdep_assert_held(&p->pi_lock); -@@ -1200,7 +1200,7 @@ static int __set_cpus_allowed_ptr(struct - if (cpumask_test_cpu(task_cpu(p), new_mask) || __migrate_disabled(p)) - goto out; - --#if defined(CONFIG_PREEMPT_COUNT) && defined(CONFIG_SMP) -+#if defined(CONFIG_SMP) && defined(CONFIG_PREEMPT_RT_BASE) - if (__migrate_disabled(p)) { - p->migrate_disable_update = 1; - goto out; -@@ -7193,7 +7193,7 @@ const u32 sched_prio_to_wmult[40] = { +@@ -7186,7 +7186,7 @@ const u32 sched_prio_to_wmult[40] = { #undef CREATE_TRACE_POINTS @@ -126,7 +117,7 @@ Signed-off-by: Sebastian Andrzej Siewior static inline void update_nr_migratory(struct task_struct *p, long delta) -@@ -7339,45 +7339,44 @@ EXPORT_SYMBOL(migrate_enable); +@@ -7330,45 +7330,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 66d1ed45a00a..983ddce1d0b7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. @@ -78,7 +78,7 @@ Signed-off-by: Thomas Gleixner struct mm_struct *mm; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2716,9 +2716,13 @@ static struct rq *finish_task_switch(str +@@ -2709,9 +2709,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) -@@ -5546,6 +5550,8 @@ void sched_setnuma(struct task_struct *p +@@ -5539,6 +5543,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. -@@ -5561,7 +5567,11 @@ void idle_task_exit(void) +@@ -5554,7 +5560,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 } /* -@@ -5873,6 +5883,10 @@ int sched_cpu_dying(unsigned int cpu) +@@ -5866,6 +5876,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 249878665815..b5bc8c7cbaae 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -2033,8 +2033,27 @@ try_to_wake_up(struct task_struct *p, un +@@ -2026,8 +2026,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); -@@ -2149,6 +2168,18 @@ int wake_up_process(struct task_struct * +@@ -2142,6 +2161,18 @@ int wake_up_process(struct task_struct * } EXPORT_SYMBOL(wake_up_process); diff --git a/debian/patches-rt/sched-swait-Add-swait_event_lock_irq.patch b/debian/patches-rt/sched-swait-Add-swait_event_lock_irq.patch index ad464a9f90d7..277f748aca06 100644 --- a/debian/patches-rt/sched-swait-Add-swait_event_lock_irq.patch +++ b/debian/patches-rt/sched-swait-Add-swait_event_lock_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 22 May 2019 12:42:26 +0200 Subject: [PATCH] sched/swait: Add swait_event_lock_irq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The swait_event_lock_irq() is inspired by wait_event_lock_irq(). diff --git a/debian/patches-rt/scsi-fcoe-rt-aware.patch b/debian/patches-rt/scsi-fcoe-rt-aware.patch index e7258e27958f..999957a859fa 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 dedef0b80fb5..70bbae4be8ce 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. diff --git a/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch b/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch index 00dde22ee0f9..077c9fe339bc 100644 --- a/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch +++ b/debian/patches-rt/serial-8250-export-symbols-which-are-used-by-symbols.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 16 Feb 2019 09:02:00 +0100 Subject: [PATCH] serial: 8250: export symbols which are used by symbols -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- diff --git a/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch b/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch index 7df88820682a..5f0842f6675a 100644 --- a/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch +++ b/debian/patches-rt/serial-8250-remove-that-trylock-in-serial8250_consol.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 14 Feb 2019 17:38:24 +0100 Subject: [PATCH] serial: 8250: remove that trylock in serial8250_console_write_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz This does not work as rtmutex in NMI context. As per John, it is not needed. diff --git a/debian/patches-rt/series b/debian/patches-rt/series index 6167299cc6c2..9dab6296822b 100644 --- a/debian/patches-rt/series +++ b/debian/patches-rt/series @@ -47,6 +47,7 @@ printk-only-allow-kernel-to-emergency-message.patch printk-devkmsg-llseek-reset-clear-if-it-is-lost.patch printk-print-rate-limitted-message-as-info.patch printk-kmsg_dump-remove-mutex-usage.patch +printk-devkmsg-read-Return-EPIPE-when-the-first-mess.patch ############################################################ # POSTED @@ -74,6 +75,7 @@ efi-Allow-efi-runtime.patch dma-buf-Use-seqlock_t-instread-disabling-preemption.patch softirq-Add-preemptible-softirq.patch +rcu-Acquire-RCU-lock-when-disabling-BHs.patch sched-swait-Add-swait_event_lock_irq.patch # WORKQUEUE workqueue-Make-alloc-apply-free_workqueue_attrs-stat.patch @@ -102,14 +104,17 @@ timers-Drop-expiry-lock-after-each-timer-invocation.patch hrtimer-Introduce-expiry-spin-lock.patch posix-timers-move-rcu-out-of-union.patch posix-timers-expiry-lock.patch +posix-timers-Unlock-expiry-lock-in-the-early-return.patch ############################################################### # Stuff broken upstream and upstream wants something different ############################################################### NFSv4-replace-seqcount_t-with-a-seqlock_t.patch kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch +sched-__set_cpus_allowed_ptr-Check-cpus_mask-not-cpu.patch add_migrate_disable.patch sched-migrate_disable-Add-export_symbol_gpl-for-__mi.patch +sched-Remove-dead-__migrate_disabled-check.patch # Those two should vanish soon (not use PIT during bootup) at91_dont_enable_disable_clock.patch @@ -240,6 +245,7 @@ sched-might-sleep-do-not-account-rcu-depth.patch cond-resched-lock-rt-tweak.patch sched-disable-ttwu-queue.patch rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch +sched-migrate-disable-Protect-cpus_ptr-with-lock.patch # MIGRATE DISABLE AND PER CPU hotplug-light-get-online-cpus.patch @@ -288,8 +294,10 @@ locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch # RCU rcu-Eliminate-softirq-processing-from-rcutree.patch +rcu-Use-rcuc-threads-on-PREEMPT_RT-as-we-did.patch srcu-replace-local_irqsave-with-a-locallock.patch rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch +rcutorture-Avoid-problematic-critical-section-nestin.patch # DRIVERS SERIAL drivers-tty-fix-omap-lock-crap.patch @@ -375,6 +383,7 @@ random-make-it-work-on-rt.patch cpu-hotplug--Implement-CPU-pinning.patch sched-Allow-pinned-user-tasks-to-be-awakened-to-the-.patch hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch +sched-migrate_dis-enable-Use-sleeping_lock-to-annota.patch # NET upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -410,6 +419,8 @@ drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch drm-i915-disable-tracing-on-RT.patch drm-i915-skip-DRM_I915_LOW_LEVEL_TRACEPOINTS-with-NO.patch +drm-i915-Don-t-disable-interrupts-for-intel_engine_b.patch +drm-i915-Drop-the-IRQ-off-asserts.patch # CGROUPS cpuset-Convert-callback_lock-to-raw_spinlock_t.patch diff --git a/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches-rt/signal-revert-ptrace-preempt-magic.patch index 3832611a43c8..8bf85a5add9e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 a446b5bb229b..2aff5984668f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. diff --git a/debian/patches-rt/skbufhead-raw-lock.patch b/debian/patches-rt/skbufhead-raw-lock.patch index 31c5b7b1cffa..bfb00ecb4ada 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 @@ -66,7 +66,7 @@ Signed-off-by: Thomas Gleixner #endif } -@@ -5323,7 +5323,7 @@ static void flush_backlog(struct work_st +@@ -5327,7 +5327,7 @@ static void flush_backlog(struct work_st skb_queue_walk_safe(&sd->input_pkt_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->input_pkt_queue); @@ -75,7 +75,7 @@ Signed-off-by: Thomas Gleixner input_queue_head_incr(sd); } } -@@ -5333,11 +5333,14 @@ static void flush_backlog(struct work_st +@@ -5337,11 +5337,14 @@ static void flush_backlog(struct work_st skb_queue_walk_safe(&sd->process_queue, skb, tmp) { if (skb->dev->reg_state == NETREG_UNREGISTERING) { __skb_unlink(skb, &sd->process_queue); @@ -91,7 +91,7 @@ Signed-off-by: Thomas Gleixner } static void flush_all_backlogs(void) -@@ -5937,7 +5940,9 @@ static int process_backlog(struct napi_s +@@ -5941,7 +5944,9 @@ static int process_backlog(struct napi_s while (again) { struct sk_buff *skb; @@ -101,7 +101,7 @@ Signed-off-by: Thomas Gleixner rcu_read_lock(); __netif_receive_skb(skb); rcu_read_unlock(); -@@ -5945,9 +5950,9 @@ static int process_backlog(struct napi_s +@@ -5949,9 +5954,9 @@ static int process_backlog(struct napi_s if (++work >= quota) return work; @@ -112,7 +112,7 @@ Signed-off-by: Thomas Gleixner rps_lock(sd); if (skb_queue_empty(&sd->input_pkt_queue)) { /* -@@ -6412,13 +6417,21 @@ static __latent_entropy void net_rx_acti +@@ -6416,13 +6421,21 @@ static __latent_entropy void net_rx_acti unsigned long time_limit = jiffies + usecs_to_jiffies(netdev_budget_usecs); int budget = netdev_budget; @@ -134,7 +134,7 @@ Signed-off-by: Thomas Gleixner for (;;) { struct napi_struct *n; -@@ -9529,10 +9542,13 @@ static int dev_cpu_dead(unsigned int old +@@ -9535,10 +9548,13 @@ static int dev_cpu_dead(unsigned int old netif_rx_ni(skb); input_queue_head_incr(oldsd); } @@ -149,7 +149,7 @@ Signed-off-by: Thomas Gleixner return 0; } -@@ -9843,8 +9859,9 @@ static int __init net_dev_init(void) +@@ -9849,8 +9865,9 @@ static int __init net_dev_init(void) INIT_WORK(flush, flush_backlog); diff --git a/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches-rt/slub-disable-SLUB_CPU_PARTIAL.patch index 3debff852715..de5f7267c6d3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 56b7941501a3..95c8b08b10e3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz SYSTEM_RUNNING might be too late for enabling interrupts. Allocations with GFP_WAIT can happen before that. So use this as an indicator. diff --git a/debian/patches-rt/softirq-Add-preemptible-softirq.patch b/debian/patches-rt/softirq-Add-preemptible-softirq.patch index 34134e474264..435bcde261f6 100644 --- a/debian/patches-rt/softirq-Add-preemptible-softirq.patch +++ b/debian/patches-rt/softirq-Add-preemptible-softirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 20 May 2019 13:09:08 +0200 Subject: [PATCH] softirq: Add preemptible softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add preemptible softirq for RT's needs. By removing the softirq count from the preempt counter, the softirq becomes preemptible. A per-CPU diff --git a/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch b/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch index 19ea95fbd276..4663d89c10a8 100644 --- a/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch +++ b/debian/patches-rt/softirq-Avoid-a-cancel-dead-lock-in-tasklet-handling.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 22 Jun 2019 00:09:22 +0200 Subject: [PATCH] softirq: Avoid a cancel dead-lock in tasklet handling due to preemptible-softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz A pending / active tasklet which is preempted by a task on the same CPU will spin indefinitely becauase the tasklet makes no progress. @@ -37,7 +37,7 @@ Signed-off-by: Sebastian Andrzej Siewior #define tasklet_trylock(t) 1 --- a/kernel/softirq.c +++ b/kernel/softirq.c -@@ -705,7 +705,8 @@ void tasklet_kill(struct tasklet_struct +@@ -711,7 +711,8 @@ void tasklet_kill(struct tasklet_struct while (test_and_set_bit(TASKLET_STATE_SCHED, &t->state)) { do { 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 fa9f5fdee888..32aea5059da4 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 0a0d03ee297b..ee179c74bba3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, @@ -128,7 +128,7 @@ Signed-off-by: Thomas Gleixner } EXPORT_SYMBOL(__dev_kfree_skb_irq); -@@ -4294,6 +4296,7 @@ static int enqueue_to_backlog(struct sk_ +@@ -4298,6 +4300,7 @@ static int enqueue_to_backlog(struct sk_ rps_unlock(sd); local_irq_restore(flags); @@ -136,7 +136,7 @@ Signed-off-by: Thomas Gleixner atomic_long_inc(&skb->dev->rx_dropped); kfree_skb(skb); -@@ -5899,12 +5902,14 @@ static void net_rps_action_and_irq_enabl +@@ -5903,12 +5906,14 @@ static void net_rps_action_and_irq_enabl sd->rps_ipi_list = NULL; local_irq_enable(); @@ -151,7 +151,7 @@ Signed-off-by: Thomas Gleixner } static bool sd_has_rps_ipi_waiting(struct softnet_data *sd) -@@ -5982,6 +5987,7 @@ void __napi_schedule(struct napi_struct +@@ -5986,6 +5991,7 @@ void __napi_schedule(struct napi_struct local_irq_save(flags); ____napi_schedule(this_cpu_ptr(&softnet_data), n); local_irq_restore(flags); @@ -159,7 +159,7 @@ Signed-off-by: Thomas Gleixner } EXPORT_SYMBOL(__napi_schedule); -@@ -9511,6 +9517,7 @@ static int dev_cpu_dead(unsigned int old +@@ -9517,6 +9523,7 @@ static int dev_cpu_dead(unsigned int old raise_softirq_irqoff(NET_TX_SOFTIRQ); local_irq_enable(); diff --git a/debian/patches-rt/spinlock-types-separate-raw.patch b/debian/patches-rt/spinlock-types-separate-raw.patch index 185342bbb633..db7c1ee2dfec 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 e059bb632b11..eeeb0e2d8648 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 aef22ff13dae..dd053c4845b7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz There are two instances which disable interrupts in order to become a stable this_cpu_ptr() pointer. The restore part is coupled with diff --git a/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches-rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch index a0737477fb7d..1b22fa44176f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 9d52ce34c64d..8113bf95cb36 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch b/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch index 66a659d41221..9b644bfb0495 100644 --- a/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch +++ b/debian/patches-rt/thermal-x86_pkg_temp-make-pkg_temp_lock-a-raw-spinlo.patch @@ -1,7 +1,7 @@ From: Clark Williams Date: Mon, 15 Jul 2019 15:25:00 -0500 Subject: [PATCH] thermal/x86_pkg_temp: make pkg_temp_lock a raw spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The spinlock pkg_temp_lock has the potential of being taken in atomic context on v5.2-rt PREEMPT_RT. It's static and limited scope so diff --git a/debian/patches-rt/timekeeping-split-jiffies-lock.patch b/debian/patches-rt/timekeeping-split-jiffies-lock.patch index 0f366ba873b5..b42402d8e8f7 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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-Drop-expiry-lock-after-each-timer-invocation.patch b/debian/patches-rt/timers-Drop-expiry-lock-after-each-timer-invocation.patch index 9928976092d3..1a9f6a76f5e2 100644 --- a/debian/patches-rt/timers-Drop-expiry-lock-after-each-timer-invocation.patch +++ b/debian/patches-rt/timers-Drop-expiry-lock-after-each-timer-invocation.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Thu, 10 Jan 2019 13:00:07 +0100 Subject: [PATCH] timers: Drop expiry lock after each timer invocation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The ->expiry_lock lock is held until every timer is expired. So if a __del_timer_sync() caller blocks on the lock then it has to wait until diff --git a/debian/patches-rt/timers-Introduce-expiry-spin-lock.patch b/debian/patches-rt/timers-Introduce-expiry-spin-lock.patch index 0f3aa82f077c..94a5e12d4cbb 100644 --- a/debian/patches-rt/timers-Introduce-expiry-spin-lock.patch +++ b/debian/patches-rt/timers-Introduce-expiry-spin-lock.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Thu, 10 Jan 2019 13:00:06 +0100 Subject: [PATCH] timers: Introduce expiry spin lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz When del_timer_sync() is called, it is possible, that the CPU has to spin, because the timer is marked as running. The function will diff --git a/debian/patches-rt/timers-prepare-for-full-preemption.patch b/debian/patches-rt/timers-prepare-for-full-preemption.patch index 068f2dbb36af..7a6dd5a23fb5 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 diff --git a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch index 54f6eb5cda7a..fb8ef54ddd70 100644 --- a/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch +++ b/debian/patches-rt/tpm-remove-tpm_dev_wq_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Feb 2019 11:33:11 +0100 Subject: [PATCH] tpm: remove tpm_dev_wq_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Added in commit diff --git a/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch b/debian/patches-rt/tpm_tis-fix-stall-after-iowrite-s.patch index 9ec1a4697587..3a4c242e1cc9 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. diff --git a/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch index 9cf617045d34..049e2f934812 100644 --- a/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch +++ b/debian/patches-rt/tty-serial-pl011-warning-about-uninitialized.patch @@ -4,7 +4,7 @@ Subject: [PATCH] tty: serial: pl011: explicitly initialize the flags variable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Silence the following gcc warning: diff --git a/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches-rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch index 63dccbcb80b5..57e4f0f093e8 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by @@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner --- a/net/core/dev.c +++ b/net/core/dev.c -@@ -4515,7 +4515,7 @@ static int netif_rx_internal(struct sk_b +@@ -4519,7 +4519,7 @@ static int netif_rx_internal(struct sk_b struct rps_dev_flow voidflow, *rflow = &voidflow; int cpu; @@ -47,7 +47,7 @@ Signed-off-by: Thomas Gleixner rcu_read_lock(); cpu = get_rps_cpu(skb->dev, skb, &rflow); -@@ -4525,14 +4525,14 @@ static int netif_rx_internal(struct sk_b +@@ -4529,14 +4529,14 @@ static int netif_rx_internal(struct sk_b ret = enqueue_to_backlog(skb, cpu, &rflow->last_qtail); rcu_read_unlock(); diff --git a/debian/patches-rt/wait.h-include-atomic.h.patch b/debian/patches-rt/wait.h-include-atomic.h.patch index c6da5142973a..6f9c5f441e1d 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz | CC init/main.o |In file included from include/linux/mmzone.h:9:0, diff --git a/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch index ed1bfa41a89b..0ed20e9f6063 100644 --- a/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch +++ b/debian/patches-rt/watchdog-prevent-deferral-of-watchdogd-wakeup-on-RT.patch @@ -1,7 +1,7 @@ From: Julia Cartwright Date: Fri, 28 Sep 2018 21:03:51 +0000 Subject: [PATCH] watchdog: prevent deferral of watchdogd wakeup on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz When PREEMPT_RT_FULL is enabled, all hrtimer expiry functions are deferred for execution into the context of ktimersoftd unless otherwise diff --git a/debian/patches-rt/workqueue-Convert-the-locks-to-raw-type.patch b/debian/patches-rt/workqueue-Convert-the-locks-to-raw-type.patch index 09212d1d48ed..5c7d0a20eb78 100644 --- a/debian/patches-rt/workqueue-Convert-the-locks-to-raw-type.patch +++ b/debian/patches-rt/workqueue-Convert-the-locks-to-raw-type.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 22 May 2019 12:43:56 +0200 Subject: [PATCH] workqueue: Convert the locks to raw type -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz After all the workqueue and the timer rework, we can finally make the worker_pool lock raw. diff --git a/debian/patches-rt/workqueue-Make-alloc-apply-free_workqueue_attrs-stat.patch b/debian/patches-rt/workqueue-Make-alloc-apply-free_workqueue_attrs-stat.patch index 976b440a894d..3f70da84b846 100644 --- a/debian/patches-rt/workqueue-Make-alloc-apply-free_workqueue_attrs-stat.patch +++ b/debian/patches-rt/workqueue-Make-alloc-apply-free_workqueue_attrs-stat.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 21 May 2019 16:35:12 +0200 Subject: [PATCH] workqueue: Make alloc/apply/free_workqueue_attrs() static -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz None of those functions have any users outside of workqueue.c. Confine them. diff --git a/debian/patches-rt/workqueue-Remove-GPF-argument-from-alloc_workqueue_a.patch b/debian/patches-rt/workqueue-Remove-GPF-argument-from-alloc_workqueue_a.patch index 49b325309c50..de76e600e583 100644 --- a/debian/patches-rt/workqueue-Remove-GPF-argument-from-alloc_workqueue_a.patch +++ b/debian/patches-rt/workqueue-Remove-GPF-argument-from-alloc_workqueue_a.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Tue, 21 May 2019 16:39:56 +0200 Subject: [PATCH] workqueue: Remove GPF argument from alloc_workqueue_attrs() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz All callers use GFP_KERNEL. No point in having that argument. diff --git a/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch b/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch index dcd750819495..23992d21305c 100644 --- a/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch +++ b/debian/patches-rt/x86-Disable-HAVE_ARCH_JUMP_LABEL.patch @@ -4,7 +4,7 @@ Subject: [PATCH] x86: Disable HAVE_ARCH_JUMP_LABEL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz __text_poke() does: | local_irq_save(flags); 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 a58e59e4220a..574d69063050 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch b/debian/patches-rt/x86-highmem-add-a-already-used-pte-check.patch index 7abe0ae60daa..8550e4e8553f 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 84def961a8f8..16c12882c03c 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2e8bb8a5a40f..453ed056179e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 -@@ -7017,6 +7017,14 @@ int kvm_arch_init(void *opaque) +@@ -7025,6 +7025,14 @@ int kvm_arch_init(void *opaque) goto out; } diff --git a/debian/patches-rt/x86-ldt-Initialize-the-context-lock-for-init_mm.patch b/debian/patches-rt/x86-ldt-Initialize-the-context-lock-for-init_mm.patch index 39a044859db8..9aa9603a6f4b 100644 --- a/debian/patches-rt/x86-ldt-Initialize-the-context-lock-for-init_mm.patch +++ b/debian/patches-rt/x86-ldt-Initialize-the-context-lock-for-init_mm.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 1 Jul 2019 17:53:13 +0200 Subject: [PATCH] x86/ldt: Initialize the context lock for init_mm -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz The mutex mm->context->lock for init_mm is not initialized for init_mm. This wasn't a problem because it remained unused. This changed however diff --git a/debian/patches-rt/x86-preempt-Check-preemption-level-before-looking-at.patch b/debian/patches-rt/x86-preempt-Check-preemption-level-before-looking-at.patch index b5f94af661ef..25d3f0bdc783 100644 --- a/debian/patches-rt/x86-preempt-Check-preemption-level-before-looking-at.patch +++ b/debian/patches-rt/x86-preempt-Check-preemption-level-before-looking-at.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Aug 2019 17:08:58 +0200 Subject: [PATCH] x86: preempt: Check preemption level before looking at lazy-preempt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Before evaluating the lazy-preempt state it must be ensure that the preempt-count is zero. diff --git a/debian/patches-rt/x86-preempt-lazy.patch b/debian/patches-rt/x86-preempt-lazy.patch index 9655ed8e94cc..b35d3a52330e 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.tar.xz Implement the x86 pieces for lazy preempt. 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 6a8951bd602d..0c175d32a4d3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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 2b4bab23ebd9..e52c032a95f3 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/5.2/older/patches-5.2.14-rt7.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/5.2/older/patches-5.2.17-rt9.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