From baa5254a6f29ddd0c4eef8f42312a29cc7c0572c Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 22 May 2018 00:55:31 +0200 Subject: [PATCH] [rt] Update to 4.16.8-rt3 --- debian/changelog | 1 + ...M-at91-add-TCB-registers-definitions.patch | 2 +- ..._t-for-reference-counting-instead-at.patch | 103 +++++ ...ck-loop-in-locking-dentries-on-shrin.patch | 2 +- ...nto-account-that-alloc_dev_data-may-.patch | 2 +- ...se-raw-locks-on-atomic-context-paths.patch | 2 +- ...d-modifier-parsing-hist-error-for-hi.patch | 50 +++ ...ers-Add-a-new-driver-for-the-Atmel-A.patch | 2 +- ...use-dev_data-in-irte_ga_set_affinity.patch | 2 +- ...-dev_data_list-into-a-lock-less-list.patch | 2 +- ..._parent-can-t-run-into-killed-dentry.patch | 2 +- ...d-parsing-hist-error-for-hist-trigge.patch | 50 +++ ...unt_t-for-reference-counting-instead.patch | 83 ++++ ...drivers-atmel-pit-make-option-silent.patch | 2 +- ...locking-get_irq_table-from-atomic-co.patch | 2 +- ...domain-id-out-of-amd_iommu_devtable_.patch | 2 +- ...count_t-for-reference-counting-inste.patch | 365 ++++++++++++++++++ ...lit-the-slow-part-of-lock_parent-off.patch | 2 +- ...proper-field-flag-printing-when-disp.patch | 66 ++++ ...at91-Implement-clocksource-selection.patch | 2 +- ...-the-do-we-need-to-retain-it-into-an.patch | 2 +- ...irq_lookup_table-out-of-the-amd_iomm.patch | 2 +- ...-implement-refcount_dec_and_lock_irq.patch | 69 ++++ ...lized-variable-in-create_tracing_map.patch | 37 ++ ...onfigs-at91-use-new-TCB-timer-driver.patch | 2 +- ...ve-variant-of-refcount_dec_and_lock.patch} | 12 +- ...-handle-move-to-LRU-in-retain_dentry.patch | 2 +- ...-the-special-case-from-alloc_irq_tab.patch | 2 +- ...ing-Fix-a-potential-NULL-dereference.patch | 30 ++ .../0006-ARM-configs-at91-unselect-PIT.patch | 2 +- ...d-of-trylock-loop-around-dentry_kill.patch | 2 +- ...ble-instead-irt-as-variable-name-in-.patch | 2 +- ...ve-variant-of-refcount_dec_and_lock.patch} | 11 +- ...a-try_lock-loop-in-shrink_dentry_lis.patch | 2 +- ...-out-setting-the-remap-table-for-a-d.patch | 2 +- ...ave-variant-of-refcount_dec_and_loc.patch} | 12 +- .../all/rt/0008-dcache.c-trim-includes.patch | 2 +- ...he-lock-while-allocating-new-irq-rem.patch | 2 +- ...isable-irq-on-release_inactive_stri.patch} | 5 +- ...-amd_iommu_devtable_lock-a-spin_lock.patch | 2 +- ...ath-and-friends-into-a-separate-file.patch | 2 +- ...t-trigger-Documentation-to-histogram.patch | 2 +- ...-proper-error-code-in-irq_remapping_.patch | 2 +- ...an-externs-empty_string-slash_string.patch | 2 +- ...-Add-Documentation-for-log2-modifier.patch | 2 +- ...-fold-lookup_real-into-__lookup_hash.patch | 2 +- ...pport-to-detect-and-avoid-duplicates.patch | 2 +- ...up-switch-to-lookup_one_len_unlocked.patch | 2 +- ...-Remove-code-which-merges-duplicates.patch | 2 +- ...-of-pointless-casts-to-struct-dentry.patch | 2 +- ...interface-for-setting-absolute-time-.patch | 2 +- ...efs-don-t-oops-on-allocation-failure.patch | 2 +- ...fine-the-unimplemented-RINGBUF_TYPE_.patch | 2 +- ...ing-__d_move-copy-d_parent-rather-th.patch | 2 +- ...racing-Add-timestamp_mode-trace-file.patch | 2 +- ..._for_move-into-its-sole-caller-and-c.patch | 2 +- ...nt-triggers-access-to-ring_buffer_ev.patch | 2 +- ...d_genocide-move-export-to-definition.patch | 2 +- ...-buffer-event-param-to-hist-field-fu.patch | 2 +- ...-out-hist-trigger-assignment-parsing.patch | 2 +- ...g-Add-hist-trigger-timestamp-support.patch | 2 +- ...element-variable-support-to-tracing_.patch | 2 +- ...g-Add-hist_data-member-to-hist_field.patch | 2 +- ...s-modifier-for-hist-trigger-timestam.patch | 2 +- ...dd-variable-support-to-hist-triggers.patch | 2 +- ...for-variables-in-named-trigger-compa.patch | 2 +- ...25-tracing-Move-get_hist_field_flags.patch | 2 +- ...le-expression-support-to-hist-trigge.patch | 2 +- ...ralize-per-element-hist-trigger-data.patch | 2 +- ...cing_map_elt-to-hist_field-accessor-.patch | 2 +- ...29-tracing-Add-hist_field-type-field.patch | 2 +- ...able-reference-handling-to-hist-trig.patch | 2 +- ...tracing-Add-hist-trigger-action-hook.patch | 2 +- ...ing-Add-support-for-synthetic-events.patch | 2 +- ...cing-Add-support-for-field-variables.patch | 2 +- ...-onmatch-hist-trigger-action-support.patch | 2 +- ...dd-onmax-hist-trigger-action-support.patch | 2 +- ...itespace-to-surround-hist-trigger-fi.patch | 2 +- ...cing-Add-cpu-field-for-hist-triggers.patch | 2 +- ...-trigger-support-for-variable-refere.patch | 2 +- ...-error-error-facility-for-hist-trigg.patch | 2 +- ...ter-event-hist-trigger-Documentation.patch | 2 +- ...ng-Make-tracing_set_clock-non-static.patch | 2 +- ...-a-clock-attribute-for-hist-triggers.patch | 2 +- ...nesting-for-adding-events-within-eve.patch | 2 +- ...ring-buffer-nesting-to-allow-synthet.patch | 2 +- ...r-event-blurb-to-HIST_TRIGGERS-confi.patch | 2 +- ...-Add-inter-event-hist-triggers-testc.patch | 2 +- ...cpi_gbl_hardware-lock-back-to-an-acp.patch | 2 +- ...ovide-abstraction-for-raw_spinlock_t.patch | 2 +- ...cal_irq_disable-enable-and-local_irq.patch | 2 +- ...n-translation-section-permission-fau.patch | 2 +- ...intk-drop-the-logbuf_lock-more-often.patch | 2 +- ...-local_irq_disable-with-proper-locki.patch | 2 +- ...wngrade-preempt_disable-d-region-to-.patch | 2 +- ...-replace-seqcount_t-with-a-seqlock_t.patch | 2 +- ...edule-in-RCU-section-warning-on-UP-t.patch | 2 +- ...kip-that-warning-but-only-on-sleepin.patch | 2 +- ...t.c-fix-vmstat_update-preemption-BUG.patch | 2 +- ...-remove-irq-save-in-sas_ata_qc_issue.patch | 2 +- ...2xxx-remove-irq-save-in-qla2x00_poll.patch | 2 +- .../features/all/rt/add_migrate_disable.patch | 2 +- ...-move-irq-restore-before-pci_dev_put.patch | 2 +- ...-a-locallock-instead-preempt_disable.patch | 2 +- .../arch-arm64-Add-lazy-preempt-support.patch | 2 +- .../all/rt/arm-convert-boot-lock-to-raw.patch | 2 +- .../rt/arm-disable-NEON-in-kernel-mode.patch | 2 +- .../all/rt/arm-enable-highmem-for-rt.patch | 2 +- .../rt/arm-highmem-flush-tlb-on-unmap.patch | 2 +- ...arm-include-definition-for-cpumask_t.patch | 2 +- ...probe-replace-patch_lock-to-raw-lock.patch | 2 +- .../all/rt/arm-preempt-lazy-support.patch | 2 +- .../all/rt/arm-unwind-use_raw_lock.patch | 2 +- ...-a-local_lock-instead-of-local_bh_di.patch | 150 +++++++ ...arm64-xen--Make-XEN-depend-on-non-rt.patch | 4 +- .../rt/at91_dont_enable_disable_clock.patch | 2 +- .../rt/block-Remove-redundant-WARN_ON.patch | 2 +- ...abling-interrupts-during-kmap_atomic.patch | 2 +- ...e-blk_queue_usage_counter_release-in.patch | 2 +- ...k-mq-don-t-complete-requests-via-IPI.patch | 2 +- .../rt/block-mq-drop-preempt-disable.patch | 2 +- .../all/rt/block-mq-use-cpu_light.patch | 2 +- ...k-shorten-interrupt-disabled-regions.patch | 2 +- .../features/all/rt/block-use-cpu-chill.patch | 2 +- ...roups-use-simple-wait-in-css_release.patch | 2 +- ...source-tclib-allow-higher-clockrates.patch | 2 +- .../completion-use-simple-wait-queues.patch | 2 +- .../all/rt/cond-resched-lock-rt-tweak.patch | 2 +- .../all/rt/cond-resched-softirq-rt.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 +- .../rt/cpumask-disable-offstack-on-rt.patch | 2 +- ...vert-callback_lock-to-raw_spinlock_t.patch | 2 +- ...-preempt-disabled-regions-more-algos.patch | 2 +- ...ypto-limit-more-FPU-enabled-sections.patch | 2 +- .../rt/d_delete-get-rid-of-trylock-loop.patch | 2 +- .../features/all/rt/debugobjects-rt.patch | 2 +- .../all/rt/delayacct-use-raw_spinlocks.patch | 2 +- ...rq-remove-BUG_ON-irqs_disabled-check.patch | 2 +- ...am-Replace-bit-spinlocks-with-rtmute.patch | 2 +- ...andom-reduce-preempt-disabled-region.patch | 2 +- .../rt/drivers-tty-fix-omap-lock-crap.patch | 2 +- ...rivers-tty-pl011-irq-disable-madness.patch | 2 +- ...-t-disable-preemption-in-zcomp_strea.patch | 2 +- ...-zcomp_stream_get-smp_processor_id-u.patch | 2 +- ...rq()_in_intel_pipe_update_startend().patch | 2 +- ...disableenable_rt()_where_recommended.patch | 2 +- .../all/rt/epoll-use-get-cpu-light.patch | 2 +- .../all/rt/fs-aio-simple-simple-work.patch | 2 +- ...e-Move-dentry_kill-below-lock_parent.patch | 2 +- ...emove-stale-comment-from-dentry_kill.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 +- .../all/rt/fs-jbd-replace-bh_state-lock.patch | 2 +- .../all/rt/fs-namespace-preemption-fix.patch | 2 +- ...-nfs-turn-rmdir_sem-into-a-semaphore.patch | 2 +- .../fs-replace-bh_uptodate_lock-for-rt.patch | 2 +- .../ftrace-Fix-trace-header-alignment.patch | 2 +- .../rt/ftrace-migrate-disable-tracing.patch | 2 +- ...k-unlock-symetry-versus-pi_lock-and-.patch | 2 +- .../all/rt/futex-requeue-pi-fix.patch | 2 +- ...-migrate_disable-enable-in-different.patch | 2 +- .../all/rt/genirq-disable-irqpoll-on-rt.patch | 2 +- ...voke-the-affinity-callback-via-a-wor.patch | 2 +- .../all/rt/genirq-force-threading.patch | 2 +- ...-irq_set_irqchip_state-documentation.patch | 2 +- ...duct-tape-RT-rwlock-usage-for-non-RT.patch | 2 +- .../rt/hotplug-light-get-online-cpus.patch | 2 +- ...-schedule_work-call-to-helper-thread.patch | 2 +- ...-by-default-into-the-softirq-context.patch | 4 +- ...ate-hrtimer_init-hrtimer_init_sleepe.patch | 2 +- .../rt/hrtimers-prepare-full-preemption.patch | 2 +- ...isable-interrupts-during-kmap_atomic.patch | 2 +- ...e-interrupts-if-they-are-already-dis.patch | 2 +- ...-disable-interrupts-in-force-threade.patch | 2 +- ...4_stats_sync.h-Remove-functions-with.patch | 2 +- ...up-locking-in-__attach-detach_device.patch | 2 +- ...amd-Do-not-flush-when-device-is-busy.patch | 2 +- ...t-possible-null-pointer-dereference-.patch | 2 +- ...mmu-amd-hide-unused-iommu_table_lock.patch | 2 +- ...irq-processing-in-irq-thread-context.patch | 2 +- ...rk-Move-irq-safe-work-to-irq-context.patch | 2 +- ...-push_most_work_into_softirq_context.patch | 2 +- .../features/all/rt/jump-label-rt.patch | 2 +- .../rt/kconfig-disable-a-few-options-rt.patch | 2 +- .../all/rt/kconfig-preempt-rt-full.patch | 2 +- ...el-SRCU-provide-a-static-initializer.patch | 2 +- ...n-t-try-to-print-from-IRQ-NMI-region.patch | 2 +- ...vide-a-pointer-to-the-valid-CPU-mask.patch | 2 +- ...e-stack-kprobe-clean-up-to-__put_tas.patch | 2 +- ...move-no-longer-required-irqsave-rest.patch | 2 +- .../kernel-softirq-unlock-with-irqs-on.patch | 2 +- .../all/rt/kgb-serial-hackaround.patch | 2 +- ...ds-trigger-disable-CPU-trigger-on-RT.patch | 2 +- ...ibata-remove-ata_sff_data_xfer_noirq.patch | 2 +- .../list_bl-fixup-bogus-lockdep-warning.patch | 2 +- ..._bl.h-make-list-head-locking-RT-safe.patch | 2 +- ...provide-get-put-_locked_ptr-variants.patch | 43 +++ .../features/all/rt/localversion.patch | 4 +- .../rt/lockdep-Add-a-assert_in_softirq.patch | 2 +- .../all/rt/lockdep-disable-self-test.patch | 2 +- .../lockdep-no-softirq-accounting-on-rt.patch | 2 +- ...-fix-warnings-due-to-missing-PREEMPT.patch | 2 +- ...ardirq-context-test-for-raw-spinlock.patch | 2 +- ...eck-for-__LINUX_SPINLOCK_TYPES_H-on-.patch | 2 +- ...ure-Do-NOT-include-rwlock.h-directly.patch | 2 +- ...-fix-deadlock-in-device-mapper-block.patch | 2 +- ...Handle-non-enqueued-waiters-graceful.patch | 2 +- ...mutex-don-t-drop-the-wait_lock-twice.patch | 2 +- ...re-init-the-wait_lock-in-rt_mutex_in.patch | 2 +- .../features/all/rt/md-disable-bcache.patch | 2 +- .../md-raid5-percpu-handling-rt-aware.patch | 6 +- ...fd-syscon-atmel-smc-include-string.h.patch | 2 +- .../all/rt/mips-disable-highmem-on-rt.patch | 2 +- ...--rt--Fix-generic-kmap_atomic-for-RT.patch | 2 +- .../rt/mm-convert-swap-to-percpu-locked.patch | 2 +- .../features/all/rt/mm-disable-sloub-rt.patch | 2 +- .../features/all/rt/mm-enable-slub.patch | 2 +- .../all/rt/mm-make-vmstat-rt-aware.patch | 2 +- .../rt/mm-memcontrol-do_not_disable_irq.patch | 2 +- ...e-alloc-use-local-lock-on-target-cpu.patch | 2 +- ...e_alloc-reduce-lock-sections-further.patch | 2 +- ...page_alloc-rt-friendly-per-cpu-pages.patch | 2 +- ...m-perform-lru_add_drain_all-remotely.patch | 2 +- .../rt/mm-protect-activate-switch-mm.patch | 2 +- .../all/rt/mm-rt-kmap-atomic-scheduling.patch | 2 +- ...-scatterlist-dont-disable-irqs-on-RT.patch | 2 +- .../all/rt/mm-vmalloc-use-get-cpu-light.patch | 2 +- ...-not-protect-workingset_shadow_nodes.patch | 2 +- ...oc_copy_with_get_cpu_var_and_locking.patch | 2 +- .../all/rt/mmci-remove-bogus-irq-save.patch | 2 +- .../features/all/rt/mutex-no-spin-on-rt.patch | 2 +- ...ove-boomerang-vortex-conditional-int.patch | 2 +- ...t-3com-3c59x-Pull-locking-out-of-ISR.patch | 2 +- ...t-3com-3c59x-irq-save-variant-of-ISR.patch | 2 +- ...schedule_irqoff-disable-interrupts-o.patch | 2 +- ...Qdisc-use-a-seqlock-instead-seqcount.patch | 2 +- .../rt/net-add-a-lock-around-icmp_sk.patch | 2 +- ...-missing-serialization-in-ip_send_un.patch | 2 +- ...al-irq-disable-alloc-atomic-headache.patch | 2 +- ...tplug-drain-input_pkt_queue-lockless.patch | 2 +- ...-users-of-napi_alloc_cache-against-r.patch | 2 +- ...-use-local_bh_disable-in-netif_rx_ni.patch | 2 +- ...ake-qdisc-s-busylock-in-__dev_xmit_s.patch | 2 +- ...ble-xt-write-recseq-begin-rt-fallout.patch | 2 +- .../all/rt/net-mac808211-rc-warn_on.patch | 2 +- .../net-make-devnet_rename_seq-a-mutex.patch | 2 +- ...recursion-to-per-task-variable-on-RT.patch | 2 +- ...y-to-delegate-processing-a-softirq-t.patch | 2 +- ...activate_many-use-msleep-1-instead-o.patch | 2 +- ...he-tcp_sk_lock-lock-with-BH-disabled.patch | 2 +- .../features/all/rt/net-use-cpu-chill.patch | 2 +- ...uct-instead-of-CPU-number-as-the-que.patch | 2 +- .../all/rt/net-use-trylock-in-icmp_sk.patch | 2 +- .../all/rt/net_disable_NET_RX_BUSY_POLL.patch | 2 +- ...vent-erroneous-tick-stop-invocations.patch | 2 +- ...abling-interrupts-during-kmap_atomic.patch | 2 +- .../features/all/rt/oleg-signal-rt-fix.patch | 2 +- .../all/rt/panic-disable-random-on-rt.patch | 2 +- ...ce-rcu-bh-qs-where-safe-from-softirq.patch | 2 +- ...ec-Don-t-use-completion-s-wait-queue.patch | 2 +- ...irqsave-instead-of-local_irq_save-sp.patch | 2 +- .../all/rt/peter_zijlstra-frob-rcu.patch | 2 +- .../all/rt/peterz-percpu-rwsem-rt.patch | 2 +- .../all/rt/peterz-srcu-crypto-chain.patch | 2 +- .../all/rt/pid.h-include-atomic.h.patch | 2 +- ...-remove-lockdep_assert_irqs_disabled.patch | 2 +- ...s-move-the-rcu-head-out-of-the-union.patch | 2 +- .../all/rt/posix-timers-no-broadcast.patch | 2 +- ...timers-thread-posix-cpu-timers-on-rt.patch | 2 +- .../all/rt/power-disable-highmem-on-rt.patch | 2 +- .../rt/power-use-generic-rwsem-on-rt.patch | 2 +- ...ble-in-kernel-MPIC-emulation-for-PRE.patch | 2 +- .../all/rt/powerpc-preempt-lazy-support.patch | 2 +- ...ce-init.c-adapt-to-completions-using.patch | 2 +- .../all/rt/preempt-lazy-support.patch | 2 +- .../all/rt/preempt-nort-rt-variants.patch | 2 +- ...27-boot-param-to-help-with-debugging.patch | 2 +- .../patches/features/all/rt/printk-kill.patch | 2 +- .../features/all/rt/printk-rt-aware.patch | 2 +- ...ace-fix-ptrace-vs-tasklist_lock-race.patch | 2 +- .../all/rt/radix-tree-use-local-locks.patch | 2 +- ...dom-avoid-preempt_disable-ed-section.patch | 2 +- .../all/rt/random-make-it-work-on-rt.patch | 2 +- ...tree-include-rcu.h-because-we-use-it.patch | 2 +- ...nate-softirq-processing-from-rcutree.patch | 2 +- .../rt/rcu-disable-rcu-fast-no-hz-on-rt.patch | 2 +- ..._normal_after_boot-by-default-for-RT.patch | 2 +- .../rt/rcu-make-RCU_BOOST-default-on-RT.patch | 2 +- ...merge-rcu-bh-into-rcu-preempt-for-rt.patch | 2 +- ...s-disable-irq-while-calling-rcu_pree.patch | 2 +- ...l-arm-coredump-fails-for-cpu-3e-3d-4.patch | 2 +- ...function-called-from-invalid-context.patch | 2 +- ...ease-the-nr-of-migratory-tasks-when-.patch | 2 +- .../all/rt/rt-introduce-cpu-chill.patch | 2 +- .../features/all/rt/rt-local-irq-lock.patch | 2 +- .../all/rt/rt-preempt-base-config.patch | 2 +- .../features/all/rt/rt-serial-warn-fix.patch | 2 +- .../rt/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 | 2 +- .../all/rt/rtmutex-avoid-include-hell.patch | 2 +- ...ockdep-less-version-of-rt_mutex-s-lo.patch | 2 +- .../all/rt/rtmutex-futex-prepare-rt.patch | 2 +- .../all/rt/rtmutex-lock-killable.patch | 2 +- .../rt/rtmutex-trylock-is-okay-on-RT.patch | 2 +- .../all/rt/rtmutex-wire-up-RT-s-locking.patch | 2 +- .../all/rt/rtmutex_dont_include_rcu.patch | 2 +- ...rxrpc-remove-unused-static-variables.patch | 2 +- ...sk-state-corruption-by-spurious-lock.patch | 2 +- .../all/rt/sched-Remove-TASK_ALL.patch | 2 +- .../all/rt/sched-delay-put-task.patch | 2 +- .../sched-disable-rt-group-sched-on-rt.patch | 2 +- .../all/rt/sched-disable-ttwu-queue.patch | 2 +- ...FS-bandwidth-control-lockdep-DEADLOC.patch | 49 +++ ...q_count-return-0-if-inside-local_bh_.patch | 30 ++ .../all/rt/sched-limit-nr-migrate.patch | 2 +- ...might-sleep-do-not-account-rcu-depth.patch | 2 +- .../all/rt/sched-mmdrop-delayed.patch | 2 +- .../all/rt/sched-rt-mutex-wakeup.patch | 2 +- .../all/rt/sched-swait-include-wait.h.patch | 2 +- ...twu-ensure-success-return-is-correct.patch | 2 +- ...Only-wake-up-idle-workers-if-not-blo.patch | 2 +- .../features/all/rt/scsi-fcoe-rt-aware.patch | 2 +- .../rt/seqlock-prevent-rt-starvation.patch | 2 +- .../signal-revert-ptrace-preempt-magic.patch | 2 +- ...t-tasks-to-cache-one-sigqueue-struct.patch | 2 +- .../features/all/rt/skbufhead-raw-lock.patch | 2 +- .../rt/slub-disable-SLUB_CPU_PARTIAL.patch | 2 +- .../all/rt/slub-enable-irqs-for-no-wait.patch | 2 +- ...oftirq-disable-softirq-stacks-for-rt.patch | 2 +- .../all/rt/softirq-preempt-fix-3-re.patch | 2 +- .../features/all/rt/softirq-split-locks.patch | 2 +- ...plit-timer-softirqs-out-of-ksoftirqd.patch | 2 +- ...irq-wake-the-timer-softirq-if-needed.patch | 2 +- ..._dec_and_lock-Add-an-irqsave-variant.patch | 59 --- .../all/rt/spinlock-types-separate-raw.patch | 2 +- ...e-of-local-lock-in-multi_cpu-decompr.patch | 66 ++++ ...place-local_irqsave-with-a-locallock.patch | 2 +- ...-use-cpu_online-instead-custom-check.patch | 2 +- .../all/rt/stop-machine-raw-lock.patch | 2 +- ...vc_xprt_do_enqueue-use-get_cpu_light.patch | 2 +- .../suspend-prevernt-might-sleep-splats.patch | 2 +- .../all/rt/sysfs-realtime-entry.patch | 2 +- ...te_seqcount_invalidate-into-__d_drop.patch | 2 +- ...-from-going-into-infinite-spin-in-rt.patch | 2 +- ...rmal-Defer-thermal-wakups-to-threads.patch | 2 +- ...id-schedule_work-with-interrupts-dis.patch | 2 +- .../rt/timekeeping-split-jiffies-lock.patch | 2 +- ...-waking-softirqs-from-the-jiffy-tick.patch | 2 +- .../all/rt/timer-fd-avoid-live-lock.patch | 2 +- .../timers-prepare-for-full-preemption.patch | 2 +- .../tpm_tis-fix-stall-after-iowrite-s.patch | 2 +- ...lay-of-hist-trigger-expressions-cont.patch | 82 ++++ ...0-don-t-take-the-trylock-during-oops.patch | 2 +- ...-use-port-name-as-name-in-request_ir.patch | 2 +- ...ove-preemption-disabling-in-netif_rx.patch | 2 +- ...o-not-disable-interrupts-in-giveback.patch | 2 +- .../all/rt/wait.h-include-atomic.h.patch | 2 +- ...rk-around-irqsafe-timer-optimization.patch | 2 +- ...mple-Simple-work-queue-implemenation.patch | 2 +- .../rt/workqueue-distangle-from-rq-lock.patch | 2 +- .../rt/workqueue-prevent-deadlock-stall.patch | 2 +- .../all/rt/workqueue-use-locallock.patch | 2 +- .../features/all/rt/workqueue-use-rcu.patch | 2 +- .../rt/x86-UV-raw_spinlock-conversion.patch | 2 +- ...ypto-reduce-preempt-disabled-regions.patch | 2 +- ...highmem-add-a-already-used-pte-check.patch | 2 +- .../all/rt/x86-io-apic-migra-no-unmask.patch | 2 +- .../rt/x86-kvm-require-const-tsc-for-rt.patch | 2 +- .../all/rt/x86-mce-timer-hrtimer.patch | 165 -------- ...-mce-use-swait-queue-for-mce-wakeups.patch | 126 ------ .../features/all/rt/x86-preempt-lazy.patch | 2 +- ...ignal-delay-calling-signals-on-32bit.patch | 2 +- .../rt/x86-stackprot-no-random-on-rt.patch | 2 +- .../rt/x86-use-gen-rwsem-spinlocks-rt.patch | 2 +- ...9pfs-don-t-inclide-rwlock.h-directly.patch | 2 +- debian/patches/series-rt | 59 +-- 386 files changed, 1698 insertions(+), 759 deletions(-) create mode 100644 debian/patches/features/all/rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch create mode 100644 debian/patches/features/all/rt/0001-tracing-Add-field-modifier-parsing-hist-error-for-hi.patch create mode 100644 debian/patches/features/all/rt/0002-tracing-Add-field-parsing-hist-error-for-hist-trigge.patch create mode 100644 debian/patches/features/all/rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch create mode 100644 debian/patches/features/all/rt/0003-md-raid5-use-refcount_t-for-reference-counting-inste.patch create mode 100644 debian/patches/features/all/rt/0003-tracing-Restore-proper-field-flag-printing-when-disp.patch create mode 100644 debian/patches/features/all/rt/0004-locking-refcount-implement-refcount_dec_and_lock_irq.patch create mode 100644 debian/patches/features/all/rt/0004-tracing-Uninitialized-variable-in-create_tracing_map.patch rename debian/patches/features/all/rt/{mm-backing-dev-Use-irqsave-variant-of-atomic_dec_and.patch => 0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch} (67%) create mode 100644 debian/patches/features/all/rt/0005-tracing-Fix-a-potential-NULL-dereference.patch rename debian/patches/features/all/rt/{kernel-user-Use-irqsave-variant-of-atomic_dec_and_lo.patch => 0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch} (66%) rename debian/patches/features/all/rt/{drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch => 0007-md-raid5-Use-irqsave-variant-of-refcount_dec_and_loc.patch} (73%) rename debian/patches/features/all/rt/{drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch => 0008-md-raid5-Do-not-disable-irq-on-release_inactive_stri.patch} (87%) create mode 100644 debian/patches/features/all/rt/arm64-fpsimd-use-a-local_lock-instead-of-local_bh_di.patch create mode 100644 debian/patches/features/all/rt/locallock-provide-get-put-_locked_ptr-variants.patch create mode 100644 debian/patches/features/all/rt/sched-fair-Fix-CFS-bandwidth-control-lockdep-DEADLOC.patch create mode 100644 debian/patches/features/all/rt/sched-let-softirq_count-return-0-if-inside-local_bh_.patch delete mode 100644 debian/patches/features/all/rt/spinlock-atomic_dec_and_lock-Add-an-irqsave-variant.patch create mode 100644 debian/patches/features/all/rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch create mode 100644 debian/patches/features/all/rt/tracing-Fix-display-of-hist-trigger-expressions-cont.patch delete mode 100644 debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch delete mode 100644 debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch diff --git a/debian/changelog b/debian/changelog index 8c1d52f83..c0d273587 100644 --- a/debian/changelog +++ b/debian/changelog @@ -374,6 +374,7 @@ linux (4.16.10-1) UNRELEASED; urgency=medium [ Ben Hutchings ] * kbuild: use -fmacro-prefix-map to make __FILE__ a relative path * Bump ABI to 2 + * [rt] Update to 4.16.8-rt3 [ Salvatore Bonaccorso ] * [rt] Update to 4.16.7-rt1 and reenable diff --git a/debian/patches/features/all/rt/0001-ARM-at91-add-TCB-registers-definitions.patch b/debian/patches/features/all/rt/0001-ARM-at91-add-TCB-registers-definitions.patch index d25bfbe50..34ba5d599 100644 --- a/debian/patches/features/all/rt/0001-ARM-at91-add-TCB-registers-definitions.patch +++ b/debian/patches/features/all/rt/0001-ARM-at91-add-TCB-registers-definitions.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:38 +0200 Subject: [PATCH 1/6] ARM: at91: add TCB registers definitions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add registers and bits definitions for the timer counter blocks found on Atmel ARM SoCs. diff --git a/debian/patches/features/all/rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch b/debian/patches/features/all/rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch new file mode 100644 index 000000000..474acb82d --- /dev/null +++ b/debian/patches/features/all/rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch @@ -0,0 +1,103 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 7 May 2018 16:51:09 +0200 +Subject: [PATCH] bdi: use refcount_t for reference counting instead atomic_t +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +refcount_t type and corresponding API should be used instead of atomic_t when +the variable is used as a reference counter. This allows to avoid accidental +refcounter overflows that might lead to use-after-free situations. + +Suggested-by: Peter Zijlstra +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/backing-dev-defs.h | 3 ++- + include/linux/backing-dev.h | 4 ++-- + mm/backing-dev.c | 12 ++++++------ + 3 files changed, 10 insertions(+), 9 deletions(-) + +--- a/include/linux/backing-dev-defs.h ++++ b/include/linux/backing-dev-defs.h +@@ -12,6 +12,7 @@ + #include + #include + #include ++#include + + struct page; + struct device; +@@ -76,7 +77,7 @@ enum wb_reason { + */ + struct bdi_writeback_congested { + unsigned long state; /* WB_[a]sync_congested flags */ +- atomic_t refcnt; /* nr of attached wb's and blkg */ ++ refcount_t refcnt; /* nr of attached wb's and blkg */ + + #ifdef CONFIG_CGROUP_WRITEBACK + struct backing_dev_info *__bdi; /* the associated bdi, set to NULL +--- a/include/linux/backing-dev.h ++++ b/include/linux/backing-dev.h +@@ -403,13 +403,13 @@ static inline bool inode_cgwb_enabled(st + static inline struct bdi_writeback_congested * + wb_congested_get_create(struct backing_dev_info *bdi, int blkcg_id, gfp_t gfp) + { +- atomic_inc(&bdi->wb_congested->refcnt); ++ refcount_inc(&bdi->wb_congested->refcnt); + return bdi->wb_congested; + } + + static inline void wb_congested_put(struct bdi_writeback_congested *congested) + { +- if (atomic_dec_and_test(&congested->refcnt)) ++ if (refcount_dec_and_test(&congested->refcnt)) + kfree(congested); + } + +--- a/mm/backing-dev.c ++++ b/mm/backing-dev.c +@@ -460,10 +460,10 @@ wb_congested_get_create(struct backing_d + if (new_congested) { + /* !found and storage for new one already allocated, insert */ + congested = new_congested; +- new_congested = NULL; + rb_link_node(&congested->rb_node, parent, node); + rb_insert_color(&congested->rb_node, &bdi->cgwb_congested_tree); +- goto found; ++ spin_unlock_irqrestore(&cgwb_lock, flags); ++ return congested; + } + + spin_unlock_irqrestore(&cgwb_lock, flags); +@@ -473,13 +473,13 @@ wb_congested_get_create(struct backing_d + if (!new_congested) + return NULL; + +- atomic_set(&new_congested->refcnt, 0); ++ refcount_set(&new_congested->refcnt, 1); + new_congested->__bdi = bdi; + new_congested->blkcg_id = blkcg_id; + goto retry; + + found: +- atomic_inc(&congested->refcnt); ++ refcount_inc(&congested->refcnt); + spin_unlock_irqrestore(&cgwb_lock, flags); + kfree(new_congested); + return congested; +@@ -496,7 +496,7 @@ void wb_congested_put(struct bdi_writeba + unsigned long flags; + + local_irq_save(flags); +- if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) { ++ if (!refcount_dec_and_lock(&congested->refcnt, &cgwb_lock)) { + local_irq_restore(flags); + return; + } +@@ -806,7 +806,7 @@ static int cgwb_bdi_init(struct backing_ + if (!bdi->wb_congested) + return -ENOMEM; + +- atomic_set(&bdi->wb_congested->refcnt, 1); ++ refcount_set(&bdi->wb_congested->refcnt, 1); + + err = wb_init(&bdi->wb, bdi, 1, GFP_KERNEL); + if (err) { diff --git a/debian/patches/features/all/rt/0001-get-rid-of-trylock-loop-in-locking-dentries-on-shrin.patch b/debian/patches/features/all/rt/0001-get-rid-of-trylock-loop-in-locking-dentries-on-shrin.patch index 7a241e0ec..1a3ab9890 100644 --- a/debian/patches/features/all/rt/0001-get-rid-of-trylock-loop-in-locking-dentries-on-shrin.patch +++ b/debian/patches/features/all/rt/0001-get-rid-of-trylock-loop-in-locking-dentries-on-shrin.patch @@ -2,7 +2,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 21:54:18 -0500 Subject: [PATCH 01/17] get rid of trylock loop in locking dentries on shrink list -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 3b3f09f48ba78c0634e929849860a6447d057eed diff --git a/debian/patches/features/all/rt/0001-iommu-amd-Take-into-account-that-alloc_dev_data-may-.patch b/debian/patches/features/all/rt/0001-iommu-amd-Take-into-account-that-alloc_dev_data-may-.patch index 3e3e8c931..8ef80f588 100644 --- a/debian/patches/features/all/rt/0001-iommu-amd-Take-into-account-that-alloc_dev_data-may-.patch +++ b/debian/patches/features/all/rt/0001-iommu-amd-Take-into-account-that-alloc_dev_data-may-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:33 +0100 Subject: [PATCH 01/10] iommu/amd: Take into account that alloc_dev_data() may return NULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 39ffe39545cd5cb5b8cee9f0469165cf24dc62c2 diff --git a/debian/patches/features/all/rt/0001-iommu-amd-Use-raw-locks-on-atomic-context-paths.patch b/debian/patches/features/all/rt/0001-iommu-amd-Use-raw-locks-on-atomic-context-paths.patch index 479bc3a6c..e7e7d725b 100644 --- a/debian/patches/features/all/rt/0001-iommu-amd-Use-raw-locks-on-atomic-context-paths.patch +++ b/debian/patches/features/all/rt/0001-iommu-amd-Use-raw-locks-on-atomic-context-paths.patch @@ -1,7 +1,7 @@ From: Scott Wood Date: Sun, 21 Jan 2018 03:28:54 -0600 Subject: [PATCH 1/3] iommu/amd: Use raw locks on atomic context paths -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 27790398c2aed917828dc3c6f81240d57f1584c9 diff --git a/debian/patches/features/all/rt/0001-tracing-Add-field-modifier-parsing-hist-error-for-hi.patch b/debian/patches/features/all/rt/0001-tracing-Add-field-modifier-parsing-hist-error-for-hi.patch new file mode 100644 index 000000000..21c5065ed --- /dev/null +++ b/debian/patches/features/all/rt/0001-tracing-Add-field-modifier-parsing-hist-error-for-hi.patch @@ -0,0 +1,50 @@ +From: Steven Rostedt +Date: Wed, 16 May 2018 09:36:43 -0400 +Subject: [PATCH 1/5] tracing: Add field modifier parsing hist error for hist + triggers +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +From: Tom Zanussi + +[ commit dcf234577cd31fa16874e828b90659166ad6b80d ] + +If the user specifies an invalid field modifier for a hist trigger, +the current code correctly flags that as an error, but doesn't tell +the user what happened. + +Fix this by invoking hist_err() with an appropriate message when +invalid modifiers are specified. + +Before: + + # echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + -su: echo: write error: Invalid argument + # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist + +After: + + # echo 'hist:keys=pid:ts0=common_timestamp.junkusecs' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + -su: echo: write error: Invalid argument + # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/hist + ERROR: Invalid field modifier: junkusecs + Last command: keys=pid:ts0=common_timestamp.junkusecs + +Link: http://lkml.kernel.org/r/b043c59fa79acd06a5f14a1d44dee9e5a3cd1248.1524790601.git.tom.zanussi@linux.intel.com + +Signed-off-by: Tom Zanussi +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -2466,6 +2466,7 @@ parse_field(struct hist_trigger_data *hi + else if (strcmp(modifier, "usecs") == 0) + *flags |= HIST_FIELD_FL_TIMESTAMP_USECS; + else { ++ hist_err("Invalid field modifier: ", modifier); + field = ERR_PTR(-EINVAL); + goto out; + } diff --git a/debian/patches/features/all/rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch b/debian/patches/features/all/rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch index 2e1b24cb3..dafeae764 100644 --- a/debian/patches/features/all/rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch +++ b/debian/patches/features/all/rt/0002-clocksource-drivers-Add-a-new-driver-for-the-Atmel-A.patch @@ -2,7 +2,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:39 +0200 Subject: [PATCH 2/6] clocksource/drivers: Add a new driver for the Atmel ARM TC blocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a driver for the Atmel Timer Counter Blocks. This driver provides a clocksource and two clockevent devices. diff --git a/debian/patches/features/all/rt/0002-iommu-amd-Don-t-use-dev_data-in-irte_ga_set_affinity.patch b/debian/patches/features/all/rt/0002-iommu-amd-Don-t-use-dev_data-in-irte_ga_set_affinity.patch index 5f4275290..201002262 100644 --- a/debian/patches/features/all/rt/0002-iommu-amd-Don-t-use-dev_data-in-irte_ga_set_affinity.patch +++ b/debian/patches/features/all/rt/0002-iommu-amd-Don-t-use-dev_data-in-irte_ga_set_affinity.patch @@ -1,7 +1,7 @@ From: Scott Wood Date: Sun, 28 Jan 2018 14:22:19 -0600 Subject: [PATCH 2/3] iommu/amd: Don't use dev_data in irte_ga_set_affinity() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 01ee04badefd296eb7a4430497373be9b7b16783 diff --git a/debian/patches/features/all/rt/0002-iommu-amd-Turn-dev_data_list-into-a-lock-less-list.patch b/debian/patches/features/all/rt/0002-iommu-amd-Turn-dev_data_list-into-a-lock-less-list.patch index 176557ba1..9c60288f4 100644 --- a/debian/patches/features/all/rt/0002-iommu-amd-Turn-dev_data_list-into-a-lock-less-list.patch +++ b/debian/patches/features/all/rt/0002-iommu-amd-Turn-dev_data_list-into-a-lock-less-list.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:34 +0100 Subject: [PATCH 02/10] iommu/amd: Turn dev_data_list into a lock less list -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 779da73273fc4c4c6f41579a95e4fb7880a1720e diff --git a/debian/patches/features/all/rt/0002-now-lock_parent-can-t-run-into-killed-dentry.patch b/debian/patches/features/all/rt/0002-now-lock_parent-can-t-run-into-killed-dentry.patch index b66632fd6..4d4303f77 100644 --- a/debian/patches/features/all/rt/0002-now-lock_parent-can-t-run-into-killed-dentry.patch +++ b/debian/patches/features/all/rt/0002-now-lock_parent-can-t-run-into-killed-dentry.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 22:07:35 -0500 Subject: [PATCH 02/17] now lock_parent() can't run into killed dentry -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 65d8eb5a8f5480756105173de147ef5d60163e2f diff --git a/debian/patches/features/all/rt/0002-tracing-Add-field-parsing-hist-error-for-hist-trigge.patch b/debian/patches/features/all/rt/0002-tracing-Add-field-parsing-hist-error-for-hist-trigge.patch new file mode 100644 index 000000000..6bb90190f --- /dev/null +++ b/debian/patches/features/all/rt/0002-tracing-Add-field-parsing-hist-error-for-hist-trigge.patch @@ -0,0 +1,50 @@ +From: Steven Rostedt +Date: Wed, 16 May 2018 09:36:44 -0400 +Subject: [PATCH 2/5] tracing: Add field parsing hist error for hist triggers +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +From: Tom Zanussi + +[ commit 5ec432d7bf9dd3b4a2b84f8974e3adb71f45fb1d ] + +If the user specifies a nonexistent field for a hist trigger, the +current code correctly flags that as an error, but doesn't tell the +user what happened. + +Fix this by invoking hist_err() with an appropriate message when +nonexistent fields are specified. + +Before: + + # echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger + -su: echo: write error: Invalid argument + # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist + +After: + + # echo 'hist:keys=pid:ts0=common_timestamp.usecs' >> /sys/kernel/debug/tracing/events/sched/sched_switch/trigger + -su: echo: write error: Invalid argument + # cat /sys/kernel/debug/tracing/events/sched/sched_switch/hist + ERROR: Couldn't find field: pid + Last command: keys=pid:ts0=common_timestamp.usecs + +Link: http://lkml.kernel.org/r/fdc8746969d16906120f162b99dd71c741e0b62c.1524790601.git.tom.zanussi@linux.intel.com + +Signed-off-by: Tom Zanussi +Reported-by: Masami Hiramatsu +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -2482,6 +2482,7 @@ parse_field(struct hist_trigger_data *hi + else { + field = trace_find_event_field(file->event_call, field_name); + if (!field || !field->size) { ++ hist_err("Couldn't find field: ", field_name); + field = ERR_PTR(-EINVAL); + goto out; + } diff --git a/debian/patches/features/all/rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch b/debian/patches/features/all/rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch new file mode 100644 index 000000000..b914d03e2 --- /dev/null +++ b/debian/patches/features/all/rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch @@ -0,0 +1,83 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 7 May 2018 17:09:42 +0200 +Subject: [PATCH] userns: use refcount_t for reference counting instead + atomic_t +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +refcount_t type and corresponding API should be used instead of atomic_t when +the variable is used as a reference counter. This allows to avoid accidental +refcounter overflows that might lead to use-after-free situations. + +Suggested-by: Peter Zijlstra +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/sched/user.h | 5 +++-- + kernel/user.c | 8 ++++---- + 2 files changed, 7 insertions(+), 6 deletions(-) + +--- a/include/linux/sched/user.h ++++ b/include/linux/sched/user.h +@@ -4,6 +4,7 @@ + + #include + #include ++#include + #include + + struct key; +@@ -12,7 +13,7 @@ struct key; + * Some day this will be a full-fledged user tracking system.. + */ + struct user_struct { +- atomic_t __count; /* reference count */ ++ refcount_t __count; /* reference count */ + atomic_t processes; /* How many processes does this user have? */ + atomic_t sigpending; /* How many pending signals does this user have? */ + #ifdef CONFIG_FANOTIFY +@@ -59,7 +60,7 @@ extern struct user_struct root_user; + extern struct user_struct * alloc_uid(kuid_t); + static inline struct user_struct *get_uid(struct user_struct *u) + { +- atomic_inc(&u->__count); ++ refcount_inc(&u->__count); + return u; + } + extern void free_uid(struct user_struct *); +--- a/kernel/user.c ++++ b/kernel/user.c +@@ -96,7 +96,7 @@ static DEFINE_SPINLOCK(uidhash_lock); + + /* root_user.__count is 1, for init task cred */ + struct user_struct root_user = { +- .__count = ATOMIC_INIT(1), ++ .__count = REFCOUNT_INIT(1), + .processes = ATOMIC_INIT(1), + .sigpending = ATOMIC_INIT(0), + .locked_shm = 0, +@@ -123,7 +123,7 @@ static struct user_struct *uid_hash_find + + hlist_for_each_entry(user, hashent, uidhash_node) { + if (uid_eq(user->uid, uid)) { +- atomic_inc(&user->__count); ++ refcount_inc(&user->__count); + return user; + } + } +@@ -170,7 +170,7 @@ void free_uid(struct user_struct *up) + return; + + local_irq_save(flags); +- if (atomic_dec_and_lock(&up->__count, &uidhash_lock)) ++ if (refcount_dec_and_lock(&up->__count, &uidhash_lock)) + free_user(up, flags); + else + local_irq_restore(flags); +@@ -191,7 +191,7 @@ struct user_struct *alloc_uid(kuid_t uid + goto out_unlock; + + new->uid = uid; +- atomic_set(&new->__count, 1); ++ refcount_set(&new->__count, 1); + ratelimit_state_init(&new->ratelimit, HZ, 100); + ratelimit_set_flags(&new->ratelimit, RATELIMIT_MSG_ON_RELEASE); + diff --git a/debian/patches/features/all/rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch b/debian/patches/features/all/rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch index 4866b108b..b2a6bde46 100644 --- a/debian/patches/features/all/rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch +++ b/debian/patches/features/all/rt/0003-clocksource-drivers-atmel-pit-make-option-silent.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:40 +0200 Subject: [PATCH 3/6] clocksource/drivers: atmel-pit: make option silent -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz To conform with the other option, make the ATMEL_PIT option silent so it can be selected from the platform diff --git a/debian/patches/features/all/rt/0003-iommu-amd-Avoid-locking-get_irq_table-from-atomic-co.patch b/debian/patches/features/all/rt/0003-iommu-amd-Avoid-locking-get_irq_table-from-atomic-co.patch index b7fe7e7c8..2b56c8dc2 100644 --- a/debian/patches/features/all/rt/0003-iommu-amd-Avoid-locking-get_irq_table-from-atomic-co.patch +++ b/debian/patches/features/all/rt/0003-iommu-amd-Avoid-locking-get_irq_table-from-atomic-co.patch @@ -2,7 +2,7 @@ From: Scott Wood Date: Wed, 14 Feb 2018 17:36:28 -0600 Subject: [PATCH 3/3] iommu/amd: Avoid locking get_irq_table() from atomic context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit df42a04b15f19a842393dc98a84cbc52b1f8ed49 diff --git a/debian/patches/features/all/rt/0003-iommu-amd-Split-domain-id-out-of-amd_iommu_devtable_.patch b/debian/patches/features/all/rt/0003-iommu-amd-Split-domain-id-out-of-amd_iommu_devtable_.patch index 5785c3fe1..a2686d51e 100644 --- a/debian/patches/features/all/rt/0003-iommu-amd-Split-domain-id-out-of-amd_iommu_devtable_.patch +++ b/debian/patches/features/all/rt/0003-iommu-amd-Split-domain-id-out-of-amd_iommu_devtable_.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:35 +0100 Subject: [PATCH 03/10] iommu/amd: Split domain id out of amd_iommu_devtable_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 2bc00180890427dcc092b2f2b0d03c904bcade29 diff --git a/debian/patches/features/all/rt/0003-md-raid5-use-refcount_t-for-reference-counting-inste.patch b/debian/patches/features/all/rt/0003-md-raid5-use-refcount_t-for-reference-counting-inste.patch new file mode 100644 index 000000000..a799df36b --- /dev/null +++ b/debian/patches/features/all/rt/0003-md-raid5-use-refcount_t-for-reference-counting-inste.patch @@ -0,0 +1,365 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 7 May 2018 17:42:52 +0200 +Subject: [PATCH] md: raid5: use refcount_t for reference counting instead + atomic_t +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +refcount_t type and corresponding API should be used instead of atomic_t when +the variable is used as a reference counter. This allows to avoid accidental +refcounter overflows that might lead to use-after-free situations. + +Most changes are 1:1 replacements except for + BUG_ON(atomic_inc_return(&sh->count) != 1); + +which has been turned into + refcount_inc(&sh->count); + BUG_ON(refcount_read(&sh->count) != 1); + +Suggested-by: Peter Zijlstra +Signed-off-by: Sebastian Andrzej Siewior +--- + drivers/md/raid5-cache.c | 8 ++--- + drivers/md/raid5-ppl.c | 2 - + drivers/md/raid5.c | 67 +++++++++++++++++++++++------------------------ + drivers/md/raid5.h | 4 +- + 4 files changed, 41 insertions(+), 40 deletions(-) + +--- a/drivers/md/raid5-cache.c ++++ b/drivers/md/raid5-cache.c +@@ -1049,7 +1049,7 @@ int r5l_write_stripe(struct r5l_log *log + * don't delay. + */ + clear_bit(STRIPE_DELAYED, &sh->state); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + mutex_lock(&log->io_mutex); + /* meta + data */ +@@ -1388,7 +1388,7 @@ static void r5c_flush_stripe(struct r5co + lockdep_assert_held(&conf->device_lock); + + list_del_init(&sh->lru); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + set_bit(STRIPE_HANDLE, &sh->state); + atomic_inc(&conf->active_stripes); +@@ -1491,7 +1491,7 @@ static void r5c_do_reclaim(struct r5conf + */ + if (!list_empty(&sh->lru) && + !test_bit(STRIPE_HANDLE, &sh->state) && +- atomic_read(&sh->count) == 0) { ++ refcount_read(&sh->count) == 0) { + r5c_flush_stripe(conf, sh); + if (count++ >= R5C_RECLAIM_STRIPE_GROUP) + break; +@@ -2912,7 +2912,7 @@ int r5c_cache_data(struct r5l_log *log, + * don't delay. + */ + clear_bit(STRIPE_DELAYED, &sh->state); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + mutex_lock(&log->io_mutex); + /* meta + data */ +--- a/drivers/md/raid5-ppl.c ++++ b/drivers/md/raid5-ppl.c +@@ -388,7 +388,7 @@ int ppl_write_stripe(struct r5conf *conf + + set_bit(STRIPE_LOG_TRAPPED, &sh->state); + clear_bit(STRIPE_DELAYED, &sh->state); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + if (ppl_log_stripe(log, sh)) { + spin_lock_irq(&ppl_conf->no_mem_stripes_lock); +--- a/drivers/md/raid5.c ++++ b/drivers/md/raid5.c +@@ -306,7 +306,7 @@ static void do_release_stripe(struct r5c + static void __release_stripe(struct r5conf *conf, struct stripe_head *sh, + struct list_head *temp_inactive_list) + { +- if (atomic_dec_and_test(&sh->count)) ++ if (refcount_dec_and_test(&sh->count)) + do_release_stripe(conf, sh, temp_inactive_list); + } + +@@ -398,7 +398,7 @@ void raid5_release_stripe(struct stripe_ + + /* Avoid release_list until the last reference. + */ +- if (atomic_add_unless(&sh->count, -1, 1)) ++ if (refcount_dec_not_one(&sh->count)) + return; + + if (unlikely(!conf->mddev->thread) || +@@ -411,7 +411,7 @@ void raid5_release_stripe(struct stripe_ + slow_path: + local_irq_save(flags); + /* we are ok here if STRIPE_ON_RELEASE_LIST is set or not */ +- if (atomic_dec_and_lock(&sh->count, &conf->device_lock)) { ++ if (refcount_dec_and_lock(&sh->count, &conf->device_lock)) { + INIT_LIST_HEAD(&list); + hash = sh->hash_lock_index; + do_release_stripe(conf, sh, &list); +@@ -501,7 +501,7 @@ static void init_stripe(struct stripe_he + struct r5conf *conf = sh->raid_conf; + int i, seq; + +- BUG_ON(atomic_read(&sh->count) != 0); ++ BUG_ON(refcount_read(&sh->count) != 0); + BUG_ON(test_bit(STRIPE_HANDLE, &sh->state)); + BUG_ON(stripe_operations_active(sh)); + BUG_ON(sh->batch_head); +@@ -678,11 +678,11 @@ raid5_get_active_stripe(struct r5conf *c + &conf->cache_state); + } else { + init_stripe(sh, sector, previous); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + } +- } else if (!atomic_inc_not_zero(&sh->count)) { ++ } else if (!refcount_inc_not_zero(&sh->count)) { + spin_lock(&conf->device_lock); +- if (!atomic_read(&sh->count)) { ++ if (!refcount_read(&sh->count)) { + if (!test_bit(STRIPE_HANDLE, &sh->state)) + atomic_inc(&conf->active_stripes); + BUG_ON(list_empty(&sh->lru) && +@@ -698,7 +698,7 @@ raid5_get_active_stripe(struct r5conf *c + sh->group = NULL; + } + } +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + spin_unlock(&conf->device_lock); + } + } while (sh == NULL); +@@ -760,9 +760,9 @@ static void stripe_add_to_batch_list(str + hash = stripe_hash_locks_hash(head_sector); + spin_lock_irq(conf->hash_locks + hash); + head = __find_stripe(conf, head_sector, conf->generation); +- if (head && !atomic_inc_not_zero(&head->count)) { ++ if (head && !refcount_inc_not_zero(&head->count)) { + spin_lock(&conf->device_lock); +- if (!atomic_read(&head->count)) { ++ if (!refcount_read(&head->count)) { + if (!test_bit(STRIPE_HANDLE, &head->state)) + atomic_inc(&conf->active_stripes); + BUG_ON(list_empty(&head->lru) && +@@ -778,7 +778,7 @@ static void stripe_add_to_batch_list(str + head->group = NULL; + } + } +- atomic_inc(&head->count); ++ refcount_inc(&head->count); + spin_unlock(&conf->device_lock); + } + spin_unlock_irq(conf->hash_locks + hash); +@@ -847,7 +847,7 @@ static void stripe_add_to_batch_list(str + sh->batch_head->bm_seq = seq; + } + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + unlock_out: + unlock_two_stripes(head, sh); + out: +@@ -1110,9 +1110,9 @@ static void ops_run_io(struct stripe_hea + pr_debug("%s: for %llu schedule op %d on disc %d\n", + __func__, (unsigned long long)sh->sector, + bi->bi_opf, i); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + if (sh != head_sh) +- atomic_inc(&head_sh->count); ++ refcount_inc(&head_sh->count); + if (use_new_offset(conf, sh)) + bi->bi_iter.bi_sector = (sh->sector + + rdev->new_data_offset); +@@ -1174,9 +1174,9 @@ static void ops_run_io(struct stripe_hea + "replacement disc %d\n", + __func__, (unsigned long long)sh->sector, + rbi->bi_opf, i); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + if (sh != head_sh) +- atomic_inc(&head_sh->count); ++ refcount_inc(&head_sh->count); + if (use_new_offset(conf, sh)) + rbi->bi_iter.bi_sector = (sh->sector + + rrdev->new_data_offset); +@@ -1354,7 +1354,7 @@ static void ops_run_biofill(struct strip + } + } + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + init_async_submit(&submit, ASYNC_TX_ACK, tx, ops_complete_biofill, sh, NULL); + async_trigger_callback(&submit); + } +@@ -1432,7 +1432,7 @@ ops_run_compute5(struct stripe_head *sh, + if (i != target) + xor_srcs[count++] = sh->dev[i].page; + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + init_async_submit(&submit, ASYNC_TX_FENCE|ASYNC_TX_XOR_ZERO_DST, NULL, + ops_complete_compute, sh, to_addr_conv(sh, percpu, 0)); +@@ -1521,7 +1521,7 @@ ops_run_compute6_1(struct stripe_head *s + BUG_ON(!test_bit(R5_Wantcompute, &tgt->flags)); + dest = tgt->page; + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + if (target == qd_idx) { + count = set_syndrome_sources(blocks, sh, SYNDROME_SRC_ALL); +@@ -1596,7 +1596,7 @@ ops_run_compute6_2(struct stripe_head *s + pr_debug("%s: stripe: %llu faila: %d failb: %d\n", + __func__, (unsigned long long)sh->sector, faila, failb); + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + + if (failb == syndrome_disks+1) { + /* Q disk is one of the missing disks */ +@@ -1867,7 +1867,7 @@ ops_run_reconstruct5(struct stripe_head + break; + } + if (i >= sh->disks) { +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + set_bit(R5_Discard, &sh->dev[pd_idx].flags); + ops_complete_reconstruct(sh); + return; +@@ -1908,7 +1908,7 @@ ops_run_reconstruct5(struct stripe_head + flags = ASYNC_TX_ACK | + (prexor ? ASYNC_TX_XOR_DROP_DST : ASYNC_TX_XOR_ZERO_DST); + +- atomic_inc(&head_sh->count); ++ refcount_inc(&head_sh->count); + init_async_submit(&submit, flags, tx, ops_complete_reconstruct, head_sh, + to_addr_conv(sh, percpu, j)); + } else { +@@ -1950,7 +1950,7 @@ ops_run_reconstruct6(struct stripe_head + break; + } + if (i >= sh->disks) { +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + set_bit(R5_Discard, &sh->dev[sh->pd_idx].flags); + set_bit(R5_Discard, &sh->dev[sh->qd_idx].flags); + ops_complete_reconstruct(sh); +@@ -1974,7 +1974,7 @@ ops_run_reconstruct6(struct stripe_head + struct stripe_head, batch_list) == head_sh; + + if (last_stripe) { +- atomic_inc(&head_sh->count); ++ refcount_inc(&head_sh->count); + init_async_submit(&submit, txflags, tx, ops_complete_reconstruct, + head_sh, to_addr_conv(sh, percpu, j)); + } else +@@ -2031,7 +2031,7 @@ static void ops_run_check_p(struct strip + tx = async_xor_val(xor_dest, xor_srcs, 0, count, STRIPE_SIZE, + &sh->ops.zero_sum_result, &submit); + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + init_async_submit(&submit, ASYNC_TX_ACK, tx, ops_complete_check, sh, NULL); + tx = async_trigger_callback(&submit); + } +@@ -2050,7 +2050,7 @@ static void ops_run_check_pq(struct stri + if (!checkp) + srcs[count] = NULL; + +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + init_async_submit(&submit, ASYNC_TX_ACK, NULL, ops_complete_check, + sh, to_addr_conv(sh, percpu, 0)); + async_syndrome_val(srcs, 0, count+2, STRIPE_SIZE, +@@ -2150,7 +2150,7 @@ static struct stripe_head *alloc_stripe( + INIT_LIST_HEAD(&sh->lru); + INIT_LIST_HEAD(&sh->r5c); + INIT_LIST_HEAD(&sh->log_list); +- atomic_set(&sh->count, 1); ++ refcount_set(&sh->count, 1); + sh->raid_conf = conf; + sh->log_start = MaxSector; + for (i = 0; i < disks; i++) { +@@ -2451,7 +2451,7 @@ static int drop_one_stripe(struct r5conf + spin_unlock_irq(conf->hash_locks + hash); + if (!sh) + return 0; +- BUG_ON(atomic_read(&sh->count)); ++ BUG_ON(refcount_read(&sh->count)); + shrink_buffers(sh); + free_stripe(conf->slab_cache, sh); + atomic_dec(&conf->active_stripes); +@@ -2483,7 +2483,7 @@ static void raid5_end_read_request(struc + break; + + pr_debug("end_read_request %llu/%d, count: %d, error %d.\n", +- (unsigned long long)sh->sector, i, atomic_read(&sh->count), ++ (unsigned long long)sh->sector, i, refcount_read(&sh->count), + bi->bi_status); + if (i == disks) { + bio_reset(bi); +@@ -2620,7 +2620,7 @@ static void raid5_end_write_request(stru + } + } + pr_debug("end_write_request %llu/%d, count %d, error: %d.\n", +- (unsigned long long)sh->sector, i, atomic_read(&sh->count), ++ (unsigned long long)sh->sector, i, refcount_read(&sh->count), + bi->bi_status); + if (i == disks) { + bio_reset(bi); +@@ -4687,7 +4687,7 @@ static void handle_stripe(struct stripe_ + pr_debug("handling stripe %llu, state=%#lx cnt=%d, " + "pd_idx=%d, qd_idx=%d\n, check:%d, reconstruct:%d\n", + (unsigned long long)sh->sector, sh->state, +- atomic_read(&sh->count), sh->pd_idx, sh->qd_idx, ++ refcount_read(&sh->count), sh->pd_idx, sh->qd_idx, + sh->check_state, sh->reconstruct_state); + + analyse_stripe(sh, &s); +@@ -5062,7 +5062,7 @@ static void activate_bit_delay(struct r5 + struct stripe_head *sh = list_entry(head.next, struct stripe_head, lru); + int hash; + list_del_init(&sh->lru); +- atomic_inc(&sh->count); ++ refcount_inc(&sh->count); + hash = sh->hash_lock_index; + __release_stripe(conf, sh, &temp_inactive_list[hash]); + } +@@ -5387,7 +5387,8 @@ static struct stripe_head *__get_priorit + sh->group = NULL; + } + list_del_init(&sh->lru); +- BUG_ON(atomic_inc_return(&sh->count) != 1); ++ refcount_inc(&sh->count); ++ BUG_ON(refcount_read(&sh->count) != 1); + return sh; + } + +--- a/drivers/md/raid5.h ++++ b/drivers/md/raid5.h +@@ -4,7 +4,7 @@ + + #include + #include +- ++#include + /* + * + * Each stripe contains one buffer per device. Each buffer can be in +@@ -208,7 +208,7 @@ struct stripe_head { + short ddf_layout;/* use DDF ordering to calculate Q */ + short hash_lock_index; + unsigned long state; /* state flags */ +- atomic_t count; /* nr of active thread/requests */ ++ refcount_t count; /* nr of active thread/requests */ + int bm_seq; /* sequence number for bitmap flushes */ + int disks; /* disks in stripe */ + int overwrite_disks; /* total overwrite disks in stripe, diff --git a/debian/patches/features/all/rt/0003-split-the-slow-part-of-lock_parent-off.patch b/debian/patches/features/all/rt/0003-split-the-slow-part-of-lock_parent-off.patch index 3881f5d0b..663c820bc 100644 --- a/debian/patches/features/all/rt/0003-split-the-slow-part-of-lock_parent-off.patch +++ b/debian/patches/features/all/rt/0003-split-the-slow-part-of-lock_parent-off.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 22:11:34 -0500 Subject: [PATCH 03/17] split the slow part of lock_parent() off -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 8b987a46a1e0e93d4cb4babea06ea274e2e2b658 diff --git a/debian/patches/features/all/rt/0003-tracing-Restore-proper-field-flag-printing-when-disp.patch b/debian/patches/features/all/rt/0003-tracing-Restore-proper-field-flag-printing-when-disp.patch new file mode 100644 index 000000000..7b8602fd2 --- /dev/null +++ b/debian/patches/features/all/rt/0003-tracing-Restore-proper-field-flag-printing-when-disp.patch @@ -0,0 +1,66 @@ +From: Steven Rostedt +Date: Wed, 16 May 2018 09:36:45 -0400 +Subject: [PATCH 3/5] tracing: Restore proper field flag printing when + displaying triggers +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +From: Tom Zanussi + +[ commit 608940dabe1bd2ce4c97524004ec86637cf80f2c ] + +The flag-printing code used when displaying hist triggers somehow got +dropped during refactoring of the inter-event patchset. This restores +it. + +Below are a couple examples - in the first case, .usecs wasn't being +displayed properly for common_timestamps and the second illustrates +the same for other flags such as .execname. + +Before: + + # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger + # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger + hist:keys=common_pid:vals=hitcount,count:sort=count:size=2048 [active] + + # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + hist:keys=pid:vals=hitcount:ts0=common_timestamp:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] + +After: + + # echo 'hist:key=common_pid.execname:val=count:sort=count' > /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger + # cat /sys/kernel/debug/tracing/events/syscalls/sys_enter_read/trigger + hist:keys=common_pid.execname:vals=hitcount,count:sort=count:size=2048 [active] + + # echo 'hist:keys=pid:ts0=common_timestamp.usecs if comm=="cyclictest"' >> /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + # cat /sys/kernel/debug/tracing/events/sched/sched_wakeup/trigger + hist:keys=pid:vals=hitcount:ts0=common_timestamp.usecs:sort=hitcount:size=2048:clock=global if comm=="cyclictest" [active] + +Link: http://lkml.kernel.org/r/492bab42ff21806600af98a8ea901af10efbee0c.1524790601.git.tom.zanussi@linux.intel.com + +Signed-off-by: Tom Zanussi +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -4867,6 +4867,16 @@ static void hist_field_print(struct seq_ + seq_printf(m, "%s", field_name); + } else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP) + seq_puts(m, "common_timestamp"); ++ ++ if (hist_field->flags) { ++ if (!(hist_field->flags & HIST_FIELD_FL_VAR_REF) && ++ !(hist_field->flags & HIST_FIELD_FL_EXPR)) { ++ const char *flags = get_hist_field_flags(hist_field); ++ ++ if (flags) ++ seq_printf(m, ".%s", flags); ++ } ++ } + } + + static int event_hist_trigger_print(struct seq_file *m, diff --git a/debian/patches/features/all/rt/0004-ARM-at91-Implement-clocksource-selection.patch b/debian/patches/features/all/rt/0004-ARM-at91-Implement-clocksource-selection.patch index 32b28bab5..2ecca7aa1 100644 --- a/debian/patches/features/all/rt/0004-ARM-at91-Implement-clocksource-selection.patch +++ b/debian/patches/features/all/rt/0004-ARM-at91-Implement-clocksource-selection.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:41 +0200 Subject: [PATCH 4/6] ARM: at91: Implement clocksource selection -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Allow selecting and unselecting the PIT clocksource driver so it doesn't have to be compile when unused. diff --git a/debian/patches/features/all/rt/0004-dput-consolidate-the-do-we-need-to-retain-it-into-an.patch b/debian/patches/features/all/rt/0004-dput-consolidate-the-do-we-need-to-retain-it-into-an.patch index 30a4ec64a..ff8ee949b 100644 --- a/debian/patches/features/all/rt/0004-dput-consolidate-the-do-we-need-to-retain-it-into-an.patch +++ b/debian/patches/features/all/rt/0004-dput-consolidate-the-do-we-need-to-retain-it-into-an.patch @@ -2,7 +2,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 21:07:24 -0500 Subject: [PATCH 04/17] dput(): consolidate the "do we need to retain it?" into an inlined helper -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit a338579f2f3d6a15c78f1dc7de4c248b4183fcea diff --git a/debian/patches/features/all/rt/0004-iommu-amd-Split-irq_lookup_table-out-of-the-amd_iomm.patch b/debian/patches/features/all/rt/0004-iommu-amd-Split-irq_lookup_table-out-of-the-amd_iomm.patch index afd17e45c..627fb25e2 100644 --- a/debian/patches/features/all/rt/0004-iommu-amd-Split-irq_lookup_table-out-of-the-amd_iomm.patch +++ b/debian/patches/features/all/rt/0004-iommu-amd-Split-irq_lookup_table-out-of-the-amd_iomm.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:36 +0100 Subject: [PATCH 04/10] iommu/amd: Split irq_lookup_table out of the amd_iommu_devtable_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit ea6166f4b83e9cfba1c18f46a764d50045682fe5 diff --git a/debian/patches/features/all/rt/0004-locking-refcount-implement-refcount_dec_and_lock_irq.patch b/debian/patches/features/all/rt/0004-locking-refcount-implement-refcount_dec_and_lock_irq.patch new file mode 100644 index 000000000..7df9b46d1 --- /dev/null +++ b/debian/patches/features/all/rt/0004-locking-refcount-implement-refcount_dec_and_lock_irq.patch @@ -0,0 +1,69 @@ +From: Anna-Maria Gleixner +Date: Mon, 7 May 2018 16:44:57 +0200 +Subject: [PATCH] locking/refcount: implement + refcount_dec_and_lock_irqsave() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +There are in-tree users of refcount_dec_and_lock() which must acquire the +spin lock with interrupts disabled. To workaround the lack of an irqsave +variant of refcount_dec_and_lock() they use local_irq_save() at the call +site. This causes extra code and creates in some places unneeded long +interrupt disabled times. These places need also extra treatment for +PREEMPT_RT due to the disconnect of the irq disabling and the lock +function. + +Implement the missing irqsave variant of the function. + +Signed-off-by: Anna-Maria Gleixner +[bigeasy: s@atomic_dec_and_lock@refcount_dec_and_lock@g] +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/refcount.h | 4 +++- + lib/refcount.c | 28 ++++++++++++++++++++++++++++ + 2 files changed, 31 insertions(+), 1 deletion(-) + +--- a/include/linux/refcount.h ++++ b/include/linux/refcount.h +@@ -98,5 +98,7 @@ extern __must_check bool refcount_dec_if + extern __must_check bool refcount_dec_not_one(refcount_t *r); + extern __must_check bool refcount_dec_and_mutex_lock(refcount_t *r, struct mutex *lock); + extern __must_check bool refcount_dec_and_lock(refcount_t *r, spinlock_t *lock); +- ++extern __must_check bool refcount_dec_and_lock_irqsave(refcount_t *r, ++ spinlock_t *lock, ++ unsigned long *flags); + #endif /* _LINUX_REFCOUNT_H */ +--- a/lib/refcount.c ++++ b/lib/refcount.c +@@ -350,3 +350,31 @@ bool refcount_dec_and_lock(refcount_t *r + } + EXPORT_SYMBOL(refcount_dec_and_lock); + ++/** ++ * refcount_dec_and_lock_irqsave - return holding spinlock with disabled ++ * interrupts if able to decrement refcount to 0 ++ * @r: the refcount ++ * @lock: the spinlock to be locked ++ * @flags: saved IRQ-flags if the is acquired ++ * ++ * Same as refcount_dec_and_lock() above except that the spinlock is acquired ++ * with disabled interupts. ++ * ++ * Return: true and hold spinlock if able to decrement refcount to 0, false ++ * otherwise ++ */ ++bool refcount_dec_and_lock_irqsave(refcount_t *r, spinlock_t *lock, ++ unsigned long *flags) ++{ ++ if (refcount_dec_not_one(r)) ++ return false; ++ ++ spin_lock_irqsave(lock, *flags); ++ if (!refcount_dec_and_test(r)) { ++ spin_unlock_irqrestore(lock, *flags); ++ return false; ++ } ++ ++ return true; ++} ++EXPORT_SYMBOL(refcount_dec_and_lock_irqsave); diff --git a/debian/patches/features/all/rt/0004-tracing-Uninitialized-variable-in-create_tracing_map.patch b/debian/patches/features/all/rt/0004-tracing-Uninitialized-variable-in-create_tracing_map.patch new file mode 100644 index 000000000..dde0f3ee3 --- /dev/null +++ b/debian/patches/features/all/rt/0004-tracing-Uninitialized-variable-in-create_tracing_map.patch @@ -0,0 +1,37 @@ +From: Steven Rostedt +Date: Wed, 16 May 2018 09:36:46 -0400 +Subject: [PATCH 4/5] tracing: Uninitialized variable in + create_tracing_map_fields() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +From: Dan Carpenter + +[ commit b28d7b2dc27f0eef1ae608b49d6860f2463910f1 ] + +Smatch complains that idx can be used uninitialized when we check if +(idx < 0). It has to be the first iteration through the loop and the +HIST_FIELD_FL_STACKTRACE bit has to be clear and the HIST_FIELD_FL_VAR +bit has to be set to reach the bug. + +Link: http://lkml.kernel.org/r/20180328114815.GC29050@mwanda + +Fixes: 30350d65ac56 ("tracing: Add variable support to hist triggers") +Acked-by: Tom Zanussi +Signed-off-by: Dan Carpenter +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -4412,7 +4412,7 @@ static int create_tracing_map_fields(str + struct tracing_map *map = hist_data->map; + struct ftrace_event_field *field; + struct hist_field *hist_field; +- int i, idx; ++ int i, idx = 0; + + for_each_hist_field(i, hist_data) { + hist_field = hist_data->fields[i]; diff --git a/debian/patches/features/all/rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch b/debian/patches/features/all/rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch index d55057111..71c0c2703 100644 --- a/debian/patches/features/all/rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch +++ b/debian/patches/features/all/rt/0005-ARM-configs-at91-use-new-TCB-timer-driver.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:42 +0200 Subject: [PATCH 5/6] ARM: configs: at91: use new TCB timer driver -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Unselecting ATMEL_TCLIB switches the TCB timer driver from tcb_clksrc to timer-atmel-tcb. diff --git a/debian/patches/features/all/rt/mm-backing-dev-Use-irqsave-variant-of-atomic_dec_and.patch b/debian/patches/features/all/rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch similarity index 67% rename from debian/patches/features/all/rt/mm-backing-dev-Use-irqsave-variant-of-atomic_dec_and.patch rename to debian/patches/features/all/rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch index 6f43542ff..6ec169b0c 100644 --- a/debian/patches/features/all/rt/mm-backing-dev-Use-irqsave-variant-of-atomic_dec_and.patch +++ b/debian/patches/features/all/rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch @@ -1,14 +1,14 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:56 +0200 -Subject: [PATCH] mm/backing-dev: Use irqsave variant of - atomic_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Subject: [PATCH] bdi: Use irqsave variant of refcount_dec_and_lock() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz -The irqsave variant of atomic_dec_and_lock handles irqsave/restore when +The irqsave variant of refcount_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of local_irq_save/restore is no longer required. Signed-off-by: Anna-Maria Gleixner +[bigeasy: s@atomic_dec_and_lock@refcount_dec_and_lock@g ] Signed-off-by: Sebastian Andrzej Siewior --- mm/backing-dev.c | 5 +---- @@ -21,9 +21,9 @@ Signed-off-by: Sebastian Andrzej Siewior unsigned long flags; - local_irq_save(flags); -- if (!atomic_dec_and_lock(&congested->refcnt, &cgwb_lock)) { +- if (!refcount_dec_and_lock(&congested->refcnt, &cgwb_lock)) { - local_irq_restore(flags); -+ if (!atomic_dec_and_lock_irqsave(&congested->refcnt, &cgwb_lock, flags)) ++ if (!refcount_dec_and_lock_irqsave(&congested->refcnt, &cgwb_lock, &flags)) return; - } diff --git a/debian/patches/features/all/rt/0005-handle-move-to-LRU-in-retain_dentry.patch b/debian/patches/features/all/rt/0005-handle-move-to-LRU-in-retain_dentry.patch index 0f983bbc8..c3dc30c69 100644 --- a/debian/patches/features/all/rt/0005-handle-move-to-LRU-in-retain_dentry.patch +++ b/debian/patches/features/all/rt/0005-handle-move-to-LRU-in-retain_dentry.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Tue, 6 Mar 2018 21:37:31 -0500 Subject: [PATCH 05/17] handle move to LRU in retain_dentry() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 62d9956cefe6ecc4b43a7fae37af78ba7adaceaa diff --git a/debian/patches/features/all/rt/0005-iommu-amd-Remove-the-special-case-from-alloc_irq_tab.patch b/debian/patches/features/all/rt/0005-iommu-amd-Remove-the-special-case-from-alloc_irq_tab.patch index f14aeb469..9a16ec5d4 100644 --- a/debian/patches/features/all/rt/0005-iommu-amd-Remove-the-special-case-from-alloc_irq_tab.patch +++ b/debian/patches/features/all/rt/0005-iommu-amd-Remove-the-special-case-from-alloc_irq_tab.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:37 +0100 Subject: [PATCH 05/10] iommu/amd: Remove the special case from alloc_irq_table() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit fde65dd3d3096e8f6ecc7bbe544eb91f4220772c diff --git a/debian/patches/features/all/rt/0005-tracing-Fix-a-potential-NULL-dereference.patch b/debian/patches/features/all/rt/0005-tracing-Fix-a-potential-NULL-dereference.patch new file mode 100644 index 000000000..e577a68ae --- /dev/null +++ b/debian/patches/features/all/rt/0005-tracing-Fix-a-potential-NULL-dereference.patch @@ -0,0 +1,30 @@ +From: Dan Carpenter +Date: Fri, 23 Mar 2018 14:37:36 +0300 +Subject: [PATCH 5/5] tracing: Fix a potential NULL dereference +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +We forgot to set the error code on this path so we return ERR_PTR(0) +which is NULL. It results in a NULL dereference in the caller. + +Link: http://lkml.kernel.org/r/20180323113735.GC28518@mwanda + +Fixes: 100719dcef44 ("tracing: Add simple expression support to hist triggers") +Acked-by: Tom Zanussi +Signed-off-by: Dan Carpenter +Signed-off-by: Steven Rostedt (VMware) +(cherry picked from commit 5e4cf2bf6d1c198a90ccc0df5ffd8e0d4ea36b48) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 1 + + 1 file changed, 1 insertion(+) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -2777,6 +2777,7 @@ static struct hist_field *parse_expr(str + expr->fn = hist_field_plus; + break; + default: ++ ret = -EINVAL; + goto free; + } + diff --git a/debian/patches/features/all/rt/0006-ARM-configs-at91-unselect-PIT.patch b/debian/patches/features/all/rt/0006-ARM-configs-at91-unselect-PIT.patch index 4f2350554..487a0afe0 100644 --- a/debian/patches/features/all/rt/0006-ARM-configs-at91-unselect-PIT.patch +++ b/debian/patches/features/all/rt/0006-ARM-configs-at91-unselect-PIT.patch @@ -1,7 +1,7 @@ From: Alexandre Belloni Date: Wed, 18 Apr 2018 12:51:43 +0200 Subject: [PATCH 6/6] ARM: configs: at91: unselect PIT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The PIT is not required anymore to successfully boot and may actually harm in case preempt-rt is used because the PIT interrupt is shared. diff --git a/debian/patches/features/all/rt/0006-get-rid-of-trylock-loop-around-dentry_kill.patch b/debian/patches/features/all/rt/0006-get-rid-of-trylock-loop-around-dentry_kill.patch index 645b9db7c..0fc00555b 100644 --- a/debian/patches/features/all/rt/0006-get-rid-of-trylock-loop-around-dentry_kill.patch +++ b/debian/patches/features/all/rt/0006-get-rid-of-trylock-loop-around-dentry_kill.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 21:25:42 -0500 Subject: [PATCH 06/17] get rid of trylock loop around dentry_kill() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit f657a666fd1b1b9fe59963943c74c245ae66f4cc diff --git a/debian/patches/features/all/rt/0006-iommu-amd-Use-table-instead-irt-as-variable-name-in-.patch b/debian/patches/features/all/rt/0006-iommu-amd-Use-table-instead-irt-as-variable-name-in-.patch index 9df168488..7245bb071 100644 --- a/debian/patches/features/all/rt/0006-iommu-amd-Use-table-instead-irt-as-variable-name-in-.patch +++ b/debian/patches/features/all/rt/0006-iommu-amd-Use-table-instead-irt-as-variable-name-in-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:38 +0100 Subject: [PATCH 06/10] iommu/amd: Use `table' instead `irt' as variable name in amd_iommu_update_ga() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 4fde541c9dc114c5b448ad34b0286fe8b7c550f1 diff --git a/debian/patches/features/all/rt/kernel-user-Use-irqsave-variant-of-atomic_dec_and_lo.patch b/debian/patches/features/all/rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch similarity index 66% rename from debian/patches/features/all/rt/kernel-user-Use-irqsave-variant-of-atomic_dec_and_lo.patch rename to debian/patches/features/all/rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch index 56eec54de..ee0e2cc91 100644 --- a/debian/patches/features/all/rt/kernel-user-Use-irqsave-variant-of-atomic_dec_and_lo.patch +++ b/debian/patches/features/all/rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch @@ -1,13 +1,14 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:57 +0200 -Subject: [PATCH] kernel/user: Use irqsave variant of atomic_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Subject: [PATCH] userns: Use irqsave variant of refcount_dec_and_lock() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz -The irqsave variant of atomic_dec_and_lock handles irqsave/restore when +The irqsave variant of refcount_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of local_irq_save/restore is no longer required. Signed-off-by: Anna-Maria Gleixner +[bigeasy: s@atomic_dec_and_lock@refcount_dec_and_lock@g ] Signed-off-by: Sebastian Andrzej Siewior --- kernel/user.c | 5 +---- @@ -20,8 +21,8 @@ Signed-off-by: Sebastian Andrzej Siewior return; - local_irq_save(flags); -- if (atomic_dec_and_lock(&up->__count, &uidhash_lock)) -+ if (atomic_dec_and_lock_irqsave(&up->__count, &uidhash_lock, flags)) +- if (refcount_dec_and_lock(&up->__count, &uidhash_lock)) ++ if (refcount_dec_and_lock_irqsave(&up->__count, &uidhash_lock, &flags)) free_user(up, flags); - else - local_irq_restore(flags); diff --git a/debian/patches/features/all/rt/0007-fs-dcache-Avoid-a-try_lock-loop-in-shrink_dentry_lis.patch b/debian/patches/features/all/rt/0007-fs-dcache-Avoid-a-try_lock-loop-in-shrink_dentry_lis.patch index 55af182c4..d555f496d 100644 --- a/debian/patches/features/all/rt/0007-fs-dcache-Avoid-a-try_lock-loop-in-shrink_dentry_lis.patch +++ b/debian/patches/features/all/rt/0007-fs-dcache-Avoid-a-try_lock-loop-in-shrink_dentry_lis.patch @@ -2,7 +2,7 @@ From: John Ogness Date: Fri, 23 Feb 2018 00:50:24 +0100 Subject: [PATCH 07/17] fs/dcache: Avoid a try_lock loop in shrink_dentry_list() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 8f04da2adbdffed8dc4b2feb00ec3b3d84683885 diff --git a/debian/patches/features/all/rt/0007-iommu-amd-Factor-out-setting-the-remap-table-for-a-d.patch b/debian/patches/features/all/rt/0007-iommu-amd-Factor-out-setting-the-remap-table-for-a-d.patch index f4ee4f8db..04d1bae7a 100644 --- a/debian/patches/features/all/rt/0007-iommu-amd-Factor-out-setting-the-remap-table-for-a-d.patch +++ b/debian/patches/features/all/rt/0007-iommu-amd-Factor-out-setting-the-remap-table-for-a-d.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:39 +0100 Subject: [PATCH 07/10] iommu/amd: Factor out setting the remap table for a devid -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 2fcc1e8ac4a8514c64f946178fc36c2e30e56a41 diff --git a/debian/patches/features/all/rt/drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch b/debian/patches/features/all/rt/0007-md-raid5-Use-irqsave-variant-of-refcount_dec_and_loc.patch similarity index 73% rename from debian/patches/features/all/rt/drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch rename to debian/patches/features/all/rt/0007-md-raid5-Use-irqsave-variant-of-refcount_dec_and_loc.patch index 5351683de..1bc57a024 100644 --- a/debian/patches/features/all/rt/drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch +++ b/debian/patches/features/all/rt/0007-md-raid5-Use-irqsave-variant-of-refcount_dec_and_loc.patch @@ -1,14 +1,14 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:58 +0200 -Subject: [PATCH] drivers/md/raid5: Use irqsave variant of - atomic_dec_and_lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Subject: [PATCH] md: raid5: Use irqsave variant of refcount_dec_and_lock() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz -The irqsave variant of atomic_dec_and_lock handles irqsave/restore when +The irqsave variant of refcount_dec_and_lock handles irqsave/restore when taking/releasing the spin lock. With this variant the call of local_irq_save is no longer required. Signed-off-by: Anna-Maria Gleixner +[bigeasy: s@atomic_dec_and_lock@refcount_dec_and_lock@g ] Signed-off-by: Sebastian Andrzej Siewior --- drivers/md/raid5.c | 5 ++--- @@ -22,8 +22,8 @@ Signed-off-by: Sebastian Andrzej Siewior slow_path: - local_irq_save(flags); /* we are ok here if STRIPE_ON_RELEASE_LIST is set or not */ -- if (atomic_dec_and_lock(&sh->count, &conf->device_lock)) { -+ if (atomic_dec_and_lock_irqsave(&sh->count, &conf->device_lock, flags)) { +- if (refcount_dec_and_lock(&sh->count, &conf->device_lock)) { ++ if (refcount_dec_and_lock_irqsave(&sh->count, &conf->device_lock, &flags)) { INIT_LIST_HEAD(&list); hash = sh->hash_lock_index; do_release_stripe(conf, sh, &list); diff --git a/debian/patches/features/all/rt/0008-dcache.c-trim-includes.patch b/debian/patches/features/all/rt/0008-dcache.c-trim-includes.patch index 7c99f78c9..b16122cdc 100644 --- a/debian/patches/features/all/rt/0008-dcache.c-trim-includes.patch +++ b/debian/patches/features/all/rt/0008-dcache.c-trim-includes.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Sun, 25 Feb 2018 02:47:29 -0500 Subject: [PATCH 08/17] dcache.c: trim includes -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 43986d63b60fd0152d9038ee3f0f9294efa8c983 diff --git a/debian/patches/features/all/rt/0008-iommu-amd-Drop-the-lock-while-allocating-new-irq-rem.patch b/debian/patches/features/all/rt/0008-iommu-amd-Drop-the-lock-while-allocating-new-irq-rem.patch index ec638a874..371c06b46 100644 --- a/debian/patches/features/all/rt/0008-iommu-amd-Drop-the-lock-while-allocating-new-irq-rem.patch +++ b/debian/patches/features/all/rt/0008-iommu-amd-Drop-the-lock-while-allocating-new-irq-rem.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:40 +0100 Subject: [PATCH 08/10] iommu/amd: Drop the lock while allocating new irq remap table -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 993ca6e063a69a0c65ca42ed449b6bc1b3844151 diff --git a/debian/patches/features/all/rt/drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch b/debian/patches/features/all/rt/0008-md-raid5-Do-not-disable-irq-on-release_inactive_stri.patch similarity index 87% rename from debian/patches/features/all/rt/drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch rename to debian/patches/features/all/rt/0008-md-raid5-Do-not-disable-irq-on-release_inactive_stri.patch index 133b143f1..a4e6be3bd 100644 --- a/debian/patches/features/all/rt/drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch +++ b/debian/patches/features/all/rt/0008-md-raid5-Do-not-disable-irq-on-release_inactive_stri.patch @@ -1,8 +1,8 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:43:59 +0200 -Subject: [PATCH] drivers/md/raid5: Do not disable irq on +Subject: [PATCH] md: raid5: Do not disable irq on release_inactive_stripe_list() call -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There is no need to invoke release_inactive_stripe_list() with interrupts disabled. All call sites, except raid5_release_stripe(), unlock @@ -11,6 +11,7 @@ disabled. All call sites, except raid5_release_stripe(), unlock Make it consistent. Signed-off-by: Anna-Maria Gleixner +[bigeasy: s@atomic_dec_and_lock@refcount_dec_and_lock@g ] Signed-off-by: Sebastian Andrzej Siewior --- drivers/md/raid5.c | 3 +-- diff --git a/debian/patches/features/all/rt/0009-iommu-amd-Make-amd_iommu_devtable_lock-a-spin_lock.patch b/debian/patches/features/all/rt/0009-iommu-amd-Make-amd_iommu_devtable_lock-a-spin_lock.patch index 57fb1bb16..e622ba035 100644 --- a/debian/patches/features/all/rt/0009-iommu-amd-Make-amd_iommu_devtable_lock-a-spin_lock.patch +++ b/debian/patches/features/all/rt/0009-iommu-amd-Make-amd_iommu_devtable_lock-a-spin_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:41 +0100 Subject: [PATCH 09/10] iommu/amd: Make amd_iommu_devtable_lock a spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 2cd1083d79a0a8c223af430ca97884c28a1e2fc0 diff --git a/debian/patches/features/all/rt/0009-split-d_path-and-friends-into-a-separate-file.patch b/debian/patches/features/all/rt/0009-split-d_path-and-friends-into-a-separate-file.patch index 926e59c22..7afdae6e9 100644 --- a/debian/patches/features/all/rt/0009-split-d_path-and-friends-into-a-separate-file.patch +++ b/debian/patches/features/all/rt/0009-split-d_path-and-friends-into-a-separate-file.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Mon, 5 Mar 2018 19:15:50 -0500 Subject: [PATCH 09/17] split d_path() and friends into a separate file -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 7a5cf791a747640adb2a1b5e3838321b26953a23 diff --git a/debian/patches/features/all/rt/0009-tracing-Move-hist-trigger-Documentation-to-histogram.patch b/debian/patches/features/all/rt/0009-tracing-Move-hist-trigger-Documentation-to-histogram.patch index 7c0814425..9bce3504f 100644 --- a/debian/patches/features/all/rt/0009-tracing-Move-hist-trigger-Documentation-to-histogram.patch +++ b/debian/patches/features/all/rt/0009-tracing-Move-hist-trigger-Documentation-to-histogram.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:35 -0600 Subject: [PATCH 09/48] tracing: Move hist trigger Documentation to histogram.txt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The hist trigger Documentation takes up a large part of events.txt - since it will be getting even larger, move it to a separate file. diff --git a/debian/patches/features/all/rt/0010-iommu-amd-Return-proper-error-code-in-irq_remapping_.patch b/debian/patches/features/all/rt/0010-iommu-amd-Return-proper-error-code-in-irq_remapping_.patch index 3200a7e34..3545a457f 100644 --- a/debian/patches/features/all/rt/0010-iommu-amd-Return-proper-error-code-in-irq_remapping_.patch +++ b/debian/patches/features/all/rt/0010-iommu-amd-Return-proper-error-code-in-irq_remapping_.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Mar 2018 16:22:42 +0100 Subject: [PATCH 10/10] iommu/amd: Return proper error code in irq_remapping_alloc() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 29d049be9438278c47253a74cf8d0ddf36bd5d68 diff --git a/debian/patches/features/all/rt/0010-take-out-orphan-externs-empty_string-slash_string.patch b/debian/patches/features/all/rt/0010-take-out-orphan-externs-empty_string-slash_string.patch index 66c4b552c..5a80abfe5 100644 --- a/debian/patches/features/all/rt/0010-take-out-orphan-externs-empty_string-slash_string.patch +++ b/debian/patches/features/all/rt/0010-take-out-orphan-externs-empty_string-slash_string.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Wed, 7 Mar 2018 12:47:04 -0500 Subject: [PATCH 10/17] take out orphan externs (empty_string/slash_string) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 903ddaf49329076862d65f7284d825759ff67bd6 diff --git a/debian/patches/features/all/rt/0010-tracing-Add-Documentation-for-log2-modifier.patch b/debian/patches/features/all/rt/0010-tracing-Add-Documentation-for-log2-modifier.patch index 150aac7b7..94954bf1b 100644 --- a/debian/patches/features/all/rt/0010-tracing-Add-Documentation-for-log2-modifier.patch +++ b/debian/patches/features/all/rt/0010-tracing-Add-Documentation-for-log2-modifier.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:36 -0600 Subject: [PATCH 10/48] tracing: Add Documentation for log2 modifier -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a line for the log2 modifier, to keep it aligned with tracing/README. diff --git a/debian/patches/features/all/rt/0011-fold-lookup_real-into-__lookup_hash.patch b/debian/patches/features/all/rt/0011-fold-lookup_real-into-__lookup_hash.patch index 87e20d5ef..e58c74df0 100644 --- a/debian/patches/features/all/rt/0011-fold-lookup_real-into-__lookup_hash.patch +++ b/debian/patches/features/all/rt/0011-fold-lookup_real-into-__lookup_hash.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Thu, 8 Mar 2018 11:00:45 -0500 Subject: [PATCH 11/17] fold lookup_real() into __lookup_hash() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit a03ece5ff2bd7a9abaa0e8ddfe5f79d79e5984c8 diff --git a/debian/patches/features/all/rt/0011-tracing-Add-support-to-detect-and-avoid-duplicates.patch b/debian/patches/features/all/rt/0011-tracing-Add-support-to-detect-and-avoid-duplicates.patch index 79701425c..ca6e3d8db 100644 --- a/debian/patches/features/all/rt/0011-tracing-Add-support-to-detect-and-avoid-duplicates.patch +++ b/debian/patches/features/all/rt/0011-tracing-Add-support-to-detect-and-avoid-duplicates.patch @@ -1,7 +1,7 @@ From: Vedang Patel Date: Mon, 15 Jan 2018 20:51:37 -0600 Subject: [PATCH 11/48] tracing: Add support to detect and avoid duplicates -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz A duplicate in the tracing_map hash table is when 2 different entries have the same key and, as a result, the key_hash. This is possible due diff --git a/debian/patches/features/all/rt/0012-debugfs_lookup-switch-to-lookup_one_len_unlocked.patch b/debian/patches/features/all/rt/0012-debugfs_lookup-switch-to-lookup_one_len_unlocked.patch index 917a30a05..77eff120e 100644 --- a/debian/patches/features/all/rt/0012-debugfs_lookup-switch-to-lookup_one_len_unlocked.patch +++ b/debian/patches/features/all/rt/0012-debugfs_lookup-switch-to-lookup_one_len_unlocked.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Thu, 8 Mar 2018 11:01:22 -0500 Subject: [PATCH 12/17] debugfs_lookup(): switch to lookup_one_len_unlocked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit cd1c0c9321999737073dcfc3364e194e02604bce diff --git a/debian/patches/features/all/rt/0012-tracing-Remove-code-which-merges-duplicates.patch b/debian/patches/features/all/rt/0012-tracing-Remove-code-which-merges-duplicates.patch index cc4f0d22b..9e3b8a75e 100644 --- a/debian/patches/features/all/rt/0012-tracing-Remove-code-which-merges-duplicates.patch +++ b/debian/patches/features/all/rt/0012-tracing-Remove-code-which-merges-duplicates.patch @@ -1,7 +1,7 @@ From: Vedang Patel Date: Mon, 15 Jan 2018 20:51:38 -0600 Subject: [PATCH 12/48] tracing: Remove code which merges duplicates -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz We now have the logic to detect and remove duplicates in the tracing_map hash table. The code which merges duplicates in the diff --git a/debian/patches/features/all/rt/0013-lustre-get-rid-of-pointless-casts-to-struct-dentry.patch b/debian/patches/features/all/rt/0013-lustre-get-rid-of-pointless-casts-to-struct-dentry.patch index 73f66a86c..cee7ab2ee 100644 --- a/debian/patches/features/all/rt/0013-lustre-get-rid-of-pointless-casts-to-struct-dentry.patch +++ b/debian/patches/features/all/rt/0013-lustre-get-rid-of-pointless-casts-to-struct-dentry.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Fri, 9 Mar 2018 18:06:03 -0500 Subject: [PATCH 13/17] lustre: get rid of pointless casts to struct dentry * -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 5bf1ddf7ee0e23598a620ef9ea2b0f00e804859d diff --git a/debian/patches/features/all/rt/0013-ring-buffer-Add-interface-for-setting-absolute-time-.patch b/debian/patches/features/all/rt/0013-ring-buffer-Add-interface-for-setting-absolute-time-.patch index 391834c7b..33cf200df 100644 --- a/debian/patches/features/all/rt/0013-ring-buffer-Add-interface-for-setting-absolute-time-.patch +++ b/debian/patches/features/all/rt/0013-ring-buffer-Add-interface-for-setting-absolute-time-.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:39 -0600 Subject: [PATCH 13/48] ring-buffer: Add interface for setting absolute time stamps -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Define a new function, tracing_set_time_stamp_abs(), which can be used to enable or disable the use of absolute timestamps rather than time diff --git a/debian/patches/features/all/rt/0014-oprofilefs-don-t-oops-on-allocation-failure.patch b/debian/patches/features/all/rt/0014-oprofilefs-don-t-oops-on-allocation-failure.patch index 8678c67da..968eb3971 100644 --- a/debian/patches/features/all/rt/0014-oprofilefs-don-t-oops-on-allocation-failure.patch +++ b/debian/patches/features/all/rt/0014-oprofilefs-don-t-oops-on-allocation-failure.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Sat, 10 Mar 2018 16:40:33 -0500 Subject: [PATCH 14/17] oprofilefs: don't oops on allocation failure -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit a7498968338da9b928f5d8054acc8be6ed2bc14c diff --git a/debian/patches/features/all/rt/0014-ring-buffer-Redefine-the-unimplemented-RINGBUF_TYPE_.patch b/debian/patches/features/all/rt/0014-ring-buffer-Redefine-the-unimplemented-RINGBUF_TYPE_.patch index 4af3636b0..2ddb547c4 100644 --- a/debian/patches/features/all/rt/0014-ring-buffer-Redefine-the-unimplemented-RINGBUF_TYPE_.patch +++ b/debian/patches/features/all/rt/0014-ring-buffer-Redefine-the-unimplemented-RINGBUF_TYPE_.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:40 -0600 Subject: [PATCH 14/48] ring-buffer: Redefine the unimplemented RINGBUF_TYPE_TIME_STAMP -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz RINGBUF_TYPE_TIME_STAMP is defined but not used, and from what I can gather was reserved for something like an absolute timestamp feature diff --git a/debian/patches/features/all/rt/0015-make-non-exchanging-__d_move-copy-d_parent-rather-th.patch b/debian/patches/features/all/rt/0015-make-non-exchanging-__d_move-copy-d_parent-rather-th.patch index 4f9935510..8b27168d8 100644 --- a/debian/patches/features/all/rt/0015-make-non-exchanging-__d_move-copy-d_parent-rather-th.patch +++ b/debian/patches/features/all/rt/0015-make-non-exchanging-__d_move-copy-d_parent-rather-th.patch @@ -2,7 +2,7 @@ From: Al Viro Date: Sat, 10 Mar 2018 23:15:52 -0500 Subject: [PATCH 15/17] make non-exchanging __d_move() copy ->d_parent rather than swap them -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 076515fc926793e162fc6525bed1679ef2bbf269 diff --git a/debian/patches/features/all/rt/0015-tracing-Add-timestamp_mode-trace-file.patch b/debian/patches/features/all/rt/0015-tracing-Add-timestamp_mode-trace-file.patch index 46d33434a..a40a90582 100644 --- a/debian/patches/features/all/rt/0015-tracing-Add-timestamp_mode-trace-file.patch +++ b/debian/patches/features/all/rt/0015-tracing-Add-timestamp_mode-trace-file.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:41 -0600 Subject: [PATCH 15/48] tracing: Add timestamp_mode trace file -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a new option flag indicating whether or not the ring buffer is in 'absolute timestamp' mode. diff --git a/debian/patches/features/all/rt/0016-fold-dentry_lock_for_move-into-its-sole-caller-and-c.patch b/debian/patches/features/all/rt/0016-fold-dentry_lock_for_move-into-its-sole-caller-and-c.patch index 5a385d7f3..d3b7d2397 100644 --- a/debian/patches/features/all/rt/0016-fold-dentry_lock_for_move-into-its-sole-caller-and-c.patch +++ b/debian/patches/features/all/rt/0016-fold-dentry_lock_for_move-into-its-sole-caller-and-c.patch @@ -2,7 +2,7 @@ From: Al Viro Date: Sun, 11 Mar 2018 15:15:46 -0400 Subject: [PATCH 16/17] fold dentry_lock_for_move() into its sole caller and clean it up -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 42177007aa277af3e37bf2ae3efdfe795c81d700 diff --git a/debian/patches/features/all/rt/0016-tracing-Give-event-triggers-access-to-ring_buffer_ev.patch b/debian/patches/features/all/rt/0016-tracing-Give-event-triggers-access-to-ring_buffer_ev.patch index 69e083d97..ca04bf4e5 100644 --- a/debian/patches/features/all/rt/0016-tracing-Give-event-triggers-access-to-ring_buffer_ev.patch +++ b/debian/patches/features/all/rt/0016-tracing-Give-event-triggers-access-to-ring_buffer_ev.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:42 -0600 Subject: [PATCH 16/48] tracing: Give event triggers access to ring_buffer_event -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The ring_buffer event can provide a timestamp that may be useful to various triggers - pass it into the handlers for that purpose. diff --git a/debian/patches/features/all/rt/0017-d_genocide-move-export-to-definition.patch b/debian/patches/features/all/rt/0017-d_genocide-move-export-to-definition.patch index 555f6f1b2..249abc83c 100644 --- a/debian/patches/features/all/rt/0017-d_genocide-move-export-to-definition.patch +++ b/debian/patches/features/all/rt/0017-d_genocide-move-export-to-definition.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Thu, 29 Mar 2018 15:08:21 -0400 Subject: [PATCH 17/17] d_genocide: move export to definition -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit cbd4a5bcb25b5ed0c1c64bc969b893cad9b78acc diff --git a/debian/patches/features/all/rt/0017-tracing-Add-ring-buffer-event-param-to-hist-field-fu.patch b/debian/patches/features/all/rt/0017-tracing-Add-ring-buffer-event-param-to-hist-field-fu.patch index a1ec9d415..da5e637fa 100644 --- a/debian/patches/features/all/rt/0017-tracing-Add-ring-buffer-event-param-to-hist-field-fu.patch +++ b/debian/patches/features/all/rt/0017-tracing-Add-ring-buffer-event-param-to-hist-field-fu.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:43 -0600 Subject: [PATCH 17/48] tracing: Add ring buffer event param to hist field functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Some events such as timestamps require access to a ring_buffer_event struct; add a param so that hist field functions can access that. diff --git a/debian/patches/features/all/rt/0018-tracing-Break-out-hist-trigger-assignment-parsing.patch b/debian/patches/features/all/rt/0018-tracing-Break-out-hist-trigger-assignment-parsing.patch index fabdcf7b3..066114e8d 100644 --- a/debian/patches/features/all/rt/0018-tracing-Break-out-hist-trigger-assignment-parsing.patch +++ b/debian/patches/features/all/rt/0018-tracing-Break-out-hist-trigger-assignment-parsing.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:44 -0600 Subject: [PATCH 18/48] tracing: Break out hist trigger assignment parsing -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This will make it easier to add variables, and makes the parsing code cleaner regardless. diff --git a/debian/patches/features/all/rt/0019-tracing-Add-hist-trigger-timestamp-support.patch b/debian/patches/features/all/rt/0019-tracing-Add-hist-trigger-timestamp-support.patch index c505f0f53..7194150fc 100644 --- a/debian/patches/features/all/rt/0019-tracing-Add-hist-trigger-timestamp-support.patch +++ b/debian/patches/features/all/rt/0019-tracing-Add-hist-trigger-timestamp-support.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:45 -0600 Subject: [PATCH 19/48] tracing: Add hist trigger timestamp support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add support for a timestamp event field. This is actually a 'pseudo-' event field in that it behaves like it's part of the event record, but diff --git a/debian/patches/features/all/rt/0020-tracing-Add-per-element-variable-support-to-tracing_.patch b/debian/patches/features/all/rt/0020-tracing-Add-per-element-variable-support-to-tracing_.patch index b1a41a5f0..c1d443179 100644 --- a/debian/patches/features/all/rt/0020-tracing-Add-per-element-variable-support-to-tracing_.patch +++ b/debian/patches/features/all/rt/0020-tracing-Add-per-element-variable-support-to-tracing_.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:46 -0600 Subject: [PATCH 20/48] tracing: Add per-element variable support to tracing_map -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In order to allow information to be passed between trace events, add support for per-element variables to tracing_map. This provides a diff --git a/debian/patches/features/all/rt/0021-tracing-Add-hist_data-member-to-hist_field.patch b/debian/patches/features/all/rt/0021-tracing-Add-hist_data-member-to-hist_field.patch index 1c4d098d0..3f73a2317 100644 --- a/debian/patches/features/all/rt/0021-tracing-Add-hist_data-member-to-hist_field.patch +++ b/debian/patches/features/all/rt/0021-tracing-Add-hist_data-member-to-hist_field.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:47 -0600 Subject: [PATCH 21/48] tracing: Add hist_data member to hist_field -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Allow hist_data access via hist_field. Some users of hist_fields require or will require more access to the associated hist_data. diff --git a/debian/patches/features/all/rt/0022-tracing-Add-usecs-modifier-for-hist-trigger-timestam.patch b/debian/patches/features/all/rt/0022-tracing-Add-usecs-modifier-for-hist-trigger-timestam.patch index 4f4550688..3d4ffcd87 100644 --- a/debian/patches/features/all/rt/0022-tracing-Add-usecs-modifier-for-hist-trigger-timestam.patch +++ b/debian/patches/features/all/rt/0022-tracing-Add-usecs-modifier-for-hist-trigger-timestam.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:48 -0600 Subject: [PATCH 22/48] tracing: Add usecs modifier for hist trigger timestamps -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Appending .usecs onto a common_timestamp field will cause the timestamp value to be in microseconds instead of the default diff --git a/debian/patches/features/all/rt/0023-tracing-Add-variable-support-to-hist-triggers.patch b/debian/patches/features/all/rt/0023-tracing-Add-variable-support-to-hist-triggers.patch index 78ceff137..70f5ef0c5 100644 --- a/debian/patches/features/all/rt/0023-tracing-Add-variable-support-to-hist-triggers.patch +++ b/debian/patches/features/all/rt/0023-tracing-Add-variable-support-to-hist-triggers.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:49 -0600 Subject: [PATCH 23/48] tracing: Add variable support to hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add support for saving the value of a current event's event field by assigning it to a variable that can be read by a subsequent event. diff --git a/debian/patches/features/all/rt/0024-tracing-Account-for-variables-in-named-trigger-compa.patch b/debian/patches/features/all/rt/0024-tracing-Account-for-variables-in-named-trigger-compa.patch index de939a65a..5ddd0a754 100644 --- a/debian/patches/features/all/rt/0024-tracing-Account-for-variables-in-named-trigger-compa.patch +++ b/debian/patches/features/all/rt/0024-tracing-Account-for-variables-in-named-trigger-compa.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:50 -0600 Subject: [PATCH 24/48] tracing: Account for variables in named trigger compatibility -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Named triggers must also have the same set of variables in order to be considered compatible - update the trigger match test to account for diff --git a/debian/patches/features/all/rt/0025-tracing-Move-get_hist_field_flags.patch b/debian/patches/features/all/rt/0025-tracing-Move-get_hist_field_flags.patch index fddb6ea2e..607b1327b 100644 --- a/debian/patches/features/all/rt/0025-tracing-Move-get_hist_field_flags.patch +++ b/debian/patches/features/all/rt/0025-tracing-Move-get_hist_field_flags.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:51 -0600 Subject: [PATCH 25/48] tracing: Move get_hist_field_flags() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Move get_hist_field_flags() to make it more easily accessible for new code (and keep the move separate from new functionality). diff --git a/debian/patches/features/all/rt/0026-tracing-Add-simple-expression-support-to-hist-trigge.patch b/debian/patches/features/all/rt/0026-tracing-Add-simple-expression-support-to-hist-trigge.patch index 3170b0dc0..ff365787e 100644 --- a/debian/patches/features/all/rt/0026-tracing-Add-simple-expression-support-to-hist-trigge.patch +++ b/debian/patches/features/all/rt/0026-tracing-Add-simple-expression-support-to-hist-trigge.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:52 -0600 Subject: [PATCH 26/48] tracing: Add simple expression support to hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add support for simple addition, subtraction, and unary expressions (-(expr) and expr, where expr = b-a, a+b, a+b+c) to hist triggers, in diff --git a/debian/patches/features/all/rt/0027-tracing-Generalize-per-element-hist-trigger-data.patch b/debian/patches/features/all/rt/0027-tracing-Generalize-per-element-hist-trigger-data.patch index 932045066..c900f0fb5 100644 --- a/debian/patches/features/all/rt/0027-tracing-Generalize-per-element-hist-trigger-data.patch +++ b/debian/patches/features/all/rt/0027-tracing-Generalize-per-element-hist-trigger-data.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:53 -0600 Subject: [PATCH 27/48] tracing: Generalize per-element hist trigger data -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Up until now, hist triggers only needed per-element support for saving 'comm' data, which was saved directly as a private data pointer. diff --git a/debian/patches/features/all/rt/0028-tracing-Pass-tracing_map_elt-to-hist_field-accessor-.patch b/debian/patches/features/all/rt/0028-tracing-Pass-tracing_map_elt-to-hist_field-accessor-.patch index 914141d7c..b94ee9e2b 100644 --- a/debian/patches/features/all/rt/0028-tracing-Pass-tracing_map_elt-to-hist_field-accessor-.patch +++ b/debian/patches/features/all/rt/0028-tracing-Pass-tracing_map_elt-to-hist_field-accessor-.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:54 -0600 Subject: [PATCH 28/48] tracing: Pass tracing_map_elt to hist_field accessor functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Some accessor functions, such as for variable references, require access to a corrsponding tracing_map_elt. diff --git a/debian/patches/features/all/rt/0029-tracing-Add-hist_field-type-field.patch b/debian/patches/features/all/rt/0029-tracing-Add-hist_field-type-field.patch index ce4bf9764..7cb1c8c63 100644 --- a/debian/patches/features/all/rt/0029-tracing-Add-hist_field-type-field.patch +++ b/debian/patches/features/all/rt/0029-tracing-Add-hist_field-type-field.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:55 -0600 Subject: [PATCH 29/48] tracing: Add hist_field 'type' field -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Future support for synthetic events requires hist_field 'type' information, so add a field for that. diff --git a/debian/patches/features/all/rt/0030-tracing-Add-variable-reference-handling-to-hist-trig.patch b/debian/patches/features/all/rt/0030-tracing-Add-variable-reference-handling-to-hist-trig.patch index a9ec8bc73..747c507bb 100644 --- a/debian/patches/features/all/rt/0030-tracing-Add-variable-reference-handling-to-hist-trig.patch +++ b/debian/patches/features/all/rt/0030-tracing-Add-variable-reference-handling-to-hist-trig.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:56 -0600 Subject: [PATCH 30/48] tracing: Add variable reference handling to hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add the necessary infrastructure to allow the variables defined on one event to be referenced in another. This allows variables set by a diff --git a/debian/patches/features/all/rt/0031-tracing-Add-hist-trigger-action-hook.patch b/debian/patches/features/all/rt/0031-tracing-Add-hist-trigger-action-hook.patch index bf92ce2cf..4851d8dd3 100644 --- a/debian/patches/features/all/rt/0031-tracing-Add-hist-trigger-action-hook.patch +++ b/debian/patches/features/all/rt/0031-tracing-Add-hist-trigger-action-hook.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:57 -0600 Subject: [PATCH 31/48] tracing: Add hist trigger action hook -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a hook for executing extra actions whenever a histogram entry is added or updated. diff --git a/debian/patches/features/all/rt/0032-tracing-Add-support-for-synthetic-events.patch b/debian/patches/features/all/rt/0032-tracing-Add-support-for-synthetic-events.patch index f81d55414..5847f847c 100644 --- a/debian/patches/features/all/rt/0032-tracing-Add-support-for-synthetic-events.patch +++ b/debian/patches/features/all/rt/0032-tracing-Add-support-for-synthetic-events.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:58 -0600 Subject: [PATCH 32/48] tracing: Add support for 'synthetic' events -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Synthetic events are user-defined events generated from hist trigger variables saved from one or more other events. diff --git a/debian/patches/features/all/rt/0033-tracing-Add-support-for-field-variables.patch b/debian/patches/features/all/rt/0033-tracing-Add-support-for-field-variables.patch index c0311153b..c93a5c482 100644 --- a/debian/patches/features/all/rt/0033-tracing-Add-support-for-field-variables.patch +++ b/debian/patches/features/all/rt/0033-tracing-Add-support-for-field-variables.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:51:59 -0600 Subject: [PATCH 33/48] tracing: Add support for 'field variables' -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Users should be able to directly specify event fields in hist trigger 'actions' rather than being forced to explicitly create a variable for diff --git a/debian/patches/features/all/rt/0034-tracing-Add-onmatch-hist-trigger-action-support.patch b/debian/patches/features/all/rt/0034-tracing-Add-onmatch-hist-trigger-action-support.patch index 5a52da9cc..89e31f2db 100644 --- a/debian/patches/features/all/rt/0034-tracing-Add-onmatch-hist-trigger-action-support.patch +++ b/debian/patches/features/all/rt/0034-tracing-Add-onmatch-hist-trigger-action-support.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:00 -0600 Subject: [PATCH 34/48] tracing: Add 'onmatch' hist trigger action support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add an 'onmatch(matching.event).(param list)' hist trigger action which is invoked with the set of variables or diff --git a/debian/patches/features/all/rt/0035-tracing-Add-onmax-hist-trigger-action-support.patch b/debian/patches/features/all/rt/0035-tracing-Add-onmax-hist-trigger-action-support.patch index 67c7a798e..e44f08c56 100644 --- a/debian/patches/features/all/rt/0035-tracing-Add-onmax-hist-trigger-action-support.patch +++ b/debian/patches/features/all/rt/0035-tracing-Add-onmax-hist-trigger-action-support.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:01 -0600 Subject: [PATCH 35/48] tracing: Add 'onmax' hist trigger action support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add an 'onmax(var).save(field,...)' hist trigger action which is invoked whenever an event exceeds the current maximum. diff --git a/debian/patches/features/all/rt/0036-tracing-Allow-whitespace-to-surround-hist-trigger-fi.patch b/debian/patches/features/all/rt/0036-tracing-Allow-whitespace-to-surround-hist-trigger-fi.patch index f3b84ec38..4c21505c9 100644 --- a/debian/patches/features/all/rt/0036-tracing-Allow-whitespace-to-surround-hist-trigger-fi.patch +++ b/debian/patches/features/all/rt/0036-tracing-Allow-whitespace-to-surround-hist-trigger-fi.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:02 -0600 Subject: [PATCH 36/48] tracing: Allow whitespace to surround hist trigger filter -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The existing code only allows for one space before and after the 'if' specifying the filter for a hist trigger. Add code to make that more diff --git a/debian/patches/features/all/rt/0037-tracing-Add-cpu-field-for-hist-triggers.patch b/debian/patches/features/all/rt/0037-tracing-Add-cpu-field-for-hist-triggers.patch index a45049ca5..b2c4db092 100644 --- a/debian/patches/features/all/rt/0037-tracing-Add-cpu-field-for-hist-triggers.patch +++ b/debian/patches/features/all/rt/0037-tracing-Add-cpu-field-for-hist-triggers.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:03 -0600 Subject: [PATCH 37/48] tracing: Add cpu field for hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz A common key to use in a histogram is the cpuid - add a new cpu 'synthetic' field named 'cpu' for that purpose. diff --git a/debian/patches/features/all/rt/0038-tracing-Add-hist-trigger-support-for-variable-refere.patch b/debian/patches/features/all/rt/0038-tracing-Add-hist-trigger-support-for-variable-refere.patch index d9d515fe4..48c94d9bf 100644 --- a/debian/patches/features/all/rt/0038-tracing-Add-hist-trigger-support-for-variable-refere.patch +++ b/debian/patches/features/all/rt/0038-tracing-Add-hist-trigger-support-for-variable-refere.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:04 -0600 Subject: [PATCH 38/48] tracing: Add hist trigger support for variable reference aliases -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add support for alias=$somevar where alias can be used as onmatch.xxx($alias). diff --git a/debian/patches/features/all/rt/0039-tracing-Add-last-error-error-facility-for-hist-trigg.patch b/debian/patches/features/all/rt/0039-tracing-Add-last-error-error-facility-for-hist-trigg.patch index 0d5b6a296..800eb613e 100644 --- a/debian/patches/features/all/rt/0039-tracing-Add-last-error-error-facility-for-hist-trigg.patch +++ b/debian/patches/features/all/rt/0039-tracing-Add-last-error-error-facility-for-hist-trigg.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:05 -0600 Subject: [PATCH 39/48] tracing: Add 'last error' error facility for hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz With the addition of variables and actions, it's become necessary to provide more detailed error information to users about syntax errors. diff --git a/debian/patches/features/all/rt/0040-tracing-Add-inter-event-hist-trigger-Documentation.patch b/debian/patches/features/all/rt/0040-tracing-Add-inter-event-hist-trigger-Documentation.patch index 094a705ef..1ffc09b9c 100644 --- a/debian/patches/features/all/rt/0040-tracing-Add-inter-event-hist-trigger-Documentation.patch +++ b/debian/patches/features/all/rt/0040-tracing-Add-inter-event-hist-trigger-Documentation.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:06 -0600 Subject: [PATCH 40/48] tracing: Add inter-event hist trigger Documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add background and details on inter-event hist triggers, including hist variables, synthetic events, and actions. diff --git a/debian/patches/features/all/rt/0041-tracing-Make-tracing_set_clock-non-static.patch b/debian/patches/features/all/rt/0041-tracing-Make-tracing_set_clock-non-static.patch index 75b806992..51193f950 100644 --- a/debian/patches/features/all/rt/0041-tracing-Make-tracing_set_clock-non-static.patch +++ b/debian/patches/features/all/rt/0041-tracing-Make-tracing_set_clock-non-static.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:07 -0600 Subject: [PATCH 41/48] tracing: Make tracing_set_clock() non-static -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Allow tracing code outside of trace.c to access tracing_set_clock(). diff --git a/debian/patches/features/all/rt/0042-tracing-Add-a-clock-attribute-for-hist-triggers.patch b/debian/patches/features/all/rt/0042-tracing-Add-a-clock-attribute-for-hist-triggers.patch index ce173fce3..9325cfd5f 100644 --- a/debian/patches/features/all/rt/0042-tracing-Add-a-clock-attribute-for-hist-triggers.patch +++ b/debian/patches/features/all/rt/0042-tracing-Add-a-clock-attribute-for-hist-triggers.patch @@ -1,7 +1,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:08 -0600 Subject: [PATCH 42/48] tracing: Add a clock attribute for hist triggers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The default clock if timestamps are used in a histogram is "global". If timestamps aren't used, the clock is irrelevant. diff --git a/debian/patches/features/all/rt/0045-ring-buffer-Add-nesting-for-adding-events-within-eve.patch b/debian/patches/features/all/rt/0045-ring-buffer-Add-nesting-for-adding-events-within-eve.patch index 623843d64..ac86523c6 100644 --- a/debian/patches/features/all/rt/0045-ring-buffer-Add-nesting-for-adding-events-within-eve.patch +++ b/debian/patches/features/all/rt/0045-ring-buffer-Add-nesting-for-adding-events-within-eve.patch @@ -2,7 +2,7 @@ From: "Steven Rostedt (VMware)" Date: Wed, 7 Feb 2018 17:26:32 -0500 Subject: [PATCH 45/48] ring-buffer: Add nesting for adding events within events -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The ring-buffer code has recusion protection in case tracing ends up tracing itself, the ring-buffer will detect that it was called at the same context diff --git a/debian/patches/features/all/rt/0046-tracing-Use-the-ring-buffer-nesting-to-allow-synthet.patch b/debian/patches/features/all/rt/0046-tracing-Use-the-ring-buffer-nesting-to-allow-synthet.patch index a429eb6eb..2b8d35f90 100644 --- a/debian/patches/features/all/rt/0046-tracing-Use-the-ring-buffer-nesting-to-allow-synthet.patch +++ b/debian/patches/features/all/rt/0046-tracing-Use-the-ring-buffer-nesting-to-allow-synthet.patch @@ -2,7 +2,7 @@ From: "Steven Rostedt (VMware)" Date: Wed, 7 Feb 2018 17:29:46 -0500 Subject: [PATCH 46/48] tracing: Use the ring-buffer nesting to allow synthetic events to be traced -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Synthetic events can be done within the recording of other events. Notify the ring buffer via ring_buffer_nest_start() and ring_buffer_nest_end() that diff --git a/debian/patches/features/all/rt/0047-tracing-Add-inter-event-blurb-to-HIST_TRIGGERS-confi.patch b/debian/patches/features/all/rt/0047-tracing-Add-inter-event-blurb-to-HIST_TRIGGERS-confi.patch index 76e1d9797..77e267208 100644 --- a/debian/patches/features/all/rt/0047-tracing-Add-inter-event-blurb-to-HIST_TRIGGERS-confi.patch +++ b/debian/patches/features/all/rt/0047-tracing-Add-inter-event-blurb-to-HIST_TRIGGERS-confi.patch @@ -2,7 +2,7 @@ From: Tom Zanussi Date: Mon, 15 Jan 2018 20:52:10 -0600 Subject: [PATCH 47/48] tracing: Add inter-event blurb to HIST_TRIGGERS config option -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz So that users know that inter-event tracing is supported as part of the HIST_TRIGGERS option, include text to that effect in the help diff --git a/debian/patches/features/all/rt/0048-selftests-ftrace-Add-inter-event-hist-triggers-testc.patch b/debian/patches/features/all/rt/0048-selftests-ftrace-Add-inter-event-hist-triggers-testc.patch index 26f66720d..941999f5f 100644 --- a/debian/patches/features/all/rt/0048-selftests-ftrace-Add-inter-event-hist-triggers-testc.patch +++ b/debian/patches/features/all/rt/0048-selftests-ftrace-Add-inter-event-hist-triggers-testc.patch @@ -2,7 +2,7 @@ From: Rajvi Jingar Date: Mon, 15 Jan 2018 20:52:11 -0600 Subject: [PATCH 48/48] selftests: ftrace: Add inter-event hist triggers testcases -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This adds inter-event hist triggers testcases which covers following: - create/remove synthetic event diff --git a/debian/patches/features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch b/debian/patches/features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch index 9c9a18e66..2d7e1e54f 100644 --- a/debian/patches/features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch +++ b/debian/patches/features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch @@ -5,7 +5,7 @@ Subject: [PATCH] ACPICA: Convert acpi_gbl_hardware lock back to an MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz We hit the following bug with -RT: diff --git a/debian/patches/features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch b/debian/patches/features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch index cc05d85d1..f6455dc00 100644 --- a/debian/patches/features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch +++ b/debian/patches/features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 25 Apr 2018 15:19:42 +0200 Subject: [PATCH] ACPICA: provide abstraction for raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Provide a new lock type acpi_raw_spinlock which is implemented as raw_spinlock_t on Linux. This type should be used in code which covers diff --git a/debian/patches/features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch b/debian/patches/features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch index 5303df395..975495c03 100644 --- a/debian/patches/features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch +++ b/debian/patches/features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch @@ -2,7 +2,7 @@ From: Anna-Maria Gleixner Date: Thu, 29 Mar 2018 17:09:27 +0200 Subject: [PATCH] ALSA: pcm: Hide local_irq_disable/enable() and local_irqsave/restore() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The snd_pcm_stream_lock_irq*() functions decouple disabling interrupts from the actual locking process. This does not work as expected if the diff --git a/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch b/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch index 1c31c4bc4..27c226e94 100644 --- a/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch +++ b/debian/patches/features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch @@ -1,7 +1,7 @@ From: "Yadi.hu" Date: Wed, 10 Dec 2014 10:32:09 +0800 Subject: ARM: enable irq in translation/section permission fault handlers -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT_FULL diff --git a/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch b/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch index ca2851654..3d3a93133 100644 --- a/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch +++ b/debian/patches/features/all/rt/HACK-printk-drop-the-logbuf_lock-more-often.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 21 Mar 2013 19:01:05 +0100 Subject: printk: Drop the logbuf_lock more often -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The lock is hold with irgs off. The latency drops 500us+ on my arm bugs with a "full" buffer after executing "dmesg" on the shell. diff --git a/debian/patches/features/all/rt/IB-ipoib-replace-local_irq_disable-with-proper-locki.patch b/debian/patches/features/all/rt/IB-ipoib-replace-local_irq_disable-with-proper-locki.patch index b347226bb..7ba6ba016 100644 --- a/debian/patches/features/all/rt/IB-ipoib-replace-local_irq_disable-with-proper-locki.patch +++ b/debian/patches/features/all/rt/IB-ipoib-replace-local_irq_disable-with-proper-locki.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 11 Apr 2018 13:34:26 +0200 Subject: [PATCH] IB/ipoib: replace local_irq_disable() with proper locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit 78bfe0b5b67f ("IPoIB: Take dev->xmit_lock around mc_list accesses") introduced xmit_lock lock in ipoib_mcast_restart_task() and commit diff --git a/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch b/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch index c5a70e959..dc53cfab6 100644 --- a/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +++ b/debian/patches/features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:01 -0600 Subject: KVM: arm/arm64: downgrade preempt_disable()d region to migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz kvm_arch_vcpu_ioctl_run() disables the use of preemption when updating the vgic and timer states to prevent the calling task from migrating to diff --git a/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch b/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch index ca19c395a..05c0df248 100644 --- a/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch +++ b/debian/patches/features/all/rt/NFSv4-replace-seqcount_t-with-a-seqlock_t.patch @@ -5,7 +5,7 @@ Cc: Anna Schumaker , linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de Subject: NFSv4: replace seqcount_t with a seqlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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 diff --git a/debian/patches/features/all/rt/RCU-skip-the-schedule-in-RCU-section-warning-on-UP-t.patch b/debian/patches/features/all/rt/RCU-skip-the-schedule-in-RCU-section-warning-on-UP-t.patch index b96978c4b..c864c72c1 100644 --- a/debian/patches/features/all/rt/RCU-skip-the-schedule-in-RCU-section-warning-on-UP-t.patch +++ b/debian/patches/features/all/rt/RCU-skip-the-schedule-in-RCU-section-warning-on-UP-t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 16 Feb 2018 11:45:13 +0100 Subject: [PATCH] RCU: skip the "schedule() in RCU section" warning on UP, too -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In "RCU: we need to skip that warning but only on sleeping locks" we skipped a warning on SMP systems in case we schedule out in a RCU diff --git a/debian/patches/features/all/rt/RCU-we-need-to-skip-that-warning-but-only-on-sleepin.patch b/debian/patches/features/all/rt/RCU-we-need-to-skip-that-warning-but-only-on-sleepin.patch index 75f2eb64d..042640444 100644 --- a/debian/patches/features/all/rt/RCU-we-need-to-skip-that-warning-but-only-on-sleepin.patch +++ b/debian/patches/features/all/rt/RCU-we-need-to-skip-that-warning-but-only-on-sleepin.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2017 14:25:13 +0200 Subject: [PATCH] RCU: we need to skip that warning but only on sleeping locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This check is okay for upstream. On RT we trigger this while blocking on sleeping lock. In this case, it is okay to schedule() within a RCU diff --git a/debian/patches/features/all/rt/Revert-mm-vmstat.c-fix-vmstat_update-preemption-BUG.patch b/debian/patches/features/all/rt/Revert-mm-vmstat.c-fix-vmstat_update-preemption-BUG.patch index e23b864bb..0a56d894e 100644 --- a/debian/patches/features/all/rt/Revert-mm-vmstat.c-fix-vmstat_update-preemption-BUG.patch +++ b/debian/patches/features/all/rt/Revert-mm-vmstat.c-fix-vmstat_update-preemption-BUG.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 11 Apr 2018 11:27:44 +0200 Subject: [PATCH] Revert mm/vmstat.c: fix vmstat_update() preemption BUG -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This patch reverts commit c7f26ccfb2c3 ("mm/vmstat.c: fix vmstat_update() preemption BUG"). diff --git a/debian/patches/features/all/rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch b/debian/patches/features/all/rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch index 1e1c3d3b7..67577b410 100644 --- a/debian/patches/features/all/rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch +++ b/debian/patches/features/all/rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Apr 2018 09:16:22 +0200 Subject: [PATCH] [SCSI] libsas: remove irq save in sas_ata_qc_issue() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since commit 312d3e56119a ("[SCSI] libsas: remove ata_port.lock management duties from lldds") the sas_ata_qc_issue() function unlocks diff --git a/debian/patches/features/all/rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch b/debian/patches/features/all/rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch index 4bc67706b..e4bda5e7c 100644 --- a/debian/patches/features/all/rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch +++ b/debian/patches/features/all/rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Apr 2018 09:55:25 +0200 Subject: [PATCH] [SCSI] qla2xxx: remove irq save in qla2x00_poll() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In commit d2ba5675d899 ("[SCSI] qla2xxx: Disable local-interrupts while polling for RISC status.") added a local_irq_disable() before invoking diff --git a/debian/patches/features/all/rt/add_migrate_disable.patch b/debian/patches/features/all/rt/add_migrate_disable.patch index be97196d6..d91dacb9b 100644 --- a/debian/patches/features/all/rt/add_migrate_disable.patch +++ b/debian/patches/features/all/rt/add_migrate_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 Subject: kernel/sched/core: add migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz --- include/linux/preempt.h | 23 ++++++++ diff --git a/debian/patches/features/all/rt/alim15x3-move-irq-restore-before-pci_dev_put.patch b/debian/patches/features/all/rt/alim15x3-move-irq-restore-before-pci_dev_put.patch index f7d4b0ca4..13328a6fc 100644 --- a/debian/patches/features/all/rt/alim15x3-move-irq-restore-before-pci_dev_put.patch +++ b/debian/patches/features/all/rt/alim15x3-move-irq-restore-before-pci_dev_put.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 3 Apr 2018 15:13:20 +0200 Subject: [PATCH] alim15x3: move irq-restore before pci_dev_put() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz init_chipset_ali15x3() initializes the chipset during init with disabled interrupts. There is no need to keep the interrupts disabled during diff --git a/debian/patches/features/all/rt/apparmor-use-a-locallock-instead-preempt_disable.patch b/debian/patches/features/all/rt/apparmor-use-a-locallock-instead-preempt_disable.patch index 650ac6ae2..c4f1e466b 100644 --- a/debian/patches/features/all/rt/apparmor-use-a-locallock-instead-preempt_disable.patch +++ b/debian/patches/features/all/rt/apparmor-use-a-locallock-instead-preempt_disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 11 Oct 2017 17:43:49 +0200 Subject: apparmor: use a locallock instead preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz get_buffers() disables preemption which acts as a lock for the per-CPU variable. Since we can't disable preemption here on RT, a local_lock is diff --git a/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch b/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch index 56ffb2f13..00bcf7001 100644 --- a/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch +++ b/debian/patches/features/all/rt/arch-arm64-Add-lazy-preempt-support.patch @@ -1,7 +1,7 @@ From: Anders Roxell Date: Thu, 14 May 2015 17:52:17 +0200 Subject: arch/arm64: Add lazy preempt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz arm64 is missing support for PREEMPT_RT. The main feature which is lacking is support for lazy preemption. The arch-specific entry code, diff --git a/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch b/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch index c4cf7d162..2c14c5359 100644 --- a/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch +++ b/debian/patches/features/all/rt/arm-convert-boot-lock-to-raw.patch @@ -1,7 +1,7 @@ From: Frank Rowand Date: Mon, 19 Sep 2011 14:51:14 -0700 Subject: arm: Convert arm boot_lock to raw -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The arm boot_lock is used by the secondary processor startup code. The locking task is the idle thread, which has idle->sched_class == &idle_sched_class. diff --git a/debian/patches/features/all/rt/arm-disable-NEON-in-kernel-mode.patch b/debian/patches/features/all/rt/arm-disable-NEON-in-kernel-mode.patch index c3dad2411..b4a600483 100644 --- a/debian/patches/features/all/rt/arm-disable-NEON-in-kernel-mode.patch +++ b/debian/patches/features/all/rt/arm-disable-NEON-in-kernel-mode.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 1 Dec 2017 10:42:03 +0100 Subject: [PATCH] arm*: disable NEON in kernel mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/arm-enable-highmem-for-rt.patch b/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch index 8f9875086..faad9b473 100644 --- a/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch +++ b/debian/patches/features/all/rt/arm-enable-highmem-for-rt.patch @@ -1,7 +1,7 @@ Subject: arm: Enable highmem for rt From: Thomas Gleixner Date: Wed, 13 Feb 2013 11:03:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz fixup highmem for ARM. diff --git a/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch b/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch index f4a829c2c..48a7941d8 100644 --- a/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch +++ b/debian/patches/features/all/rt/arm-highmem-flush-tlb-on-unmap.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 21:37:27 +0100 Subject: arm/highmem: Flush tlb on unmap -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The tlb should be flushed on unmap and thus make the mapping entry invalid. This is only done in the non-debug case which does not look diff --git a/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch b/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch index e2ae846ec..b641ac367 100644 --- a/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch +++ b/debian/patches/features/all/rt/arm-include-definition-for-cpumask_t.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 22 Dec 2016 17:28:33 +0100 Subject: [PATCH] arm: include definition for cpumask_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This definition gets pulled in by other files. With the (later) split of RCU and spinlock.h it won't compile anymore. diff --git a/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch b/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch index a9f426d17..bcc218a9b 100644 --- a/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch +++ b/debian/patches/features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Thu, 10 Nov 2016 16:17:55 -0800 Subject: [PATCH] arm: kprobe: replace patch_lock to raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When running kprobe on -rt kernel, the below bug is caught: diff --git a/debian/patches/features/all/rt/arm-preempt-lazy-support.patch b/debian/patches/features/all/rt/arm-preempt-lazy-support.patch index d287cc029..9e53d4765 100644 --- a/debian/patches/features/all/rt/arm-preempt-lazy-support.patch +++ b/debian/patches/features/all/rt/arm-preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: arm: Add support for lazy preemption From: Thomas Gleixner Date: Wed, 31 Oct 2012 12:04:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Implement the arm pieces for lazy preempt. diff --git a/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch b/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch index 14655268a..24c907554 100644 --- a/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch +++ b/debian/patches/features/all/rt/arm-unwind-use_raw_lock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 20 Sep 2013 14:31:54 +0200 Subject: arm/unwind: use a raw_spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Mostly unwind is done with irqs enabled however SLUB may call it with irqs disabled while creating a new SLUB cache. diff --git a/debian/patches/features/all/rt/arm64-fpsimd-use-a-local_lock-instead-of-local_bh_di.patch b/debian/patches/features/all/rt/arm64-fpsimd-use-a-local_lock-instead-of-local_bh_di.patch new file mode 100644 index 000000000..f60a7b822 --- /dev/null +++ b/debian/patches/features/all/rt/arm64-fpsimd-use-a-local_lock-instead-of-local_bh_di.patch @@ -0,0 +1,150 @@ +From: Sebastian Andrzej Siewior +Date: Thu, 17 May 2018 14:05:49 +0200 +Subject: [PATCH] arm64: fpsimd: use a local_lock() in addition to local_bh_disable() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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 +task remains preemptible but remains the same CPU. This may corrupt the +content of the SIMD registers if the task is preempted during +saving/restoring those registers. +Add a locallock around this process. This avoids that the any function +within the locallock block is invoked more than once on the same CPU. + +The preempt_disable() + local_bh_enable() combo in kernel_neon_begin() +is not working on -RT. We don't use NEON in kernel mode on RT right now +but this still should be addressed. + +Signed-off-by: Sebastian Andrzej Siewior +--- + arch/arm64/kernel/fpsimd.c | 20 ++++++++++++++++++-- + 1 file changed, 18 insertions(+), 2 deletions(-) + +--- a/arch/arm64/kernel/fpsimd.c ++++ b/arch/arm64/kernel/fpsimd.c +@@ -38,6 +38,7 @@ + #include + #include + #include ++#include + + #include + #include +@@ -235,7 +236,7 @@ static void sve_user_enable(void) + * whether TIF_SVE is clear or set, since these are not vector length + * dependent. + */ +- ++static DEFINE_LOCAL_IRQ_LOCK(fpsimd_lock); + /* + * Update current's FPSIMD/SVE registers from thread_struct. + * +@@ -594,6 +595,7 @@ int sve_set_vector_length(struct task_st + * non-SVE thread. + */ + if (task == current) { ++ local_lock(fpsimd_lock); + local_bh_disable(); + + task_fpsimd_save(); +@@ -604,8 +606,10 @@ int sve_set_vector_length(struct task_st + if (test_and_clear_tsk_thread_flag(task, TIF_SVE)) + sve_to_fpsimd(task); + +- if (task == current) ++ if (task == current) { ++ local_unlock(fpsimd_lock); + local_bh_enable(); ++ } + + /* + * Force reallocation of task SVE state to the correct size +@@ -838,6 +842,7 @@ asmlinkage void do_sve_acc(unsigned int + sve_alloc(current); + + local_bh_disable(); ++ local_lock(fpsimd_lock); + + task_fpsimd_save(); + fpsimd_to_sve(current); +@@ -849,6 +854,7 @@ asmlinkage void do_sve_acc(unsigned int + if (test_and_set_thread_flag(TIF_SVE)) + WARN_ON(1); /* SVE access shouldn't have trapped */ + ++ local_unlock(fpsimd_lock); + local_bh_enable(); + } + +@@ -926,6 +932,7 @@ void fpsimd_flush_thread(void) + return; + + local_bh_disable(); ++ local_lock(fpsimd_lock); + + memset(¤t->thread.fpsimd_state, 0, sizeof(struct fpsimd_state)); + fpsimd_flush_task_state(current); +@@ -967,6 +974,7 @@ void fpsimd_flush_thread(void) + + set_thread_flag(TIF_FOREIGN_FPSTATE); + ++ local_unlock(fpsimd_lock); + local_bh_enable(); + } + +@@ -980,7 +988,9 @@ void fpsimd_preserve_current_state(void) + return; + + local_bh_disable(); ++ local_lock(fpsimd_lock); + task_fpsimd_save(); ++ local_unlock(fpsimd_lock); + local_bh_enable(); + } + +@@ -1022,12 +1032,14 @@ void fpsimd_restore_current_state(void) + return; + + local_bh_disable(); ++ local_lock(fpsimd_lock); + + if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) { + task_fpsimd_load(); + fpsimd_bind_to_cpu(); + } + ++ local_unlock(fpsimd_lock); + local_bh_enable(); + } + +@@ -1042,6 +1054,7 @@ void fpsimd_update_current_state(struct + return; + + local_bh_disable(); ++ local_lock(fpsimd_lock); + + current->thread.fpsimd_state.user_fpsimd = *state; + if (system_supports_sve() && test_thread_flag(TIF_SVE)) +@@ -1052,6 +1065,7 @@ void fpsimd_update_current_state(struct + if (test_and_clear_thread_flag(TIF_FOREIGN_FPSTATE)) + fpsimd_bind_to_cpu(); + ++ local_unlock(fpsimd_lock); + local_bh_enable(); + } + +@@ -1116,6 +1130,7 @@ void kernel_neon_begin(void) + BUG_ON(!may_use_simd()); + + local_bh_disable(); ++ local_lock(fpsimd_lock); + + __this_cpu_write(kernel_neon_busy, true); + +@@ -1128,6 +1143,7 @@ void kernel_neon_begin(void) + /* Invalidate any task state remaining in the fpsimd regs: */ + fpsimd_flush_cpu_state(); + ++ local_unlock(fpsimd_lock); + preempt_disable(); + + local_bh_enable(); diff --git a/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch b/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch index e9bd6a4e6..dc2b7c98f 100644 --- a/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch +++ b/debian/patches/features/all/rt/arm64-xen--Make-XEN-depend-on-non-rt.patch @@ -1,7 +1,7 @@ Subject: arm64/xen: Make XEN depend on !RT From: Thomas Gleixner Date: Mon, 12 Oct 2015 11:18:40 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz It's not ready and probably never will be, unless xen folks have a look at it. @@ -13,7 +13,7 @@ Signed-off-by: Thomas Gleixner --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig -@@ -846,7 +846,7 @@ config XEN_DOM0 +@@ -860,7 +860,7 @@ config XEN_DOM0 config XEN bool "Xen guest support on ARM64" diff --git a/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch b/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch index d30357daf..358a594ea 100644 --- a/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch +++ b/debian/patches/features/all/rt/at91_dont_enable_disable_clock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 09 Mar 2016 10:51:06 +0100 Subject: arm: at91: do not disable/enable clocks in a row -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Currently the driver will disable the clock and enable it one line later if it is switching from periodic mode into one shot. diff --git a/debian/patches/features/all/rt/block-Remove-redundant-WARN_ON.patch b/debian/patches/features/all/rt/block-Remove-redundant-WARN_ON.patch index 08acbbc09..cb6d06719 100644 --- a/debian/patches/features/all/rt/block-Remove-redundant-WARN_ON.patch +++ b/debian/patches/features/all/rt/block-Remove-redundant-WARN_ON.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Wed, 11 Apr 2018 15:05:43 +0200 Subject: [PATCH] block: Remove redundant WARN_ON() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit 2fff8a924d4c ("block: Check locking assumptions at runtime") added a lockdep_assert_held(q->queue_lock) which makes the WARN_ON() redundant diff --git a/debian/patches/features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch b/debian/patches/features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch index 4b9ba26fb..33d642184 100644 --- a/debian/patches/features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch +++ b/debian/patches/features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 10 Apr 2018 17:32:57 +0200 Subject: [PATCH] block: don't disable interrupts during kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz bounce_copy_vec() disables interrupts around kmap_atomic(). This is a leftover from the old kmap_atomic() implementation which relied on fixed diff --git a/debian/patches/features/all/rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch b/debian/patches/features/all/rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch index 033248c7b..92ec33822 100644 --- a/debian/patches/features/all/rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch +++ b/debian/patches/features/all/rt/block-blk-mq-move-blk_queue_usage_counter_release-in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 13 Mar 2018 13:49:16 +0100 Subject: [PATCH] block: blk-mq: move blk_queue_usage_counter_release() into process context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch b/debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch index d64533dc1..492fa4e65 100644 --- a/debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch +++ b/debian/patches/features/all/rt/block-mq-don-t-complete-requests-via-IPI.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 15:10:08 +0100 Subject: block/mq: don't complete requests via IPI -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The IPI runs in hardirq context and there are sleeping locks. This patch moves the completion into a workqueue. diff --git a/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch b/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch index bb355ad73..0255c02d7 100644 --- a/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch +++ b/debian/patches/features/all/rt/block-mq-drop-preempt-disable.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: block/mq: do not invoke preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz preempt_disable() and get_cpu() don't play well together with the sleeping locks it tries to allocate later. diff --git a/debian/patches/features/all/rt/block-mq-use-cpu_light.patch b/debian/patches/features/all/rt/block-mq-use-cpu_light.patch index ddfc89585..11e1ec8b3 100644 --- a/debian/patches/features/all/rt/block-mq-use-cpu_light.patch +++ b/debian/patches/features/all/rt/block-mq-use-cpu_light.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 9 Apr 2014 10:37:23 +0200 Subject: block: mq: use cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/block-shorten-interrupt-disabled-regions.patch b/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch index 93c2eb83e..d18e4e028 100644 --- a/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch +++ b/debian/patches/features/all/rt/block-shorten-interrupt-disabled-regions.patch @@ -1,7 +1,7 @@ Subject: block: Shorten interrupt disabled regions From: Thomas Gleixner Date: Wed, 22 Jun 2011 19:47:02 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit 9c40cef2b799 ("sched: Move blk_schedule_flush_plug() out of __schedule()") moved the blk_schedule_flush_plug() call out of the diff --git a/debian/patches/features/all/rt/block-use-cpu-chill.patch b/debian/patches/features/all/rt/block-use-cpu-chill.patch index a1d83f7c7..b956ae2d9 100644 --- a/debian/patches/features/all/rt/block-use-cpu-chill.patch +++ b/debian/patches/features/all/rt/block-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: block: Use cpu_chill() for retry loops From: Thomas Gleixner Date: Thu, 20 Dec 2012 18:28:26 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Steven also observed a live lock when there was a diff --git a/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch b/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch index 03bfa36b2..86d19723a 100644 --- a/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch +++ b/debian/patches/features/all/rt/cgroups-use-simple-wait-in-css_release.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 13 Feb 2015 15:52:24 +0100 Subject: cgroups: use simple wait in css_release() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz To avoid: |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:914 diff --git a/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch b/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch index 61d21c91a..0a9aacb91 100644 --- a/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch +++ b/debian/patches/features/all/rt/clocksource-tclib-allow-higher-clockrates.patch @@ -1,7 +1,7 @@ From: Benedikt Spranger Date: Mon, 8 Mar 2010 18:57:04 +0100 Subject: clocksource: TCLIB: Allow higher clock rates for clock events -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz As default the TCLIB uses the 32KiHz base clock rate for clock events. Add a compile time selection to allow higher clock resulution. diff --git a/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch b/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch index c19b57dca..2ba8572c9 100644 --- a/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch +++ b/debian/patches/features/all/rt/completion-use-simple-wait-queues.patch @@ -1,7 +1,7 @@ Subject: completion: Use simple wait queues From: Thomas Gleixner Date: Fri, 11 Jan 2013 11:23:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the diff --git a/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch b/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch index a1c85ded2..b9a80bf82 100644 --- a/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch +++ b/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch @@ -1,7 +1,7 @@ Subject: sched: Use the proper LOCK_OFFSET for cond_resched() From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:51:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz RT does not increment preempt count when a 'sleeping' spinlock is locked. Update PREEMPT_LOCK_OFFSET for that case. diff --git a/debian/patches/features/all/rt/cond-resched-softirq-rt.patch b/debian/patches/features/all/rt/cond-resched-softirq-rt.patch index 39efb546f..4f3df6aa4 100644 --- a/debian/patches/features/all/rt/cond-resched-softirq-rt.patch +++ b/debian/patches/features/all/rt/cond-resched-softirq-rt.patch @@ -1,7 +1,7 @@ Subject: sched: Take RT softirq semantics into account in cond_resched() From: Thomas Gleixner Date: Thu, 14 Jul 2011 09:56:44 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The softirq semantics work different on -RT. There is no SOFTIRQ_MASK in the preemption counter which leads to the BUG_ON() statement in diff --git a/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch b/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch index 1fc5b02a8..6a6ad5a07 100644 --- a/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch +++ b/debian/patches/features/all/rt/connector-cn_proc-Protect-send_msg-with-a-local-lock.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Sun, 16 Oct 2016 05:11:54 +0200 Subject: [PATCH] connector/cn_proc: Protect send_msg() with a local lock on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:931 |in_atomic(): 1, irqs_disabled(): 0, pid: 31807, name: sleep diff --git a/debian/patches/features/all/rt/cpu-hotplug--Implement-CPU-pinning.patch b/debian/patches/features/all/rt/cpu-hotplug--Implement-CPU-pinning.patch index d95e2d0ec..b1aa00ab4 100644 --- a/debian/patches/features/all/rt/cpu-hotplug--Implement-CPU-pinning.patch +++ b/debian/patches/features/all/rt/cpu-hotplug--Implement-CPU-pinning.patch @@ -1,7 +1,7 @@ Subject: cpu/hotplug: Implement CPU pinning From: Thomas Gleixner Date: Wed, 19 Jul 2017 17:31:20 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch b/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch index 3aa578eda..1f589e357 100644 --- a/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch +++ b/debian/patches/features/all/rt/cpufreq-drop-K8-s-driver-from-beeing-selected.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 9 Apr 2015 15:23:01 +0200 Subject: cpufreq: drop K8's driver from beeing selected -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Ralf posted a picture of a backtrace from diff --git a/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch b/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch index 237698e20..e1293a9bf 100644 --- a/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch +++ b/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch @@ -1,7 +1,7 @@ Subject: cpumask: Disable CONFIG_CPUMASK_OFFSTACK for RT From: Thomas Gleixner Date: Wed, 14 Dec 2011 01:03:49 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There are "valid" GFP_ATOMIC allocations such as diff --git a/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch b/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch index 6e20c59ac..94f16a7bd 100644 --- a/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch +++ b/debian/patches/features/all/rt/cpuset-Convert-callback_lock-to-raw_spinlock_t.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Sun, 8 Jan 2017 09:32:25 +0100 Subject: [PATCH] cpuset: Convert callback_lock to raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The two commits below add up to a cpuset might_sleep() splat for RT: diff --git a/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch b/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch index 97e5da5b0..f181fab7c 100644 --- a/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch +++ b/debian/patches/features/all/rt/crypto-Reduce-preempt-disabled-regions-more-algos.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Don Estabrook reported | kernel: WARNING: CPU: 2 PID: 858 at kernel/sched/core.c:2428 migrate_disable+0xed/0x100() diff --git a/debian/patches/features/all/rt/crypto-limit-more-FPU-enabled-sections.patch b/debian/patches/features/all/rt/crypto-limit-more-FPU-enabled-sections.patch index 7be453d8f..683a0757b 100644 --- a/debian/patches/features/all/rt/crypto-limit-more-FPU-enabled-sections.patch +++ b/debian/patches/features/all/rt/crypto-limit-more-FPU-enabled-sections.patch @@ -4,7 +4,7 @@ Subject: [PATCH] crypto: limit more FPU-enabled sections MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Those crypto drivers use SSE/AVX/… for their crypto work and in order to do so in kernel they need to enable the "FPU" in kernel mode which diff --git a/debian/patches/features/all/rt/d_delete-get-rid-of-trylock-loop.patch b/debian/patches/features/all/rt/d_delete-get-rid-of-trylock-loop.patch index f3751323b..70eb85448 100644 --- a/debian/patches/features/all/rt/d_delete-get-rid-of-trylock-loop.patch +++ b/debian/patches/features/all/rt/d_delete-get-rid-of-trylock-loop.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Fri, 23 Feb 2018 21:02:31 -0500 Subject: [PATCH] d_delete(): get rid of trylock loop -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit c19457f0aed7fae73bb40e68ffcc72f36e3966a5 diff --git a/debian/patches/features/all/rt/debugobjects-rt.patch b/debian/patches/features/all/rt/debugobjects-rt.patch index a65ceddb7..cde9ac45a 100644 --- a/debian/patches/features/all/rt/debugobjects-rt.patch +++ b/debian/patches/features/all/rt/debugobjects-rt.patch @@ -1,7 +1,7 @@ Subject: debugobjects: Make RT aware From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:41:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Avoid filling the pool / allocating memory with irqs off(). diff --git a/debian/patches/features/all/rt/delayacct-use-raw_spinlocks.patch b/debian/patches/features/all/rt/delayacct-use-raw_spinlocks.patch index 5d3442aaf..753302a07 100644 --- a/debian/patches/features/all/rt/delayacct-use-raw_spinlocks.patch +++ b/debian/patches/features/all/rt/delayacct-use-raw_spinlocks.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 20 May 2017 12:32:23 +0200 Subject: [PATCH] delayacct: use raw_spinlocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz upstream commit 02acc80d19edb0d5684c997b2004ad19f9f5236e diff --git a/debian/patches/features/all/rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch b/debian/patches/features/all/rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch index c5567abc3..7f81f94ea 100644 --- a/debian/patches/features/all/rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch +++ b/debian/patches/features/all/rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 27 Mar 2018 16:24:15 +0200 Subject: [PATCH] dm rq: remove BUG_ON(!irqs_disabled) check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In commit 052189a2ec95 ("dm: remove superfluous irq disablement in dm_request_fn") the spin_lock_irq() was replaced with spin_lock() + a diff --git a/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch b/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch index a76ef6652..e72d55324 100644 --- a/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch +++ b/debian/patches/features/all/rt/drivers-block-zram-Replace-bit-spinlocks-with-rtmute.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Thu, 31 Mar 2016 04:08:28 +0200 Subject: [PATCH] drivers/block/zram: Replace bit spinlocks with rtmutex for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz They're nondeterministic, and lead to ___might_sleep() splats in -rt. OTOH, they're a lot less wasteful than an rtmutex per page. diff --git a/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch b/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch index a2f0b4a64..473498d82 100644 --- a/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch +++ b/debian/patches/features/all/rt/drivers-random-reduce-preempt-disabled-region.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:30 -0500 Subject: drivers: random: Reduce preempt disabled region -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz No need to keep preemption disabled across the whole function. diff --git a/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch b/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch index 7116db145..94145e544 100644 --- a/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch +++ b/debian/patches/features/all/rt/drivers-tty-fix-omap-lock-crap.patch @@ -1,7 +1,7 @@ Subject: tty/serial/omap: Make the locking RT aware From: Thomas Gleixner Date: Thu, 28 Jul 2011 13:32:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and diff --git a/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch b/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch index 07488d0a3..2daf46a14 100644 --- a/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch +++ b/debian/patches/features/all/rt/drivers-tty-pl011-irq-disable-madness.patch @@ -1,7 +1,7 @@ Subject: tty/serial/pl011: Make the locking work on RT From: Thomas Gleixner Date: Tue, 08 Jan 2013 21:36:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The lock is a sleeping lock and local_irq_save() is not the optimsation we are looking for. Redo it to make it work on -RT and non-RT. diff --git a/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch b/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch index eb23e3fde..11a501370 100644 --- a/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch +++ b/debian/patches/features/all/rt/drivers-zram-Don-t-disable-preemption-in-zcomp_strea.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Thu, 20 Oct 2016 11:15:22 +0200 Subject: [PATCH] drivers/zram: Don't disable preemption in zcomp_stream_get/put() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In v4.7, the driver switched to percpu compression streams, disabling preemption via get/put_cpu_ptr(). Use a per-zcomp_strm lock here. We diff --git a/debian/patches/features/all/rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch b/debian/patches/features/all/rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch index 163eb3334..23734f74b 100644 --- a/debian/patches/features/all/rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch +++ b/debian/patches/features/all/rt/drivers-zram-fix-zcomp_stream_get-smp_processor_id-u.patch @@ -2,7 +2,7 @@ From: Mike Galbraith Date: Wed, 23 Aug 2017 11:57:29 +0200 Subject: [PATCH] drivers/zram: fix zcomp_stream_get() smp_processor_id() use in preemptible code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Use get_local_ptr() instead this_cpu_ptr() to avoid a warning regarding smp_processor_id() in preemptible code. diff --git a/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch b/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch index bb2d8714a..f4b0ede67 100644 --- a/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch +++ b/debian/patches/features/all/rt/drmi915_Use_local_lockunlock_irq()_in_intel_pipe_update_startend().patch @@ -1,7 +1,7 @@ Subject: drm,i915: Use local_lock/unlock_irq() in intel_pipe_update_start/end() From: Mike Galbraith Date: Sat, 27 Feb 2016 09:01:42 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz [ 8.014039] BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:918 diff --git a/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch b/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch index a5fd2851b..37fdbc5d5 100644 --- a/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch +++ b/debian/patches/features/all/rt/drmradeoni915_Use_preempt_disableenable_rt()_where_recommended.patch @@ -1,7 +1,7 @@ Subject: drm,radeon,i915: Use preempt_disable/enable_rt() where recommended From: Mike Galbraith Date: Sat, 27 Feb 2016 08:09:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz DRM folks identified the spots, so use them. diff --git a/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch b/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch index 6f239c8b3..2b6dfab12 100644 --- a/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch +++ b/debian/patches/features/all/rt/epoll-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: fs/epoll: Do not disable preemption on RT From: Thomas Gleixner Date: Fri, 08 Jul 2011 16:35:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ep_call_nested() takes a sleeping lock so we can't disable preemption. The light version is enough since ep_call_nested() doesn't mind beeing diff --git a/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch b/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch index 94e60bf8e..e769cb893 100644 --- a/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch +++ b/debian/patches/features/all/rt/fs-aio-simple-simple-work.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 16 Feb 2015 18:49:10 +0100 Subject: fs/aio: simple simple work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/fs-dcache-Move-dentry_kill-below-lock_parent.patch b/debian/patches/features/all/rt/fs-dcache-Move-dentry_kill-below-lock_parent.patch index 08e8d708a..fa1084ceb 100644 --- a/debian/patches/features/all/rt/fs-dcache-Move-dentry_kill-below-lock_parent.patch +++ b/debian/patches/features/all/rt/fs-dcache-Move-dentry_kill-below-lock_parent.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Fri, 23 Feb 2018 00:50:21 +0100 Subject: [PATCH] fs/dcache: Move dentry_kill() below lock_parent() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit c1d0c1a2b51e86124b7ba8ff9054698e2036d8e7 diff --git a/debian/patches/features/all/rt/fs-dcache-Remove-stale-comment-from-dentry_kill.patch b/debian/patches/features/all/rt/fs-dcache-Remove-stale-comment-from-dentry_kill.patch index a2906190d..5da07ad6e 100644 --- a/debian/patches/features/all/rt/fs-dcache-Remove-stale-comment-from-dentry_kill.patch +++ b/debian/patches/features/all/rt/fs-dcache-Remove-stale-comment-from-dentry_kill.patch @@ -1,7 +1,7 @@ From: John Ogness Date: Fri, 23 Feb 2018 00:50:20 +0100 Subject: [PATCH] fs/dcache: Remove stale comment from dentry_kill() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 06080d100d921848b35196850ec17310469e06ba diff --git a/debian/patches/features/all/rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch b/debian/patches/features/all/rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch index e2a747c48..98e400434 100644 --- a/debian/patches/features/all/rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch +++ b/debian/patches/features/all/rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 12:32:34 +0200 Subject: [PATCH] fs/dcache: bring back explicit INIT_HLIST_BL_HEAD init -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit 3d375d78593c ("mm: update callers to use HASH_ZERO flag") removed INIT_HLIST_BL_HEAD and uses the ZERO flag instead for the init. However diff --git a/debian/patches/features/all/rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch b/debian/patches/features/all/rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch index def701ec1..bde64cded 100644 --- a/debian/patches/features/all/rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +++ b/debian/patches/features/all/rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 20 Oct 2017 11:29:53 +0200 Subject: [PATCH] fs/dcache: disable preemption on i_dir_seq's write side -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz i_dir_seq is an opencoded seqcounter. Based on the code it looks like we could have two writers in parallel despite the fact that the d_lock is diff --git a/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch b/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch index f4e5c101f..640c780aa 100644 --- a/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch +++ b/debian/patches/features/all/rt/fs-dcache-use-cpu-chill-in-trylock-loops.patch @@ -1,7 +1,7 @@ Subject: fs: dcache: Use cpu_chill() in trylock loops From: Thomas Gleixner Date: Wed, 07 Mar 2012 21:00:34 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch b/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch index 1adf2ff50..6e95e6853 100644 --- a/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch +++ b/debian/patches/features/all/rt/fs-dcache-use-swait_queue-instead-of-waitqueue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 14:35:49 +0200 Subject: [PATCH] fs/dcache: use swait_queue instead of waitqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz __d_lookup_done() invokes wake_up_all() while holding a hlist_bl_lock() which disables preemption. As a workaround convert it to swait. diff --git a/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch b/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch index 532450255..202baffa2 100644 --- a/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch +++ b/debian/patches/features/all/rt/fs-jbd-replace-bh_state-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 18 Mar 2011 10:11:25 +0100 Subject: fs: jbd/jbd2: Make state lock and journal head lock rt safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz bit_spin_locks break under RT. diff --git a/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch b/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch index 640136785..5500e0cc1 100644 --- a/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch +++ b/debian/patches/features/all/rt/fs-namespace-preemption-fix.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 19 Jul 2009 08:44:27 -0500 Subject: fs: namespace preemption fix -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On RT we cannot loop with preemption disabled here as mnt_make_readonly() might have been preempted. We can safely enable diff --git a/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch b/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch index 0b815a32d..881afe8e9 100644 --- a/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch +++ b/debian/patches/features/all/rt/fs-nfs-turn-rmdir_sem-into-a-semaphore.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 15 Sep 2016 10:51:27 +0200 Subject: [PATCH] fs/nfs: turn rmdir_sem into a semaphore -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The RW semaphore had a reader side which used the _non_owner version because it most likely took the reader lock in one thread and released it diff --git a/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch b/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch index 6b5e92593..5c818350c 100644 --- a/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch +++ b/debian/patches/features/all/rt/fs-replace-bh_uptodate_lock-for-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 18 Mar 2011 09:18:52 +0100 Subject: buffer_head: Replace bh_uptodate_lock for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/ftrace-Fix-trace-header-alignment.patch b/debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch index dbddc5d63..ea030e982 100644 --- a/debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch +++ b/debian/patches/features/all/rt/ftrace-Fix-trace-header-alignment.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Sun, 16 Oct 2016 05:08:30 +0200 Subject: [PATCH] ftrace: Fix trace header alignment -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Line up helper arrows to the right column. diff --git a/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch b/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch index 88a217d3e..49d311ac3 100644 --- a/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch +++ b/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:56:42 +0200 Subject: trace: Add migrate-disabled counter to tracing output -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch index 07d03cd96..53d51fa94 100644 --- a/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch +++ b/debian/patches/features/all/rt/futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 1 Mar 2013 11:17:42 +0100 Subject: futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In exit_pi_state_list() we have the following locking construct: diff --git a/debian/patches/features/all/rt/futex-requeue-pi-fix.patch b/debian/patches/features/all/rt/futex-requeue-pi-fix.patch index dec67b4fd..cd23e9d65 100644 --- a/debian/patches/features/all/rt/futex-requeue-pi-fix.patch +++ b/debian/patches/features/all/rt/futex-requeue-pi-fix.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: futex: Fix bug on when a requeued RT task times out -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Requeue with timeout causes a bug with PREEMPT_RT_FULL. diff --git a/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch b/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch index fd8c94c5e..e89974c9b 100644 --- a/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch +++ b/debian/patches/features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 8 Mar 2017 14:23:35 +0100 Subject: [PATCH] futex: workaround migrate_disable/enable in different context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz migrate_disable()/migrate_enable() takes a different path in atomic() vs !atomic() context. These little hacks ensure that we don't underflow / overflow diff --git a/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch b/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch index 32c60361e..a220b29f8 100644 --- a/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch +++ b/debian/patches/features/all/rt/genirq-disable-irqpoll-on-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:57 -0500 Subject: genirq: Disable irqpoll on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Creates long latencies for no value diff --git a/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch b/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch index 7ce2c959d..57123a041 100644 --- a/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch +++ b/debian/patches/features/all/rt/genirq-do-not-invoke-the-affinity-callback-via-a-wor.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 21 Aug 2013 17:48:46 +0200 Subject: genirq: Do not invoke the affinity callback via a workqueue on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Joe Korty reported, that __irq_set_affinity_locked() schedules a workqueue while holding a rawlock which results in a might_sleep() diff --git a/debian/patches/features/all/rt/genirq-force-threading.patch b/debian/patches/features/all/rt/genirq-force-threading.patch index a868f014f..ea5153e2d 100644 --- a/debian/patches/features/all/rt/genirq-force-threading.patch +++ b/debian/patches/features/all/rt/genirq-force-threading.patch @@ -1,7 +1,7 @@ Subject: genirq: Force interrupt thread on RT From: Thomas Gleixner Date: Sun, 03 Apr 2011 11:57:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Force threaded_irqs and optimize the code (force_irqthreads) in regard to this. diff --git a/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch b/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch index 260946647..520d06858 100644 --- a/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch +++ b/debian/patches/features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 11 Feb 2016 11:54:00 -0600 Subject: genirq: update irq_set_irqchip_state documentation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On -rt kernels, the use of migrate_disable()/migrate_enable() is sufficient to guarantee a task isn't moved to another CPU. Update the diff --git a/debian/patches/features/all/rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch b/debian/patches/features/all/rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch index 71f13443f..12434a7cd 100644 --- a/debian/patches/features/all/rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch +++ b/debian/patches/features/all/rt/hotplug-duct-tape-RT-rwlock-usage-for-non-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 18:31:00 +0200 Subject: [PATCH] hotplug: duct-tape RT-rwlock usage for non-RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/hotplug-light-get-online-cpus.patch b/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch index 85b6af252..cf547c711 100644 --- a/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch +++ b/debian/patches/features/all/rt/hotplug-light-get-online-cpus.patch @@ -1,7 +1,7 @@ Subject: hotplug: Lightweight get online cpus From: Thomas Gleixner Date: Wed, 15 Jun 2011 12:36:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz get_online_cpus() is a heavy weight function which involves a global mutex. migrate_disable() wants a simpler construct which prevents only diff --git a/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch b/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch index 4ad99523c..4fdf020d3 100644 --- a/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch +++ b/debian/patches/features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Mon, 16 Sep 2013 14:09:19 -0700 Subject: hrtimer: Move schedule_work call to helper thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When run ltp leapsec_timer test, the following call trace is caught: diff --git a/debian/patches/features/all/rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch b/debian/patches/features/all/rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch index 3070af82d..94a5417b4 100644 --- a/debian/patches/features/all/rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch +++ b/debian/patches/features/all/rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 3 Jul 2009 08:44:31 -0500 Subject: hrtimer: by timers by default into the softirq context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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. @@ -27,7 +27,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/arch/x86/kvm/lapic.c +++ b/arch/x86/kvm/lapic.c -@@ -2155,7 +2155,7 @@ int kvm_create_lapic(struct kvm_vcpu *vc +@@ -2158,7 +2158,7 @@ int kvm_create_lapic(struct kvm_vcpu *vc apic->vcpu = vcpu; hrtimer_init(&apic->lapic_timer.timer, CLOCK_MONOTONIC, diff --git a/debian/patches/features/all/rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch b/debian/patches/features/all/rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch index 64e8fe7b5..eb087964b 100644 --- a/debian/patches/features/all/rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch +++ b/debian/patches/features/all/rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 4 Sep 2017 18:31:50 +0200 Subject: [PATCH] hrtimer: consolidate hrtimer_init() + hrtimer_init_sleeper() calls -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz hrtimer_init_sleeper() calls require a prior initialisation of the hrtimer object with hrtimer_init(). Lets make the initialisation of the diff --git a/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch b/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch index f78b537f3..01cacb7d7 100644 --- a/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch +++ b/debian/patches/features/all/rt/hrtimers-prepare-full-preemption.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 Subject: hrtimers: Prepare full preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Make cancellation of a running callback in softirq context safe against preemption. diff --git a/debian/patches/features/all/rt/ide-don-t-disable-interrupts-during-kmap_atomic.patch b/debian/patches/features/all/rt/ide-don-t-disable-interrupts-during-kmap_atomic.patch index 57b6e301e..5594706bb 100644 --- a/debian/patches/features/all/rt/ide-don-t-disable-interrupts-during-kmap_atomic.patch +++ b/debian/patches/features/all/rt/ide-don-t-disable-interrupts-during-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 10 Apr 2018 17:15:40 +0200 Subject: [PATCH] ide: don't disable interrupts during kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ide_pio_bytes() disables interrupts around kmap_atomic(). This is a leftover from the old kmap_atomic() implementation which relied on fixed diff --git a/debian/patches/features/all/rt/ide-don-t-disable-interrupts-if-they-are-already-dis.patch b/debian/patches/features/all/rt/ide-don-t-disable-interrupts-if-they-are-already-dis.patch index e1d8ff308..839d315a7 100644 --- a/debian/patches/features/all/rt/ide-don-t-disable-interrupts-if-they-are-already-dis.patch +++ b/debian/patches/features/all/rt/ide-don-t-disable-interrupts-if-they-are-already-dis.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 4 Apr 2018 21:42:28 +0200 Subject: [PATCH] ide: Handle irq disabling consistently -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ide_timer_expiry() disables interrupt at function entry when acquiring hwif->lock. Before disabling the device interrupt it unlocks hwif->lock, diff --git a/debian/patches/features/all/rt/ide-don-t-enable-disable-interrupts-in-force-threade.patch b/debian/patches/features/all/rt/ide-don-t-enable-disable-interrupts-in-force-threade.patch index 304ca5ee4..40f3c05bd 100644 --- a/debian/patches/features/all/rt/ide-don-t-enable-disable-interrupts-in-force-threade.patch +++ b/debian/patches/features/all/rt/ide-don-t-enable-disable-interrupts-in-force-threade.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 19 Apr 2018 11:22:55 +0200 Subject: [PATCH] ide: don't enable/disable interrupts in force threaded-IRQ mode -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The interrupts are enabled/disabled so the interrupt handler can run with enabled interrupts while serving the interrupt and not lose other diff --git a/debian/patches/features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch b/debian/patches/features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch index c9e15025b..d0260974f 100644 --- a/debian/patches/features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch +++ b/debian/patches/features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:44:00 +0200 Subject: [PATCH] net: u64_stats_sync: Remove functions without user -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit 67db3e4bfbc9 ("tcp: no longer hold ehash lock while calling tcp_get_info()") removes the only users of u64_stats_update_end/begin_raw() diff --git a/debian/patches/features/all/rt/iommu-amd-Cleanup-locking-in-__attach-detach_device.patch b/debian/patches/features/all/rt/iommu-amd-Cleanup-locking-in-__attach-detach_device.patch index 9c5397727..6fdac7420 100644 --- a/debian/patches/features/all/rt/iommu-amd-Cleanup-locking-in-__attach-detach_device.patch +++ b/debian/patches/features/all/rt/iommu-amd-Cleanup-locking-in-__attach-detach_device.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Mon, 16 Apr 2018 16:15:24 +0200 Subject: [PATCH] iommu/amd: Cleanup locking in __attach/detach_device() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since introduction of the pd_bitmap_lock in commit 2bc001808904 ("iommu/amd: Split domain id out of amd_iommu_devtable_lock") diff --git a/debian/patches/features/all/rt/iommu-amd-Do-not-flush-when-device-is-busy.patch b/debian/patches/features/all/rt/iommu-amd-Do-not-flush-when-device-is-busy.patch index 8576a0831..962aa910c 100644 --- a/debian/patches/features/all/rt/iommu-amd-Do-not-flush-when-device-is-busy.patch +++ b/debian/patches/features/all/rt/iommu-amd-Do-not-flush-when-device-is-busy.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Mon, 16 Apr 2018 16:15:25 +0200 Subject: [PATCH] iommu/amd: Do not flush when device is busy -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When device is already attached to a domain, there is no need to execute the domain_flush_tlb_pde(). Therefore move the check if the domain is set diff --git a/debian/patches/features/all/rt/iommu-amd-Prevent-possible-null-pointer-dereference-.patch b/debian/patches/features/all/rt/iommu-amd-Prevent-possible-null-pointer-dereference-.patch index b3c894961..ee8bb8e83 100644 --- a/debian/patches/features/all/rt/iommu-amd-Prevent-possible-null-pointer-dereference-.patch +++ b/debian/patches/features/all/rt/iommu-amd-Prevent-possible-null-pointer-dereference-.patch @@ -2,7 +2,7 @@ From: Anna-Maria Gleixner Date: Mon, 16 Apr 2018 16:15:23 +0200 Subject: [PATCH] iommu/amd: Prevent possible null pointer dereference and infinite loop -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The check for !dev_data->domain in __detach_device() emits a warning and returns. The calling code in detach_device() dereferences dev_data->domain diff --git a/debian/patches/features/all/rt/iommu-amd-hide-unused-iommu_table_lock.patch b/debian/patches/features/all/rt/iommu-amd-hide-unused-iommu_table_lock.patch index 0e6971f4d..600af68b8 100644 --- a/debian/patches/features/all/rt/iommu-amd-hide-unused-iommu_table_lock.patch +++ b/debian/patches/features/all/rt/iommu-amd-hide-unused-iommu_table_lock.patch @@ -1,7 +1,7 @@ From: Arnd Bergmann Date: Wed, 4 Apr 2018 12:56:59 +0200 Subject: [PATCH] iommu: amd: hide unused iommu_table_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The newly introduced lock is only used when CONFIG_IRQ_REMAP is enabled: diff --git a/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch b/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch index 5854f7b97..364266e64 100644 --- a/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch +++ b/debian/patches/features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch @@ -1,7 +1,7 @@ Subject: genirq: Allow disabling of softirq processing in irq thread context From: Thomas Gleixner Date: Tue, 31 Jan 2012 13:01:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The processing of softirqs in irq thread context is a performance gain for the non-rt workloads of a system, but it's counterproductive for diff --git a/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch b/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch index 30bc2a677..781f61d92 100644 --- a/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch +++ b/debian/patches/features/all/rt/irqwork-Move-irq-safe-work-to-irq-context.patch @@ -1,7 +1,7 @@ Subject: irqwork: Move irq safe work to irq context From: Thomas Gleixner Date: Sun, 15 Nov 2015 18:40:17 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On architectures where arch_irq_work_has_interrupt() returns false, we end up running the irq safe work from the softirq context. That diff --git a/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch b/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch index aee88228d..e407bfe89 100644 --- a/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch +++ b/debian/patches/features/all/rt/irqwork-push_most_work_into_softirq_context.patch @@ -1,7 +1,7 @@ Subject: irqwork: push most work into softirq context From: Sebastian Andrzej Siewior Date: Tue, 23 Jun 2015 15:32:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Initially we defered all irqwork into softirq because we didn't want the latency spikes if perf or another user was busy and delayed the RT task. diff --git a/debian/patches/features/all/rt/jump-label-rt.patch b/debian/patches/features/all/rt/jump-label-rt.patch index 4867300c7..d6714f0cd 100644 --- a/debian/patches/features/all/rt/jump-label-rt.patch +++ b/debian/patches/features/all/rt/jump-label-rt.patch @@ -1,7 +1,7 @@ Subject: jump-label: disable if stop_machine() is used From: Thomas Gleixner Date: Wed, 08 Jul 2015 17:14:48 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Some architectures are using stop_machine() while switching the opcode which leads to latency spikes. diff --git a/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch b/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch index e75f813d3..8e6abf343 100644 --- a/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch +++ b/debian/patches/features/all/rt/kconfig-disable-a-few-options-rt.patch @@ -1,7 +1,7 @@ Subject: kconfig: Disable config options which are not RT compatible From: Thomas Gleixner Date: Sun, 24 Jul 2011 12:11:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Disable stuff which is known to have issues on RT diff --git a/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch b/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch index 4eec2bd77..8a0f654e7 100644 --- a/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch +++ b/debian/patches/features/all/rt/kconfig-preempt-rt-full.patch @@ -1,7 +1,7 @@ Subject: kconfig: Add PREEMPT_RT_FULL From: Thomas Gleixner Date: Wed, 29 Jun 2011 14:58:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Introduce the final symbol for PREEMPT_RT_FULL. diff --git a/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch b/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch index bf150e3e1..d3f8cc2c0 100644 --- a/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch +++ b/debian/patches/features/all/rt/kernel-SRCU-provide-a-static-initializer.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 19 Mar 2013 14:44:30 +0100 Subject: kernel/SRCU: provide a static initializer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There are macros for static initializer for the three out of four possible notifier types, that are: diff --git a/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch b/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch index bf48d2e0f..cf3e0113e 100644 --- a/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch +++ b/debian/patches/features/all/rt/kernel-printk-Don-t-try-to-print-from-IRQ-NMI-region.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 19 May 2016 17:45:27 +0200 Subject: [PATCH] kernel/printk: Don't try to print from IRQ/NMI region -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On -RT we try to acquire sleeping locks which might lead to warnings from lockdep or a warn_on() from spin_try_lock() (which is a rtmutex on diff --git a/debian/patches/features/all/rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch b/debian/patches/features/all/rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch index 7eb9b3ef8..e92307edf 100644 --- a/debian/patches/features/all/rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch +++ b/debian/patches/features/all/rt/kernel-sched-Provide-a-pointer-to-the-valid-CPU-mask.patch @@ -4,7 +4,7 @@ Subject: [PATCH] kernel: sched: Provide a pointer to the valid CPU mask MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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 diff --git a/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch b/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch index 897a4b694..867db4598 100644 --- a/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch +++ b/debian/patches/features/all/rt/kernel-sched-move-stack-kprobe-clean-up-to-__put_tas.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 21 Nov 2016 19:31:08 +0100 Subject: [PATCH] kernel/sched: move stack + kprobe clean up to __put_task_struct() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There is no need to free the stack before the task struct. This also comes handy on -RT because we can't free memory in preempt disabled diff --git a/debian/patches/features/all/rt/kernel-signal-Remove-no-longer-required-irqsave-rest.patch b/debian/patches/features/all/rt/kernel-signal-Remove-no-longer-required-irqsave-rest.patch index 4dd1a00f8..8994d3b81 100644 --- a/debian/patches/features/all/rt/kernel-signal-Remove-no-longer-required-irqsave-rest.patch +++ b/debian/patches/features/all/rt/kernel-signal-Remove-no-longer-required-irqsave-rest.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Wed, 4 Apr 2018 11:44:01 +0200 Subject: [PATCH] kernel/signal: Remove no longer required irqsave/restore -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Commit a841796f11c9 ("signal: align __lock_task_sighand() irq disabling and RCU") introduced a rcu read side critical section with interrupts diff --git a/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch b/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch index 7170a62b1..4e715644d 100644 --- a/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch +++ b/debian/patches/features/all/rt/kernel-softirq-unlock-with-irqs-on.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 9 Feb 2016 18:17:18 +0100 Subject: kernel: softirq: unlock with irqs on -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz We unlock the lock while the interrupts are off. This isn't a problem now but will get because the migrate_disable() + enable are not diff --git a/debian/patches/features/all/rt/kgb-serial-hackaround.patch b/debian/patches/features/all/rt/kgb-serial-hackaround.patch index 106c8dcc1..375e840cb 100644 --- a/debian/patches/features/all/rt/kgb-serial-hackaround.patch +++ b/debian/patches/features/all/rt/kgb-serial-hackaround.patch @@ -1,7 +1,7 @@ From: Jason Wessel Date: Thu, 28 Jul 2011 12:42:23 -0500 Subject: kgdb/serial: Short term workaround -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On 07/27/2011 04:37 PM, Thomas Gleixner wrote: > - KGDB (not yet disabled) is reportedly unusable on -rt right now due diff --git a/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch b/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch index 4bc08910f..7f45f231b 100644 --- a/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch +++ b/debian/patches/features/all/rt/leds-trigger-disable-CPU-trigger-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 23 Jan 2014 14:45:59 +0100 Subject: leds: trigger: disable CPU trigger on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz as it triggers: |CPU: 0 PID: 0 Comm: swapper Not tainted 3.12.8-rt10 #141 diff --git a/debian/patches/features/all/rt/libata-remove-ata_sff_data_xfer_noirq.patch b/debian/patches/features/all/rt/libata-remove-ata_sff_data_xfer_noirq.patch index 8e05cc284..2939392e0 100644 --- a/debian/patches/features/all/rt/libata-remove-ata_sff_data_xfer_noirq.patch +++ b/debian/patches/features/all/rt/libata-remove-ata_sff_data_xfer_noirq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 19 Apr 2018 12:55:14 +0200 Subject: [PATCH] libata: remove ata_sff_data_xfer_noirq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ata_sff_data_xfer_noirq() is invoked via the ->sff_data_xfer hook. The latter is invoked by ata_pio_sector(), atapi_send_cdb() and diff --git a/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch b/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch index e6e8187d6..1c3044d8e 100644 --- a/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch +++ b/debian/patches/features/all/rt/list_bl-fixup-bogus-lockdep-warning.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Thu, 31 Mar 2016 00:04:25 -0500 Subject: [PATCH] list_bl: fixup bogus lockdep warning -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz At first glance, the use of 'static inline' seems appropriate for INIT_HLIST_BL_HEAD(). diff --git a/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch b/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch index a02a2909a..82f14cd08 100644 --- a/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch +++ b/debian/patches/features/all/rt/list_bl.h-make-list-head-locking-RT-safe.patch @@ -1,7 +1,7 @@ From: Paul Gortmaker Date: Fri, 21 Jun 2013 15:07:25 -0400 Subject: list_bl: Make list head locking RT safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz As per changes in include/linux/jbd_common.h for avoiding the bit_spin_locks on RT ("fs: jbd/jbd2: Make state lock and journal diff --git a/debian/patches/features/all/rt/locallock-provide-get-put-_locked_ptr-variants.patch b/debian/patches/features/all/rt/locallock-provide-get-put-_locked_ptr-variants.patch new file mode 100644 index 000000000..6cc9d0694 --- /dev/null +++ b/debian/patches/features/all/rt/locallock-provide-get-put-_locked_ptr-variants.patch @@ -0,0 +1,43 @@ +From: Julia Cartwright +Date: Mon, 7 May 2018 08:58:56 -0500 +Subject: [PATCH] locallock: provide {get,put}_locked_ptr() variants +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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. + +These are symmetric with the {get,put}_cpu_ptr() per-CPU accessor +variants. + +Signed-off-by: Julia Cartwright +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/locallock.h | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +--- a/include/linux/locallock.h ++++ b/include/linux/locallock.h +@@ -222,6 +222,14 @@ static inline int __local_unlock_irqrest + + #define put_locked_var(lvar, var) local_unlock(lvar); + ++#define get_locked_ptr(lvar, var) \ ++ ({ \ ++ local_lock(lvar); \ ++ this_cpu_ptr(var); \ ++ }) ++ ++#define put_locked_ptr(lvar, var) local_unlock(lvar); ++ + #define local_lock_cpu(lvar) \ + ({ \ + local_lock(lvar); \ +@@ -262,6 +270,8 @@ static inline void local_irq_lock_init(i + + #define get_locked_var(lvar, var) get_cpu_var(var) + #define put_locked_var(lvar, var) put_cpu_var(var) ++#define get_locked_ptr(lvar, var) get_cpu_ptr(var) ++#define put_locked_ptr(lvar, var) put_cpu_ptr(var) + + #define local_lock_cpu(lvar) get_cpu() + #define local_unlock_cpu(lvar) put_cpu() diff --git a/debian/patches/features/all/rt/localversion.patch b/debian/patches/features/all/rt/localversion.patch index 9574abb31..a268efce4 100644 --- a/debian/patches/features/all/rt/localversion.patch +++ b/debian/patches/features/all/rt/localversion.patch @@ -1,7 +1,7 @@ Subject: Add localversion for -RT release From: Thomas Gleixner Date: Fri, 08 Jul 2011 20:25:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner --- @@ -11,4 +11,4 @@ Signed-off-by: Thomas Gleixner --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt1 ++-rt3 diff --git a/debian/patches/features/all/rt/lockdep-Add-a-assert_in_softirq.patch b/debian/patches/features/all/rt/lockdep-Add-a-assert_in_softirq.patch index 053a610c6..8fc822fd6 100644 --- a/debian/patches/features/all/rt/lockdep-Add-a-assert_in_softirq.patch +++ b/debian/patches/features/all/rt/lockdep-Add-a-assert_in_softirq.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Tue, 10 Apr 2018 11:37:11 +0200 Subject: [PATCH] lockdep: Add a assert_in_softirq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Instead of directly warn on wrong context, check if softirq context is set. This check could be a nop on RT. diff --git a/debian/patches/features/all/rt/lockdep-disable-self-test.patch b/debian/patches/features/all/rt/lockdep-disable-self-test.patch index 5fa3f355b..43d125198 100644 --- a/debian/patches/features/all/rt/lockdep-disable-self-test.patch +++ b/debian/patches/features/all/rt/lockdep-disable-self-test.patch @@ -4,7 +4,7 @@ Subject: [PATCH] lockdep: disable self-test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The self-test wasn't always 100% accurate for RT. We disabled a few tests which failed because they had a different semantic for RT. Some diff --git a/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch b/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch index 3d17a2feb..dc1025a74 100644 --- a/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch +++ b/debian/patches/features/all/rt/lockdep-no-softirq-accounting-on-rt.patch @@ -1,7 +1,7 @@ Subject: lockdep: Make it RT aware From: Thomas Gleixner Date: Sun, 17 Jul 2011 18:51:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz teach lockdep that we don't really do softirqs on -RT. diff --git a/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch b/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch index 0fccab567..3e21c52aa 100644 --- a/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch +++ b/debian/patches/features/all/rt/lockdep-selftest-fix-warnings-due-to-missing-PREEMPT.patch @@ -1,7 +1,7 @@ From: Josh Cartwright Date: Wed, 28 Jan 2015 13:08:45 -0600 Subject: lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch b/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch index d3daa64f3..48bb60880 100644 --- a/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch +++ b/debian/patches/features/all/rt/lockdep-selftest-only-do-hardirq-context-test-for-raw-spinlock.patch @@ -1,7 +1,7 @@ Subject: lockdep: selftest: Only do hardirq context test for raw spinlock From: Yong Zhang Date: Mon, 16 Apr 2012 15:01:56 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz From: Yong Zhang diff --git a/debian/patches/features/all/rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch b/debian/patches/features/all/rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch index bdf1cde1a..ec96274bb 100644 --- a/debian/patches/features/all/rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch +++ b/debian/patches/features/all/rt/locking-don-t-check-for-__LINUX_SPINLOCK_TYPES_H-on-.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 4 Aug 2017 17:40:42 +0200 Subject: [PATCH 1/2] locking: don't check for __LINUX_SPINLOCK_TYPES_H on -RT archs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream uses arch_spinlock_t within spinlock_t and requests that spinlock_types.h header file is included first. diff --git a/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch b/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch index 135de7fa2..084ee0ed4 100644 --- a/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch +++ b/debian/patches/features/all/rt/locking-locktorture-Do-NOT-include-rwlock.h-directly.patch @@ -1,7 +1,7 @@ From: "Wolfgang M. Reimer" Date: Tue, 21 Jul 2015 16:20:07 +0200 Subject: locking: locktorture: Do NOT include rwlock.h directly -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch b/debian/patches/features/all/rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch index c143cfc5a..3ebc19e24 100644 --- a/debian/patches/features/all/rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch +++ b/debian/patches/features/all/rt/locking-rt-mutex-fix-deadlock-in-device-mapper-block.patch @@ -1,7 +1,7 @@ From: Mikulas Patocka Date: Mon, 13 Nov 2017 12:56:53 -0500 Subject: [PATCH] locking/rt-mutex: fix deadlock in device mapper / block-IO -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When some block device driver creates a bio and submits it to another block device driver, the bio is added to current->bio_list (in order to diff --git a/debian/patches/features/all/rt/locking-rtmutex-Handle-non-enqueued-waiters-graceful.patch b/debian/patches/features/all/rt/locking-rtmutex-Handle-non-enqueued-waiters-graceful.patch index 023e0e918..667368577 100644 --- a/debian/patches/features/all/rt/locking-rtmutex-Handle-non-enqueued-waiters-graceful.patch +++ b/debian/patches/features/all/rt/locking-rtmutex-Handle-non-enqueued-waiters-graceful.patch @@ -2,7 +2,7 @@ From: Peter Zijlstra Date: Tue, 27 Mar 2018 14:14:38 +0200 Subject: [PATCH] locking/rtmutex: Handle non enqueued waiters gracefully in remove_waiter() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit c28d62cf52d791ba5f6db7ce525ed06b86291c82 diff --git a/debian/patches/features/all/rt/locking-rtmutex-don-t-drop-the-wait_lock-twice.patch b/debian/patches/features/all/rt/locking-rtmutex-don-t-drop-the-wait_lock-twice.patch index 7d7f07801..20d14b59a 100644 --- a/debian/patches/features/all/rt/locking-rtmutex-don-t-drop-the-wait_lock-twice.patch +++ b/debian/patches/features/all/rt/locking-rtmutex-don-t-drop-the-wait_lock-twice.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 7 Sep 2017 12:38:47 +0200 Subject: locking/rtmutex: don't drop the wait_lock twice -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since the futex rework, __rt_mutex_start_proxy_lock() does no longer acquire the wait_lock so it must not drop it. Otherwise the lock is not diff --git a/debian/patches/features/all/rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch b/debian/patches/features/all/rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch index 821491d40..66aaf9fe4 100644 --- a/debian/patches/features/all/rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch +++ b/debian/patches/features/all/rt/locking-rtmutex-re-init-the-wait_lock-in-rt_mutex_in.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 16 Nov 2017 16:48:48 +0100 Subject: [PATCH] locking/rtmutex: re-init the wait_lock in rt_mutex_init_proxy_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz We could provide a key-class for the lockdep (and fixup all callers) or move the init to all callers (like it was) in order to avoid lockdep diff --git a/debian/patches/features/all/rt/md-disable-bcache.patch b/debian/patches/features/all/rt/md-disable-bcache.patch index ddbc690c7..2350c07c9 100644 --- a/debian/patches/features/all/rt/md-disable-bcache.patch +++ b/debian/patches/features/all/rt/md-disable-bcache.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 11:48:57 +0200 Subject: md: disable bcache -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz It uses anon semaphores |drivers/md/bcache/request.c: In function ‘cached_dev_write_complete’: diff --git a/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch b/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch index 29c10957d..26839354f 100644 --- a/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch +++ b/debian/patches/features/all/rt/md-raid5-percpu-handling-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 6 Apr 2010 16:51:31 +0200 Subject: md: raid5: Make raid5_percpu handling RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic @@ -42,7 +42,7 @@ Tested-by: Udo van den Heuvel } static void free_stripe(struct kmem_cache *sc, struct stripe_head *sh) -@@ -6788,6 +6790,7 @@ static int raid456_cpu_up_prepare(unsign +@@ -6789,6 +6791,7 @@ static int raid456_cpu_up_prepare(unsign __func__, cpu); return -ENOMEM; } @@ -50,7 +50,7 @@ Tested-by: Udo van den Heuvel return 0; } -@@ -6798,7 +6801,6 @@ static int raid5_alloc_percpu(struct r5c +@@ -6799,7 +6802,6 @@ static int raid5_alloc_percpu(struct r5c conf->percpu = alloc_percpu(struct raid5_percpu); if (!conf->percpu) return -ENOMEM; diff --git a/debian/patches/features/all/rt/mfd-syscon-atmel-smc-include-string.h.patch b/debian/patches/features/all/rt/mfd-syscon-atmel-smc-include-string.h.patch index 12d9c3e70..f983e50f2 100644 --- a/debian/patches/features/all/rt/mfd-syscon-atmel-smc-include-string.h.patch +++ b/debian/patches/features/all/rt/mfd-syscon-atmel-smc-include-string.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 4 Oct 2017 09:55:58 +0200 Subject: [PATCH] mfd: syscon: atmel-smc: include string.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The string.h header file is needed for the memset() definition. The RT build fails because it is not pulled in via other header files. diff --git a/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch b/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch index 51c5f2e9c..da10a61e1 100644 --- a/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch +++ b/debian/patches/features/all/rt/mips-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: mips: Disable highmem on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:10:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch b/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch index a6207a05f..2782ff24c 100644 --- a/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch +++ b/debian/patches/features/all/rt/mm--rt--Fix-generic-kmap_atomic-for-RT.patch @@ -1,7 +1,7 @@ Subject: mm: rt: Fix generic kmap_atomic for RT From: Thomas Gleixner Date: Sat, 19 Sep 2015 10:15:00 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The update to 4.1 brought in the mainline variant of the pagefault disable distangling from preempt count. That introduced a diff --git a/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch b/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch index b5e704ee3..493962571 100644 --- a/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch +++ b/debian/patches/features/all/rt/mm-convert-swap-to-percpu-locked.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:51 -0500 Subject: mm/swap: Convert to percpu locked -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Replace global locks (get_cpu + local_irq_save) with "local_locks()". Currently there is one of for "rotate" and one for "swap". diff --git a/debian/patches/features/all/rt/mm-disable-sloub-rt.patch b/debian/patches/features/all/rt/mm-disable-sloub-rt.patch index de9173052..2b7cc0fc6 100644 --- a/debian/patches/features/all/rt/mm-disable-sloub-rt.patch +++ b/debian/patches/features/all/rt/mm-disable-sloub-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:03 -0500 Subject: mm: Allow only slub on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Disable SLAB and SLOB on -RT. Only SLUB is adopted to -RT needs. diff --git a/debian/patches/features/all/rt/mm-enable-slub.patch b/debian/patches/features/all/rt/mm-enable-slub.patch index 5f7399f40..3299f5ca1 100644 --- a/debian/patches/features/all/rt/mm-enable-slub.patch +++ b/debian/patches/features/all/rt/mm-enable-slub.patch @@ -1,7 +1,7 @@ Subject: mm: Enable SLUB for RT From: Thomas Gleixner Date: Thu, 25 Oct 2012 10:32:35 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Make SLUB RT aware by converting locks to raw and using free lists to move the freeing out of the lock held region. diff --git a/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch b/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch index 29a386c6f..35978435a 100644 --- a/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch +++ b/debian/patches/features/all/rt/mm-make-vmstat-rt-aware.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:13 -0500 Subject: mm/vmstat: Protect per cpu variables with preempt disable on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Disable preemption on -RT for the vmstat code. On vanila the code runs in IRQ-off regions while on -RT it is not. "preempt_disable" ensures that the diff --git a/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch b/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch index 9b5b86320..f936851b2 100644 --- a/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch +++ b/debian/patches/features/all/rt/mm-memcontrol-do_not_disable_irq.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Subject: mm/memcontrol: Replace local_irq_disable with local locks Date: Wed, 28 Jan 2015 17:14:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There are a few local_irq_disable() which then take sleeping locks. This patch converts them local locks. diff --git a/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch b/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch index a8f036ae5..735e89319 100644 --- a/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch +++ b/debian/patches/features/all/rt/mm-page-alloc-use-local-lock-on-target-cpu.patch @@ -1,7 +1,7 @@ Subject: mm: page_alloc: Use local_lock_on() instead of plain spinlock From: Thomas Gleixner Date: Thu, 27 Sep 2012 11:11:46 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The plain spinlock while sufficient does not update the local_lock internals. Use a proper local_lock function instead to ease debugging. diff --git a/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch b/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch index 8b3e0f21d..5fdf4b97b 100644 --- a/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch +++ b/debian/patches/features/all/rt/mm-page_alloc-reduce-lock-sections-further.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra Date: Fri Jul 3 08:44:37 2009 -0500 Subject: mm: page_alloc: Reduce lock sections further -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Split out the pages which are to be freed into a separate list and call free_pages_bulk() outside of the percpu page allocator locks. diff --git a/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch b/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch index d1ee2c3a3..a9db60520 100644 --- a/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch +++ b/debian/patches/features/all/rt/mm-page_alloc-rt-friendly-per-cpu-pages.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:37 -0500 Subject: mm: page_alloc: rt-friendly per-cpu pages -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. diff --git a/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch b/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch index 2b5fb5bde..fe59d719f 100644 --- a/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch +++ b/debian/patches/features/all/rt/mm-perform-lru_add_drain_all-remotely.patch @@ -1,7 +1,7 @@ From: Luiz Capitulino Date: Fri, 27 May 2016 15:03:28 +0200 Subject: [PATCH] mm: perform lru_add_drain_all() remotely -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/mm-protect-activate-switch-mm.patch b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch index 2c799e102..3db9a2afe 100644 --- a/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch +++ b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch @@ -1,7 +1,7 @@ From: Yong Zhang Date: Tue, 15 May 2012 13:53:56 +0800 Subject: mm: Protect activate_mm() by preempt_[disable&enable]_rt() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/mm-rt-kmap-atomic-scheduling.patch b/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch index 9315f52c1..dd179eb6b 100644 --- a/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch +++ b/debian/patches/features/all/rt/mm-rt-kmap-atomic-scheduling.patch @@ -1,7 +1,7 @@ Subject: mm, rt: kmap_atomic scheduling From: Peter Zijlstra Date: Thu, 28 Jul 2011 10:43:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In fact, with migrate_disable() existing one could play games with kmap_atomic. You could save/restore the kmap_atomic slots on context diff --git a/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index c8cecbd73..ea5bf1acd 100644 --- a/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch +++ b/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:34 -0500 Subject: mm/scatterlist: Do not disable irqs on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz For -RT it is enough to keep pagefault disabled (which is currently handled by kmap_atomic()). diff --git a/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch b/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch index 801a219a6..cfb4a56d0 100644 --- a/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch +++ b/debian/patches/features/all/rt/mm-vmalloc-use-get-cpu-light.patch @@ -1,7 +1,7 @@ Subject: mm/vmalloc: Another preempt disable region which sucks From: Thomas Gleixner Date: Tue, 12 Jul 2011 11:39:36 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Avoid the preempt disable version of get_cpu_var(). The inner-lock should provide enough serialisation. diff --git a/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch b/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch index ea710f3da..57276a12c 100644 --- a/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch +++ b/debian/patches/features/all/rt/mm-workingset-do-not-protect-workingset_shadow_nodes.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 17:19:44 +0100 Subject: mm/workingset: Do not protect workingset_shadow_nodes with irq off -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz workingset_shadow_nodes is protected by local_irq_disable(). Some users use spin_lock_irq(). diff --git a/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch b/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch index 84d2bfb2c..59930a34c 100644 --- a/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch +++ b/debian/patches/features/all/rt/mm_zsmalloc_copy_with_get_cpu_var_and_locking.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Tue, 22 Mar 2016 11:16:09 +0100 Subject: [PATCH] mm/zsmalloc: copy with get_cpu_var() and locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz get_cpu_var() disables preemption and triggers a might_sleep() splat later. This is replaced with get_locked_var(). diff --git a/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch b/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch index 87446c83d..012a4ea18 100644 --- a/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch +++ b/debian/patches/features/all/rt/mmci-remove-bogus-irq-save.patch @@ -1,7 +1,7 @@ Subject: mmci: Remove bogus local_irq_save() From: Thomas Gleixner Date: Wed, 09 Jan 2013 12:11:12 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz upstream commit 99d02d6cd5610711d91f286bb67a57142028e9e6 diff --git a/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch b/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch index 04bcaf695..4f04e3645 100644 --- a/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch +++ b/debian/patches/features/all/rt/mutex-no-spin-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:51:45 +0200 Subject: locking: Disable spin on owner for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Drop spin on owner for mutex / rwsem. We are most likely not using it but… diff --git a/debian/patches/features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch b/debian/patches/features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch index de3974af5..6c112ce96 100644 --- a/debian/patches/features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch +++ b/debian/patches/features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch @@ -2,7 +2,7 @@ From: Anna-Maria Gleixner Date: Thu, 12 Apr 2018 18:36:14 +0200 Subject: [PATCH] net: 3com: 3c59x: Move boomerang/vortex conditional into function -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz If vp->full_bus_master_tx is set, vp->full_bus_master_rx is set as well (see vortex_probe1()). Therefore the conditionals for the decision if diff --git a/debian/patches/features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch b/debian/patches/features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch index 56772c1dc..5c25ac629 100644 --- a/debian/patches/features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch +++ b/debian/patches/features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Thu, 12 Apr 2018 18:36:15 +0200 Subject: [PATCH] net: 3com: 3c59x: Pull locking out of ISR -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Locking is done in the same way in _vortex_interrupt() and _boomerang_interrupt(). To prevent duplication, move the locking into the diff --git a/debian/patches/features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch b/debian/patches/features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch index 13b425166..4155d4f42 100644 --- a/debian/patches/features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch +++ b/debian/patches/features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Thu, 12 Apr 2018 18:36:16 +0200 Subject: [PATCH] net: 3com: 3c59x: irq save variant of ISR -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When vortex_boomerang_interrupt() is invoked from vortex_tx_timeout() or poll_vortex() interrupts must be disabled. This detaches the interrupt diff --git a/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch b/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch index 86b149a54..365c85108 100644 --- a/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch +++ b/debian/patches/features/all/rt/net-Have-__napi_schedule_irqoff-disable-interrupts-o.patch @@ -2,7 +2,7 @@ From: Steven Rostedt Date: Tue, 6 Dec 2016 17:50:30 -0500 Subject: [PATCH] net: Have __napi_schedule_irqoff() disable interrupts on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz A customer hit a crash where the napi sd->poll_list became corrupted. The customer had the bnx2x driver, which does a diff --git a/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch b/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch index 69594a046..1d252ca34 100644 --- a/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch +++ b/debian/patches/features/all/rt/net-Qdisc-use-a-seqlock-instead-seqcount.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 17:36:35 +0200 Subject: [PATCH] net/Qdisc: use a seqlock instead seqcount -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The seqcount disables preemption on -RT while it is held which can't remove. Also we don't want the reader to spin for ages if the writer is diff --git a/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch b/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch index 47e29d617..9c5f5f5fa 100644 --- a/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch +++ b/debian/patches/features/all/rt/net-add-a-lock-around-icmp_sk.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 31 Aug 2016 17:54:09 +0200 Subject: [PATCH] net: add a lock around icmp_sk() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz It looks like the this_cpu_ptr() access in icmp_sk() is protected with local_bh_disable(). To avoid missing serialization in -RT I am adding diff --git a/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch b/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch index b8e516208..f0e0fb16a 100644 --- a/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch +++ b/debian/patches/features/all/rt/net-add-back-the-missing-serialization-in-ip_send_un.patch @@ -5,7 +5,7 @@ Subject: [PATCH] net: add back the missing serialization in MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Some time ago Sami Pietikäinen reported a crash on -RT in ip_send_unicast_reply() which was later fixed by Nicholas Mc Guire diff --git a/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch b/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch index a8b5a2430..1e0d4d02b 100644 --- a/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch +++ b/debian/patches/features/all/rt/net-another-local-irq-disable-alloc-atomic-headache.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 26 Sep 2012 16:21:08 +0200 Subject: net: Another local_irq_disable/kmalloc headache -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Replace it by a local lock. Though that's pretty inefficient :( diff --git a/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch b/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch index f7915e4d2..d51f65ad9 100644 --- a/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch +++ b/debian/patches/features/all/rt/net-core-cpuhotplug-drain-input_pkt_queue-lockless.patch @@ -1,7 +1,7 @@ Subject: net/core/cpuhotplug: Drain input_pkt_queue lockless From: Grygorii Strashko Date: Fri, 9 Oct 2015 09:25:49 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz I can constantly see below error report with 4.1 RT-kernel on TI ARM dra7-evm if I'm trying to unplug cpu1: diff --git a/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch b/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch index d1d957eb7..a4bd89fac 100644 --- a/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch +++ b/debian/patches/features/all/rt/net-core-protect-users-of-napi_alloc_cache-against-r.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 15 Jan 2016 16:33:34 +0100 Subject: net/core: protect users of napi_alloc_cache against reentrance -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch b/debian/patches/features/all/rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch index 0dbf1b592..695ba2014 100644 --- a/debian/patches/features/all/rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch +++ b/debian/patches/features/all/rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 16 Jun 2017 19:03:16 +0200 Subject: [PATCH] net/core: use local_bh_disable() in netif_rx_ni() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In 2004 netif_rx_ni() gained a preempt_disable() section around netif_rx() and its do_softirq() + testing for it. The do_softirq() part diff --git a/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch b/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch index 7e0d40d22..ef66e3ac3 100644 --- a/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch +++ b/debian/patches/features/all/rt/net-dev-always-take-qdisc-s-busylock-in-__dev_xmit_s.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 30 Mar 2016 13:36:29 +0200 Subject: [PATCH] net: dev: always take qdisc's busylock in __dev_xmit_skb() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The root-lock is dropped before dev_hard_start_xmit() is invoked and after setting the __QDISC___STATE_RUNNING bit. If this task is now pushed away diff --git a/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch b/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch index 7bf5fe72d..7f04ca73c 100644 --- a/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch +++ b/debian/patches/features/all/rt/net-fix-iptable-xt-write-recseq-begin-rt-fallout.patch @@ -1,7 +1,7 @@ Subject: net: netfilter: Serialize xt_write_recseq sections on RT From: Thomas Gleixner Date: Sun, 28 Oct 2012 11:18:08 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/net-mac808211-rc-warn_on.patch b/debian/patches/features/all/rt/net-mac808211-rc-warn_on.patch index d3b3407df..d7eaee059 100644 --- a/debian/patches/features/all/rt/net-mac808211-rc-warn_on.patch +++ b/debian/patches/features/all/rt/net-mac808211-rc-warn_on.patch @@ -1,7 +1,7 @@ From: Anna-Maria Gleixner Date: Tue, 10 Apr 2018 11:37:12 +0200 Subject: [PATCH] net: mac808211: mac802154: use lockdep_assert_in_softirq() instead own warning -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The warning in ieee802154_rx() and ieee80211_rx_napi() is there to ensure the softirq context for the subsequent netif_receive_skb() call. The check diff --git a/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch b/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch index 5ad3f8aae..affa1a65c 100644 --- a/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch +++ b/debian/patches/features/all/rt/net-make-devnet_rename_seq-a-mutex.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Mar 2013 18:06:20 +0100 Subject: net: Add a mutex around devnet_rename_seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On RT write_seqcount_begin() disables preemption and device_rename() allocates memory with GFP_KERNEL and grabs later the sysfs_mutex diff --git a/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch b/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch index a60c9f557..2039a9b08 100644 --- a/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch +++ b/debian/patches/features/all/rt/net-move-xmit_recursion-to-per-task-variable-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Jan 2016 15:55:02 +0100 Subject: net: move xmit_recursion to per-task variable on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz A softirq on -RT can be preempted. That means one task is in __dev_queue_xmit(), gets preempted and another task may enter diff --git a/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch b/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch index ff58264b6..c44e6bb18 100644 --- a/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch +++ b/debian/patches/features/all/rt/net-provide-a-way-to-delegate-processing-a-softirq-t.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 15:39:05 +0100 Subject: net: provide a way to delegate processing a softirq to ksoftirqd -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz If the NET_RX uses up all of his budget it moves the following NAPI invocations into the `ksoftirqd`. On -RT it does not do so. Instead it diff --git a/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch b/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch index 47f16d43a..e0c2bf63d 100644 --- a/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch +++ b/debian/patches/features/all/rt/net-sched-dev_deactivate_many-use-msleep-1-instead-o.patch @@ -1,7 +1,7 @@ From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 Subject: net: sched: Use msleep() instead of yield() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On PREEMPT_RT enabled systems the interrupt handler run as threads at prio 50 (by default). If a high priority userspace process tries to shut down a busy diff --git a/debian/patches/features/all/rt/net-take-the-tcp_sk_lock-lock-with-BH-disabled.patch b/debian/patches/features/all/rt/net-take-the-tcp_sk_lock-lock-with-BH-disabled.patch index 67c1d45e1..2a4e7dca6 100644 --- a/debian/patches/features/all/rt/net-take-the-tcp_sk_lock-lock-with-BH-disabled.patch +++ b/debian/patches/features/all/rt/net-take-the-tcp_sk_lock-lock-with-BH-disabled.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 21 Aug 2017 15:09:13 +0200 Subject: [PATCH] net: take the tcp_sk_lock lock with BH disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Lockdep may complain about an unsafe locking scenario: | CPU0 CPU1 diff --git a/debian/patches/features/all/rt/net-use-cpu-chill.patch b/debian/patches/features/all/rt/net-use-cpu-chill.patch index 0fdd5c349..ae7cf1d96 100644 --- a/debian/patches/features/all/rt/net-use-cpu-chill.patch +++ b/debian/patches/features/all/rt/net-use-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: net: Use cpu_chill() instead of cpu_relax() From: Thomas Gleixner Date: Wed, 07 Mar 2012 21:10:04 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches/features/all/rt/net-use-task_struct-instead-of-CPU-number-as-the-que.patch b/debian/patches/features/all/rt/net-use-task_struct-instead-of-CPU-number-as-the-que.patch index ad52bc3ef..347e4cc6f 100644 --- a/debian/patches/features/all/rt/net-use-task_struct-instead-of-CPU-number-as-the-que.patch +++ b/debian/patches/features/all/rt/net-use-task_struct-instead-of-CPU-number-as-the-que.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 21 Feb 2018 10:39:54 +0100 Subject: [PATCH] net: use task_struct instead of CPU number as the queue owner on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In commit ("net: move xmit_recursion to per-task variable on -RT") the recursion level was changed to be per-task since we can get preempted in diff --git a/debian/patches/features/all/rt/net-use-trylock-in-icmp_sk.patch b/debian/patches/features/all/rt/net-use-trylock-in-icmp_sk.patch index 3f0a2d0cf..6d4a9b593 100644 --- a/debian/patches/features/all/rt/net-use-trylock-in-icmp_sk.patch +++ b/debian/patches/features/all/rt/net-use-trylock-in-icmp_sk.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 21 Sep 2017 14:42:04 +0200 Subject: net: use trylock in icmp_sk -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The locking path can be recursive (same as for sk->sk_lock.slock) and therefore we need a trylock version for the locallock, too. diff --git a/debian/patches/features/all/rt/net_disable_NET_RX_BUSY_POLL.patch b/debian/patches/features/all/rt/net_disable_NET_RX_BUSY_POLL.patch index cca6535fc..f339b7684 100644 --- a/debian/patches/features/all/rt/net_disable_NET_RX_BUSY_POLL.patch +++ b/debian/patches/features/all/rt/net_disable_NET_RX_BUSY_POLL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Sat, 27 May 2017 19:02:06 +0200 Subject: net/core: disable NET_RX_BUSY_POLL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/nohz-Prevent-erroneous-tick-stop-invocations.patch b/debian/patches/features/all/rt/nohz-Prevent-erroneous-tick-stop-invocations.patch index 661531ec2..b140aac20 100644 --- a/debian/patches/features/all/rt/nohz-Prevent-erroneous-tick-stop-invocations.patch +++ b/debian/patches/features/all/rt/nohz-Prevent-erroneous-tick-stop-invocations.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 22 Dec 2017 15:51:13 +0100 Subject: [PATCH 2/4] nohz: Prevent erroneous tick stop invocations -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The conditions in irq_exit() to invoke tick_nohz_irq_exit() are: diff --git a/debian/patches/features/all/rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch b/debian/patches/features/all/rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch index 64a9feb1b..4c1124c11 100644 --- a/debian/patches/features/all/rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch +++ b/debian/patches/features/all/rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Tue, 10 Apr 2018 17:54:32 +0200 Subject: [PATCH] ntfs: don't disable interrupts during kmap_atomic() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ntfs_end_buffer_async_read() disables interrupts around kmap_atomic(). This is a leftover from the old kmap_atomic() implementation which relied on fixed diff --git a/debian/patches/features/all/rt/oleg-signal-rt-fix.patch b/debian/patches/features/all/rt/oleg-signal-rt-fix.patch index eb1a2e304..377513425 100644 --- a/debian/patches/features/all/rt/oleg-signal-rt-fix.patch +++ b/debian/patches/features/all/rt/oleg-signal-rt-fix.patch @@ -1,7 +1,7 @@ From: Oleg Nesterov Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: signal/x86: Delay calling signals in atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using diff --git a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch b/debian/patches/features/all/rt/panic-disable-random-on-rt.patch index db05a6308..c2226095a 100644 --- a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch +++ b/debian/patches/features/all/rt/panic-disable-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Disable on -RT. If this is invoked from irq-context we will have problems to acquire the sleeping lock. diff --git a/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch b/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch index bba2c4138..efbb97441 100644 --- a/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch +++ b/debian/patches/features/all/rt/patch-to-introduce-rcu-bh-qs-where-safe-from-softirq.patch @@ -1,7 +1,7 @@ Subject: rcu: Make ksoftirqd do RCU quiescent states From: "Paul E. McKenney" Date: Wed, 5 Oct 2011 11:45:18 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Implementing RCU-bh in terms of RCU-preempt makes the system vulnerable to network-based denial-of-service attacks. This patch therefore diff --git a/debian/patches/features/all/rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch b/debian/patches/features/all/rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch index 7c885dd93..83b990f57 100644 --- a/debian/patches/features/all/rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch +++ b/debian/patches/features/all/rt/pci-switchtec-Don-t-use-completion-s-wait-queue.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 4 Oct 2017 10:24:23 +0200 Subject: [PATCH] pci/switchtec: Don't use completion's wait queue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The poll callback is using completion's wait_queue_head_t member and puts it in poll_wait() so the poll() caller gets a wakeup after command diff --git a/debian/patches/features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch b/debian/patches/features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch index 7da3f0350..9b5c2f747 100644 --- a/debian/patches/features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch +++ b/debian/patches/features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch @@ -2,7 +2,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 23 Apr 2018 16:42:39 +0200 Subject: [PATCH] percpu_ida: Use _irqsave() instead of local_irq_save() + spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz percpu_ida() decouples disabling interrupts from the locking operations. This breaks some assumptions if the locking operations are replaced like diff --git a/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch index 2fe06936f..795a72193 100644 --- a/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-rcu.patch @@ -1,7 +1,7 @@ Subject: rcu: Frob softirq test From: Peter Zijlstra Date: Sat Aug 13 00:23:17 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz With RT_FULL we get the below wreckage: diff --git a/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch b/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch index b4974264a..074a0d9c6 100644 --- a/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch +++ b/debian/patches/features/all/rt/peterz-percpu-rwsem-rt.patch @@ -1,7 +1,7 @@ Subject: locking/percpu-rwsem: Remove preempt_disable variants From: Peter Zijlstra Date: Wed Nov 23 16:29:32 CET 2016 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Effective revert commit: diff --git a/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch b/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch index b446762b5..057897778 100644 --- a/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch +++ b/debian/patches/features/all/rt/peterz-srcu-crypto-chain.patch @@ -1,7 +1,7 @@ Subject: crypto: Convert crypto notifier chain to SRCU From: Peter Zijlstra Date: Fri, 05 Oct 2012 09:03:24 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The crypto notifier deadlocks on RT. Though this can be a real deadlock on mainline as well due to fifo fair rwsems. diff --git a/debian/patches/features/all/rt/pid.h-include-atomic.h.patch b/debian/patches/features/all/rt/pid.h-include-atomic.h.patch index 4d091d28e..7d2de172d 100644 --- a/debian/patches/features/all/rt/pid.h-include-atomic.h.patch +++ b/debian/patches/features/all/rt/pid.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Grygorii Strashko Date: Tue, 21 Jul 2015 19:43:56 +0300 Subject: pid.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This patch fixes build error: CC kernel/pid_namespace.o diff --git a/debian/patches/features/all/rt/posix-cpu-timers-remove-lockdep_assert_irqs_disabled.patch b/debian/patches/features/all/rt/posix-cpu-timers-remove-lockdep_assert_irqs_disabled.patch index 2959f30e2..d05e9f099 100644 --- a/debian/patches/features/all/rt/posix-cpu-timers-remove-lockdep_assert_irqs_disabled.patch +++ b/debian/patches/features/all/rt/posix-cpu-timers-remove-lockdep_assert_irqs_disabled.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Apr 2018 17:37:17 +0200 Subject: [PATCH] posix-cpu-timers: remove lockdep_assert_irqs_disabled() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The lockdep_assert_irqs_disabled() was a BUG_ON() statement in the beginning and it was added just before the "spin_lock(siglock)" diff --git a/debian/patches/features/all/rt/posix-timers-move-the-rcu-head-out-of-the-union.patch b/debian/patches/features/all/rt/posix-timers-move-the-rcu-head-out-of-the-union.patch index b9fb2d19d..37b8200b9 100644 --- a/debian/patches/features/all/rt/posix-timers-move-the-rcu-head-out-of-the-union.patch +++ b/debian/patches/features/all/rt/posix-timers-move-the-rcu-head-out-of-the-union.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 28 Mar 2018 11:15:19 +0200 Subject: [PATCH 3/3] posix-timers: move the rcu head out of the union -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/posix-timers-no-broadcast.patch b/debian/patches/features/all/rt/posix-timers-no-broadcast.patch index a7a2e6586..bf4f5122f 100644 --- a/debian/patches/features/all/rt/posix-timers-no-broadcast.patch +++ b/debian/patches/features/all/rt/posix-timers-no-broadcast.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:29:20 -0500 Subject: posix-timers: Prevent broadcast signals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Posix timers should not send broadcast signals and kernel only signals. Prevent it. diff --git a/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch b/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch index f856c5766..d467b4544 100644 --- a/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch +++ b/debian/patches/features/all/rt/posix-timers-thread-posix-cpu-timers-on-rt.patch @@ -1,7 +1,7 @@ From: John Stultz Date: Fri, 3 Jul 2009 08:29:58 -0500 Subject: posix-timers: Thread posix-cpu-timers on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. diff --git a/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch b/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch index b49b432bf..0dc955a97 100644 --- a/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch +++ b/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: powerpc: Disable highmem on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:08:34 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The current highmem handling on -RT is not compatible and needs fixups. diff --git a/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch b/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch index b816c19da..9703a668b 100644 --- a/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch +++ b/debian/patches/features/all/rt/power-use-generic-rwsem-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 14 Jul 2015 14:26:34 +0200 Subject: powerpc: Use generic rwsem on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Use generic code which uses rtmutex diff --git a/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch b/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch index 3c2dbf083..ecec8f4fc 100644 --- a/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch +++ b/debian/patches/features/all/rt/powerpc-kvm-Disable-in-kernel-MPIC-emulation-for-PRE.patch @@ -1,7 +1,7 @@ From: Bogdan Purcareata Date: Fri, 24 Apr 2015 15:53:13 +0000 Subject: powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz While converting the openpic emulation code to use a raw_spinlock_t enables guests to run on RT, there's still a performance issue. For interrupts sent in diff --git a/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch b/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch index 9e8bc7fdd..284aec9c4 100644 --- a/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch +++ b/debian/patches/features/all/rt/powerpc-preempt-lazy-support.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 1 Nov 2012 10:14:11 +0100 Subject: powerpc: Add support for lazy preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Implement the powerpc pieces for lazy preempt. diff --git a/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch b/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch index 63872c396..71aa317df 100644 --- a/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch +++ b/debian/patches/features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch @@ -1,7 +1,7 @@ From: Paul Gortmaker Date: Sun, 31 May 2015 14:44:42 -0400 Subject: powerpc: ps3/device-init.c - adapt to completions using swait vs wait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz To fix: diff --git a/debian/patches/features/all/rt/preempt-lazy-support.patch b/debian/patches/features/all/rt/preempt-lazy-support.patch index b9bd20c3f..affd2bb51 100644 --- a/debian/patches/features/all/rt/preempt-lazy-support.patch +++ b/debian/patches/features/all/rt/preempt-lazy-support.patch @@ -1,7 +1,7 @@ Subject: sched: Add support for lazy preemption From: Thomas Gleixner Date: Fri, 26 Oct 2012 18:50:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points diff --git a/debian/patches/features/all/rt/preempt-nort-rt-variants.patch b/debian/patches/features/all/rt/preempt-nort-rt-variants.patch index a723ffc33..9825fb2b9 100644 --- a/debian/patches/features/all/rt/preempt-nort-rt-variants.patch +++ b/debian/patches/features/all/rt/preempt-nort-rt-variants.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 24 Jul 2009 12:38:56 +0200 Subject: preempt: Provide preempt_*_(no)rt variants -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz RT needs a few preempt_disable/enable points which are not necessary otherwise. Implement variants to avoid #ifdeffery. diff --git a/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch b/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch index 28140bc08..b1e4a6738 100644 --- a/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch +++ b/debian/patches/features/all/rt/printk-27force_early_printk-27-boot-param-to-help-with-debugging.patch @@ -1,7 +1,7 @@ Subject: printk: Add "force_early_printk" boot param to help with debugging From: Peter Zijlstra Date: Fri, 02 Sep 2011 14:41:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Gives me an option to screw printk and actually see what the machine says. diff --git a/debian/patches/features/all/rt/printk-kill.patch b/debian/patches/features/all/rt/printk-kill.patch index 54b398f9f..3a82e9126 100644 --- a/debian/patches/features/all/rt/printk-kill.patch +++ b/debian/patches/features/all/rt/printk-kill.patch @@ -1,7 +1,7 @@ Subject: printk: Add a printk kill switch From: Ingo Molnar Date: Fri, 22 Jul 2011 17:58:40 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a prinkt-kill-switch. This is used from (NMI) watchdog to ensure that it does not dead-lock with the early printk code. diff --git a/debian/patches/features/all/rt/printk-rt-aware.patch b/debian/patches/features/all/rt/printk-rt-aware.patch index e905b2daa..f425c1c45 100644 --- a/debian/patches/features/all/rt/printk-rt-aware.patch +++ b/debian/patches/features/all/rt/printk-rt-aware.patch @@ -1,7 +1,7 @@ Subject: printk: Make rt aware From: Thomas Gleixner Date: Wed, 19 Sep 2012 14:50:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Drop the lock before calling the console driver and do not disable interrupts while printing to a serial console. diff --git a/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch b/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch index e5c4e2389..f66f62e7f 100644 --- a/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch +++ b/debian/patches/features/all/rt/ptrace-fix-ptrace-vs-tasklist_lock-race.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 18:21:04 +0200 Subject: ptrace: fix ptrace vs tasklist_lock race -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz As explained by Alexander Fyodorov : diff --git a/debian/patches/features/all/rt/radix-tree-use-local-locks.patch b/debian/patches/features/all/rt/radix-tree-use-local-locks.patch index 23030d2ad..dcbc7a611 100644 --- a/debian/patches/features/all/rt/radix-tree-use-local-locks.patch +++ b/debian/patches/features/all/rt/radix-tree-use-local-locks.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 25 Jan 2017 16:34:27 +0100 Subject: [PATCH] radix-tree: use local locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The preload functionality uses per-CPU variables and preempt-disable to ensure that it does not switch CPUs during its usage. This patch adds diff --git a/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch b/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch index 5adc36a96..c4cf28941 100644 --- a/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch +++ b/debian/patches/features/all/rt/random-avoid-preempt_disable-ed-section.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 12 May 2017 15:46:17 +0200 Subject: [PATCH] random: avoid preempt_disable()ed section -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz extract_crng() will use sleeping locks while in a preempt_disable() section due to get_cpu_var(). diff --git a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch b/debian/patches/features/all/rt/random-make-it-work-on-rt.patch index 5556dddfe..37a4362f1 100644 --- a/debian/patches/features/all/rt/random-make-it-work-on-rt.patch +++ b/debian/patches/features/all/rt/random-make-it-work-on-rt.patch @@ -1,7 +1,7 @@ Subject: random: Make it work on rt From: Thomas Gleixner Date: Tue, 21 Aug 2012 20:38:50 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Delegate the random insertion to the forced threaded interrupt handler. Store the return IP of the hard interrupt handler in the irq diff --git a/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch b/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch index 74ddc8abf..83eca0beb 100644 --- a/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch +++ b/debian/patches/features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 14 Sep 2016 11:52:17 +0200 Subject: rbtree: include rcu.h because we use it -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since commit c1adf20052d8 ("Introduce rb_replace_node_rcu()") rbtree_augmented.h uses RCU related data structures but does not include diff --git a/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch b/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch index 4ea200886..26464229d 100644 --- a/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch +++ b/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch @@ -1,7 +1,7 @@ From: "Paul E. McKenney" Date: Mon, 4 Nov 2013 13:21:10 -0800 Subject: rcu: Eliminate softirq processing from rcutree -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Running RCU out of softirq is a problem for some workloads that would like to manage RCU core processing independently of other softirq work, diff --git a/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch b/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch index 460dda33a..8e67be2bc 100644 --- a/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch +++ b/debian/patches/features/all/rt/rcu-disable-rcu-fast-no-hz-on-rt.patch @@ -1,7 +1,7 @@ Subject: rcu: Disable RCU_FAST_NO_HZ on RT From: Thomas Gleixner Date: Sun, 28 Oct 2012 13:26:09 +0000 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This uses a timer_list timer from the irq disabled guts of the idle code. Disable it for now to prevent wreckage. diff --git a/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch b/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch index 0d7c3c2a5..3539e7a05 100644 --- a/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch +++ b/debian/patches/features/all/rt/rcu-enable-rcu_normal_after_boot-by-default-for-RT.patch @@ -1,7 +1,7 @@ From: Julia Cartwright Date: Wed, 12 Oct 2016 11:21:14 -0500 Subject: [PATCH] rcu: enable rcu_normal_after_boot by default for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The forcing of an expedited grace period is an expensive and very RT-application unfriendly operation, as it forcibly preempts all running diff --git a/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch b/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch index 1679cd776..cecda0772 100644 --- a/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch +++ b/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 21 Mar 2014 20:19:05 +0100 Subject: rcu: make RCU_BOOST default on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since it is no longer invoked from the softirq people run into OOM more often if the priority of the RCU thread is too low. Making boosting diff --git a/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch b/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch index 902613533..1081797c5 100644 --- a/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch +++ b/debian/patches/features/all/rt/rcu-merge-rcu-bh-into-rcu-preempt-for-rt.patch @@ -1,7 +1,7 @@ Subject: rcu: Merge RCU-bh into RCU-preempt Date: Wed, 5 Oct 2011 11:59:38 -0700 From: Thomas Gleixner -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The Linux kernel has long RCU-bh read-side critical sections that intolerably increase scheduling latency under mainline's RCU-bh rules, diff --git a/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch b/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch index 27c54475c..6c7572abe 100644 --- a/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch +++ b/debian/patches/features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch @@ -1,7 +1,7 @@ From: Tiejun Chen Date: Wed, 18 Dec 2013 17:51:49 +0800 Subject: rcutree/rcu_bh_qs: Disable irq while calling rcu_preempt_qs() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Any callers to the function rcu_preempt_qs() must disable irqs in order to protect the assignment to ->rcu_read_unlock_special. In diff --git a/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch b/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch index 3ed82449d..e84b9007d 100644 --- a/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch +++ b/debian/patches/features/all/rt/re-preempt_rt_full-arm-coredump-fails-for-cpu-3e-3d-4.patch @@ -1,7 +1,7 @@ Subject: ARM: Initialize split page table locks for vector page From: Frank Rowand Date: Sat, 1 Oct 2011 18:58:13 -0700 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch b/debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch index 918edd074..2652853db 100644 --- a/debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch +++ b/debian/patches/features/all/rt/rfc-arm-smp-__cpu_disable-fix-sleeping-function-called-from-invalid-context.patch @@ -1,7 +1,7 @@ Subject: ARM: smp: Move clear_tasks_mm_cpumask() call to __cpu_die() From: Grygorii Strashko Date: Fri, 11 Sep 2015 21:21:23 +0300 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When running with the RT-kernel (4.1.5-rt5) on TI OMAP dra7-evm and trying to do Suspend to RAM, the following backtrace occurs: diff --git a/debian/patches/features/all/rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch b/debian/patches/features/all/rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch index 7de791505..14f5c8ce3 100644 --- a/debian/patches/features/all/rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch +++ b/debian/patches/features/all/rt/rt-Increase-decrease-the-nr-of-migratory-tasks-when-.patch @@ -1,7 +1,7 @@ From: Daniel Bristot de Oliveira Date: Mon, 26 Jun 2017 17:07:15 +0200 Subject: rt: Increase/decrease the nr of migratory tasks when enabling/disabling migration -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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 diff --git a/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch b/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch index c823a4e63..a44b4bfc7 100644 --- a/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch +++ b/debian/patches/features/all/rt/rt-introduce-cpu-chill.patch @@ -1,7 +1,7 @@ Subject: rt: Introduce cpu_chill() From: Thomas Gleixner Date: Wed, 07 Mar 2012 20:51:03 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Add cpu_chill() to replace cpu_relax(). cpu_chill() diff --git a/debian/patches/features/all/rt/rt-local-irq-lock.patch b/debian/patches/features/all/rt/rt-local-irq-lock.patch index e0a638ee8..21a867520 100644 --- a/debian/patches/features/all/rt/rt-local-irq-lock.patch +++ b/debian/patches/features/all/rt/rt-local-irq-lock.patch @@ -1,7 +1,7 @@ Subject: rt: Add local irq locks From: Thomas Gleixner Date: Mon, 20 Jun 2011 09:03:47 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Introduce locallock. For !RT this maps to preempt_disable()/ local_irq_disable() so there is not much that changes. For RT this will diff --git a/debian/patches/features/all/rt/rt-preempt-base-config.patch b/debian/patches/features/all/rt/rt-preempt-base-config.patch index 0b170a521..50ae1b55a 100644 --- a/debian/patches/features/all/rt/rt-preempt-base-config.patch +++ b/debian/patches/features/all/rt/rt-preempt-base-config.patch @@ -1,7 +1,7 @@ Subject: rt: Provide PREEMPT_RT_BASE config switch From: Thomas Gleixner Date: Fri, 17 Jun 2011 12:39:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/rt-serial-warn-fix.patch b/debian/patches/features/all/rt/rt-serial-warn-fix.patch index 29ffa8ad1..c39ef819e 100644 --- a/debian/patches/features/all/rt/rt-serial-warn-fix.patch +++ b/debian/patches/features/all/rt/rt-serial-warn-fix.patch @@ -1,7 +1,7 @@ Subject: rt: Improve the serial console PASS_LIMIT From: Ingo Molnar Date: Wed Dec 14 13:05:54 CET 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Beyond the warning: diff --git a/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch b/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch index d24c476f5..8aa8f52fc 100644 --- a/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch +++ b/debian/patches/features/all/rt/rtmutex-Make-lock_killable-work.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sat, 1 Apr 2017 12:50:59 +0200 Subject: [PATCH] rtmutex: Make lock_killable work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Locking an rt mutex killable does not work because signal handling is restricted to TASK_INTERRUPTIBLE. diff --git a/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch b/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch index 91c9a208e..26e849eed 100644 --- a/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch +++ b/debian/patches/features/all/rt/rtmutex-Provide-rt_mutex_slowlock_locked.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:14:22 +0200 Subject: rtmutex: Provide rt_mutex_slowlock_locked() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This is the inner-part of rt_mutex_slowlock(), required for rwsem-rt. diff --git a/debian/patches/features/all/rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch b/debian/patches/features/all/rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch index 633b00b4c..8cfd93471 100644 --- a/debian/patches/features/all/rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch +++ b/debian/patches/features/all/rt/rtmutex-add-mutex-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:17:03 +0200 Subject: rtmutex: add mutex implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch b/debian/patches/features/all/rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch index 5fa9d668c..f8c84fc42 100644 --- a/debian/patches/features/all/rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch +++ b/debian/patches/features/all/rt/rtmutex-add-rwlock-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:18:06 +0200 Subject: rtmutex: add rwlock implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The implementation is bias-based, similar to the rwsem implementation. diff --git a/debian/patches/features/all/rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch b/debian/patches/features/all/rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch index 11fec24dd..69b9d59d3 100644 --- a/debian/patches/features/all/rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch +++ b/debian/patches/features/all/rt/rtmutex-add-rwsem-implementation-based-on-rtmutex.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:28:34 +0200 Subject: rtmutex: add rwsem implementation based on rtmutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The RT specific R/W semaphore implementation restricts the number of readers to one because a writer cannot block on multiple readers and inherit its diff --git a/debian/patches/features/all/rt/rtmutex-add-sleeping-lock-implementation.patch b/debian/patches/features/all/rt/rtmutex-add-sleeping-lock-implementation.patch index 8caaae9cd..1b0764ec7 100644 --- a/debian/patches/features/all/rt/rtmutex-add-sleeping-lock-implementation.patch +++ b/debian/patches/features/all/rt/rtmutex-add-sleeping-lock-implementation.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:11:19 +0200 Subject: rtmutex: add sleeping lock implementation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch b/debian/patches/features/all/rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch index 9f11c96f1..5acb53f53 100644 --- a/debian/patches/features/all/rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch +++ b/debian/patches/features/all/rt/rtmutex-add-ww_mutex-addon-for-mutex-rt.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 17:34:38 +0200 Subject: rtmutex: add ww_mutex addon for mutex-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- diff --git a/debian/patches/features/all/rt/rtmutex-annotate-sleeping-lock-context.patch b/debian/patches/features/all/rt/rtmutex-annotate-sleeping-lock-context.patch index 9febfb87f..012197bd5 100644 --- a/debian/patches/features/all/rt/rtmutex-annotate-sleeping-lock-context.patch +++ b/debian/patches/features/all/rt/rtmutex-annotate-sleeping-lock-context.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 20 Apr 2018 18:13:11 +0200 Subject: [PATCH] rtmutex: annotate sleeping lock context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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 diff --git a/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch b/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch index 3935f5cf1..9b47fcd46 100644 --- a/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch +++ b/debian/patches/features/all/rt/rtmutex-avoid-include-hell.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Avoid include hell From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:06:39 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Include only the required raw types. This avoids pulling in the complete spinlock header which in turn requires rtmutex.h at some point. diff --git a/debian/patches/features/all/rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch b/debian/patches/features/all/rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch index e76dfd8dc..5b8821383 100644 --- a/debian/patches/features/all/rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch +++ b/debian/patches/features/all/rt/rtmutex-export-lockdep-less-version-of-rt_mutex-s-lo.patch @@ -2,7 +2,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 16:36:39 +0200 Subject: rtmutex: export lockdep-less version of rt_mutex's lock, trylock and unlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Required for lock implementation ontop of rtmutex. diff --git a/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch b/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch index 7c017a994..4fbdbc3e2 100644 --- a/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch +++ b/debian/patches/features/all/rt/rtmutex-futex-prepare-rt.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Handle the various new futex race conditions From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:04:15 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz RT opens a few new interesting race conditions in the rtmutex/futex combo due to futex hash bucket lock being a 'sleeping' spinlock and diff --git a/debian/patches/features/all/rt/rtmutex-lock-killable.patch b/debian/patches/features/all/rt/rtmutex-lock-killable.patch index efc51ffd9..c0f01e39c 100644 --- a/debian/patches/features/all/rt/rtmutex-lock-killable.patch +++ b/debian/patches/features/all/rt/rtmutex-lock-killable.patch @@ -1,7 +1,7 @@ Subject: rtmutex: Add rtmutex_lock_killable() From: Thomas Gleixner Date: Thu, 09 Jun 2011 11:43:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add "killable" type to rtmutex. We need this since rtmutex are used as "normal" mutexes which do use this type. diff --git a/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch b/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch index 1fd36ed54..dd1dbb7b0 100644 --- a/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch +++ b/debian/patches/features/all/rt/rtmutex-trylock-is-okay-on-RT.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed 02 Dec 2015 11:34:07 +0100 Subject: rtmutex: trylock is okay on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz non-RT kernel could deadlock on rt_mutex_trylock() in softirq context. On -RT we don't run softirqs in IRQ context but in thread context so it is diff --git a/debian/patches/features/all/rt/rtmutex-wire-up-RT-s-locking.patch b/debian/patches/features/all/rt/rtmutex-wire-up-RT-s-locking.patch index 87dace6af..d7c351ffd 100644 --- a/debian/patches/features/all/rt/rtmutex-wire-up-RT-s-locking.patch +++ b/debian/patches/features/all/rt/rtmutex-wire-up-RT-s-locking.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 12 Oct 2017 17:31:14 +0200 Subject: rtmutex: wire up RT's locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch b/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch index f9e175655..7865ff22e 100644 --- a/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch +++ b/debian/patches/features/all/rt/rtmutex_dont_include_rcu.patch @@ -1,6 +1,6 @@ From: Sebastian Andrzej Siewior Subject: rbtree: don't include the rcu header -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The RCU header pulls in spinlock.h and fails due not yet defined types: diff --git a/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch b/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch index b33ff7aad..2cc65d6c4 100644 --- a/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch +++ b/debian/patches/features/all/rt/rxrpc-remove-unused-static-variables.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 21 Oct 2016 10:54:50 +0200 Subject: [PATCH] rxrpc: remove unused static variables -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz upstream commit edb63e2b271752a9424a3d33cfcd4f434a020f9b diff --git a/debian/patches/features/all/rt/sched-Prevent-task-state-corruption-by-spurious-lock.patch b/debian/patches/features/all/rt/sched-Prevent-task-state-corruption-by-spurious-lock.patch index c72f47c81..c3c823d9e 100644 --- a/debian/patches/features/all/rt/sched-Prevent-task-state-corruption-by-spurious-lock.patch +++ b/debian/patches/features/all/rt/sched-Prevent-task-state-corruption-by-spurious-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 6 Jun 2017 14:20:37 +0200 Subject: sched: Prevent task state corruption by spurious lock wakeup -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Mathias and others reported GDB failures on RT. diff --git a/debian/patches/features/all/rt/sched-Remove-TASK_ALL.patch b/debian/patches/features/all/rt/sched-Remove-TASK_ALL.patch index 39936d71d..9a29d7d56 100644 --- a/debian/patches/features/all/rt/sched-Remove-TASK_ALL.patch +++ b/debian/patches/features/all/rt/sched-Remove-TASK_ALL.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra Date: Wed, 7 Jun 2017 10:12:45 +0200 Subject: [PATCH] sched: Remove TASK_ALL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz It's unused: diff --git a/debian/patches/features/all/rt/sched-delay-put-task.patch b/debian/patches/features/all/rt/sched-delay-put-task.patch index 6c4b81347..9ad305055 100644 --- a/debian/patches/features/all/rt/sched-delay-put-task.patch +++ b/debian/patches/features/all/rt/sched-delay-put-task.patch @@ -1,7 +1,7 @@ Subject: sched: Move task_struct cleanup to RCU From: Thomas Gleixner Date: Tue, 31 May 2011 16:59:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/sched-disable-rt-group-sched-on-rt.patch b/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch index a5da7b9b1..57562693d 100644 --- a/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch +++ b/debian/patches/features/all/rt/sched-disable-rt-group-sched-on-rt.patch @@ -1,7 +1,7 @@ Subject: sched: Disable CONFIG_RT_GROUP_SCHED on RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:03:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Carsten reported problems when running: diff --git a/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch b/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch index 71ff85d7c..ab414df32 100644 --- a/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch +++ b/debian/patches/features/all/rt/sched-disable-ttwu-queue.patch @@ -1,7 +1,7 @@ Subject: sched: Disable TTWU_QUEUE on RT From: Thomas Gleixner Date: Tue, 13 Sep 2011 16:42:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The queued remote wakeup mechanism can introduce rather large latencies if the number of migrated tasks is high. Disable it for RT. diff --git a/debian/patches/features/all/rt/sched-fair-Fix-CFS-bandwidth-control-lockdep-DEADLOC.patch b/debian/patches/features/all/rt/sched-fair-Fix-CFS-bandwidth-control-lockdep-DEADLOC.patch new file mode 100644 index 000000000..e423508f4 --- /dev/null +++ b/debian/patches/features/all/rt/sched-fair-Fix-CFS-bandwidth-control-lockdep-DEADLOC.patch @@ -0,0 +1,49 @@ +From: Mike Galbraith +Date: Fri, 4 May 2018 08:14:38 +0200 +Subject: [PATCH] sched/fair: Fix CFS bandwidth control lockdep DEADLOCK report +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +CFS bandwidth control yields the inversion gripe below, moving +handling quells it. + +|======================================================== +|WARNING: possible irq lock inversion dependency detected +|4.16.7-rt1-rt #2 Tainted: G E +|-------------------------------------------------------- +|sirq-hrtimer/0/15 just changed the state of lock: +| (&cfs_b->lock){+...}, at: [<000000009adb5cf7>] sched_cfs_period_timer+0x28/0x140 +|but this lock was taken by another, HARDIRQ-safe lock in the past: (&rq->lock){-...} +|and interrupts could create inverse lock ordering between them. +|other info that might help us debug this: +| Possible interrupt unsafe locking scenario: +| CPU0 CPU1 +| ---- ---- +| lock(&cfs_b->lock); +| local_irq_disable(); +| lock(&rq->lock); +| lock(&cfs_b->lock); +| +| lock(&rq->lock); + +Cc: stable-rt@vger.kernel.org +Acked-by: Steven Rostedt (VMware) +Signed-off-by: Mike Galbraith +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/sched/fair.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +--- a/kernel/sched/fair.c ++++ b/kernel/sched/fair.c +@@ -5007,9 +5007,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); +- hrtimer_init(&cfs_b->period_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED); ++ hrtimer_init(&cfs_b->period_timer, CLOCK_MONOTONIC, HRTIMER_MODE_ABS_PINNED_HARD); + cfs_b->period_timer.function = sched_cfs_period_timer; +- hrtimer_init(&cfs_b->slack_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL); ++ hrtimer_init(&cfs_b->slack_timer, CLOCK_MONOTONIC, HRTIMER_MODE_REL_HARD); + cfs_b->slack_timer.function = sched_cfs_slack_timer; + } + diff --git a/debian/patches/features/all/rt/sched-let-softirq_count-return-0-if-inside-local_bh_.patch b/debian/patches/features/all/rt/sched-let-softirq_count-return-0-if-inside-local_bh_.patch new file mode 100644 index 000000000..d2aaef7a1 --- /dev/null +++ b/debian/patches/features/all/rt/sched-let-softirq_count-return-0-if-inside-local_bh_.patch @@ -0,0 +1,30 @@ +From: Sebastian Andrzej Siewior +Date: Thu, 17 May 2018 11:47:24 +0200 +Subject: [PATCH] sched: let softirq_count() return !0 if inside + local_bh_disable()ed section +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +I don't see a reason why softirq_count() shouldn't reflect the fact that +we are within a local_bh_disable() section. I *think* it was done +primary because in RT the softirq is slightly different (and +preemptible) and it broke some of RCU's assumptions. +I don't see any fallout with this change. Furthermore, all checks like +"WARN_ON(!softirq_count())" will work and we can drop the workaround we +currently have in the queue. + +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/preempt.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/linux/preempt.h ++++ b/include/linux/preempt.h +@@ -91,7 +91,7 @@ + # define softirq_count() (preempt_count() & SOFTIRQ_MASK) + # define in_serving_softirq() (softirq_count() & SOFTIRQ_OFFSET) + #else +-# define softirq_count() (0UL) ++# define softirq_count() ((unsigned long)current->softirq_nestcnt) + extern int in_serving_softirq(void); + #endif + diff --git a/debian/patches/features/all/rt/sched-limit-nr-migrate.patch b/debian/patches/features/all/rt/sched-limit-nr-migrate.patch index 49a0381e5..a8af322dc 100644 --- a/debian/patches/features/all/rt/sched-limit-nr-migrate.patch +++ b/debian/patches/features/all/rt/sched-limit-nr-migrate.patch @@ -1,7 +1,7 @@ Subject: sched: Limit the number of task migrations per batch From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:12:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Put an upper limit on the number of tasks which are migrated per batch to avoid large latencies. diff --git a/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch b/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch index 1c42e78a4..5d9437d58 100644 --- a/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch +++ b/debian/patches/features/all/rt/sched-might-sleep-do-not-account-rcu-depth.patch @@ -1,7 +1,7 @@ Subject: sched: Do not account rcu_preempt_depth on RT in might_sleep() From: Thomas Gleixner Date: Tue, 07 Jun 2011 09:19:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz RT changes the rcu_preempt_depth semantics, so we cannot check for it in might_sleep(). diff --git a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch index 8e4c28509..85de0bfdc 100644 --- a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch +++ b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch @@ -1,7 +1,7 @@ Subject: sched: Move mmdrop to RCU on RT From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:20:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Takes sleeping locks and calls into the memory allocator, so nothing we want to do in task switch and oder atomic contexts. diff --git a/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch b/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch index 2401090b9..ab3902e22 100644 --- a/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch +++ b/debian/patches/features/all/rt/sched-rt-mutex-wakeup.patch @@ -1,7 +1,7 @@ Subject: sched: Add saved_state for tasks blocked on sleeping locks From: Thomas Gleixner Date: Sat, 25 Jun 2011 09:21:04 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Spinlocks are state preserving in !RT. RT changes the state when a task gets blocked on a lock. So we need to remember the state before diff --git a/debian/patches/features/all/rt/sched-swait-include-wait.h.patch b/debian/patches/features/all/rt/sched-swait-include-wait.h.patch index 053555188..b7afb27f8 100644 --- a/debian/patches/features/all/rt/sched-swait-include-wait.h.patch +++ b/debian/patches/features/all/rt/sched-swait-include-wait.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 4 Dec 2017 13:11:10 +0100 Subject: [PATCH] sched/swait: include wait.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz kbuild bot reported against an intermediate RT patch that the build fails with: diff --git a/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch b/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch index 069346f58..5abba3873 100644 --- a/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch +++ b/debian/patches/features/all/rt/sched-ttwu-ensure-success-return-is-correct.patch @@ -1,7 +1,7 @@ Subject: sched: ttwu: Return success when only changing the saved_state value From: Thomas Gleixner Date: Tue, 13 Dec 2011 21:42:19 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When a task blocks on a rt lock, it saves the current state in p->saved_state, so a lock related wake up will not destroy the diff --git a/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch b/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch index ba1dec7b9..ac23c04bd 100644 --- a/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch +++ b/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Mon, 18 Mar 2013 15:12:49 -0400 Subject: sched/workqueue: Only wake up idle workers if not blocked on sleeping spin lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz In -rt, most spin_locks() turn into mutexes. One of these spin_lock conversions is performed on the workqueue gcwq->lock. When the idle diff --git a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch index 0d5504181..4ae5886b9 100644 --- a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch +++ b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch @@ -1,7 +1,7 @@ Subject: scsi/fcoe: Make RT aware. From: Thomas Gleixner Date: Sat, 12 Nov 2011 14:00:48 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Do not disable preemption while taking sleeping locks. All user look safe for migrate_diable() only. diff --git a/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch b/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch index 329a10b56..6028ce201 100644 --- a/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch +++ b/debian/patches/features/all/rt/seqlock-prevent-rt-starvation.patch @@ -1,7 +1,7 @@ Subject: seqlock: Prevent rt starvation From: Thomas Gleixner Date: Wed, 22 Feb 2012 12:03:30 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz If a low prio writer gets preempted while holding the seqlock write locked, a high prio reader spins forever on RT. diff --git a/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch b/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch index 03d707e9d..f91a20fba 100644 --- a/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch +++ b/debian/patches/features/all/rt/signal-revert-ptrace-preempt-magic.patch @@ -1,7 +1,7 @@ Subject: signal: Revert ptrace preempt magic From: Thomas Gleixner Date: Wed, 21 Sep 2011 19:57:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit '53da1d9456fe7f8 fix ptrace slowness' is nothing more than a bandaid around the ptrace design trainwreck. It's not a diff --git a/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch b/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch index 89dec2542..2739eb95f 100644 --- a/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch +++ b/debian/patches/features/all/rt/signals-allow-rt-tasks-to-cache-one-sigqueue-struct.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:56 -0500 Subject: signals: Allow rt tasks to cache one sigqueue struct -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. diff --git a/debian/patches/features/all/rt/skbufhead-raw-lock.patch b/debian/patches/features/all/rt/skbufhead-raw-lock.patch index b119560fc..bef1e36d4 100644 --- a/debian/patches/features/all/rt/skbufhead-raw-lock.patch +++ b/debian/patches/features/all/rt/skbufhead-raw-lock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 12 Jul 2011 15:38:34 +0200 Subject: net: Use skbufhead with raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Use the rps lock as rawlock so we can keep irq-off regions. It looks low latency. However we can't kfree() from this context therefore we defer this diff --git a/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch b/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch index 03df65e9f..530198bf3 100644 --- a/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch +++ b/debian/patches/features/all/rt/slub-disable-SLUB_CPU_PARTIAL.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 15 Apr 2015 19:00:47 +0200 Subject: slub: Disable SLUB_CPU_PARTIAL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 87, name: rcuop/7 diff --git a/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch b/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch index 6e3c882cc..954bf7a7a 100644 --- a/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch +++ b/debian/patches/features/all/rt/slub-enable-irqs-for-no-wait.patch @@ -1,7 +1,7 @@ Subject: slub: Enable irqs for __GFP_WAIT From: Thomas Gleixner Date: Wed, 09 Jan 2013 12:08:15 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz SYSTEM_RUNNING might be too late for enabling interrupts. Allocations with GFP_WAIT can happen before that. So use this as an indicator. diff --git a/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch b/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch index a1806d769..2d9dfa141 100644 --- a/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch +++ b/debian/patches/features/all/rt/softirq-disable-softirq-stacks-for-rt.patch @@ -1,7 +1,7 @@ Subject: softirq: Disable softirq stacks for RT From: Thomas Gleixner Date: Mon, 18 Jul 2011 13:59:17 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Disable extra stacks for softirqs. We want to preempt softirqs and having them on special IRQ-stack does not make this easier. diff --git a/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch b/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch index 3aa859cea..0d35ab2e7 100644 --- a/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch +++ b/debian/patches/features/all/rt/softirq-preempt-fix-3-re.patch @@ -1,7 +1,7 @@ Subject: softirq: Check preemption after reenabling interrupts From: Thomas Gleixner Date: Sun, 13 Nov 2011 17:17:09 +0100 (CET) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz raise_softirq_irqoff() disables interrupts and wakes the softirq daemon, but after reenabling interrupts there is no preemption check, diff --git a/debian/patches/features/all/rt/softirq-split-locks.patch b/debian/patches/features/all/rt/softirq-split-locks.patch index fcb652c4f..a79c8003c 100644 --- a/debian/patches/features/all/rt/softirq-split-locks.patch +++ b/debian/patches/features/all/rt/softirq-split-locks.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 04 Oct 2012 14:20:47 +0100 Subject: softirq: Split softirq locks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The 3.x RT series removed the split softirq implementation in favour of pushing softirq processing into the context of the thread which diff --git a/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch b/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch index 25f8a1206..79f36ba99 100644 --- a/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch +++ b/debian/patches/features/all/rt/softirq-split-timer-softirqs-out-of-ksoftirqd.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 20 Jan 2016 16:34:17 +0100 Subject: softirq: split timer softirqs out of ksoftirqd -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The softirqd runs in -RT with SCHED_FIFO (prio 1) and deals mostly with timer wakeup which can not happen in hardirq context. The prio has been diff --git a/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch b/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch index 06bf9029d..0532b9484 100644 --- a/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch +++ b/debian/patches/features/all/rt/softirq-wake-the-timer-softirq-if-needed.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Fri, 20 Jan 2017 18:10:20 +0100 Subject: [PATCH] softirq: wake the timer softirq if needed -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The irq-exit path only checks the "normal"-softirq thread if it is running and ignores the state of the "timer"-softirq thread. It is possible diff --git a/debian/patches/features/all/rt/spinlock-atomic_dec_and_lock-Add-an-irqsave-variant.patch b/debian/patches/features/all/rt/spinlock-atomic_dec_and_lock-Add-an-irqsave-variant.patch deleted file mode 100644 index bf43c7377..000000000 --- a/debian/patches/features/all/rt/spinlock-atomic_dec_and_lock-Add-an-irqsave-variant.patch +++ /dev/null @@ -1,59 +0,0 @@ -From: Anna-Maria Gleixner -Date: Wed, 4 Apr 2018 11:43:55 +0200 -Subject: [PATCH] spinlock: atomic_dec_and_lock: Add an irqsave variant -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz - -There are in-tree users of atomic_dec_and_lock() which must acquire the -spin lock with interrupts disabled. To workaround the lack of an irqsave -variant of atomic_dec_and_lock() they use local_irq_save() at the call -site. This causes extra code and creates in some places unneeded long -interrupt disabled times. These places need also extra treatment for -PREEMPT_RT due to the disconnect of the irq disabling and the lock -function. - -Implement the missing irqsave variant of the function. - -Signed-off-by: Anna-Maria Gleixner -Signed-off-by: Sebastian Andrzej Siewior ---- - include/linux/spinlock.h | 5 +++++ - lib/dec_and_lock.c | 17 +++++++++++++++++ - 2 files changed, 22 insertions(+) - ---- a/include/linux/spinlock.h -+++ b/include/linux/spinlock.h -@@ -409,6 +409,11 @@ extern int _atomic_dec_and_lock(atomic_t - #define atomic_dec_and_lock(atomic, lock) \ - __cond_lock(lock, _atomic_dec_and_lock(atomic, lock)) - -+extern int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, -+ unsigned long *flags); -+#define atomic_dec_and_lock_irqsave(atomic, lock, flags) \ -+ __cond_lock(lock, _atomic_dec_and_lock_irqsave(atomic, lock, &(flags))) -+ - int alloc_bucket_spinlocks(spinlock_t **locks, unsigned int *lock_mask, - size_t max_size, unsigned int cpu_mult, - gfp_t gfp); ---- a/lib/dec_and_lock.c -+++ b/lib/dec_and_lock.c -@@ -33,3 +33,20 @@ int _atomic_dec_and_lock(atomic_t *atomi - } - - EXPORT_SYMBOL(_atomic_dec_and_lock); -+ -+int _atomic_dec_and_lock_irqsave(atomic_t *atomic, spinlock_t *lock, -+ unsigned long *flags) -+{ -+ /* Subtract 1 from counter unless that drops it to 0 (ie. it was 1) */ -+ if (atomic_add_unless(atomic, -1, 1)) -+ return 0; -+ -+ /* Otherwise do it the slow way */ -+ spin_lock_irqsave(lock, *flags); -+ if (atomic_dec_and_test(atomic)) -+ return 1; -+ spin_unlock_irqrestore(lock, *flags); -+ return 0; -+} -+ -+EXPORT_SYMBOL(_atomic_dec_and_lock_irqsave); diff --git a/debian/patches/features/all/rt/spinlock-types-separate-raw.patch b/debian/patches/features/all/rt/spinlock-types-separate-raw.patch index 52650e158..94a8b1f6d 100644 --- a/debian/patches/features/all/rt/spinlock-types-separate-raw.patch +++ b/debian/patches/features/all/rt/spinlock-types-separate-raw.patch @@ -1,7 +1,7 @@ Subject: spinlock: Split the lock types header From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:34:01 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Split raw_spinlock into its own file and the remaining spinlock_t into its own non-RT header. The non-RT header will be replaced later by sleeping diff --git a/debian/patches/features/all/rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch b/debian/patches/features/all/rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch new file mode 100644 index 000000000..fa8b780d7 --- /dev/null +++ b/debian/patches/features/all/rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch @@ -0,0 +1,66 @@ +From: Julia Cartwright +Date: Mon, 7 May 2018 08:58:57 -0500 +Subject: [PATCH] squashfs: make use of local lock in multi_cpu + decompressor +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +Currently, the squashfs multi_cpu decompressor makes use of +get_cpu_ptr()/put_cpu_ptr(), which unconditionally disable preemption +during decompression. + +Because the workload is distributed across CPUs, all CPUs can observe a +very high wakeup latency, which has been seen to be as much as 8000us. + +Convert this decompressor to make use of a local lock, which will allow +execution of the decompressor with preemption-enabled, but also ensure +concurrent accesses to the percpu compressor data on the local CPU will +be serialized. + +Cc: stable-rt@vger.kernel.org +Reported-by: Alexander Stein +Tested-by: Alexander Stein +Signed-off-by: Julia Cartwright +Signed-off-by: Sebastian Andrzej Siewior +--- + fs/squashfs/decompressor_multi_percpu.c | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/fs/squashfs/decompressor_multi_percpu.c ++++ b/fs/squashfs/decompressor_multi_percpu.c +@@ -10,6 +10,7 @@ + #include + #include + #include ++#include + + #include "squashfs_fs.h" + #include "squashfs_fs_sb.h" +@@ -25,6 +26,8 @@ struct squashfs_stream { + void *stream; + }; + ++static DEFINE_LOCAL_IRQ_LOCK(stream_lock); ++ + void *squashfs_decompressor_create(struct squashfs_sb_info *msblk, + void *comp_opts) + { +@@ -79,10 +82,15 @@ int squashfs_decompress(struct squashfs_ + { + struct squashfs_stream __percpu *percpu = + (struct squashfs_stream __percpu *) msblk->stream; +- struct squashfs_stream *stream = get_cpu_ptr(percpu); +- int res = msblk->decompressor->decompress(msblk, stream->stream, bh, b, +- offset, length, output); +- put_cpu_ptr(stream); ++ struct squashfs_stream *stream; ++ int res; ++ ++ stream = get_locked_ptr(stream_lock, percpu); ++ ++ res = msblk->decompressor->decompress(msblk, stream->stream, bh, b, ++ offset, length, output); ++ ++ put_locked_ptr(stream_lock, stream); + + if (res < 0) + ERROR("%s decompression failed, data probably corrupt\n", diff --git a/debian/patches/features/all/rt/srcu-replace-local_irqsave-with-a-locallock.patch b/debian/patches/features/all/rt/srcu-replace-local_irqsave-with-a-locallock.patch index 492e9aef2..a05229313 100644 --- a/debian/patches/features/all/rt/srcu-replace-local_irqsave-with-a-locallock.patch +++ b/debian/patches/features/all/rt/srcu-replace-local_irqsave-with-a-locallock.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 12 Oct 2017 18:37:12 +0200 Subject: [PATCH] srcu: replace local_irqsave() with a locallock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There are two instances which disable interrupts in order to become a stable this_cpu_ptr() pointer. The restore part is coupled with diff --git a/debian/patches/features/all/rt/srcu-use-cpu_online-instead-custom-check.patch b/debian/patches/features/all/rt/srcu-use-cpu_online-instead-custom-check.patch index d428f4f88..073bc485f 100644 --- a/debian/patches/features/all/rt/srcu-use-cpu_online-instead-custom-check.patch +++ b/debian/patches/features/all/rt/srcu-use-cpu_online-instead-custom-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 13 Sep 2017 14:43:41 +0200 Subject: [PATCH] srcu: use cpu_online() instead custom check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The current check via srcu_online is slightly racy because after looking at srcu_online there could be an interrupt that interrupted us long diff --git a/debian/patches/features/all/rt/stop-machine-raw-lock.patch b/debian/patches/features/all/rt/stop-machine-raw-lock.patch index 4a0070dbe..bbb998655 100644 --- a/debian/patches/features/all/rt/stop-machine-raw-lock.patch +++ b/debian/patches/features/all/rt/stop-machine-raw-lock.patch @@ -1,7 +1,7 @@ Subject: stop_machine: Use raw spinlocks From: Thomas Gleixner Date: Wed, 29 Jun 2011 11:01:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz upstream commit de5b55c1d4e30740009864eb35ce4ed856aac01d diff --git a/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch b/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch index de46e1650..8662bd8ef 100644 --- a/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch +++ b/debian/patches/features/all/rt/sunrpc-make-svc_xprt_do_enqueue-use-get_cpu_light.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Wed, 18 Feb 2015 16:05:28 +0100 Subject: sunrpc: Make svc_xprt_do_enqueue() use get_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz |BUG: sleeping function called from invalid context at kernel/locking/rtmutex.c:915 |in_atomic(): 1, irqs_disabled(): 0, pid: 3194, name: rpc.nfsd diff --git a/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch b/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch index 885933565..611f0fe94 100644 --- a/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch +++ b/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 15 Jul 2010 10:29:00 +0200 Subject: suspend: Prevent might sleep splats -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz timekeeping suspend/resume calls read_persistant_clock() which takes rtc_lock. That results in might sleep warnings because at that point diff --git a/debian/patches/features/all/rt/sysfs-realtime-entry.patch b/debian/patches/features/all/rt/sysfs-realtime-entry.patch index 760b73feb..6fa166c89 100644 --- a/debian/patches/features/all/rt/sysfs-realtime-entry.patch +++ b/debian/patches/features/all/rt/sysfs-realtime-entry.patch @@ -1,7 +1,7 @@ Subject: sysfs: Add /sys/kernel/realtime entry From: Clark Williams Date: Sat Jul 30 21:55:53 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. diff --git a/debian/patches/features/all/rt/take-write_seqcount_invalidate-into-__d_drop.patch b/debian/patches/features/all/rt/take-write_seqcount_invalidate-into-__d_drop.patch index 97965e067..140480810 100644 --- a/debian/patches/features/all/rt/take-write_seqcount_invalidate-into-__d_drop.patch +++ b/debian/patches/features/all/rt/take-write_seqcount_invalidate-into-__d_drop.patch @@ -1,7 +1,7 @@ From: Al Viro Date: Wed, 7 Mar 2018 00:49:10 -0500 Subject: [PATCH] take write_seqcount_invalidate() into __d_drop() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Upstream commit 0632a9ac7bc0a32f8251a53b3925775f0a7c4da6 diff --git a/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch b/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch index 0f298c59a..ab6ce7560 100644 --- a/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch +++ b/debian/patches/features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt.patch @@ -1,7 +1,7 @@ Subject: tasklet: Prevent tasklets from going into infinite spin in RT From: Ingo Molnar Date: Tue Nov 29 20:18:22 2011 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When CONFIG_PREEMPT_RT_FULL is enabled, tasklets run as threads, and spinlocks turn are mutexes. But this can cause issues with diff --git a/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch b/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch index 639830c96..57c1fd654 100644 --- a/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch +++ b/debian/patches/features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch @@ -1,7 +1,7 @@ From: Daniel Wagner Date: Tue, 17 Feb 2015 09:37:44 +0100 Subject: thermal: Defer thermal wakups to threads -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz On RT the spin lock in pkg_temp_thermal_platfrom_thermal_notify will call schedule while we run in irq context. diff --git a/debian/patches/features/all/rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch b/debian/patches/features/all/rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch index 48a145dc2..b56c69993 100644 --- a/debian/patches/features/all/rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch +++ b/debian/patches/features/all/rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Wed, 15 Nov 2017 17:29:51 +0100 Subject: [PATCH] time/hrtimer: avoid schedule_work() with interrupts disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz The NOHZ code tries to schedule a workqueue with interrupts disabled. Since this does not work -RT I am switching it to swork instead. diff --git a/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch b/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch index 209921cfc..7c644f6be 100644 --- a/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch +++ b/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch @@ -1,7 +1,7 @@ Subject: timekeeping: Split jiffies seqlock From: Thomas Gleixner Date: Thu, 14 Feb 2013 22:36:59 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Replace jiffies_lock seqlock with a simple seqcounter and a rawlock so it can be taken in atomic context on RT. diff --git a/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch b/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch index 5705d00d4..2359b3dd2 100644 --- a/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch +++ b/debian/patches/features/all/rt/timer-delay-waking-softirqs-from-the-jiffy-tick.patch @@ -1,7 +1,7 @@ From: Peter Zijlstra Date: Fri, 21 Aug 2009 11:56:45 +0200 Subject: timer: delay waking softirqs from the jiffy tick -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz People were complaining about broken balancing with the recent -rt series. diff --git a/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch b/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch index 65deffe3c..b739494b2 100644 --- a/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch +++ b/debian/patches/features/all/rt/timer-fd-avoid-live-lock.patch @@ -1,7 +1,7 @@ Subject: timer-fd: Prevent live lock From: Thomas Gleixner Date: Wed, 25 Jan 2012 11:08:40 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz If hrtimer_try_to_cancel() requires a retry, then depending on the priority setting te retry loop might prevent timer callback completion diff --git a/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch b/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch index 32cb7973f..1beded364 100644 --- a/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch +++ b/debian/patches/features/all/rt/timers-prepare-for-full-preemption.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:34 -0500 Subject: timers: Prepare for full preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.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/features/all/rt/tpm_tis-fix-stall-after-iowrite-s.patch b/debian/patches/features/all/rt/tpm_tis-fix-stall-after-iowrite-s.patch index 5ab7b87fc..e5f0a922a 100644 --- a/debian/patches/features/all/rt/tpm_tis-fix-stall-after-iowrite-s.patch +++ b/debian/patches/features/all/rt/tpm_tis-fix-stall-after-iowrite-s.patch @@ -1,7 +1,7 @@ From: Haris Okanovic Date: Tue, 15 Aug 2017 15:13:08 -0500 Subject: [PATCH] tpm_tis: fix stall after iowrite*()s -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz ioread8() operations to TPM MMIO addresses can stall the cpu when immediately following a sequence of iowrite*()'s to the same region. diff --git a/debian/patches/features/all/rt/tracing-Fix-display-of-hist-trigger-expressions-cont.patch b/debian/patches/features/all/rt/tracing-Fix-display-of-hist-trigger-expressions-cont.patch new file mode 100644 index 000000000..65ad9fb87 --- /dev/null +++ b/debian/patches/features/all/rt/tracing-Fix-display-of-hist-trigger-expressions-cont.patch @@ -0,0 +1,82 @@ +From: Tom Zanussi +Date: Wed, 28 Mar 2018 15:10:53 -0500 +Subject: [PATCH] tracing: Fix display of hist trigger expressions containing + timestamps +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz + +[ commit 0ae7961e75c3fe3383796323d5342cbda8f82536 ] + +When displaying hist triggers, variable references that have the +timestamp field flag set are erroneously displayed as common_timestamp +rather than the variable reference. Additionally, timestamp +expressions are displayed in the same way. Fix this by forcing the +timestamp flag handling to follow variable reference and expression +handling. + +Before: + + # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger + hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs:... + +After: + + # cat /sys/kernel/debug/tracing/events/sched/sched_switch/trigger + hist:keys=next_pid:vals=hitcount:wakeup_lat=common_timestamp.usecs-$ts0.usecs:... + +Link: http://lkml.kernel.org/r/92746b06be67499c2a6217bd55395b350ad18fad.1522256721.git.tom.zanussi@linux.intel.com + +Signed-off-by: Tom Zanussi +Signed-off-by: Steven Rostedt (VMware) +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/trace_events_hist.c | 19 +++++-------------- + 1 file changed, 5 insertions(+), 14 deletions(-) + +--- a/kernel/trace/trace_events_hist.c ++++ b/kernel/trace/trace_events_hist.c +@@ -1686,8 +1686,6 @@ static const char *hist_field_name(struc + else if (field->flags & HIST_FIELD_FL_LOG2 || + field->flags & HIST_FIELD_FL_ALIAS) + field_name = hist_field_name(field->operands[0], ++level); +- else if (field->flags & HIST_FIELD_FL_TIMESTAMP) +- field_name = "common_timestamp"; + else if (field->flags & HIST_FIELD_FL_CPU) + field_name = "cpu"; + else if (field->flags & HIST_FIELD_FL_EXPR || +@@ -1703,7 +1701,8 @@ static const char *hist_field_name(struc + field_name = full_name; + } else + field_name = field->name; +- } ++ } else if (field->flags & HIST_FIELD_FL_TIMESTAMP) ++ field_name = "common_timestamp"; + + if (field_name == NULL) + field_name = ""; +@@ -4857,23 +4856,15 @@ static void hist_field_print(struct seq_ + if (hist_field->var.name) + seq_printf(m, "%s=", hist_field->var.name); + +- if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP) +- seq_puts(m, "common_timestamp"); +- else if (hist_field->flags & HIST_FIELD_FL_CPU) ++ if (hist_field->flags & HIST_FIELD_FL_CPU) + seq_puts(m, "cpu"); + else if (field_name) { + if (hist_field->flags & HIST_FIELD_FL_VAR_REF || + hist_field->flags & HIST_FIELD_FL_ALIAS) + seq_putc(m, '$'); + seq_printf(m, "%s", field_name); +- } +- +- if (hist_field->flags) { +- const char *flags_str = get_hist_field_flags(hist_field); +- +- if (flags_str) +- seq_printf(m, ".%s", flags_str); +- } ++ } else if (hist_field->flags & HIST_FIELD_FL_TIMESTAMP) ++ seq_puts(m, "common_timestamp"); + } + + static int event_hist_trigger_print(struct seq_file *m, diff --git a/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch b/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch index 25072efd2..d08a2488e 100644 --- a/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch +++ b/debian/patches/features/all/rt/tty-serial-8250-don-t-take-the-trylock-during-oops.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Apr 2016 16:55:02 +0200 Subject: [PATCH] tty: serial: 8250: don't take the trylock during oops -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz An oops with irqs off (panic() from irqsafe hrtimer like the watchdog timer) will lead to a lockdep warning on each invocation and as such diff --git a/debian/patches/features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch b/debian/patches/features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch index e7c8bf4c8..d989ad058 100644 --- a/debian/patches/features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch +++ b/debian/patches/features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 26 Apr 2018 16:42:24 +0200 Subject: [PATCH] tty/serial: atmel: use port->name as name in request_irq() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz I was puzzled while looking at /proc/interrupts and random things showed up between reboots. This occurred more often but I realised it later. The diff --git a/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch b/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch index 4151d503c..a87883d99 100644 --- a/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch +++ b/debian/patches/features/all/rt/upstream-net-rt-remove-preemption-disabling-in-netif_rx.patch @@ -1,7 +1,7 @@ Subject: net: Remove preemption disabling in netif_rx() From: Priyanka Jain Date: Thu, 17 May 2012 09:35:11 +0530 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz 1)enqueue_to_backlog() (called from netif_rx) should be bind to a particluar CPU. This can be achieved by diff --git a/debian/patches/features/all/rt/usb-do-not-disable-interrupts-in-giveback.patch b/debian/patches/features/all/rt/usb-do-not-disable-interrupts-in-giveback.patch index cf7404049..60166521d 100644 --- a/debian/patches/features/all/rt/usb-do-not-disable-interrupts-in-giveback.patch +++ b/debian/patches/features/all/rt/usb-do-not-disable-interrupts-in-giveback.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 8 Nov 2013 17:34:54 +0100 Subject: usb: do no disable interrupts in giveback -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet context") the USB code disables interrupts before invoking the complete diff --git a/debian/patches/features/all/rt/wait.h-include-atomic.h.patch b/debian/patches/features/all/rt/wait.h-include-atomic.h.patch index c58d9aa13..8267de3f5 100644 --- a/debian/patches/features/all/rt/wait.h-include-atomic.h.patch +++ b/debian/patches/features/all/rt/wait.h-include-atomic.h.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 28 Oct 2013 12:19:57 +0100 Subject: wait.h: include atomic.h -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz | CC init/main.o |In file included from include/linux/mmzone.h:9:0, diff --git a/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch b/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch index 4de9884e5..338463ac1 100644 --- a/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch +++ b/debian/patches/features/all/rt/work-queue-work-around-irqsafe-timer-optimization.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Mon, 01 Jul 2013 11:02:42 +0200 Subject: workqueue: Prevent workqueue versus ata-piix livelock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz An Intel i7 system regularly detected rcu_preempt stalls after the kernel was upgraded from 3.6-rt to 3.8-rt. When the stall happened, disk I/O was no diff --git a/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch b/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch index 686ac3851..0d226c08b 100644 --- a/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch +++ b/debian/patches/features/all/rt/work-simple-Simple-work-queue-implemenation.patch @@ -1,7 +1,7 @@ From: Daniel Wagner Date: Fri, 11 Jul 2014 15:26:11 +0200 Subject: work-simple: Simple work queue implemenation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Provides a framework for enqueuing callbacks from irq context PREEMPT_RT_FULL safe. The callbacks are executed in kthread context. diff --git a/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch b/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch index 838e2f97a..e02db091d 100644 --- a/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch +++ b/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch @@ -22,7 +22,7 @@ Cc: Jens Axboe Cc: Linus Torvalds Link: http://lkml.kernel.org/r/20110622174919.135236139@linutronix.de Signed-off-by: Thomas Gleixner -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz --- kernel/sched/core.c | 84 +++++++------------------------------------- diff --git a/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch b/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch index d505ec875..6480177fb 100644 --- a/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch +++ b/debian/patches/features/all/rt/workqueue-prevent-deadlock-stall.patch @@ -1,7 +1,7 @@ Subject: workqueue: Prevent deadlock/stall on RT From: Thomas Gleixner Date: Fri, 27 Jun 2014 16:24:52 +0200 (CEST) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Austin reported a XFS deadlock/stall on RT where scheduled work gets never exececuted and tasks are waiting for each other for ever. diff --git a/debian/patches/features/all/rt/workqueue-use-locallock.patch b/debian/patches/features/all/rt/workqueue-use-locallock.patch index f74e0880f..2e413dea3 100644 --- a/debian/patches/features/all/rt/workqueue-use-locallock.patch +++ b/debian/patches/features/all/rt/workqueue-use-locallock.patch @@ -1,7 +1,7 @@ Subject: workqueue: Use local irq lock instead of irq disable regions From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:42:26 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Use a local_irq_lock as a replacement for irq off regions. We keep the semantic of irq-off in regard to the pool->lock and remain preemptible. diff --git a/debian/patches/features/all/rt/workqueue-use-rcu.patch b/debian/patches/features/all/rt/workqueue-use-rcu.patch index dc99370f5..a53d7311d 100644 --- a/debian/patches/features/all/rt/workqueue-use-rcu.patch +++ b/debian/patches/features/all/rt/workqueue-use-rcu.patch @@ -1,7 +1,7 @@ Subject: workqueue: Use normal rcu From: Thomas Gleixner Date: Wed, 24 Jul 2013 15:26:54 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz There is no need for sched_rcu. The undocumented reason why sched_rcu is used is to avoid a few explicit rcu_read_lock()/unlock() pairs by diff --git a/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch b/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch index 81df94d87..a9c309af3 100644 --- a/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch +++ b/debian/patches/features/all/rt/x86-UV-raw_spinlock-conversion.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Sun, 2 Nov 2014 08:31:37 +0100 Subject: x86: UV: raw_spinlock conversion -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Shrug. Lots of hobbyists have a beast in their basement, right? diff --git a/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch b/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch index a0da53251..3a9ff5cc7 100644 --- a/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch +++ b/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch @@ -1,7 +1,7 @@ Subject: x86: crypto: Reduce preempt disabled regions From: Peter Zijlstra Date: Mon, 14 Nov 2011 18:19:27 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Restrict the preempt disabled regions to the actual floating point operations and enable preemption for the administrative actions. diff --git a/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch b/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch index 9d782fbf6..959b76df5 100644 --- a/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch +++ b/debian/patches/features/all/rt/x86-highmem-add-a-already-used-pte-check.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 17:09:55 +0100 Subject: x86/highmem: Add a "already used pte" check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz This is a copy from kmap_atomic_prot(). diff --git a/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch b/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch index 0e24f5860..9e6539778 100644 --- a/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch +++ b/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:27 -0500 Subject: x86/ioapic: Do not unmask io_apic when interrupt is in progress -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz With threaded interrupts we might see an interrupt in progress on migration. Do not unmask it when this is the case. diff --git a/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch b/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch index eaa824e33..a981deb8a 100644 --- a/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch +++ b/debian/patches/features/all/rt/x86-kvm-require-const-tsc-for-rt.patch @@ -1,7 +1,7 @@ Subject: x86: kvm Require const tsc for RT From: Thomas Gleixner Date: Sun, 06 Nov 2011 12:26:18 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Non constant TSC is a nightmare on bare metal already, but with virtualization it becomes a complete disaster because the workarounds diff --git a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch b/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch deleted file mode 100644 index eb019e73f..000000000 --- a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch +++ /dev/null @@ -1,165 +0,0 @@ -From: Thomas Gleixner -Date: Mon, 13 Dec 2010 16:33:39 +0100 -Subject: x86: Convert mce timer to hrtimer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz - -mce_timer is started in atomic contexts of cpu bringup. This results -in might_sleep() warnings on RT. Convert mce_timer to a hrtimer to -avoid this. - -Signed-off-by: Thomas Gleixner -fold in: -|From: Mike Galbraith -|Date: Wed, 29 May 2013 13:52:13 +0200 -|Subject: [PATCH] x86/mce: fix mce timer interval -| -|Seems mce timer fire at the wrong frequency in -rt kernels since roughly -|forever due to 32 bit overflow. 3.8-rt is also missing a multiplier. -| -|Add missing us -> ns conversion and 32 bit overflow prevention. -| -|Signed-off-by: Mike Galbraith -|[bigeasy: use ULL instead of u64 cast] -|Signed-off-by: Sebastian Andrzej Siewior ---- - arch/x86/kernel/cpu/mcheck/mce.c | 52 +++++++++++++++++++-------------------- - 1 file changed, 26 insertions(+), 26 deletions(-) - ---- a/arch/x86/kernel/cpu/mcheck/mce.c -+++ b/arch/x86/kernel/cpu/mcheck/mce.c -@@ -41,6 +41,7 @@ - #include - #include - #include -+#include - #include - - #include -@@ -1363,7 +1364,7 @@ int memory_failure(unsigned long pfn, in - static unsigned long check_interval = INITIAL_CHECK_INTERVAL; - - static DEFINE_PER_CPU(unsigned long, mce_next_interval); /* in jiffies */ --static DEFINE_PER_CPU(struct timer_list, mce_timer); -+static DEFINE_PER_CPU(struct hrtimer, mce_timer); - - static unsigned long mce_adjust_timer_default(unsigned long interval) - { -@@ -1372,26 +1373,18 @@ static unsigned long mce_adjust_timer_de - - static unsigned long (*mce_adjust_timer)(unsigned long interval) = mce_adjust_timer_default; - --static void __start_timer(struct timer_list *t, unsigned long interval) -+static void __start_timer(struct hrtimer *t, unsigned long iv) - { -- unsigned long when = jiffies + interval; -- unsigned long flags; -- -- local_irq_save(flags); -- -- if (!timer_pending(t) || time_before(when, t->expires)) -- mod_timer(t, round_jiffies(when)); -- -- local_irq_restore(flags); -+ if (!iv) -+ return; -+ hrtimer_start_range_ns(t, ns_to_ktime(jiffies_to_usecs(iv) * 1000ULL), -+ 0, HRTIMER_MODE_REL_PINNED); - } - --static void mce_timer_fn(struct timer_list *t) -+static enum hrtimer_restart mce_timer_fn(struct hrtimer *timer) - { -- struct timer_list *cpu_t = this_cpu_ptr(&mce_timer); - unsigned long iv; - -- WARN_ON(cpu_t != t); -- - iv = __this_cpu_read(mce_next_interval); - - if (mce_available(this_cpu_ptr(&cpu_info))) { -@@ -1414,7 +1407,11 @@ static void mce_timer_fn(struct timer_li - - done: - __this_cpu_write(mce_next_interval, iv); -- __start_timer(t, iv); -+ if (!iv) -+ return HRTIMER_NORESTART; -+ -+ hrtimer_forward_now(timer, ns_to_ktime(jiffies_to_nsecs(iv))); -+ return HRTIMER_RESTART; - } - - /* -@@ -1422,7 +1419,7 @@ static void mce_timer_fn(struct timer_li - */ - void mce_timer_kick(unsigned long interval) - { -- struct timer_list *t = this_cpu_ptr(&mce_timer); -+ struct hrtimer *t = this_cpu_ptr(&mce_timer); - unsigned long iv = __this_cpu_read(mce_next_interval); - - __start_timer(t, interval); -@@ -1437,7 +1434,7 @@ static void mce_timer_delete_all(void) - int cpu; - - for_each_online_cpu(cpu) -- del_timer_sync(&per_cpu(mce_timer, cpu)); -+ hrtimer_cancel(&per_cpu(mce_timer, cpu)); - } - - /* -@@ -1766,7 +1763,7 @@ static void __mcheck_cpu_clear_vendor(st - } - } - --static void mce_start_timer(struct timer_list *t) -+static void mce_start_timer(struct hrtimer *t) - { - unsigned long iv = check_interval * HZ; - -@@ -1779,16 +1776,19 @@ static void mce_start_timer(struct timer - - static void __mcheck_cpu_setup_timer(void) - { -- struct timer_list *t = this_cpu_ptr(&mce_timer); -+ struct hrtimer *t = this_cpu_ptr(&mce_timer); - -- timer_setup(t, mce_timer_fn, TIMER_PINNED); -+ hrtimer_init(t, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ t->function = mce_timer_fn; - } - - static void __mcheck_cpu_init_timer(void) - { -- struct timer_list *t = this_cpu_ptr(&mce_timer); -+ struct hrtimer *t = this_cpu_ptr(&mce_timer); -+ -+ hrtimer_init(t, CLOCK_MONOTONIC, HRTIMER_MODE_REL); -+ t->function = mce_timer_fn; - -- timer_setup(t, mce_timer_fn, TIMER_PINNED); - mce_start_timer(t); - } - -@@ -2307,7 +2307,7 @@ static int mce_cpu_dead(unsigned int cpu - - static int mce_cpu_online(unsigned int cpu) - { -- struct timer_list *t = this_cpu_ptr(&mce_timer); -+ struct hrtimer *t = this_cpu_ptr(&mce_timer); - int ret; - - mce_device_create(cpu); -@@ -2324,10 +2324,10 @@ static int mce_cpu_online(unsigned int c - - static int mce_cpu_pre_down(unsigned int cpu) - { -- struct timer_list *t = this_cpu_ptr(&mce_timer); -+ struct hrtimer *t = this_cpu_ptr(&mce_timer); - - mce_disable_cpu(); -- del_timer_sync(t); -+ hrtimer_cancel(t); - mce_threshold_remove_device(cpu); - mce_device_remove(cpu); - return 0; diff --git a/debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch b/debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch deleted file mode 100644 index 13ce1fb20..000000000 --- a/debian/patches/features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch +++ /dev/null @@ -1,126 +0,0 @@ -Subject: x86/mce: use swait queue for mce wakeups -From: Steven Rostedt -Date: Fri, 27 Feb 2015 15:20:37 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz - -We had a customer report a lockup on a 3.0-rt kernel that had the -following backtrace: - -[ffff88107fca3e80] rt_spin_lock_slowlock at ffffffff81499113 -[ffff88107fca3f40] rt_spin_lock at ffffffff81499a56 -[ffff88107fca3f50] __wake_up at ffffffff81043379 -[ffff88107fca3f80] mce_notify_irq at ffffffff81017328 -[ffff88107fca3f90] intel_threshold_interrupt at ffffffff81019508 -[ffff88107fca3fa0] smp_threshold_interrupt at ffffffff81019fc1 -[ffff88107fca3fb0] threshold_interrupt at ffffffff814a1853 - -It actually bugged because the lock was taken by the same owner that -already had that lock. What happened was the thread that was setting -itself on a wait queue had the lock when an MCE triggered. The MCE -interrupt does a wake up on its wait list and grabs the same lock. - -NOTE: THIS IS NOT A BUG ON MAINLINE - -Sorry for yelling, but as I Cc'd mainline maintainers I want them to -know that this is an PREEMPT_RT bug only. I only Cc'd them for advice. - -On PREEMPT_RT the wait queue locks are converted from normal -"spin_locks" into an rt_mutex (see the rt_spin_lock_slowlock above). -These are not to be taken by hard interrupt context. This usually isn't -a problem as most all interrupts in PREEMPT_RT are converted into -schedulable threads. Unfortunately that's not the case with the MCE irq. - -As wait queue locks are notorious for long hold times, we can not -convert them to raw_spin_locks without causing issues with -rt. But -Thomas has created a "simple-wait" structure that uses raw spin locks -which may have been a good fit. - -Unfortunately, wait queues are not the only issue, as the mce_notify_irq -also does a schedule_work(), which grabs the workqueue spin locks that -have the exact same issue. - -Thus, this patch I'm proposing is to move the actual work of the MCE -interrupt into a helper thread that gets woken up on the MCE interrupt -and does the work in a schedulable context. - -NOTE: THIS PATCH ONLY CHANGES THE BEHAVIOR WHEN PREEMPT_RT IS SET - -Oops, sorry for yelling again, but I want to stress that I keep the same -behavior of mainline when PREEMPT_RT is not set. Thus, this only changes -the MCE behavior when PREEMPT_RT is configured. - -Signed-off-by: Steven Rostedt -[bigeasy@linutronix: make mce_notify_work() a proper prototype, use - kthread_run()] -Signed-off-by: Sebastian Andrzej Siewior -[wagi: use work-simple framework to defer work to a kthread] -Signed-off-by: Daniel Wagner ---- - arch/x86/kernel/cpu/mcheck/dev-mcelog.c | 37 +++++++++++++++++++++++++++++--- - 1 file changed, 34 insertions(+), 3 deletions(-) - ---- a/arch/x86/kernel/cpu/mcheck/dev-mcelog.c -+++ b/arch/x86/kernel/cpu/mcheck/dev-mcelog.c -@@ -14,6 +14,7 @@ - #include - #include - #include -+#include - - #include "mce-internal.h" - -@@ -86,13 +87,43 @@ static void mce_do_trigger(struct work_s - - static DECLARE_WORK(mce_trigger_work, mce_do_trigger); - -- --void mce_work_trigger(void) -+static void __mce_work_trigger(struct swork_event *event) - { - if (mce_helper[0]) - schedule_work(&mce_trigger_work); - } - -+#ifdef CONFIG_PREEMPT_RT_FULL -+static bool notify_work_ready __read_mostly; -+static struct swork_event notify_work; -+ -+static int mce_notify_work_init(void) -+{ -+ int err; -+ -+ err = swork_get(); -+ if (err) -+ return err; -+ -+ INIT_SWORK(¬ify_work, __mce_work_trigger); -+ notify_work_ready = true; -+ return 0; -+} -+ -+void mce_work_trigger(void) -+{ -+ if (notify_work_ready) -+ swork_queue(¬ify_work); -+} -+ -+#else -+void mce_work_trigger(void) -+{ -+ __mce_work_trigger(NULL); -+} -+static inline int mce_notify_work_init(void) { return 0; } -+#endif -+ - static ssize_t - show_trigger(struct device *s, struct device_attribute *attr, char *buf) - { -@@ -356,7 +387,7 @@ static __init int dev_mcelog_init_device - - return err; - } -- -+ mce_notify_work_init(); - mce_register_decode_chain(&dev_mcelog_nb); - return 0; - } diff --git a/debian/patches/features/all/rt/x86-preempt-lazy.patch b/debian/patches/features/all/rt/x86-preempt-lazy.patch index ad6b5d322..a7bd5f49f 100644 --- a/debian/patches/features/all/rt/x86-preempt-lazy.patch +++ b/debian/patches/features/all/rt/x86-preempt-lazy.patch @@ -1,7 +1,7 @@ Subject: x86: Support for lazy preemption From: Thomas Gleixner Date: Thu, 01 Nov 2012 11:03:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Implement the x86 pieces for lazy preempt. diff --git a/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch b/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch index d91d9b25c..deb0ba858 100644 --- a/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch +++ b/debian/patches/features/all/rt/x86-signal-delay-calling-signals-on-32bit.patch @@ -1,7 +1,7 @@ From: Yang Shi Date: Thu, 10 Dec 2015 10:58:51 -0800 Subject: x86/signal: delay calling signals on 32bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz When running some ptrace single step tests on x86-32 machine, the below problem is triggered: diff --git a/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch b/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch index eccd00d1e..1c9e7d652 100644 --- a/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch +++ b/debian/patches/features/all/rt/x86-stackprot-no-random-on-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 16 Dec 2010 14:25:18 +0100 Subject: x86: stackprotector: Avoid random pool on rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz CPU bringup calls into the random pool to initialize the stack canary. During boot that works nicely even on RT as the might sleep diff --git a/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch b/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch index 1575c5895..467e4cc76 100644 --- a/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch +++ b/debian/patches/features/all/rt/x86-use-gen-rwsem-spinlocks-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 26 Jul 2009 02:21:32 +0200 Subject: x86: Use generic rwsem_spinlocks on -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt. diff --git a/debian/patches/features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch b/debian/patches/features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch index 44d282689..9d9d9ace4 100644 --- a/debian/patches/features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch +++ b/debian/patches/features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch @@ -1,7 +1,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 5 Oct 2017 14:38:52 +0200 Subject: [PATCH] xen/9pfs: don't inclide rwlock.h directly. -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.7-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.16/older/patches-4.16.8-rt3.tar.xz rwlock.h should not be included directly. Instead linux/splinlock.h should be included. One thing it does is to break the RT build. diff --git a/debian/patches/series-rt b/debian/patches/series-rt index 1e21a6fe6..c62540488 100644 --- a/debian/patches/series-rt +++ b/debian/patches/series-rt @@ -83,6 +83,12 @@ features/all/rt/0045-ring-buffer-Add-nesting-for-adding-events-within-eve.patch features/all/rt/0046-tracing-Use-the-ring-buffer-nesting-to-allow-synthet.patch features/all/rt/0047-tracing-Add-inter-event-blurb-to-HIST_TRIGGERS-confi.patch features/all/rt/0048-selftests-ftrace-Add-inter-event-hist-triggers-testc.patch +features/all/rt/tracing-Fix-display-of-hist-trigger-expressions-cont.patch +features/all/rt/0001-tracing-Add-field-modifier-parsing-hist-error-for-hi.patch +features/all/rt/0002-tracing-Add-field-parsing-hist-error-for-hist-trigge.patch +features/all/rt/0003-tracing-Restore-proper-field-flag-printing-when-disp.patch +features/all/rt/0004-tracing-Uninitialized-variable-in-create_tracing_map.patch +features/all/rt/0005-tracing-Fix-a-potential-NULL-dereference.patch #misc features/all/rt/locking-rtmutex-Handle-non-enqueued-waiters-graceful.patch @@ -91,6 +97,21 @@ features/all/rt/rxrpc-remove-unused-static-variables.patch features/all/rt/delayacct-use-raw_spinlocks.patch features/all/rt/stop-machine-raw-lock.patch features/all/rt/mmci-remove-bogus-irq-save.patch +features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch +features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch +features/all/rt/sched-swait-include-wait.h.patch +features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch +features/all/rt/block-Remove-redundant-WARN_ON.patch +features/all/rt/block-shorten-interrupt-disabled-regions.patch +features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch +features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch +features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch +features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch +features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch +features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch +features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch +features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch +features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch ############################################################ # POSTED by others @@ -108,23 +129,15 @@ features/all/rt/0006-ARM-configs-at91-unselect-PIT.patch ############################################################ # POSTED ############################################################ -features/all/rt/xen-9pfs-don-t-inclide-rwlock.h-directly.patch -features/all/rt/tty-serial-atmel-use-port-name-as-name-in-request_ir.patch -features/all/rt/rbtree-include-rcu.h-because-we-use-it.patch features/all/rt/mfd-syscon-atmel-smc-include-string.h.patch -features/all/rt/sched-swait-include-wait.h.patch features/all/rt/Revert-mm-vmstat.c-fix-vmstat_update-preemption-BUG.patch features/all/rt/arm-convert-boot-lock-to-raw.patch features/all/rt/x86-io-apic-migra-no-unmask.patch -features/all/rt/ACPICA-provide-abstraction-for-raw_spinlock_t.patch -features/all/rt/ACPICA-Convert-acpi_gbl_hardware-lock-back-to-an-acp.patch ############################################################ # Ready for posting ############################################################ features/all/rt/arm-kprobe-replace-patch_lock-to-raw-lock.patch -features/all/rt/x86-mce-timer-hrtimer.patch -features/all/rt/x86-mce-use-swait-queue-for-mce-wakeups.patch features/all/rt/x86-UV-raw_spinlock-conversion.patch features/all/rt/arm-unwind-use_raw_lock.patch @@ -170,30 +183,25 @@ features/all/rt/alim15x3-move-irq-restore-before-pci_dev_put.patch features/all/rt/ide-don-t-disable-interrupts-if-they-are-already-dis.patch features/all/rt/ide-don-t-disable-interrupts-during-kmap_atomic.patch features/all/rt/ide-don-t-enable-disable-interrupts-in-force-threade.patch -features/all/rt/block-avoid-disabling-interrupts-during-kmap_atomic.patch -features/all/rt/block-Remove-redundant-WARN_ON.patch -features/all/rt/block-shorten-interrupt-disabled-regions.patch features/all/rt/dm-rq-remove-BUG_ON-irqs_disabled-check.patch features/all/rt/kernel-signal-Remove-no-longer-required-irqsave-rest.patch features/all/rt/ntfs-avoid-disabling-interrupts-during-kmap_atomic.patch -features/all/rt/include-linux-u64_stats_sync.h-Remove-functions-with.patch features/all/rt/IB-ipoib-replace-local_irq_disable-with-proper-locki.patch features/all/rt/SCSI-libsas-remove-irq-save-in-sas_ata_qc_issue.patch features/all/rt/SCSI-qla2xxx-remove-irq-save-in-qla2x00_poll.patch features/all/rt/libata-remove-ata_sff_data_xfer_noirq.patch -features/all/rt/net-3com-3c59x-Move-boomerang-vortex-conditional-int.patch -features/all/rt/net-3com-3c59x-Pull-locking-out-of-ISR.patch -features/all/rt/net-3com-3c59x-irq-save-variant-of-ISR.patch features/all/rt/posix-cpu-timers-remove-lockdep_assert_irqs_disabled.patch -features/all/rt/ALSA-pcm-Hide-local_irq_disable-enable-and-local_irq.patch features/all/rt/usb-do-not-disable-interrupts-in-giveback.patch -features/all/rt/percpu_ida-Use-_irqsave-instead-of-local_irq_save-sp.patch -#atomic_dec_and_lock_irqsave -features/all/rt/spinlock-atomic_dec_and_lock-Add-an-irqsave-variant.patch -features/all/rt/mm-backing-dev-Use-irqsave-variant-of-atomic_dec_and.patch -features/all/rt/kernel-user-Use-irqsave-variant-of-atomic_dec_and_lo.patch -features/all/rt/drivers-md-raid5-Use-irqsave-variant-of-atomic_dec_a.patch -features/all/rt/drivers-md-raid5-Do-not-disable-irq-on-release_inact.patch +# refcount_dec_and_lock_irqsave +features/all/rt/0001-bdi-use-refcount_t-for-reference-counting-instead-at.patch +features/all/rt/0002-userns-use-refcount_t-for-reference-counting-instead.patch +features/all/rt/0003-md-raid5-use-refcount_t-for-reference-counting-inste.patch +features/all/rt/0004-locking-refcount-implement-refcount_dec_and_lock_irq.patch +features/all/rt/0005-bdi-Use-irqsave-variant-of-refcount_dec_and_lock.patch +features/all/rt/0006-userns-Use-irqsave-variant-of-refcount_dec_and_lock.patch +features/all/rt/0007-md-raid5-Use-irqsave-variant-of-refcount_dec_and_loc.patch +features/all/rt/0008-md-raid5-Do-not-disable-irq-on-release_inactive_stri.patch + #iommu features/all/rt/iommu-amd-hide-unused-iommu_table_lock.patch features/all/rt/iommu-amd-Prevent-possible-null-pointer-dereference-.patch @@ -241,6 +249,7 @@ features/all/rt/preempt-nort-rt-variants.patch # local locks & migrate disable features/all/rt/futex-workaround-migrate_disable-enable-in-different.patch features/all/rt/rt-local-irq-lock.patch +features/all/rt/locallock-provide-get-put-_locked_ptr-variants.patch # ANNOTATE local_irq_disable sites features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch @@ -303,6 +312,7 @@ features/all/rt/time-hrtimer-avoid-schedule_work-with-interrupts-dis.patch features/all/rt/hrtimer-consolidate-hrtimer_init-hrtimer_init_sleepe.patch features/all/rt/hrtimers-prepare-full-preemption.patch features/all/rt/hrtimer-by-timers-by-default-into-the-softirq-context.patch +features/all/rt/sched-fair-Fix-CFS-bandwidth-control-lockdep-DEADLOC.patch features/all/rt/posix-timers-move-the-rcu-head-out-of-the-union.patch features/all/rt/hrtimer-Move-schedule_work-call-to-helper-thread.patch features/all/rt/timer-fd-avoid-live-lock.patch @@ -337,6 +347,7 @@ features/all/rt/tasklet-rt-prevent-tasklets-from-going-into-infinite-spin-in-rt. features/all/rt/softirq-preempt-fix-3-re.patch features/all/rt/softirq-disable-softirq-stacks-for-rt.patch features/all/rt/softirq-split-locks.patch +features/all/rt/sched-let-softirq_count-return-0-if-inside-local_bh_.patch features/all/rt/net-core-use-local_bh_disable-in-netif_rx_ni.patch features/all/rt/kernel-softirq-unlock-with-irqs-on.patch features/all/rt/irq-allow-disabling-of-softirq-processing-in-irq-thread-context.patch @@ -396,6 +407,7 @@ features/all/rt/fs-namespace-preemption-fix.patch features/all/rt/mm-protect-activate-switch-mm.patch features/all/rt/fs-dcache-bring-back-explicit-INIT_HLIST_BL_HEAD-in.patch features/all/rt/fs-dcache-disable-preemption-on-i_dir_seq-s-write-si.patch +features/all/rt/squashfs-make-use-of-local-lock-in-multi_cpu-decompr.patch # X86 features/all/rt/thermal-Defer-thermal-wakups-to-threads.patch @@ -465,6 +477,7 @@ features/all/rt/powerpc-ps3-device-init.c-adapt-to-completions-using.patch features/all/rt/ARM-enable-irq-in-translation-section-permission-fau.patch features/all/rt/genirq-update-irq_set_irqchip_state-documentation.patch features/all/rt/KVM-arm-arm64-downgrade-preempt_disable-d-region-to-.patch +features/all/rt/arm64-fpsimd-use-a-local_lock-instead-of-local_bh_di.patch # KGDB features/all/rt/kgb-serial-hackaround.patch