From 2017c10b63fae2ca56bb12ca8063b69ecba04e2c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Date: Wed, 22 Jul 2015 18:42:19 +0000 Subject: [PATCH] [rt] Update to 4.0.8-rt6 svn path=/dists/sid/linux/; revision=22841 --- debian/changelog | 6 + ...64-Mark-PMU-interrupt-IRQF_NO_THREAD.patch | 2 +- ...sched-Implement-lockless-wake-queues.patch | 167 +++++++++++++ ...arc64-use-generic-rwsem-spinlocks-rt.patch | 2 +- ...gefault_disable-levels-in-pagefault_.patch | 2 +- ...002-arm64-Allow-forced-irq-threading.patch | 2 +- ...002-futex-Implement-lockless-wakeups.patch | 182 ++++++++++++++ ...el-SRCU-provide-a-static-initializer.patch | 2 +- ...er-might_sleep-in-might_fault-with-d.patch | 2 +- ...highmem-add-a-already-used-pte-check.patch | 2 +- .../0003-arm-highmem-flush-tlb-on-unmap.patch | 2 +- ...that-uaccess-may-only-sleep-if-pagef.patch | 2 +- ...Implement-lockless-pipelined-wakeups.patch | 184 ++++++++++++++ ...sable-enable-preemption-in-kmap_atom.patch | 2 +- ...k-unlock-symetry-versus-pi_lock-and-.patch | 2 +- ...herent-relies-on-disabled-preemption.patch | 2 +- ..._disable-to-check-for-disabled-pagef.patch | 2 +- ...efault_disabled-to-check-for-disable.patch | 2 +- ...tomic_op_inuser-relies-on-disabled-p.patch | 2 +- ...tomic_cmpxchg_inatomic-relies-on-dis.patch | 2 +- ...ex_atomic_cmpxchg_inatomic-relies-on.patch | 2 +- ...ex_atomic_op_inuser-relies-on-disabl.patch | 2 +- ...at-preemption-doesn-t-have-to-be-dis.patch | 2 +- ...mips-properly-lock-access-to-the-fpu.patch | 2 +- ...-preemption-from-the-pagefault-logic.patch | 2 +- ...local_lock-not-__local_lock-for-soft.patch | 2 +- ...ne-__HAVE_ARCH_CMPXCHG-for-armv6-and.patch | 2 +- ...n-translation-section-permission-fau.patch | 2 +- ...se-instead-of-at-the-of-a-C-statemen.patch | 2 +- ...intk-drop-the-logbuf_lock-more-often.patch | 2 +- ...-mark-LAPIC-timer-handler-as-irqsafe.patch | 2 +- ...KVM-use-simple-waitqueue-for-vcpu-wq.patch | 2 +- ...isable-pushd-down-in-atomic_dec_and_.patch | 2 +- ...wsem-rt-Do-not-allow-readers-to-nest.patch | 2 +- ...y-ctor-until-the-object-is-requested.patch | 49 ++++ ...do-not-raise-softirq-unconditionally.patch | 2 +- ...acpi_gbl_hardware-lock-back-to-a-raw.patch | 2 +- ...on-in-recursive-migrate_disable-call.patch | 6 +- .../arch-arm64-Add-lazy-preempt-support.patch | 2 +- ...ove-irq-handler-when-clock-is-unused.patch | 2 +- ...-tclib-default-to-tclib-timer-for-rt.patch | 2 +- .../all/rt/arm-convert-boot-lock-to-raw.patch | 2 +- .../all/rt/arm-disable-highmem-on-rt.patch | 2 +- .../all/rt/arm-enable-highmem-for-rt.patch | 2 +- .../all/rt/arm-preempt-lazy-support.patch | 2 +- .../all/rt/arm-unwind-use_raw_lock.patch | 2 +- .../rt/ata-disable-interrupts-if-non-rt.patch | 2 +- ...ne-notifier-to-POST_D.patchto-POST_D.patch | 2 +- .../all/rt/block-blk-mq-use-swait.patch | 2 +- ...k-mq-don-t-complete-requests-via-IPI.patch | 2 +- .../rt/block-mq-drop-per-ctx-cpu_lock.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 +- .../all/rt/bug-rt-dependend-variants.patch | 2 +- ...heduling-while-atomic-in-cgroup-code.patch | 2 +- ...roups-use-simple-wait-in-css_release.patch | 2 +- ...source-tclib-allow-higher-clockrates.patch | 2 +- .../completion-use-simple-wait-queues.patch | 6 +- .../all/rt/cond-resched-lock-rt-tweak.patch | 4 +- .../all/rt/cond-resched-softirq-rt.patch | 8 +- ...igration_disable-on-lock-acquisition.patch | 2 +- ...ument-why-PREEMPT_RT-uses-a-spinlock.patch | 2 +- ...tplug-lock-a-sleeping-spinlock-on-rt.patch | 2 +- .../all/rt/cpu-rt-rework-cpu-down.patch | 12 +- .../features/all/rt/cpu-rt-variants.patch | 2 +- ...-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch | 2 +- .../cpu_down_move_migrate_enable_back.patch | 2 +- ...rop-K8-s-driver-from-beeing-selected.patch | 2 +- .../rt/cpumask-disable-offstack-on-rt.patch | 2 +- ...-preempt-disabled-regions-more-algos.patch | 2 +- .../features/all/rt/debugobjects-rt.patch | 2 +- .../features/all/rt/dm-make-rt-aware.patch | 2 +- .../drivers-net-8139-disable-irq-nosync.patch | 2 +- .../rt/drivers-net-fix-livelock-issues.patch | 2 +- ...rivers-net-vortex-fix-locking-issues.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 +- ...op-trace_i915_gem_ring_dispatch-onrt.patch | 2 +- .../all/rt/early-printk-consolidate.patch | 2 +- .../all/rt/epoll-use-get-cpu-light.patch | 2 +- .../all/rt/fix-rt-int3-x86_32-3.2-rt.patch | 2 +- .../all/rt/fixup_opencoded_completions.patch | 2 +- .../all/rt/fs-aio-simple-simple-work.patch | 2 +- .../features/all/rt/fs-block-rt-support.patch | 2 +- ...cache-use-cpu-chill-in-trylock-loops.patch | 2 +- ...jbd-pull-plug-when-waiting-for-space.patch | 2 +- .../all/rt/fs-jbd-replace-bh_state-lock.patch | 2 +- ...ull-your-plug-when-waiting-for-space.patch | 2 +- .../all/rt/fs-namespace-preemption-fix.patch | 2 +- .../rt/fs-ntfs-disable-interrupt-non-rt.patch | 2 +- .../fs-replace-bh_uptodate_lock-for-rt.patch | 2 +- .../rt/ftrace-migrate-disable-tracing.patch | 2 +- ...le-wake-up-in-PI-futex-wait-wake-on-.patch | 225 ++++++++++++++++++ .../all/rt/futex-requeue-pi-fix.patch | 4 +- .../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 +- .../all/rt/genirq-nodebug-shirq.patch | 2 +- .../gpio-omap-use-raw-locks-for-locking.patch | 2 +- ...cpus_allowed_ptr-in-sync_unplug_thre.patch | 2 +- .../rt/hotplug-light-get-online-cpus.patch | 2 +- ...ync_unplug-no-27-5cn-27-in-task-name.patch | 2 +- .../all/rt/hotplug-use-migrate-disable.patch | 2 +- ...-schedule_work-call-to-helper-thread.patch | 2 +- ...timer-callback-changes-for-preempt-r.patch | 2 +- ...raise-softirq-if-hrtimer-irq-stalled.patch | 2 +- .../rt/hrtimers-prepare-full-preemption.patch | 2 +- ...on-t-ignore-threshold-module-paramet.patch | 2 +- ...pdate-hwlat_detector-to-add-outer-lo.patch | 2 +- ...r-Use-thread-instead-of-stop-machine.patch | 2 +- ...r-Use-trace_clock_local-if-available.patch | 2 +- .../patches/features/all/rt/hwlatdetect.patch | 2 +- ...-omap-drop-the-lock-hard-irq-context.patch | 2 +- ...ng-from-i915-when-running-on-PREEMPT.patch | 2 +- .../features/all/rt/i915_compile_fix.patch | 2 +- .../rt/ide-use-nort-local-irq-variants.patch | 2 +- .../idr-use-local-lock-for-protection.patch | 2 +- .../infiniband-mellanox-ib-use-nort-irq.patch | 2 +- .../rt/inpt-gameport-use-local-irq-nort.patch | 2 +- .../features/all/rt/ipc-make-rt-aware.patch | 27 +-- ...critical-section-to-avoid-a-deadlock.patch | 65 ----- .../rt/ipc-sem-rework-semaphore-wakeups.patch | 2 +- ...irq-processing-in-irq-thread-context.patch | 2 +- ...cess-to-hirq_work_list-in-PREEMPT_RT.patch | 2 +- ...low-certain-work-in-hard-irq-context.patch | 2 +- ..._non-immediate_irq_work_to_ksoftirqd.patch | 2 +- .../features/all/rt/jump-label-rt.patch | 48 ++-- .../rt/kconfig-disable-a-few-options-rt.patch | 2 +- .../all/rt/kconfig-preempt-rt-full.patch | 2 +- ...pu-down-problem-if-kthread-s-cpu-is-.patch | 2 +- ...restore-original-cpu-mask-oncpu-down.patch | 2 +- ...timer-be-non-freezeable-in-cpu_chill.patch | 2 +- .../kernel-irq_work-fix-no_hz-deadlock.patch | 2 +- .../rt/kernel-irq_work-fix-non-RT-case.patch | 2 +- .../all/rt/kgb-serial-hackaround.patch | 2 +- .../features/all/rt/latency-hist.patch | 4 +- ...ds-trigger-disable-CPU-trigger-on-RT.patch | 2 +- .../patches/features/all/rt/lglocks-rt.patch | 2 +- ..._bl.h-make-list-head-locking-RT-safe.patch | 2 +- .../rt/local-irq-rt-depending-variants.patch | 2 +- .../patches/features/all/rt/local-var.patch | 2 +- .../all/rt/local-vars-migrate-disable.patch | 2 +- .../features/all/rt/localversion.patch | 4 +- .../lockdep-no-softirq-accounting-on-rt.patch | 2 +- ...-fix-warnings-due-to-missing-PREEMPT.patch | 2 +- ...ardirq-context-test-for-raw-spinlock.patch | 2 +- .../all/rt/locking-rt-provide-__up_read.patch | 66 +++++ ..._mutex-fix-ww_mutex-vs-self-deadlock.patch | 12 +- .../features/all/rt/md-disable-bcache.patch | 2 +- .../md-raid5-percpu-handling-rt-aware.patch | 2 +- .../all/rt/migrate-disable-rt-variant.patch | 2 +- ...pushd-down-in-atomic_dec_and_spin_lo.patch | 2 +- ...pushd-down-in-rt_spin_trylock_irqsav.patch | 2 +- ...pushd-down-in-rt_write_trylock_irqsa.patch | 2 +- .../all/rt/mips-disable-highmem-on-rt.patch | 2 +- .../rt/mips-enable-interrupts-in-signal.patch | 2 +- .../rt/mm-bounce-local-irq-save-nort.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 +- ...n-t-call-schedule_work_on-in-preempt.patch | 2 +- .../rt/mm-memcontrol-do_not_disable_irq.patch | 2 +- .../mm-page-alloc-use-list-last-entry.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 +- .../rt/mm-protect-activate-switch-mm.patch | 2 +- .../all/rt/mm-rt-kmap-atomic-scheduling.patch | 4 +- ...-scatterlist-dont-disable-irqs-on-RT.patch | 2 +- ...b-initialization-into-irq-enabled-re.patch | 169 +++++++++++++ .../all/rt/mm-vmalloc-use-get-cpu-light.patch | 2 +- ...-not-protect-workingset_shadow_nodes.patch | 2 +- ...sdhci-don-t-provide-hard-irq-handler.patch | 2 +- .../all/rt/mmci-remove-bogus-irq-save.patch | 2 +- .../move_sched_delayed_work_to_helper.patch | 2 +- .../features/all/rt/mutex-no-spin-on-rt.patch | 2 +- ...al-irq-disable-alloc-atomic-headache.patch | 2 +- ...ble-xt-write-recseq-begin-rt-fallout.patch | 2 +- .../all/rt/net-flip-lock-dep-thingy.patch | 2 +- ...et-gianfar-do-not-disable-interrupts.patch | 2 +- .../net-make-devnet_rename_seq-a-mutex.patch | 2 +- ...net-netif-rx-ni-use-local-bh-disable.patch | 2 +- .../rt/net-netif_rx_ni-migrate-disable.patch | 2 +- ...activate_many-use-msleep-1-instead-o.patch | 2 +- .../net-tx-action-avoid-livelock-on-rt.patch | 2 +- .../features/all/rt/net-use-cpu-chill.patch | 2 +- .../all/rt/net-wireless-warn-nort.patch | 2 +- .../features/all/rt/oleg-signal-rt-fix.patch | 4 +- .../all/rt/panic-disable-random-on-rt.patch | 2 +- ...ce-rcu-bh-qs-where-safe-from-softirq.patch | 2 +- .../pci-access-use-__wake_up_all_locked.patch | 2 +- .../all/rt/percpu-rwsem-compilefix.patch | 28 --- .../all/rt/percpu_ida-use-locklocks.patch | 2 +- .../perf-make-swevent-hrtimer-irqsafe.patch | 2 +- .../perf-move-irq-work-to-softirq-in-rt.patch | 2 +- ...eter_zijlstra-frob-migrate_disable-2.patch | 14 +- .../peter_zijlstra-frob-migrate_disable.patch | 10 +- .../all/rt/peter_zijlstra-frob-rcu.patch | 2 +- .../all/rt/peterz-srcu-crypto-chain.patch | 2 +- .../all/rt/pid-h-include-atomic-h.patch | 2 +- .../patches/features/all/rt/ping-sysrq.patch | 2 +- ...id-wakeups-when-no-timers-are-active.patch | 2 +- .../all/rt/posix-timers-no-broadcast.patch | 2 +- ...six-timers-shorten-cpu-timers-thread.patch | 2 +- ...timers-thread-posix-cpu-timers-on-rt.patch | 4 +- .../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 | 18 +- .../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 | 12 +- .../features/all/rt/radix-tree-rt-aware.patch | 2 +- .../all/rt/random-make-it-work-on-rt.patch | 2 +- ...nate-softirq-processing-from-rcutree.patch | 2 +- .../rt/rcu-disable-rcu-fast-no-hz-on-rt.patch | 2 +- .../rt/rcu-make-RCU_BOOST-default-on-RT.patch | 2 +- ...merge-rcu-bh-into-rcu-preempt-for-rt.patch | 2 +- .../all/rt/rcu-more-swait-conversions.patch | 2 +- .../features/all/rt/rcu-tiny-merge-bh.patch | 2 +- ...s-disable-irq-while-calling-rcu_pree.patch | 2 +- ...ate_disable-race-with-cpu-hotplug-3f.patch | 2 +- ...l-arm-coredump-fails-for-cpu-3e-3d-4.patch | 2 +- ...ate_disable-pushdown-to-rt_read_lock.patch | 2 +- .../all/rt/relay-fix-timer-madness.patch | 2 +- ...necessary-do-while-0-in-read-write-_.patch | 2 +- ..._chill-use-hrtimer-instead-of-msleep.patch | 2 +- .../features/all/rt/rt-add-rt-locks.patch | 2 +- .../rt/rt-add-rt-spinlock-to-headers.patch | 2 +- .../all/rt/rt-add-rt-to-mutex-headers.patch | 2 +- .../all/rt/rt-introduce-cpu-chill.patch | 2 +- .../features/all/rt/rt-local-irq-lock.patch | 2 +- ...mutex-add-sleeping-spinlocks-support.patch | 16 +- ...ll-fix-nohz_full-for-PREEMPT_RT_FULL.patch | 4 +- .../all/rt/rt-preempt-base-config.patch | 2 +- .../all/rt/rt-rw-lockdep-annotations.patch | 2 +- ...o-not-compare-cpu-masks-in-scheduler.patch | 4 +- ...grate_disable-ignore-bounded-threads.patch | 8 +- ...actual-migration-disalbe-to-schedule.patch | 10 +- .../features/all/rt/rt-serial-warn-fix.patch | 2 +- ...acing-show-padding-as-unsigned-short.patch | 2 +- ...rtmutex-add-a-first-shot-of-ww_mutex.patch | 26 +- .../all/rt/rtmutex-avoid-include-hell.patch | 2 +- ...eadlock-detection-in-ww_mutex_lock-f.patch | 6 +- .../all/rt/rtmutex-futex-prepare-rt.patch | 18 +- .../all/rt/rtmutex-lock-killable.patch | 4 +- ...a-trylock-for-waiter-lock-in-trylock.patch | 4 +- ...ock_interruptible_lockdep_annotation.patch | 6 +- ...rtmutex.c-Fix-incorrect-waiter-check.patch | 2 +- ...sable-migration-before-taking-a-lock.patch | 2 +- .../all/rt/rwsem-add-rt-variant.patch | 2 +- ...wsem-rt-Do-not-allow-readers-to-nest.patch | 2 +- ...t-t-disable-interrupts-in-qc_issue-h.patch | 2 +- ...clear-pf-thread-bound-on-fallback-rq.patch | 4 +- ...line-dl_task_timer-has-to-be-irqsafe.patch | 2 +- .../all/rt/sched-delay-put-task.patch | 8 +- .../sched-disable-rt-group-sched-on-rt.patch | 2 +- .../all/rt/sched-disable-ttwu-queue.patch | 2 +- ...taffinity-flag-in-select_fallback_rq.patch | 4 +- ...late-hweight-in-update_migrate_disab.patch | 4 +- .../all/rt/sched-limit-nr-migrate.patch | 2 +- ...might-sleep-do-not-account-rcu-depth.patch | 4 +- .../all/rt/sched-migrate-disable.patch | 14 +- .../all/rt/sched-mmdrop-delayed.patch | 12 +- .../sched-rt-fix-migrate_enable-thinko.patch | 4 +- .../all/rt/sched-rt-mutex-wakeup.patch | 10 +- ...igrate_disable-about-atomic-contexts.patch | 8 +- ...twu-ensure-success-return-is-correct.patch | 4 +- ...Only-wake-up-idle-workers-if-not-blo.patch | 4 +- .../features/all/rt/scsi-fcoe-rt-aware.patch | 2 +- ...function-called-from-invalid-context.patch | 2 +- ...ate-spin_lock-unlock-waiting-with-sp.patch | 2 +- .../rt/seqlock-prevent-rt-starvation.patch | 2 +- .../all/rt/signal-fix-up-rcu-wreckage.patch | 2 +- .../signal-revert-ptrace-preempt-magic.patch | 2 +- ...t-tasks-to-cache-one-sigqueue-struct.patch | 4 +- ...me-and-export-the-equivalent-of-wait.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 +- .../all/rt/slub_delay_ctor_on_rt.patch | 2 +- ...pcm_stream_lock-irqs_disabled-splats.patch | 2 +- ...ohz-pending-debug-code-to-new-scheme.patch | 2 +- ...oftirq-disable-softirq-stacks-for-rt.patch | 2 +- ...lock-after-per-cpu-section-is-set-up.patch | 2 +- .../features/all/rt/softirq-local-lock.patch | 4 +- .../features/all/rt/softirq-make-fifo.patch | 2 +- ...able-enable-conditioned-on-softirq_n.patch | 2 +- ...rq-make-serving-softirqs-a-task-flag.patch | 4 +- .../all/rt/softirq-preempt-fix-3-re.patch | 2 +- .../rt/softirq-sanitize-softirq-pending.patch | 2 +- .../rt/softirq-split-handling-function.patch | 2 +- .../features/all/rt/softirq-split-locks.patch | 4 +- .../all/rt/softirq-split-out-code.patch | 2 +- .../all/rt/softirq-thread-do-softirq.patch | 2 +- ...sparc-provide-EARLY_PRINTK-for-SPARC.patch | 2 +- .../all/rt/spinlock-types-separate-raw.patch | 2 +- ...eate-lg_global_trylock_relax-primiti.patch | 2 +- .../all/rt/stomp-machine-raw-lock.patch | 2 +- ...e-lg_global_trylock_relax-to-dead-wi.patch | 2 +- ...nvert-stop_machine_run-to-PREEMPT_RT.patch | 2 +- ...vc_xprt_do_enqueue-use-get_cpu_light.patch | 2 +- .../suspend-prevernt-might-sleep-splats.patch | 2 +- .../all/rt/sysctl-include-atomic-h.patch | 2 +- .../all/rt/sysfs-realtime-entry.patch | 2 +- ...-from-going-into-infinite-spin-in-rt.patch | 2 +- .../tasklist-lock-fix-section-conflict.patch | 2 +- ...rmal-Defer-thermal-wakups-to-threads.patch | 2 +- .../rt/timekeeping-split-jiffies-lock.patch | 2 +- ...er-Raise-softirq-if-there-s-irq_work.patch | 2 +- ...-waking-softirqs-from-the-jiffy-tick.patch | 2 +- .../rt/timer-do-not-spin_trylock-on-UP.patch | 2 +- .../all/rt/timer-fd-avoid-live-lock.patch | 2 +- ...e-idle-trylock-in-get-next-timer-irq.patch | 2 +- ...raise-the-softirq-if-there-s-irq_wor.patch | 2 +- ...id-the-base-null-otptimization-on-rt.patch | 2 +- ...do-not-raise-softirq-unconditionally.patch | 2 +- .../all/rt/timers-drop-try-lock.patch | 46 ++++ .../all/rt/timers-preempt-rt-support.patch | 2 +- ...-prepare-for-full-preemption-improve.patch | 2 +- .../timers-prepare-for-full-preemption.patch | 6 +- ...-for-preempt-off-in-preempt_schedule.patch | 4 +- .../all/rt/treercu-use-simple-waitqueue.patch | 2 +- ...ove-preemption-disabling-in-netif_rx.patch | 2 +- .../all/rt/usb-use-_nort-in-giveback.patch | 2 +- .../use-local-spin_locks-in-local_lock.patch | 2 +- .../all/rt/user-use-local-irq-nort.patch | 2 +- .../rt/vtime-split-lock-and-seqcount.patch | 4 +- .../all/rt/wait-simple-implementation.patch | 2 +- .../wait-simple-rework-for-completions.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 | 14 +- .../rt/workqueue-prevent-deadlock-stall.patch | 6 +- .../all/rt/workqueue-use-locallock.patch | 2 +- .../features/all/rt/workqueue-use-rcu.patch | 2 +- ...te_disable-pushdown-to-rt_write_lock.patch | 2 +- .../rt/x86-UV-raw_spinlock-conversion.patch | 2 +- ...ypto-reduce-preempt-disabled-regions.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 | 2 +- ...-mce-use-swait-queue-for-mce-wakeups.patch | 2 +- .../features/all/rt/x86-preempt-lazy.patch | 2 +- .../rt/x86-stackprot-no-random-on-rt.patch | 2 +- .../rt/x86-use-gen-rwsem-spinlocks-rt.patch | 2 +- ...Disable-percpu-SB-on-PREEMPT_RT_FULL.patch | 2 +- debian/patches/series-rt | 10 +- 357 files changed, 1612 insertions(+), 612 deletions(-) create mode 100644 debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch create mode 100644 debian/patches/features/all/rt/0002-futex-Implement-lockless-wakeups.patch create mode 100644 debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch create mode 100644 debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch create mode 100644 debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch delete mode 100644 debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch create mode 100644 debian/patches/features/all/rt/locking-rt-provide-__up_read.patch create mode 100644 debian/patches/features/all/rt/mm-slub-move-slab-initialization-into-irq-enabled-re.patch delete mode 100644 debian/patches/features/all/rt/percpu-rwsem-compilefix.patch create mode 100644 debian/patches/features/all/rt/timers-drop-try-lock.patch diff --git a/debian/changelog b/debian/changelog index 9174cefcc..f2612c41e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +linux (4.0.8-2) UNRELEASED; urgency=medium + + * [rt] Update to 4.0.8-rt6 + + -- Uwe Kleine-König Tue, 21 Jul 2015 23:19:12 +0200 + linux (4.0.8-1) unstable; urgency=medium * New upstream stable update: diff --git a/debian/patches/features/all/rt/0001-arm64-Mark-PMU-interrupt-IRQF_NO_THREAD.patch b/debian/patches/features/all/rt/0001-arm64-Mark-PMU-interrupt-IRQF_NO_THREAD.patch index b3c5cd26c..5d4259e04 100644 --- a/debian/patches/features/all/rt/0001-arm64-Mark-PMU-interrupt-IRQF_NO_THREAD.patch +++ b/debian/patches/features/all/rt/0001-arm64-Mark-PMU-interrupt-IRQF_NO_THREAD.patch @@ -2,7 +2,7 @@ From d118bf15da869e555f5cd1d6f491f6f4c1b9df93 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Mon, 27 Apr 2015 22:53:08 +0200 Subject: [PATCH 1/3] arm64: Mark PMU interrupt IRQF_NO_THREAD -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Mark the PMU interrupts as non-threadable, as is the case with arch/arm: d9c3365 ARM: 7813/1: Mark pmu interupt IRQF_NO_THREAD diff --git a/debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch b/debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch new file mode 100644 index 000000000..dddf39f10 --- /dev/null +++ b/debian/patches/features/all/rt/0001-sched-Implement-lockless-wake-queues.patch @@ -0,0 +1,167 @@ +From 1fb321e7971c26d03e20a7f8d3bacc654c6abc5f Mon Sep 17 00:00:00 2001 +From: Peter Zijlstra +Date: Fri, 1 May 2015 08:27:50 -0700 +Subject: [PATCH 1/2] sched: Implement lockless wake-queues +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +This is useful for locking primitives that can effect multiple +wakeups per operation and want to avoid lock internal lock contention +by delaying the wakeups until we've released the lock internal locks. + +Alternatively it can be used to avoid issuing multiple wakeups, and +thus save a few cycles, in packet processing. Queue all target tasks +and wakeup once you've processed all packets. That way you avoid +waking the target task multiple times if there were multiple packets +for the same task. + +Properties of a wake_q are: +- Lockless, as queue head must reside on the stack. +- Being a queue, maintains wakeup order passed by the callers. This can + be important for otherwise, in scenarios where highly contended locks + could affect any reliance on lock fairness. +- A queued task cannot be added again until it is woken up. + +This patch adds the needed infrastructure into the scheduler code +and uses the new wake_list to delay the futex wakeups until +after we've released the hash bucket locks. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Peter Zijlstra (Intel) +[tweaks, adjustments, comments, etc.] +Signed-off-by: Davidlohr Bueso +Signed-off-by: Peter Zijlstra (Intel) +Acked-by: Thomas Gleixner +Cc: Borislav Petkov +Cc: Chris Mason +Cc: Davidlohr Bueso +Cc: George Spelvin +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Manfred Spraul +Cc: Sebastian Andrzej Siewior +Cc: Steven Rostedt +Link: http://lkml.kernel.org/r/1430494072-30283-2-git-send-email-dave@stgolabs.net +Signed-off-by: Ingo Molnar +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/sched.h | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + kernel/sched/core.c | 46 ++++++++++++++++++++++++++++++++++++++++++++++ + 2 files changed, 92 insertions(+) + +--- a/include/linux/sched.h ++++ b/include/linux/sched.h +@@ -907,6 +907,50 @@ enum cpu_idle_type { + #define SCHED_CAPACITY_SCALE (1L << SCHED_CAPACITY_SHIFT) + + /* ++ * Wake-queues are lists of tasks with a pending wakeup, whose ++ * callers have already marked the task as woken internally, ++ * and can thus carry on. A common use case is being able to ++ * do the wakeups once the corresponding user lock as been ++ * released. ++ * ++ * We hold reference to each task in the list across the wakeup, ++ * thus guaranteeing that the memory is still valid by the time ++ * the actual wakeups are performed in wake_up_q(). ++ * ++ * One per task suffices, because there's never a need for a task to be ++ * in two wake queues simultaneously; it is forbidden to abandon a task ++ * in a wake queue (a call to wake_up_q() _must_ follow), so if a task is ++ * already in a wake queue, the wakeup will happen soon and the second ++ * waker can just skip it. ++ * ++ * The WAKE_Q macro declares and initializes the list head. ++ * wake_up_q() does NOT reinitialize the list; it's expected to be ++ * called near the end of a function, where the fact that the queue is ++ * not used again will be easy to see by inspection. ++ * ++ * Note that this can cause spurious wakeups. schedule() callers ++ * must ensure the call is done inside a loop, confirming that the ++ * wakeup condition has in fact occurred. ++ */ ++struct wake_q_node { ++ struct wake_q_node *next; ++}; ++ ++struct wake_q_head { ++ struct wake_q_node *first; ++ struct wake_q_node **lastp; ++}; ++ ++#define WAKE_Q_TAIL ((struct wake_q_node *) 0x01) ++ ++#define WAKE_Q(name) \ ++ struct wake_q_head name = { WAKE_Q_TAIL, &name.first } ++ ++extern void wake_q_add(struct wake_q_head *head, ++ struct task_struct *task); ++extern void wake_up_q(struct wake_q_head *head); ++ ++/* + * sched-domains (multiprocessor balancing) declarations: + */ + #ifdef CONFIG_SMP +@@ -1505,6 +1549,8 @@ struct task_struct { + /* Protection of the PI data structures: */ + raw_spinlock_t pi_lock; + ++ struct wake_q_node wake_q; ++ + #ifdef CONFIG_RT_MUTEXES + /* PI waiters blocked on a rt_mutex held by this task */ + struct rb_root pi_waiters; +--- a/kernel/sched/core.c ++++ b/kernel/sched/core.c +@@ -538,6 +538,52 @@ static bool set_nr_if_polling(struct tas + #endif + #endif + ++void wake_q_add(struct wake_q_head *head, struct task_struct *task) ++{ ++ struct wake_q_node *node = &task->wake_q; ++ ++ /* ++ * Atomically grab the task, if ->wake_q is !nil already it means ++ * its already queued (either by us or someone else) and will get the ++ * wakeup due to that. ++ * ++ * This cmpxchg() implies a full barrier, which pairs with the write ++ * barrier implied by the wakeup in wake_up_list(). ++ */ ++ if (cmpxchg(&node->next, NULL, WAKE_Q_TAIL)) ++ return; ++ ++ get_task_struct(task); ++ ++ /* ++ * The head is context local, there can be no concurrency. ++ */ ++ *head->lastp = node; ++ head->lastp = &node->next; ++} ++ ++void wake_up_q(struct wake_q_head *head) ++{ ++ struct wake_q_node *node = head->first; ++ ++ while (node != WAKE_Q_TAIL) { ++ struct task_struct *task; ++ ++ task = container_of(node, struct task_struct, wake_q); ++ BUG_ON(!task); ++ /* task can safely be re-inserted now */ ++ node = node->next; ++ task->wake_q.next = NULL; ++ ++ /* ++ * wake_up_process() implies a wmb() to pair with the queueing ++ * in wake_q_add() so as not to miss wakeups. ++ */ ++ wake_up_process(task); ++ put_task_struct(task); ++ } ++} ++ + /* + * resched_curr - mark rq's current task 'to be rescheduled now'. + * diff --git a/debian/patches/features/all/rt/0001-sparc64-use-generic-rwsem-spinlocks-rt.patch b/debian/patches/features/all/rt/0001-sparc64-use-generic-rwsem-spinlocks-rt.patch index d12b3460e..a6cf0f84e 100644 --- a/debian/patches/features/all/rt/0001-sparc64-use-generic-rwsem-spinlocks-rt.patch +++ b/debian/patches/features/all/rt/0001-sparc64-use-generic-rwsem-spinlocks-rt.patch @@ -2,7 +2,7 @@ From d6a6675d436897cd1b09e299436df3499abd753e Mon Sep 17 00:00:00 2001 From: Allen Pais Date: Fri, 13 Dec 2013 09:44:41 +0530 Subject: [PATCH 1/3] sparc64: use generic rwsem spinlocks rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Allen Pais Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/0001-uaccess-count-pagefault_disable-levels-in-pagefault_.patch b/debian/patches/features/all/rt/0001-uaccess-count-pagefault_disable-levels-in-pagefault_.patch index 42932ecc2..83a96bd40 100644 --- a/debian/patches/features/all/rt/0001-uaccess-count-pagefault_disable-levels-in-pagefault_.patch +++ b/debian/patches/features/all/rt/0001-uaccess-count-pagefault_disable-levels-in-pagefault_.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:06 +0200 Subject: [PATCH 01/14] uaccess: count pagefault_disable() levels in pagefault_disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Until now, pagefault_disable()/pagefault_enabled() used the preempt count to track whether in an environment with pagefaults disabled (can diff --git a/debian/patches/features/all/rt/0002-arm64-Allow-forced-irq-threading.patch b/debian/patches/features/all/rt/0002-arm64-Allow-forced-irq-threading.patch index f334211b3..c1cf5ad28 100644 --- a/debian/patches/features/all/rt/0002-arm64-Allow-forced-irq-threading.patch +++ b/debian/patches/features/all/rt/0002-arm64-Allow-forced-irq-threading.patch @@ -2,7 +2,7 @@ From d76d3ed5cc944776ea2d42e5d49af58a86402f12 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Mon, 27 Apr 2015 22:53:09 +0200 Subject: [PATCH 2/3] arm64: Allow forced irq threading -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Now its safe to allow forced interrupt threading for arm64, all timer interrupts and the perf interrupt are marked NO_THREAD, as is diff --git a/debian/patches/features/all/rt/0002-futex-Implement-lockless-wakeups.patch b/debian/patches/features/all/rt/0002-futex-Implement-lockless-wakeups.patch new file mode 100644 index 000000000..d7e2f0f19 --- /dev/null +++ b/debian/patches/features/all/rt/0002-futex-Implement-lockless-wakeups.patch @@ -0,0 +1,182 @@ +From 783ec42143b22999b03f228d5658207136c1d945 Mon Sep 17 00:00:00 2001 +From: Davidlohr Bueso +Date: Fri, 1 May 2015 08:27:51 -0700 +Subject: [PATCH 2/2] futex: Implement lockless wakeups +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +Given the overall futex architecture, any chance of reducing +hb->lock contention is welcome. In this particular case, using +wake-queues to enable lockless wakeups addresses very much real +world performance concerns, even cases of soft-lockups in cases +of large amounts of blocked tasks (which is not hard to find in +large boxes, using but just a handful of futex). + +At the lowest level, this patch can reduce latency of a single thread +attempting to acquire hb->lock in highly contended scenarios by a +up to 2x. At lower counts of nr_wake there are no regressions, +confirming, of course, that the wake_q handling overhead is practically +non existent. For instance, while a fair amount of variation, +the extended pef-bench wakeup benchmark shows for a 20 core machine +the following avg per-thread time to wakeup its share of tasks: + + nr_thr ms-before ms-after + 16 0.0590 0.0215 + 32 0.0396 0.0220 + 48 0.0417 0.0182 + 64 0.0536 0.0236 + 80 0.0414 0.0097 + 96 0.0672 0.0152 + +Naturally, this can cause spurious wakeups. However there is no core code +that cannot handle them afaict, and furthermore tglx does have the point +that other events can already trigger them anyway. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Davidlohr Bueso +Signed-off-by: Peter Zijlstra (Intel) +Acked-by: Thomas Gleixner +Cc: Andrew Morton +Cc: Borislav Petkov +Cc: Chris Mason +Cc: Davidlohr Bueso +Cc: George Spelvin +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Manfred Spraul +Cc: Peter Zijlstra +Cc: Sebastian Andrzej Siewior +Cc: Steven Rostedt +Link: http://lkml.kernel.org/r/1430494072-30283-3-git-send-email-dave@stgolabs.net +Signed-off-by: Ingo Molnar +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/futex.c | 33 +++++++++++++++++---------------- + 1 file changed, 17 insertions(+), 16 deletions(-) + +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -1090,9 +1090,11 @@ static void __unqueue_futex(struct futex + + /* + * The hash bucket lock must be held when this is called. +- * Afterwards, the futex_q must not be accessed. ++ * Afterwards, the futex_q must not be accessed. Callers ++ * must ensure to later call wake_up_q() for the actual ++ * wakeups to occur. + */ +-static void wake_futex(struct futex_q *q) ++static void mark_wake_futex(struct wake_q_head *wake_q, struct futex_q *q) + { + struct task_struct *p = q->task; + +@@ -1100,14 +1102,10 @@ static void wake_futex(struct futex_q *q + return; + + /* +- * We set q->lock_ptr = NULL _before_ we wake up the task. If +- * a non-futex wake up happens on another CPU then the task +- * might exit and p would dereference a non-existing task +- * struct. Prevent this by holding a reference on p across the +- * wake up. ++ * Queue the task for later wakeup for after we've released ++ * the hb->lock. wake_q_add() grabs reference to p. + */ +- get_task_struct(p); +- ++ wake_q_add(wake_q, p); + __unqueue_futex(q); + /* + * The waiting task can free the futex_q as soon as +@@ -1117,9 +1115,6 @@ static void wake_futex(struct futex_q *q + */ + smp_wmb(); + q->lock_ptr = NULL; +- +- wake_up_state(p, TASK_NORMAL); +- put_task_struct(p); + } + + static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) +@@ -1217,6 +1212,7 @@ futex_wake(u32 __user *uaddr, unsigned i + struct futex_q *this, *next; + union futex_key key = FUTEX_KEY_INIT; + int ret; ++ WAKE_Q(wake_q); + + if (!bitset) + return -EINVAL; +@@ -1244,13 +1240,14 @@ futex_wake(u32 __user *uaddr, unsigned i + if (!(this->bitset & bitset)) + continue; + +- wake_futex(this); ++ mark_wake_futex(&wake_q, this); + if (++ret >= nr_wake) + break; + } + } + + spin_unlock(&hb->lock); ++ wake_up_q(&wake_q); + out_put_key: + put_futex_key(&key); + out: +@@ -1269,6 +1266,7 @@ futex_wake_op(u32 __user *uaddr1, unsign + struct futex_hash_bucket *hb1, *hb2; + struct futex_q *this, *next; + int ret, op_ret; ++ WAKE_Q(wake_q); + + retry: + ret = get_futex_key(uaddr1, flags & FLAGS_SHARED, &key1, VERIFY_READ); +@@ -1320,7 +1318,7 @@ futex_wake_op(u32 __user *uaddr1, unsign + ret = -EINVAL; + goto out_unlock; + } +- wake_futex(this); ++ mark_wake_futex(&wake_q, this); + if (++ret >= nr_wake) + break; + } +@@ -1334,7 +1332,7 @@ futex_wake_op(u32 __user *uaddr1, unsign + ret = -EINVAL; + goto out_unlock; + } +- wake_futex(this); ++ mark_wake_futex(&wake_q, this); + if (++op_ret >= nr_wake2) + break; + } +@@ -1344,6 +1342,7 @@ futex_wake_op(u32 __user *uaddr1, unsign + + out_unlock: + double_unlock_hb(hb1, hb2); ++ wake_up_q(&wake_q); + out_put_keys: + put_futex_key(&key2); + out_put_key1: +@@ -1503,6 +1502,7 @@ static int futex_requeue(u32 __user *uad + struct futex_pi_state *pi_state = NULL; + struct futex_hash_bucket *hb1, *hb2; + struct futex_q *this, *next; ++ WAKE_Q(wake_q); + + if (requeue_pi) { + /* +@@ -1679,7 +1679,7 @@ static int futex_requeue(u32 __user *uad + * woken by futex_unlock_pi(). + */ + if (++task_count <= nr_wake && !requeue_pi) { +- wake_futex(this); ++ mark_wake_futex(&wake_q, this); + continue; + } + +@@ -1719,6 +1719,7 @@ static int futex_requeue(u32 __user *uad + out_unlock: + free_pi_state(pi_state); + double_unlock_hb(hb1, hb2); ++ wake_up_q(&wake_q); + hb_waiters_dec(hb2); + + /* diff --git a/debian/patches/features/all/rt/0002-kernel-SRCU-provide-a-static-initializer.patch b/debian/patches/features/all/rt/0002-kernel-SRCU-provide-a-static-initializer.patch index 83a1d7818..04f5620ef 100644 --- a/debian/patches/features/all/rt/0002-kernel-SRCU-provide-a-static-initializer.patch +++ b/debian/patches/features/all/rt/0002-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: [PATCH] kernel/SRCU: provide a static initializer -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/0002-mm-uaccess-trigger-might_sleep-in-might_fault-with-d.patch b/debian/patches/features/all/rt/0002-mm-uaccess-trigger-might_sleep-in-might_fault-with-d.patch index aa86f6286..afaa70e29 100644 --- a/debian/patches/features/all/rt/0002-mm-uaccess-trigger-might_sleep-in-might_fault-with-d.patch +++ b/debian/patches/features/all/rt/0002-mm-uaccess-trigger-might_sleep-in-might_fault-with-d.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:07 +0200 Subject: [PATCH 02/14] mm, uaccess: trigger might_sleep() in might_fault() with disabled pagefaults -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Commit 662bbcb2747c ("mm, sched: Allow uaccess in atomic with pagefault_disable()") removed might_sleep() checks for all user access diff --git a/debian/patches/features/all/rt/0002-x86-highmem-add-a-already-used-pte-check.patch b/debian/patches/features/all/rt/0002-x86-highmem-add-a-already-used-pte-check.patch index 3d79d7033..4bcaad9fe 100644 --- a/debian/patches/features/all/rt/0002-x86-highmem-add-a-already-used-pte-check.patch +++ b/debian/patches/features/all/rt/0002-x86-highmem-add-a-already-used-pte-check.patch @@ -2,7 +2,7 @@ From 65513f34449eedb6b84c24a3583266534c1627e4 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 17:09:55 +0100 Subject: [PATCH 2/6] x86/highmem: add a "already used pte" check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This is a copy from kmap_atomic_prot(). diff --git a/debian/patches/features/all/rt/0003-arm-highmem-flush-tlb-on-unmap.patch b/debian/patches/features/all/rt/0003-arm-highmem-flush-tlb-on-unmap.patch index cec86045b..1855e5251 100644 --- a/debian/patches/features/all/rt/0003-arm-highmem-flush-tlb-on-unmap.patch +++ b/debian/patches/features/all/rt/0003-arm-highmem-flush-tlb-on-unmap.patch @@ -2,7 +2,7 @@ From e2ca4d092d9c6e6b07b465b4d81da207bbcc7437 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 11 Mar 2013 21:37:27 +0100 Subject: [PATCH 3/6] arm/highmem: flush tlb on unmap -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/0003-uaccess-clarify-that-uaccess-may-only-sleep-if-pagef.patch b/debian/patches/features/all/rt/0003-uaccess-clarify-that-uaccess-may-only-sleep-if-pagef.patch index d95552311..c9a622e83 100644 --- a/debian/patches/features/all/rt/0003-uaccess-clarify-that-uaccess-may-only-sleep-if-pagef.patch +++ b/debian/patches/features/all/rt/0003-uaccess-clarify-that-uaccess-may-only-sleep-if-pagef.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:08 +0200 Subject: [PATCH 03/14] uaccess: clarify that uaccess may only sleep if pagefaults are enabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz In general, non-atomic variants of user access functions must not sleep if pagefaults are disabled. diff --git a/debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch b/debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch new file mode 100644 index 000000000..0592db5c2 --- /dev/null +++ b/debian/patches/features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch @@ -0,0 +1,184 @@ +From fa6004ad4528153b699a4d5ce5ea6b33acce74cc Mon Sep 17 00:00:00 2001 +From: Davidlohr Bueso +Date: Mon, 4 May 2015 07:02:46 -0700 +Subject: [PATCH 4/4] ipc/mqueue: Implement lockless pipelined wakeups +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +This patch moves the wakeup_process() invocation so it is not done under +the info->lock by making use of a lockless wake_q. With this change, the +waiter is woken up once it is STATE_READY and it does not need to loop +on SMP if it is still in STATE_PENDING. In the timeout case we still need +to grab the info->lock to verify the state. + +This change should also avoid the introduction of preempt_disable() in -rt +which avoids a busy-loop which pools for the STATE_PENDING -> STATE_READY +change if the waiter has a higher priority compared to the waker. + +Additionally, this patch micro-optimizes wq_sleep by using the cheaper +cousin of set_current_state(TASK_INTERRUPTABLE) as we will block no +matter what, thus get rid of the implied barrier. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Davidlohr Bueso +Signed-off-by: Peter Zijlstra (Intel) +Acked-by: George Spelvin +Acked-by: Thomas Gleixner +Cc: Andrew Morton +Cc: Borislav Petkov +Cc: Chris Mason +Cc: H. Peter Anvin +Cc: Linus Torvalds +Cc: Manfred Spraul +Cc: Peter Zijlstra +Cc: Sebastian Andrzej Siewior +Cc: Steven Rostedt +Cc: dave@stgolabs.net +Link: http://lkml.kernel.org/r/1430748166.1940.17.camel@stgolabs.net +Signed-off-by: Ingo Molnar +Signed-off-by: Sebastian Andrzej Siewior +--- + ipc/mqueue.c | 54 +++++++++++++++++++++++++++++++++--------------------- + 1 file changed, 33 insertions(+), 21 deletions(-) + +--- a/ipc/mqueue.c ++++ b/ipc/mqueue.c +@@ -47,8 +47,7 @@ + #define RECV 1 + + #define STATE_NONE 0 +-#define STATE_PENDING 1 +-#define STATE_READY 2 ++#define STATE_READY 1 + + struct posix_msg_tree_node { + struct rb_node rb_node; +@@ -571,15 +570,12 @@ static int wq_sleep(struct mqueue_inode_ + wq_add(info, sr, ewp); + + for (;;) { +- set_current_state(TASK_INTERRUPTIBLE); ++ __set_current_state(TASK_INTERRUPTIBLE); + + spin_unlock(&info->lock); + time = schedule_hrtimeout_range_clock(timeout, 0, + HRTIMER_MODE_ABS, CLOCK_REALTIME); + +- while (ewp->state == STATE_PENDING) +- cpu_relax(); +- + if (ewp->state == STATE_READY) { + retval = 0; + goto out; +@@ -907,11 +903,15 @@ SYSCALL_DEFINE1(mq_unlink, const char __ + * list of waiting receivers. A sender checks that list before adding the new + * message into the message array. If there is a waiting receiver, then it + * bypasses the message array and directly hands the message over to the +- * receiver. +- * The receiver accepts the message and returns without grabbing the queue +- * spinlock. Therefore an intermediate STATE_PENDING state and memory barriers +- * are necessary. The same algorithm is used for sysv semaphores, see +- * ipc/sem.c for more details. ++ * receiver. The receiver accepts the message and returns without grabbing the ++ * queue spinlock: ++ * ++ * - Set pointer to message. ++ * - Queue the receiver task for later wakeup (without the info->lock). ++ * - Update its state to STATE_READY. Now the receiver can continue. ++ * - Wake up the process after the lock is dropped. Should the process wake up ++ * before this wakeup (due to a timeout or a signal) it will either see ++ * STATE_READY and continue or acquire the lock to check the state again. + * + * The same algorithm is used for senders. + */ +@@ -919,21 +919,29 @@ SYSCALL_DEFINE1(mq_unlink, const char __ + /* pipelined_send() - send a message directly to the task waiting in + * sys_mq_timedreceive() (without inserting message into a queue). + */ +-static inline void pipelined_send(struct mqueue_inode_info *info, ++static inline void pipelined_send(struct wake_q_head *wake_q, ++ struct mqueue_inode_info *info, + struct msg_msg *message, + struct ext_wait_queue *receiver) + { + receiver->msg = message; + list_del(&receiver->list); +- receiver->state = STATE_PENDING; +- wake_up_process(receiver->task); +- smp_wmb(); ++ wake_q_add(wake_q, receiver->task); ++ /* ++ * Rely on the implicit cmpxchg barrier from wake_q_add such ++ * that we can ensure that updating receiver->state is the last ++ * write operation: As once set, the receiver can continue, ++ * and if we don't have the reference count from the wake_q, ++ * yet, at that point we can later have a use-after-free ++ * condition and bogus wakeup. ++ */ + receiver->state = STATE_READY; + } + + /* pipelined_receive() - if there is task waiting in sys_mq_timedsend() + * gets its message and put to the queue (we have one free place for sure). */ +-static inline void pipelined_receive(struct mqueue_inode_info *info) ++static inline void pipelined_receive(struct wake_q_head *wake_q, ++ struct mqueue_inode_info *info) + { + struct ext_wait_queue *sender = wq_get_first_waiter(info, SEND); + +@@ -944,10 +952,9 @@ static inline void pipelined_receive(str + } + if (msg_insert(sender->msg, info)) + return; ++ + list_del(&sender->list); +- sender->state = STATE_PENDING; +- wake_up_process(sender->task); +- smp_wmb(); ++ wake_q_add(wake_q, sender->task); + sender->state = STATE_READY; + } + +@@ -965,6 +972,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd + struct timespec ts; + struct posix_msg_tree_node *new_leaf = NULL; + int ret = 0; ++ WAKE_Q(wake_q); + + if (u_abs_timeout) { + int res = prepare_timeout(u_abs_timeout, &expires, &ts); +@@ -1049,7 +1057,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd + } else { + receiver = wq_get_first_waiter(info, RECV); + if (receiver) { +- pipelined_send(info, msg_ptr, receiver); ++ pipelined_send(&wake_q, info, msg_ptr, receiver); + } else { + /* adds message to the queue */ + ret = msg_insert(msg_ptr, info); +@@ -1062,6 +1070,7 @@ SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqd + } + out_unlock: + spin_unlock(&info->lock); ++ wake_up_q(&wake_q); + out_free: + if (ret) + free_msg(msg_ptr); +@@ -1149,14 +1158,17 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t, + msg_ptr = wait.msg; + } + } else { ++ WAKE_Q(wake_q); ++ + msg_ptr = msg_get(info); + + inode->i_atime = inode->i_mtime = inode->i_ctime = + CURRENT_TIME; + + /* There is now free space in queue. */ +- pipelined_receive(info); ++ pipelined_receive(&wake_q, info); + spin_unlock(&info->lock); ++ wake_up_q(&wake_q); + ret = 0; + } + if (ret == 0) { diff --git a/debian/patches/features/all/rt/0004-mm-explicitly-disable-enable-preemption-in-kmap_atom.patch b/debian/patches/features/all/rt/0004-mm-explicitly-disable-enable-preemption-in-kmap_atom.patch index 61a20a14d..18d19bb4a 100644 --- a/debian/patches/features/all/rt/0004-mm-explicitly-disable-enable-preemption-in-kmap_atom.patch +++ b/debian/patches/features/all/rt/0004-mm-explicitly-disable-enable-preemption-in-kmap_atom.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:09 +0200 Subject: [PATCH 04/14] mm: explicitly disable/enable preemption in kmap_atomic_* -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The existing code relies on pagefault_disable() implicitly disabling preemption, so that no schedule will happen between kmap_atomic() and diff --git a/debian/patches/features/all/rt/0005-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch b/debian/patches/features/all/rt/0005-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch index 1f8646122..62b64ccad 100644 --- a/debian/patches/features/all/rt/0005-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch +++ b/debian/patches/features/all/rt/0005-futex-Ensure-lock-unlock-symetry-versus-pi_lock-and-.patch @@ -3,7 +3,7 @@ From: Thomas Gleixner Date: Fri, 1 Mar 2013 11:17:42 +0100 Subject: [PATCH 5/6] futex: Ensure lock/unlock symetry versus pi_lock and hash bucket lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz In exit_pi_state_list() we have the following locking construct: diff --git a/debian/patches/features/all/rt/0005-mips-kmap_coherent-relies-on-disabled-preemption.patch b/debian/patches/features/all/rt/0005-mips-kmap_coherent-relies-on-disabled-preemption.patch index c7609c1ab..63afc594a 100644 --- a/debian/patches/features/all/rt/0005-mips-kmap_coherent-relies-on-disabled-preemption.patch +++ b/debian/patches/features/all/rt/0005-mips-kmap_coherent-relies-on-disabled-preemption.patch @@ -2,7 +2,7 @@ From 91021aa7ea1469d0b3127e68d177e0ad58a7eda3 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 11 May 2015 17:52:10 +0200 Subject: [PATCH 05/14] mips: kmap_coherent relies on disabled preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz k(un)map_coherent relies on pagefault_disable() to also disable preemption. diff --git a/debian/patches/features/all/rt/0006-mm-use-pagefault_disable-to-check-for-disabled-pagef.patch b/debian/patches/features/all/rt/0006-mm-use-pagefault_disable-to-check-for-disabled-pagef.patch index f502a21d4..8bfa14ea5 100644 --- a/debian/patches/features/all/rt/0006-mm-use-pagefault_disable-to-check-for-disabled-pagef.patch +++ b/debian/patches/features/all/rt/0006-mm-use-pagefault_disable-to-check-for-disabled-pagef.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:11 +0200 Subject: [PATCH 06/14] mm: use pagefault_disable() to check for disabled pagefaults in the handler -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Introduce faulthandler_disabled() and use it to check for irq context and disabled pagefaults (via pagefault_disable()) in the pagefault handlers. diff --git a/debian/patches/features/all/rt/0007-drm-i915-use-pagefault_disabled-to-check-for-disable.patch b/debian/patches/features/all/rt/0007-drm-i915-use-pagefault_disabled-to-check-for-disable.patch index eb6eaf977..e690276e5 100644 --- a/debian/patches/features/all/rt/0007-drm-i915-use-pagefault_disabled-to-check-for-disable.patch +++ b/debian/patches/features/all/rt/0007-drm-i915-use-pagefault_disabled-to-check-for-disable.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:12 +0200 Subject: [PATCH 07/14] drm/i915: use pagefault_disabled() to check for disabled pagefaults -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Now that the pagefault disabled counter is in place, we can replace the in_atomic() check by a pagefault_disabled() checks. diff --git a/debian/patches/features/all/rt/0008-futex-UP-futex_atomic_op_inuser-relies-on-disabled-p.patch b/debian/patches/features/all/rt/0008-futex-UP-futex_atomic_op_inuser-relies-on-disabled-p.patch index b61a136d9..756a1b73b 100644 --- a/debian/patches/features/all/rt/0008-futex-UP-futex_atomic_op_inuser-relies-on-disabled-p.patch +++ b/debian/patches/features/all/rt/0008-futex-UP-futex_atomic_op_inuser-relies-on-disabled-p.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:13 +0200 Subject: [PATCH 08/14] futex: UP futex_atomic_op_inuser() relies on disabled preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Let's explicitly disable/enable preemption in the !CONFIG_SMP version of futex_atomic_op_inuser, to prepare for pagefault_disable() not diff --git a/debian/patches/features/all/rt/0009-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on-dis.patch b/debian/patches/features/all/rt/0009-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on-dis.patch index a0591d4bc..bc6c87864 100644 --- a/debian/patches/features/all/rt/0009-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on-dis.patch +++ b/debian/patches/features/all/rt/0009-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on-dis.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:14 +0200 Subject: [PATCH 09/14] futex: UP futex_atomic_cmpxchg_inatomic() relies on disabled preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Let's explicitly disable/enable preemption in the !CONFIG_SMP version of futex_atomic_cmpxchg_inatomic, to prepare for pagefault_disable() not diff --git a/debian/patches/features/all/rt/0010-arm-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on.patch b/debian/patches/features/all/rt/0010-arm-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on.patch index e33b0bb60..d388a0714 100644 --- a/debian/patches/features/all/rt/0010-arm-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on.patch +++ b/debian/patches/features/all/rt/0010-arm-futex-UP-futex_atomic_cmpxchg_inatomic-relies-on.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:15 +0200 Subject: [PATCH 10/14] arm/futex: UP futex_atomic_cmpxchg_inatomic() relies on disabled preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The !CONFIG_SMP implementation of futex_atomic_cmpxchg_inatomic() requires preemption to be disabled to guarantee mutual exclusion. diff --git a/debian/patches/features/all/rt/0011-arm-futex-UP-futex_atomic_op_inuser-relies-on-disabl.patch b/debian/patches/features/all/rt/0011-arm-futex-UP-futex_atomic_op_inuser-relies-on-disabl.patch index 2f019b044..a33636a48 100644 --- a/debian/patches/features/all/rt/0011-arm-futex-UP-futex_atomic_op_inuser-relies-on-disabl.patch +++ b/debian/patches/features/all/rt/0011-arm-futex-UP-futex_atomic_op_inuser-relies-on-disabl.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:16 +0200 Subject: [PATCH 11/14] arm/futex: UP futex_atomic_op_inuser() relies on disabled preemption -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The !CONFIG_SMP implementation of futex_atomic_op_inuser() seems to rely on disabled preemption to guarantee mutual exclusion. diff --git a/debian/patches/features/all/rt/0012-futex-clarify-that-preemption-doesn-t-have-to-be-dis.patch b/debian/patches/features/all/rt/0012-futex-clarify-that-preemption-doesn-t-have-to-be-dis.patch index 2cb9f8aa9..f0ed18a9b 100644 --- a/debian/patches/features/all/rt/0012-futex-clarify-that-preemption-doesn-t-have-to-be-dis.patch +++ b/debian/patches/features/all/rt/0012-futex-clarify-that-preemption-doesn-t-have-to-be-dis.patch @@ -3,7 +3,7 @@ From: David Hildenbrand Date: Mon, 11 May 2015 17:52:17 +0200 Subject: [PATCH 12/14] futex: clarify that preemption doesn't have to be disabled -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz As arm64 and arc have no special implementations for !CONFIG_SMP, mutual exclusion doesn't seem to rely on preemption. diff --git a/debian/patches/features/all/rt/0013-mips-properly-lock-access-to-the-fpu.patch b/debian/patches/features/all/rt/0013-mips-properly-lock-access-to-the-fpu.patch index e1a71a4b4..693ff103a 100644 --- a/debian/patches/features/all/rt/0013-mips-properly-lock-access-to-the-fpu.patch +++ b/debian/patches/features/all/rt/0013-mips-properly-lock-access-to-the-fpu.patch @@ -2,7 +2,7 @@ From 66ba6c9e2893bd2f7659286627b05c37312994db Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 11 May 2015 17:52:19 +0200 Subject: [PATCH 13/14] mips: properly lock access to the fpu -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Let's always disable preemption and pagefaults when locking the fpu, so we can be sure that the owner won't change in between. diff --git a/debian/patches/features/all/rt/0014-uaccess-decouple-preemption-from-the-pagefault-logic.patch b/debian/patches/features/all/rt/0014-uaccess-decouple-preemption-from-the-pagefault-logic.patch index 5dad4b7c1..3680f5a8a 100644 --- a/debian/patches/features/all/rt/0014-uaccess-decouple-preemption-from-the-pagefault-logic.patch +++ b/debian/patches/features/all/rt/0014-uaccess-decouple-preemption-from-the-pagefault-logic.patch @@ -2,7 +2,7 @@ From 573a49b98c80acdeb8f2b0e3990863a30900c2f7 Mon Sep 17 00:00:00 2001 From: David Hildenbrand Date: Mon, 11 May 2015 17:52:20 +0200 Subject: [PATCH 14/14] uaccess: decouple preemption from the pagefault logic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz As the fault handlers now all rely on the pagefault_disabled() checks and implicit preempt_disable() calls by pagefault_disable() have been diff --git a/debian/patches/features/all/rt/API-cleanup-use-local_lock-not-__local_lock-for-soft.patch b/debian/patches/features/all/rt/API-cleanup-use-local_lock-not-__local_lock-for-soft.patch index a36a636d5..e1d177eb2 100644 --- a/debian/patches/features/all/rt/API-cleanup-use-local_lock-not-__local_lock-for-soft.patch +++ b/debian/patches/features/all/rt/API-cleanup-use-local_lock-not-__local_lock-for-soft.patch @@ -2,7 +2,7 @@ From 116a588e1e4b108bfd01b5ae8de602c12aec3323 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 17 Jan 2014 20:44:03 +0100 Subject: [PATCH 7/7] API cleanup - use local_lock not __local_lock for soft -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz trivial API cleanup - kernel/softirq.c was mimiking local_lock. diff --git a/debian/patches/features/all/rt/ARM-cmpxchg-define-__HAVE_ARCH_CMPXCHG-for-armv6-and.patch b/debian/patches/features/all/rt/ARM-cmpxchg-define-__HAVE_ARCH_CMPXCHG-for-armv6-and.patch index 704e3b9e2..3d6b3e778 100644 --- a/debian/patches/features/all/rt/ARM-cmpxchg-define-__HAVE_ARCH_CMPXCHG-for-armv6-and.patch +++ b/debian/patches/features/all/rt/ARM-cmpxchg-define-__HAVE_ARCH_CMPXCHG-for-armv6-and.patch @@ -3,7 +3,7 @@ From: Yong Zhang Date: Thu, 29 Jan 2015 12:56:18 -0600 Subject: [PATCH] ARM: cmpxchg: define __HAVE_ARCH_CMPXCHG for armv6 and later -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Both pi_stress and sigwaittest in rt-test show performance gain with __HAVE_ARCH_CMPXCHG. Testing result on coretile_express_a9x4: 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 be2796833..a34b7a2df 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 @@ -6,7 +6,7 @@ Subject: [PATCH] ARM: enable irq in translation/section permission fault 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Probably happens on all ARM, with CONFIG_PREEMPT_RT_FULL diff --git a/debian/patches/features/all/rt/ASoC-Intel-sst-use-instead-of-at-the-of-a-C-statemen.patch b/debian/patches/features/all/rt/ASoC-Intel-sst-use-instead-of-at-the-of-a-C-statemen.patch index 2756903ed..a7ceb5f37 100644 --- a/debian/patches/features/all/rt/ASoC-Intel-sst-use-instead-of-at-the-of-a-C-statemen.patch +++ b/debian/patches/features/all/rt/ASoC-Intel-sst-use-instead-of-at-the-of-a-C-statemen.patch @@ -2,7 +2,7 @@ From f407a2e976855eb4553d950f124c196061bbbd6c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 11 Jun 2015 14:17:06 +0200 Subject: [PATCH] ASoC: Intel: sst: use ; instead of , at the of a C statement -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This was spotted by Fernando Lopez-Lezcano while he tried to compile a -RT kernel with this driver enabled. 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 6e617ce93..b3161249a 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 @@ -2,7 +2,7 @@ From b72b514282ffad0d665ea94932b968f388304079 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Mar 2013 19:01:05 +0100 Subject: [PATCH] HACK: printk: drop the logbuf_lock more often -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch b/debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch index c03db78d3..b0c742092 100644 --- a/debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch +++ b/debian/patches/features/all/rt/KVM-lapic-mark-LAPIC-timer-handler-as-irqsafe.patch @@ -2,7 +2,7 @@ From d24c954fa7a252b093fa8ba9ed12c00bc3829bbe Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Wed, 8 Apr 2015 20:33:25 -0300 Subject: [PATCH 2/2] KVM: lapic: mark LAPIC timer handler as irqsafe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Since lapic timer handler only wakes up a simple waitqueue, it can be executed from hardirq context. diff --git a/debian/patches/features/all/rt/KVM-use-simple-waitqueue-for-vcpu-wq.patch b/debian/patches/features/all/rt/KVM-use-simple-waitqueue-for-vcpu-wq.patch index 55ed84cb1..b6f9129c2 100644 --- a/debian/patches/features/all/rt/KVM-use-simple-waitqueue-for-vcpu-wq.patch +++ b/debian/patches/features/all/rt/KVM-use-simple-waitqueue-for-vcpu-wq.patch @@ -2,7 +2,7 @@ From 73a22bd9fee012b115222b6b20b42fd8f581a089 Mon Sep 17 00:00:00 2001 From: Marcelo Tosatti Date: Wed, 8 Apr 2015 20:33:24 -0300 Subject: [PATCH 1/2] KVM: use simple waitqueue for vcpu->wq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The problem: diff --git a/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch b/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch index d4fcc2028..a80c76058 100644 --- a/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch +++ b/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch @@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 2 May 2014 17:32:30 +0200 Subject: [PATCH] Revert "migrate_disable pushd down in atomic_dec_and_spin_lock" -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This reverts commit ff9c870c3e27d58c9512fad122e91436681fee5a. Cc: stable-rt@vger.kernel.org diff --git a/debian/patches/features/all/rt/Revert-rwsem-rt-Do-not-allow-readers-to-nest.patch b/debian/patches/features/all/rt/Revert-rwsem-rt-Do-not-allow-readers-to-nest.patch index d812a0325..94c7afde0 100644 --- a/debian/patches/features/all/rt/Revert-rwsem-rt-Do-not-allow-readers-to-nest.patch +++ b/debian/patches/features/all/rt/Revert-rwsem-rt-Do-not-allow-readers-to-nest.patch @@ -2,7 +2,7 @@ From 1db4ce56001465fba240916d0c8de7443cafec62 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 25 Feb 2015 12:16:43 +0100 Subject: [PATCH] Revert "rwsem-rt: Do not allow readers to nest" -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This behaviour is required by cpufreq and its logic is "okay": It does a read_lock followed by a try_read_lock. diff --git a/debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch b/debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch new file mode 100644 index 000000000..ac4161088 --- /dev/null +++ b/debian/patches/features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch @@ -0,0 +1,49 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 13 Jul 2015 13:08:25 +0200 +Subject: Revert "slub: delay ctor until the object is requested" +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +This approach is broken with SLAB_DESTROY_BY_RCU allocations. +Reported by Steven Rostedt and Koehrer Mathias. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Sebastian Andrzej Siewior +--- + mm/slub.c | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/mm/slub.c b/mm/slub.c +index ea83736be12c..6d7f5165a634 100644 +--- a/mm/slub.c ++++ b/mm/slub.c +@@ -1411,13 +1411,11 @@ static void setup_object(struct kmem_cache *s, struct page *page, + void *object) + { + setup_object_debug(s, page, object); +-#ifndef CONFIG_PREEMPT_RT_FULL + if (unlikely(s->ctor)) { + kasan_unpoison_object_data(s, object); + s->ctor(object); + kasan_poison_object_data(s, object); + } +-#endif + } + + static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) +@@ -2562,13 +2560,6 @@ static __always_inline void *slab_alloc_node(struct kmem_cache *s, + + if (unlikely(gfpflags & __GFP_ZERO) && object) + memset(object, 0, s->object_size); +-#ifdef CONFIG_PREEMPT_RT_FULL +- if (unlikely(s->ctor) && object) { +- kasan_unpoison_object_data(s, object); +- s->ctor(object); +- kasan_poison_object_data(s, object); +- } +-#endif + + slab_post_alloc_hook(s, gfpflags, object); + +-- +2.1.4 + diff --git a/debian/patches/features/all/rt/Revert-timers-do-not-raise-softirq-unconditionally.patch b/debian/patches/features/all/rt/Revert-timers-do-not-raise-softirq-unconditionally.patch index d25c0930c..6845d2f2e 100644 --- a/debian/patches/features/all/rt/Revert-timers-do-not-raise-softirq-unconditionally.patch +++ b/debian/patches/features/all/rt/Revert-timers-do-not-raise-softirq-unconditionally.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Revert "timers: do not raise softirq unconditionally" 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The patch I revert here triggers the HRtimer switch from hardirq instead of from softirq. As a result we get a periodic interrupt before the diff --git a/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch b/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch index 32256bea5..c9b7319ab 100644 --- a/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch +++ b/debian/patches/features/all/rt/acpi-rt-Convert-acpi_gbl_hardware-lock-back-to-a-raw.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Wed, 13 Feb 2013 09:26:05 -0500 Subject: [PATCH] acpi/rt: Convert acpi_gbl_hardware lock back to a raw_spinlock_t -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz We hit the following bug with 3.6-rt: diff --git a/debian/patches/features/all/rt/allow-preemption-in-recursive-migrate_disable-call.patch b/debian/patches/features/all/rt/allow-preemption-in-recursive-migrate_disable-call.patch index 777342720..39a0c2b92 100644 --- a/debian/patches/features/all/rt/allow-preemption-in-recursive-migrate_disable-call.patch +++ b/debian/patches/features/all/rt/allow-preemption-in-recursive-migrate_disable-call.patch @@ -2,7 +2,7 @@ From 155cf657f6ddcade424253eb58d03a170dc9f64f Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Wed, 20 Nov 2013 07:22:09 +0800 Subject: [PATCH 1/2] allow preemption in recursive migrate_disable call -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Minor cleanup in migrate_disable/migrate_enable. The recursive case does not need to disable preemption as it is "pinned" to the current @@ -16,7 +16,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2757,13 +2757,12 @@ void migrate_disable(void) +@@ -2803,13 +2803,12 @@ void migrate_disable(void) WARN_ON_ONCE(p->migrate_disable_atomic); #endif @@ -31,7 +31,7 @@ Signed-off-by: Sebastian Andrzej Siewior pin_current_cpu(); p->migrate_disable = 1; preempt_enable(); -@@ -2789,13 +2788,12 @@ void migrate_enable(void) +@@ -2835,13 +2834,12 @@ void migrate_enable(void) #endif WARN_ON_ONCE(p->migrate_disable <= 0); 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 b31561c48..832b603de 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 @@ -2,7 +2,7 @@ From 7400b8761276c4b41581abc39ecd587f51856398 Mon Sep 17 00:00:00 2001 From: Anders Roxell Date: Thu, 14 May 2015 17:52:17 +0200 Subject: [PATCH 3/3] arch/arm64: Add lazy preempt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-at91-pit-remove-irq-handler-when-clock-is-unused.patch b/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch index d9b43e191..26dd27189 100644 --- a/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch +++ b/debian/patches/features/all/rt/arm-at91-pit-remove-irq-handler-when-clock-is-unused.patch @@ -1,7 +1,7 @@ From: Benedikt Spranger Date: Sat, 6 Mar 2010 17:47:10 +0100 Subject: ARM: AT91: PIT: Remove irq handler when clock event is unused -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Setup and remove the interrupt handler in clock event mode selection. This avoids calling the (shared) interrupt handler when the device is diff --git a/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch b/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch index bc019b95f..e7ce21485 100644 --- a/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch +++ b/debian/patches/features/all/rt/arm-at91-tclib-default-to-tclib-timer-for-rt.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sat, 1 May 2010 18:29:35 +0200 Subject: ARM: at91: tclib: Default to tclib timer for RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz RT is not too happy about the shared timer interrupt in AT91 devices. Default to tclib timer for RT. 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 bca0fc2de..1eb82eafd 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: [PATCH] preempt-rt: Convert arm boot_lock to raw -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-highmem-on-rt.patch b/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch index 1051696f6..4d57b88e2 100644 --- a/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch +++ b/debian/patches/features/all/rt/arm-disable-highmem-on-rt.patch @@ -1,7 +1,7 @@ Subject: arm-disable-highmem-on-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:09:28 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 2439f56cc..2c437a20a 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.patch From: Thomas Gleixner Date: Wed, 13 Feb 2013 11:03:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 cfca967c9..476e12c1a 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-preempt-lazy-support.patch From: Thomas Gleixner Date: Wed, 31 Oct 2012 12:04:11 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 4fd34d56e..f9230bbec 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 @@ -5,7 +5,7 @@ Subject: [PATCH RT] arm/unwind: use a raw_spin_lock MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/ata-disable-interrupts-if-non-rt.patch b/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch index de409b68e..5f9d85c12 100644 --- a/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch +++ b/debian/patches/features/all/rt/ata-disable-interrupts-if-non-rt.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Fri, 3 Jul 2009 08:44:29 -0500 Subject: ata: Do not disable interrupts in ide code for preempt-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use the local_irq_*_nort variants. diff --git a/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch b/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch index 6d07d5e6e..cbd482b3b 100644 --- a/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch +++ b/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch @@ -2,7 +2,7 @@ From de8fa902784181346b91bd121fba824a588fa99c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Sat, 3 May 2014 11:00:29 +0200 Subject: [PATCH] blk-mq: revert raw locks, post pone notifier to POST_DEAD -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The blk_mq_cpu_notify_lock should be raw because some CPU down levels are called with interrupts off. The notifier itself calls currently one diff --git a/debian/patches/features/all/rt/block-blk-mq-use-swait.patch b/debian/patches/features/all/rt/block-blk-mq-use-swait.patch index 1e2c97c54..be12e72ce 100644 --- a/debian/patches/features/all/rt/block-blk-mq-use-swait.patch +++ b/debian/patches/features/all/rt/block-blk-mq-use-swait.patch @@ -2,7 +2,7 @@ From 707f90fbaa66cfe72a8543121474edce9319d9d6 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 13 Feb 2015 11:01:26 +0100 Subject: [PATCH] block: blk-mq: use swait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 f193944c1..e169c7e19 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 @@ -2,7 +2,7 @@ From 9945a1974d877a9accfd623dcfe78ffd9dd7bb86 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 15:10:08 +0100 Subject: [PATCH] block/mq: don't complete requests via IPI -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-per-ctx-cpu_lock.patch b/debian/patches/features/all/rt/block-mq-drop-per-ctx-cpu_lock.patch index 05e12fbfd..01dfbcaeb 100644 --- a/debian/patches/features/all/rt/block-mq-drop-per-ctx-cpu_lock.patch +++ b/debian/patches/features/all/rt/block-mq-drop-per-ctx-cpu_lock.patch @@ -2,7 +2,7 @@ From 58fe6c3ba939278c159dfe7152889667b2685ea9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 18 Feb 2015 18:37:26 +0100 Subject: [PATCH] block/mq: drop per ctx cpu_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz While converting the get_cpu() to get_cpu_light() I added a cpu lock to ensure the same code is not invoked twice on the same CPU. And now I run 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 5a6228e30..822cd5300 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,6 +1,6 @@ From: Sebastian Andrzej Siewior Subject: block/mq: do not invoke preempt_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 72dfa85bd..87c4b16f9 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 @@ -2,7 +2,7 @@ From 7632d1dd96f75bdba997003fa61ab14e57afb0fe Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 9 Apr 2014 10:37:23 +0200 Subject: [PATCH 5/5] block: mq: use cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 c5700cd27..179b85b1c 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Moving the blk_sched_flush_plug() call out of the interrupt/preempt disabled region in the scheduler allows us to replace 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 61639ac2d..b42e0b79a 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/bug-rt-dependend-variants.patch b/debian/patches/features/all/rt/bug-rt-dependend-variants.patch index e04920622..8476f43eb 100644 --- a/debian/patches/features/all/rt/bug-rt-dependend-variants.patch +++ b/debian/patches/features/all/rt/bug-rt-dependend-variants.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:58 -0500 Subject: bug: BUG_ON/WARN_ON variants dependend on RT/!RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch b/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch index d51bc552a..d856e7d12 100644 --- a/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch +++ b/debian/patches/features/all/rt/cgroups-scheduling-while-atomic-in-cgroup-code.patch @@ -2,7 +2,7 @@ From eebd25188161f4e2079676e1db2f613375cfebf0 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sat, 21 Jun 2014 10:09:48 +0200 Subject: [PATCH] scheduling while atomic in cgroup code -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz mm, memcg: make refill_stock() use get_cpu_light() 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 e4018deae..02b1f7d8f 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 @@ -2,7 +2,7 @@ From 11a11a8da86fcba45725b4786bce03189d9ff2f9 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 13 Feb 2015 15:52:24 +0100 Subject: [PATCH 2/2] cgroups: use simple wait in css_release() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 02dc352f1..ded1d6bda 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 57df7db04..0c2d93eff 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the @@ -154,7 +154,7 @@ Signed-off-by: Thomas Gleixner EXPORT_SYMBOL(completion_done); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2767,7 +2767,10 @@ void migrate_disable(void) +@@ -2813,7 +2813,10 @@ void migrate_disable(void) } #ifdef CONFIG_SCHED_DEBUG @@ -166,7 +166,7 @@ Signed-off-by: Thomas Gleixner #endif if (p->migrate_disable) { -@@ -2798,7 +2801,10 @@ void migrate_enable(void) +@@ -2844,7 +2847,10 @@ void migrate_enable(void) } #ifdef CONFIG_SCHED_DEBUG 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 c9a2dd606..3c66ac4e9 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: cond-resched-lock-rt-tweak.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:51:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -10,7 +10,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2918,7 +2918,7 @@ extern int _cond_resched(void); +@@ -2964,7 +2964,7 @@ extern int _cond_resched(void); extern int __cond_resched_lock(spinlock_t *lock); 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 7731a40fe..baccd4315 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: cond-resched-softirq-fix.patch From: Thomas Gleixner Date: Thu, 14 Jul 2011 09:56:44 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -11,7 +11,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2929,12 +2929,16 @@ extern int __cond_resched_lock(spinlock_ +@@ -2975,12 +2975,16 @@ extern int __cond_resched_lock(spinlock_ __cond_resched_lock(lock); \ }) @@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner { --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4320,6 +4320,7 @@ int __cond_resched_lock(spinlock_t *lock +@@ -4366,6 +4366,7 @@ int __cond_resched_lock(spinlock_t *lock } EXPORT_SYMBOL(__cond_resched_lock); @@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner int __sched __cond_resched_softirq(void) { BUG_ON(!in_softirq()); -@@ -4333,6 +4334,7 @@ int __sched __cond_resched_softirq(void) +@@ -4379,6 +4380,7 @@ int __sched __cond_resched_softirq(void) return 0; } EXPORT_SYMBOL(__cond_resched_softirq); diff --git a/debian/patches/features/all/rt/condition-migration_disable-on-lock-acquisition.patch b/debian/patches/features/all/rt/condition-migration_disable-on-lock-acquisition.patch index 1ef9dd462..92ed16743 100644 --- a/debian/patches/features/all/rt/condition-migration_disable-on-lock-acquisition.patch +++ b/debian/patches/features/all/rt/condition-migration_disable-on-lock-acquisition.patch @@ -2,7 +2,7 @@ From 56f43bce737d3f28ad470c95fa84f824cb0d55ad Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Thu, 21 Nov 2013 22:52:30 -0500 Subject: [PATCH 2/2] condition migration_disable on lock acquisition -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz No need to unconditionally migrate_disable (what is it protecting ?) and re-enable on failure to acquire the lock. diff --git a/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch b/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch index 9b6859f44..beae99f49 100644 --- a/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch +++ b/debian/patches/features/all/rt/cpu-hotplug-Document-why-PREEMPT_RT-uses-a-spinlock.patch @@ -2,7 +2,7 @@ From 107fb2b43f5c80686ee6454713f4963728ca2737 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 5 Dec 2013 09:16:52 -0500 Subject: [PATCH] cpu hotplug: Document why PREEMPT_RT uses a spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The patch: diff --git a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch index 60d20fec9..61632c0df 100644 --- a/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch +++ b/debian/patches/features/all/rt/cpu-rt-make-hotplug-lock-a-sleeping-spinlock-on-rt.patch @@ -1,7 +1,7 @@ Subject: cpu: Make hotplug.lock a "sleeping" spinlock on RT From: Steven Rostedt Date: Fri, 02 Mar 2012 10:36:57 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Tasks can block on hotplug.lock in pin_current_cpu(), but their state might be != RUNNING. So the mutex wakeup will set the state diff --git a/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch b/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch index 2738787c0..a9f881d80 100644 --- a/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch +++ b/debian/patches/features/all/rt/cpu-rt-rework-cpu-down.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Mon, 16 Jul 2012 08:07:43 +0000 Subject: cpu/rt: Rework cpu down for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Bringing a CPU down is a pain with the PREEMPT_RT kernel because tasks can be preempted in many more places than in non-RT. In @@ -57,7 +57,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2163,6 +2163,10 @@ extern void do_set_cpus_allowed(struct t +@@ -2209,6 +2209,10 @@ extern void do_set_cpus_allowed(struct t extern int set_cpus_allowed_ptr(struct task_struct *p, const struct cpumask *new_mask); @@ -68,7 +68,7 @@ Signed-off-by: Thomas Gleixner #else static inline void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) -@@ -2175,6 +2179,9 @@ static inline int set_cpus_allowed_ptr(s +@@ -2221,6 +2225,9 @@ static inline int set_cpus_allowed_ptr(s return -EINVAL; return 0; } @@ -457,7 +457,7 @@ Signed-off-by: Thomas Gleixner */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2709,7 +2709,7 @@ void migrate_disable(void) +@@ -2755,7 +2755,7 @@ void migrate_disable(void) { struct task_struct *p = current; @@ -466,7 +466,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic++; #endif -@@ -2739,7 +2739,7 @@ void migrate_enable(void) +@@ -2785,7 +2785,7 @@ void migrate_enable(void) unsigned long flags; struct rq *rq; @@ -475,7 +475,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic--; #endif -@@ -4909,6 +4909,84 @@ void do_set_cpus_allowed(struct task_str +@@ -4955,6 +4955,84 @@ void do_set_cpus_allowed(struct task_str cpumask_copy(&p->cpus_allowed, new_mask); } diff --git a/debian/patches/features/all/rt/cpu-rt-variants.patch b/debian/patches/features/all/rt/cpu-rt-variants.patch index 198ac8f8f..32fef8821 100644 --- a/debian/patches/features/all/rt/cpu-rt-variants.patch +++ b/debian/patches/features/all/rt/cpu-rt-variants.patch @@ -1,7 +1,7 @@ Subject: cpu-rt-variants.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 15:42:38 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch b/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch index 1b96f9689..a6abe86f1 100644 --- a/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch +++ b/debian/patches/features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch @@ -2,7 +2,7 @@ From a1b3b9eafb916f839a09dcde745518a5ad6703db Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 4 Mar 2014 12:28:32 -0500 Subject: [PATCH] cpu_chill: Add a UNINTERRUPTIBLE hrtimer_nanosleep -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz We hit another bug that was caused by switching cpu_chill() from msleep() to hrtimer_nanosleep(). diff --git a/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch b/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch index 940f47b20..c0d0b090d 100644 --- a/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch +++ b/debian/patches/features/all/rt/cpu_down_move_migrate_enable_back.patch @@ -2,7 +2,7 @@ From linux-rt-users-owner@vger.kernel.org Thu Nov 7 03:07:12 2013 From: Tiejun Chen Subject: [v1][PATCH] cpu_down: move migrate_enable() back Date: Thu, 7 Nov 2013 10:06:07 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Commit 08c1ab68, "hotplug-use-migrate-disable.patch", intends to use migrate_enable()/migrate_disable() to replace that combination 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 a6745327a..0454b85ae 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 @@ -2,7 +2,7 @@ From 748dfbec410da5366c04e9b85dbc11558aae1b73 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 9 Apr 2015 15:23:01 +0200 Subject: [PATCH] cpufreq: drop K8's driver from beeing selected -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 0dd6d99fd..f7b3a40fc 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz We can't deal with the cpumask allocations which happen in atomic context (see arch/x86/kernel/apic/io_apic.c) on RT right now. 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 9143e072d..da11e45bd 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 @@ -2,7 +2,7 @@ From 0fcf777e2f217e61564bd30a2c39cb49d0e0b8c3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 21 Feb 2014 17:24:04 +0100 Subject: [PATCH] crypto: Reduce preempt disabled regions, more algos -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/debugobjects-rt.patch b/debian/patches/features/all/rt/debugobjects-rt.patch index f700a5d75..cad0fe0d4 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-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:41:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/dm-make-rt-aware.patch b/debian/patches/features/all/rt/dm-make-rt-aware.patch index 10d722741..976dc0570 100644 --- a/debian/patches/features/all/rt/dm-make-rt-aware.patch +++ b/debian/patches/features/all/rt/dm-make-rt-aware.patch @@ -1,7 +1,7 @@ Subject: dm: Make rt aware From: Thomas Gleixner Date: Mon, 14 Nov 2011 23:06:09 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use the BUG_ON_NORT variant for the irq_disabled() checks. RT has interrupts legitimately enabled here as we cant deadlock against the diff --git a/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch b/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch index 0718acb04..ba42df161 100644 --- a/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch +++ b/debian/patches/features/all/rt/drivers-net-8139-disable-irq-nosync.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:29:24 -0500 Subject: drivers/net: Use disable_irq_nosync() in 8139too -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use disable_irq_nosync() instead of disable_irq() as this might be called in atomic context with netpoll. diff --git a/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch b/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch index dd6f40110..b39517a90 100644 --- a/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch +++ b/debian/patches/features/all/rt/drivers-net-fix-livelock-issues.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sat, 20 Jun 2009 11:36:54 +0200 Subject: drivers/net: fix livelock issues -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Preempt-RT runs into a live lock issue with the NETDEV_TX_LOCKED micro optimization. The reason is that the softirq thread is rescheduling diff --git a/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch b/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch index 20f424e06..3043cb1b8 100644 --- a/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch +++ b/debian/patches/features/all/rt/drivers-net-vortex-fix-locking-issues.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Fri, 3 Jul 2009 08:30:00 -0500 Subject: drivers/net: vortex fix locking issues -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Argh, cut and paste wasn't enough... 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 fb2dff63e..41a5746ce 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 f3dcfafe0..49d2b6041 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: drivers-tty-fix-omap-lock-crap.patch From: Thomas Gleixner Date: Thu, 28 Jul 2011 13:32:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 553ca780d..4ada5b328 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: drivers-tty-pl011-irq-disable-madness.patch From: Thomas Gleixner Date: Tue, 08 Jan 2013 21:36:51 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch b/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch index 65003540e..5748defb9 100644 --- a/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch +++ b/debian/patches/features/all/rt/drm-i915-drop-trace_i915_gem_ring_dispatch-onrt.patch @@ -2,7 +2,7 @@ From d841118ac80c5bfb18f47984bc40687eed08b714 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 25 Apr 2013 18:12:52 +0200 Subject: [PATCH] drm/i915: drop trace_i915_gem_ring_dispatch on rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This tracepoint is responsible for: diff --git a/debian/patches/features/all/rt/early-printk-consolidate.patch b/debian/patches/features/all/rt/early-printk-consolidate.patch index d8c96ce3f..cc47522f4 100644 --- a/debian/patches/features/all/rt/early-printk-consolidate.patch +++ b/debian/patches/features/all/rt/early-printk-consolidate.patch @@ -1,7 +1,7 @@ Subject: early-printk-consolidate.patch From: Thomas Gleixner Date: Sat, 23 Jul 2011 11:04:08 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 5308d0342..939800d1f 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: epoll.patch From: Thomas Gleixner Date: Fri, 08 Jul 2011 16:35:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch b/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch index 6d642999a..f5b101606 100644 --- a/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch +++ b/debian/patches/features/all/rt/fix-rt-int3-x86_32-3.2-rt.patch @@ -1,6 +1,6 @@ From: Steven Rostedt Subject: x86: Do not disable preemption in int3 on 32bit -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Preemption must be disabled before enabling interrupts in do_trap on x86_64 because the stack in use for int3 and debug is a per CPU diff --git a/debian/patches/features/all/rt/fixup_opencoded_completions.patch b/debian/patches/features/all/rt/fixup_opencoded_completions.patch index 3857e94d1..87dda5258 100644 --- a/debian/patches/features/all/rt/fixup_opencoded_completions.patch +++ b/debian/patches/features/all/rt/fixup_opencoded_completions.patch @@ -2,7 +2,7 @@ From 53a9508f5983092928b0e6e12f400b686e1f04b1 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 28 Oct 2013 11:50:06 +0100 Subject: [PATCH] a few open coded completions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- 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 c31268056..2f1192095 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 @@ -2,7 +2,7 @@ From dff0dd4ff87b8f41b438f8b9bb32d2343943bb32 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 16 Feb 2015 18:49:10 +0100 Subject: [PATCH] fs/aio: simple simple work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-block-rt-support.patch b/debian/patches/features/all/rt/fs-block-rt-support.patch index f3371ee64..9358e91f5 100644 --- a/debian/patches/features/all/rt/fs-block-rt-support.patch +++ b/debian/patches/features/all/rt/fs-block-rt-support.patch @@ -1,7 +1,7 @@ Subject: fs-block-rt-support.patch From: Thomas Gleixner Date: Tue, 14 Jun 2011 17:05:09 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 c1c967a9c..ba989b4f7 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-jbd-pull-plug-when-waiting-for-space.patch b/debian/patches/features/all/rt/fs-jbd-pull-plug-when-waiting-for-space.patch index 4be377e74..0d500cc24 100644 --- a/debian/patches/features/all/rt/fs-jbd-pull-plug-when-waiting-for-space.patch +++ b/debian/patches/features/all/rt/fs-jbd-pull-plug-when-waiting-for-space.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Wed, 11 Jul 2012 22:05:20 +0000 Subject: fs, jbd: pull your plug when waiting for space -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz With an -rt kernel, and a heavy sync IO load, tasks can jam up on journal locks without unplugging, which can lead to 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 2110cc963..1def5503d 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz bit_spin_locks break under RT. diff --git a/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch b/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch index 0240e1247..e179630b9 100644 --- a/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch +++ b/debian/patches/features/all/rt/fs-jbd2-pull-your-plug-when-waiting-for-space.patch @@ -2,7 +2,7 @@ From c28e07715162bb1e1567a935b45772ca85a5267c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 17 Feb 2014 17:30:03 +0100 Subject: [PATCH] fs: jbd2: pull your plug when waiting for space -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Two cps in parallel managed to stall the the ext4 fs. It seems that journal code is either waiting for locks or sleeping waiting for 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 4a1f83f45..d8744fbf0 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-ntfs-disable-interrupt-non-rt.patch b/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch index 63fe3b258..0f7448d68 100644 --- a/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch +++ b/debian/patches/features/all/rt/fs-ntfs-disable-interrupt-non-rt.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Date: Fri, 3 Jul 2009 08:44:12 -0500 Subject: fs: ntfs: disable interrupt only on !RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz On Sat, 2007-10-27 at 11:44 +0200, Ingo Molnar wrote: > * Nick Piggin wrote: 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 476ab24ac..3b6801c92 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-migrate-disable-tracing.patch b/debian/patches/features/all/rt/ftrace-migrate-disable-tracing.patch index 6fa0fcec5..f252a7097 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: ftrace-migrate-disable-tracing.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch b/debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch new file mode 100644 index 000000000..61ca5b0a1 --- /dev/null +++ b/debian/patches/features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch @@ -0,0 +1,225 @@ +From 460bffd867ab18d151650bf9cb83207e56cc0947 Mon Sep 17 00:00:00 2001 +From: Thomas Gleixner +Date: Wed, 18 Feb 2015 20:17:31 +0100 +Subject: [PATCH] futex: avoid double wake up in PI futex wait / wake on -RT +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +The boosted priority is reverted after the unlock but before the +futex_hash_bucket (hb) has been accessed. The result is that we boost the +task, deboost the task, boost again for the hb lock, deboost again. +A sched trace of this scenario looks the following: + +| med_prio-93 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000 +| med_prio-93 sched_switch: prev_comm=med_prio prev_pid=93 prev_prio=29 prev_state=R ==> next_comm=high_prio next_pid=92 next_prio=9 +|high_prio-92 sched_pi_setprio: comm=low_prio pid=91 oldprio=120 newprio=9 +|high_prio-92 sched_switch: prev_comm=high_prio prev_pid=92 prev_prio=9 prev_state=S ==> next_comm=low_prio next_pid=91 next_prio=9 +| low_prio-91 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000 +| low_prio-91 sched_pi_setprio: comm=low_prio pid=91 oldprio=9 newprio=120 +| low_prio-91 sched_switch: prev_comm=low_prio prev_pid=91 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=92 next_prio=9 +|high_prio-92 sched_pi_setprio: comm=low_prio pid=91 oldprio=120 newprio=9 +|high_prio-92 sched_switch: prev_comm=high_prio prev_pid=92 prev_prio=9 prev_state=D ==> next_comm=low_prio next_pid=91 next_prio=9 +| low_prio-91 sched_wakeup: comm=high_prio pid=92 prio=9 success=1 target_cpu=000 +| low_prio-91 sched_pi_setprio: comm=low_prio pid=91 oldprio=9 newprio=120 +| low_prio-91 sched_switch: prev_comm=low_prio prev_pid=91 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=92 next_prio=9 + +We see four sched_pi_setprio() invocation but ideally two would be enough. +The patch tries to avoid the double wakeup by a wake up once the hb lock is +released. The same test case: + +| med_prio-21 sched_wakeup: comm=high_prio pid=20 prio=9 success=1 target_cpu=000 +| med_prio-21 sched_switch: prev_comm=med_prio prev_pid=21 prev_prio=29 prev_state=R ==> next_comm=high_prio next_pid=20 next_prio=9 +|high_prio-20 sched_pi_setprio: comm=low_prio pid=19 oldprio=120 newprio=9 +|high_prio-20 sched_switch: prev_comm=high_prio prev_pid=20 prev_prio=9 prev_state=S ==> next_comm=low_prio next_pid=19 next_prio=9 +| low_prio-19 sched_wakeup: comm=high_prio pid=20 prio=9 success=1 target_cpu=000 +| low_prio-19 sched_pi_setprio: comm=low_prio pid=19 oldprio=9 newprio=120 +| low_prio-19 sched_switch: prev_comm=low_prio prev_pid=19 prev_prio=120 prev_state=R+ ==> next_comm=high_prio next_pid=20 next_prio=9 + +only two sched_pi_setprio() invocations as one would expect and see +without -RT. + +Signed-off-by: Thomas Gleixner +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/futex.c | 32 +++++++++++++++++++++++++++++--- + kernel/locking/rtmutex.c | 40 +++++++++++++++++++++++++++++----------- + kernel/locking/rtmutex_common.h | 4 ++++ + 3 files changed, 62 insertions(+), 14 deletions(-) + +--- a/kernel/futex.c ++++ b/kernel/futex.c +@@ -1117,11 +1117,13 @@ static void mark_wake_futex(struct wake_ + q->lock_ptr = NULL; + } + +-static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) ++static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this, ++ struct futex_hash_bucket *hb) + { + struct task_struct *new_owner; + struct futex_pi_state *pi_state = this->pi_state; + u32 uninitialized_var(curval), newval; ++ bool deboost; + int ret = 0; + + if (!pi_state) +@@ -1173,7 +1175,17 @@ static int wake_futex_pi(u32 __user *uad + raw_spin_unlock_irq(&new_owner->pi_lock); + + raw_spin_unlock(&pi_state->pi_mutex.wait_lock); +- rt_mutex_unlock(&pi_state->pi_mutex); ++ ++ deboost = rt_mutex_futex_unlock(&pi_state->pi_mutex); ++ ++ /* ++ * We deboost after dropping hb->lock. That prevents a double ++ * wakeup on RT. ++ */ ++ spin_unlock(&hb->lock); ++ ++ if (deboost) ++ rt_mutex_adjust_prio(current); + + return 0; + } +@@ -2413,13 +2425,26 @@ static int futex_unlock_pi(u32 __user *u + */ + match = futex_top_waiter(hb, &key); + if (match) { +- ret = wake_futex_pi(uaddr, uval, match); ++ ret = wake_futex_pi(uaddr, uval, match, hb); ++ ++ /* ++ * In case of success wake_futex_pi dropped the hash ++ * bucket lock. ++ */ ++ if (!ret) ++ goto out_putkey; ++ + /* + * The atomic access to the futex value generated a + * pagefault, so retry the user-access and the wakeup: + */ + if (ret == -EFAULT) + goto pi_faulted; ++ ++ /* ++ * wake_futex_pi has detected invalid state. Tell user ++ * space. ++ */ + goto out_unlock; + } + +@@ -2440,6 +2465,7 @@ static int futex_unlock_pi(u32 __user *u + + out_unlock: + spin_unlock(&hb->lock); ++out_putkey: + put_futex_key(&key); + return ret; + +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -300,7 +300,7 @@ static void __rt_mutex_adjust_prio(struc + * of task. We do not use the spin_xx_mutex() variants here as we are + * outside of the debug path.) + */ +-static void rt_mutex_adjust_prio(struct task_struct *task) ++void rt_mutex_adjust_prio(struct task_struct *task) + { + unsigned long flags; + +@@ -957,8 +957,9 @@ static int task_blocks_on_rt_mutex(struc + /* + * Wake up the next waiter on the lock. + * +- * Remove the top waiter from the current tasks pi waiter list and +- * wake it up. ++ * Remove the top waiter from the current tasks pi waiter list, ++ * wake it up and return whether the current task needs to undo ++ * a potential priority boosting. + * + * Called with lock->wait_lock held. + */ +@@ -1255,7 +1256,7 @@ static inline int rt_mutex_slowtrylock(s + /* + * Slow path to release a rt-mutex: + */ +-static void __sched ++static bool __sched + rt_mutex_slowunlock(struct rt_mutex *lock) + { + raw_spin_lock(&lock->wait_lock); +@@ -1298,7 +1299,7 @@ rt_mutex_slowunlock(struct rt_mutex *loc + while (!rt_mutex_has_waiters(lock)) { + /* Drops lock->wait_lock ! */ + if (unlock_rt_mutex_safe(lock) == true) +- return; ++ return false; + /* Relock the rtmutex and try again */ + raw_spin_lock(&lock->wait_lock); + } +@@ -1311,8 +1312,7 @@ rt_mutex_slowunlock(struct rt_mutex *loc + + raw_spin_unlock(&lock->wait_lock); + +- /* Undo pi boosting if necessary: */ +- rt_mutex_adjust_prio(current); ++ return true; + } + + /* +@@ -1363,12 +1363,14 @@ rt_mutex_fasttrylock(struct rt_mutex *lo + + static inline void + rt_mutex_fastunlock(struct rt_mutex *lock, +- void (*slowfn)(struct rt_mutex *lock)) ++ bool (*slowfn)(struct rt_mutex *lock)) + { +- if (likely(rt_mutex_cmpxchg(lock, current, NULL))) ++ if (likely(rt_mutex_cmpxchg(lock, current, NULL))) { + rt_mutex_deadlock_account_unlock(current); +- else +- slowfn(lock); ++ } else if (slowfn(lock)) { ++ /* Undo pi boosting if necessary: */ ++ rt_mutex_adjust_prio(current); ++ } + } + + /** +@@ -1463,6 +1465,22 @@ void __sched rt_mutex_unlock(struct rt_m + EXPORT_SYMBOL_GPL(rt_mutex_unlock); + + /** ++ * rt_mutex_futex_unlock - Futex variant of rt_mutex_unlock ++ * @lock: the rt_mutex to be unlocked ++ * ++ * Returns: true/false indicating whether priority adjustment is ++ * required or not. ++ */ ++bool __sched rt_mutex_futex_unlock(struct rt_mutex *lock) ++{ ++ if (likely(rt_mutex_cmpxchg(lock, current, NULL))) { ++ rt_mutex_deadlock_account_unlock(current); ++ return false; ++ } ++ return rt_mutex_slowunlock(lock); ++} ++ ++/** + * rt_mutex_destroy - mark a mutex unusable + * @lock: the mutex to be destroyed + * +--- a/kernel/locking/rtmutex_common.h ++++ b/kernel/locking/rtmutex_common.h +@@ -132,6 +132,10 @@ extern int rt_mutex_finish_proxy_lock(st + struct rt_mutex_waiter *waiter); + extern int rt_mutex_timed_futex_lock(struct rt_mutex *l, struct hrtimer_sleeper *to); + ++extern bool rt_mutex_futex_unlock(struct rt_mutex *lock); ++ ++extern void rt_mutex_adjust_prio(struct task_struct *task); ++ + #ifdef CONFIG_DEBUG_RT_MUTEXES + # include "rtmutex-debug.h" + #else 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 3ad169ea6..048aacc6e 100644 --- a/debian/patches/features/all/rt/futex-requeue-pi-fix.patch +++ b/debian/patches/features/all/rt/futex-requeue-pi-fix.patch @@ -1,6 +1,6 @@ From: Steven Rostedt Subject: futex: Fix bug on when a requeued RT task times out -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Requeue with timeout causes a bug with PREEMPT_RT_FULL. @@ -65,7 +65,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -1584,6 +1585,35 @@ int rt_mutex_start_proxy_lock(struct rt_ +@@ -1602,6 +1603,35 @@ int rt_mutex_start_proxy_lock(struct rt_ return 1; } 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 c6ebf3ca9..91a0c4e4e 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 33adf6397..6dc9789ea 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 @@ -2,7 +2,7 @@ From 76666dbbdd40e963e7df84c123fc9aea4a2bcc69 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 21 Aug 2013 17:48:46 +0200 Subject: [PATCH] genirq: do not invoke the affinity callback via a workqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 ecd031ff8..c331e8f73 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-threading.patch From: Thomas Gleixner Date: Sun, 03 Apr 2011 11:57:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/genirq-nodebug-shirq.patch b/debian/patches/features/all/rt/genirq-nodebug-shirq.patch index 0c1f911ee..64a3d17bb 100644 --- a/debian/patches/features/all/rt/genirq-nodebug-shirq.patch +++ b/debian/patches/features/all/rt/genirq-nodebug-shirq.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 18 Mar 2011 10:22:04 +0100 Subject: genirq: Disable DEBUG_SHIRQ for rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/gpio-omap-use-raw-locks-for-locking.patch b/debian/patches/features/all/rt/gpio-omap-use-raw-locks-for-locking.patch index f57f2db51..a2e9f6af7 100644 --- a/debian/patches/features/all/rt/gpio-omap-use-raw-locks-for-locking.patch +++ b/debian/patches/features/all/rt/gpio-omap-use-raw-locks-for-locking.patch @@ -2,7 +2,7 @@ From acde20fca070fb86c0e4c748d010eab87171702f Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 12 Feb 2015 16:01:13 +0100 Subject: [PATCH] gpio: omap: use raw locks for locking -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This patch converts gpio_bank.lock from a spin_lock into a raw_spin_lock. The call path is to access this lock is always under a diff --git a/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch b/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch index 980c857a6..2716f20a4 100644 --- a/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch +++ b/debian/patches/features/all/rt/hotplug-Use-set_cpus_allowed_ptr-in-sync_unplug_thre.patch @@ -2,7 +2,7 @@ From c132b674ef2afe71b77fe66f2fd502faf7f2c04c Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Tue, 24 Mar 2015 08:14:49 +0100 Subject: [PATCH] hotplug: Use set_cpus_allowed_ptr() in sync_unplug_thread() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz do_set_cpus_allowed() is not safe vs ->sched_class change. 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 547faacba..3bb6d3868 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch b/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch index 7b3714dc4..9d9768a56 100644 --- a/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch +++ b/debian/patches/features/all/rt/hotplug-sync_unplug-no-27-5cn-27-in-task-name.patch @@ -1,7 +1,7 @@ Subject: hotplug: sync_unplug: No "\n" in task name From: Yong Zhang Date: Sun, 16 Oct 2011 18:56:43 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Otherwise the output will look a little odd. diff --git a/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch b/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch index b836fb5bb..286cb5610 100644 --- a/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch +++ b/debian/patches/features/all/rt/hotplug-use-migrate-disable.patch @@ -1,7 +1,7 @@ Subject: hotplug-use-migrate-disable.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 19:35:29 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 8f81110ec..4dff7e57d 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 @@ -2,7 +2,7 @@ From 180cdb93d796bf52c919f5e3df30af83aa6d46ca Mon Sep 17 00:00:00 2001 From: Yang Shi Date: Mon, 16 Sep 2013 14:09:19 -0700 Subject: [PATCH] hrtimer: Move schedule_work call to helper thread -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz When run ltp leapsec_timer test, the following call trace is caught: diff --git a/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch b/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch index 278b510db..e84f74ee6 100644 --- a/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch +++ b/debian/patches/features/all/rt/hrtimer-fixup-hrtimer-callback-changes-for-preempt-r.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:31 -0500 Subject: hrtimer: fixup hrtimer callback changes for preempt-rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz In preempt-rt we can not call the callbacks which take sleeping locks from the timer interrupt context. diff --git a/debian/patches/features/all/rt/hrtimer-raise-softirq-if-hrtimer-irq-stalled.patch b/debian/patches/features/all/rt/hrtimer-raise-softirq-if-hrtimer-irq-stalled.patch index 2d0a4f5c8..048656baf 100644 --- a/debian/patches/features/all/rt/hrtimer-raise-softirq-if-hrtimer-irq-stalled.patch +++ b/debian/patches/features/all/rt/hrtimer-raise-softirq-if-hrtimer-irq-stalled.patch @@ -1,7 +1,7 @@ Subject: hrtimer: Raise softirq if hrtimer irq stalled From: Watanabe Date: Sun, 28 Oct 2012 11:13:44 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz When the hrtimer stall detection hits the softirq is not raised. 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 256d2c9fe..cee04d380 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Make cancellation of a running callback in softirq context safe against preemption. diff --git a/debian/patches/features/all/rt/hwlat-detector-Don-t-ignore-threshold-module-paramet.patch b/debian/patches/features/all/rt/hwlat-detector-Don-t-ignore-threshold-module-paramet.patch index 3a738deaa..37c466a52 100644 --- a/debian/patches/features/all/rt/hwlat-detector-Don-t-ignore-threshold-module-paramet.patch +++ b/debian/patches/features/all/rt/hwlat-detector-Don-t-ignore-threshold-module-paramet.patch @@ -2,7 +2,7 @@ From c19bf3baaa55918486b868ab17aae0c0c220e51f Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Fri, 30 Aug 2013 07:57:25 +0200 Subject: [PATCH] hwlat-detector: Don't ignore threshold module parameter -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If the user specified a threshold at module load time, use it. diff --git a/debian/patches/features/all/rt/hwlat-detector-Update-hwlat_detector-to-add-outer-lo.patch b/debian/patches/features/all/rt/hwlat-detector-Update-hwlat_detector-to-add-outer-lo.patch index 24e8ae005..f1188c758 100644 --- a/debian/patches/features/all/rt/hwlat-detector-Update-hwlat_detector-to-add-outer-lo.patch +++ b/debian/patches/features/all/rt/hwlat-detector-Update-hwlat_detector-to-add-outer-lo.patch @@ -3,7 +3,7 @@ From: Steven Rostedt Date: Mon, 19 Aug 2013 17:33:25 -0400 Subject: [PATCH 1/3] hwlat-detector: Update hwlat_detector to add outer loop detection -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The hwlat_detector reads two timestamps in a row, then reports any gap between those calls. The problem is, it misses everything between diff --git a/debian/patches/features/all/rt/hwlat-detector-Use-thread-instead-of-stop-machine.patch b/debian/patches/features/all/rt/hwlat-detector-Use-thread-instead-of-stop-machine.patch index c6d5fc7dd..33c2ffda3 100644 --- a/debian/patches/features/all/rt/hwlat-detector-Use-thread-instead-of-stop-machine.patch +++ b/debian/patches/features/all/rt/hwlat-detector-Use-thread-instead-of-stop-machine.patch @@ -2,7 +2,7 @@ From 42b3963c5d3dcdb54226fc6bbb6b5fbcf3f2ddee Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 19 Aug 2013 17:33:27 -0400 Subject: [PATCH 3/3] hwlat-detector: Use thread instead of stop machine -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz There's no reason to use stop machine to search for hardware latency. Simply disabling interrupts while running the loop will do enough to diff --git a/debian/patches/features/all/rt/hwlat-detector-Use-trace_clock_local-if-available.patch b/debian/patches/features/all/rt/hwlat-detector-Use-trace_clock_local-if-available.patch index e26c52c34..13ef314f3 100644 --- a/debian/patches/features/all/rt/hwlat-detector-Use-trace_clock_local-if-available.patch +++ b/debian/patches/features/all/rt/hwlat-detector-Use-trace_clock_local-if-available.patch @@ -2,7 +2,7 @@ From 4aaca90c0255caee9a55371afaecb32365123762 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Mon, 19 Aug 2013 17:33:26 -0400 Subject: [PATCH 2/3] hwlat-detector: Use trace_clock_local if available -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz As ktime_get() calls into the timing code which does a read_seq(), it may be affected by other CPUS that touch that lock. To remove this diff --git a/debian/patches/features/all/rt/hwlatdetect.patch b/debian/patches/features/all/rt/hwlatdetect.patch index c4f0018fa..dcf690ea8 100644 --- a/debian/patches/features/all/rt/hwlatdetect.patch +++ b/debian/patches/features/all/rt/hwlatdetect.patch @@ -1,7 +1,7 @@ Subject: hwlatdetect.patch From: Carsten Emde Date: Tue, 19 Jul 2011 13:53:12 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Jon Masters developed this wonderful SMI detector. For details please consult Documentation/hwlat_detector.txt. It could be ported to Linux diff --git a/debian/patches/features/all/rt/i2c-omap-drop-the-lock-hard-irq-context.patch b/debian/patches/features/all/rt/i2c-omap-drop-the-lock-hard-irq-context.patch index 4d3ca948b..0ccbc0ef8 100644 --- a/debian/patches/features/all/rt/i2c-omap-drop-the-lock-hard-irq-context.patch +++ b/debian/patches/features/all/rt/i2c-omap-drop-the-lock-hard-irq-context.patch @@ -2,7 +2,7 @@ From 5145351047b216cca13aaca99f939a9a594c6c4d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 21 Mar 2013 11:35:49 +0100 Subject: [PATCH 2/3] i2c/omap: drop the lock hard irq context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The lock is taken while reading two registers. On RT the first lock is taken in hard irq where it might sleep and in the threaded irq. diff --git a/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch b/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch index aa9339b86..e6ef7366d 100644 --- a/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch +++ b/debian/patches/features/all/rt/i915-bogus-warning-from-i915-when-running-on-PREEMPT.patch @@ -2,7 +2,7 @@ From 836b4b11c76dae96bed66eb58eac9dac729956af Mon Sep 17 00:00:00 2001 From: Clark Williams Date: Tue, 26 May 2015 10:43:43 -0500 Subject: [PATCH] i915: bogus warning from i915 when running on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The i915 driver has a 'WARN_ON(!in_interrupt())' in the display handler, which whines constanly on the RT kernel (since the interrupt diff --git a/debian/patches/features/all/rt/i915_compile_fix.patch b/debian/patches/features/all/rt/i915_compile_fix.patch index fc4ded9c1..43150d444 100644 --- a/debian/patches/features/all/rt/i915_compile_fix.patch +++ b/debian/patches/features/all/rt/i915_compile_fix.patch @@ -1,6 +1,6 @@ From: Sebastian Andrzej Siewior Subject: gpu/i915: don't open code these things -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The opencode part is gone in 1f83fee0 ("drm/i915: clear up wedged transitions") the owner check is still there. diff --git a/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch b/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch index 0f4d775cc..112cb0602 100644 --- a/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch +++ b/debian/patches/features/all/rt/ide-use-nort-local-irq-variants.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:16 -0500 Subject: ide: Do not disable interrupts for PREEMPT-RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use the local_irq_*_nort variants. diff --git a/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch b/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch index b8e3d8931..21d979e6f 100644 --- a/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch +++ b/debian/patches/features/all/rt/idr-use-local-lock-for-protection.patch @@ -1,6 +1,6 @@ From: Thomas Gleixner Subject: idr: Use local lock instead of preempt enable/disable -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz We need to protect the per cpu variable and prevent migration. diff --git a/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch b/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch index a5d3ccbc5..3aa374692 100644 --- a/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch +++ b/debian/patches/features/all/rt/infiniband-mellanox-ib-use-nort-irq.patch @@ -1,7 +1,7 @@ From: Sven-Thorsten Dietrich Date: Fri, 3 Jul 2009 08:30:35 -0500 Subject: infiniband: Mellanox IB driver patch use _nort() primitives -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Fixes in_atomic stack-dump, when Mellanox module is loaded into the RT Kernel. diff --git a/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch b/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch index 9ee1118b6..8610924fc 100644 --- a/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch +++ b/debian/patches/features/all/rt/inpt-gameport-use-local-irq-nort.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:16 -0500 Subject: input: gameport: Do not disable interrupts on PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use the _nort() primitives. diff --git a/debian/patches/features/all/rt/ipc-make-rt-aware.patch b/debian/patches/features/all/rt/ipc-make-rt-aware.patch index 45e39d961..72fa94fd9 100644 --- a/debian/patches/features/all/rt/ipc-make-rt-aware.patch +++ b/debian/patches/features/all/rt/ipc-make-rt-aware.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:12 -0500 Subject: ipc: Make the ipc code -rt aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz RT serializes the code with the (rt)spinlock but keeps preemption enabled. Some parts of the code need to be atomic nevertheless. @@ -12,30 +12,9 @@ Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner --- - ipc/mqueue.c | 5 +++++ - ipc/msg.c | 16 +++++++++++++++- - 2 files changed, 20 insertions(+), 1 deletion(-) + ipc/msg.c | 16 +++++++++++++++- + 1 file changed, 15 insertions(+), 1 deletion(-) ---- a/ipc/mqueue.c -+++ b/ipc/mqueue.c -@@ -923,12 +923,17 @@ static inline void pipelined_send(struct - struct msg_msg *message, - struct ext_wait_queue *receiver) - { -+ /* -+ * Keep them in one critical section for PREEMPT_RT: -+ */ -+ preempt_disable_rt(); - receiver->msg = message; - list_del(&receiver->list); - receiver->state = STATE_PENDING; - wake_up_process(receiver->task); - smp_wmb(); - receiver->state = STATE_READY; -+ preempt_enable_rt(); - } - - /* pipelined_receive() - if there is task waiting in sys_mq_timedsend() --- a/ipc/msg.c +++ b/ipc/msg.c @@ -188,6 +188,12 @@ static void expunge_all(struct msg_queue diff --git a/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch b/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch deleted file mode 100644 index d2f187752..000000000 --- a/debian/patches/features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch +++ /dev/null @@ -1,65 +0,0 @@ -Subject: ipc/mqueue: Add a critical section to avoid a deadlock -From: KOBAYASHI Yoshitake -Date: Sat, 23 Jul 2011 11:57:36 +0900 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz - -(Repost for v3.0-rt1 and changed the distination addreses) -I have tested the following patch on v3.0-rt1 with PREEMPT_RT_FULL. -In POSIX message queue, if a sender process uses SCHED_FIFO and -has a higher priority than a receiver process, the sender will -be stuck at ipc/mqueue.c:452 - - 452 while (ewp->state == STATE_PENDING) - 453 cpu_relax(); - -Description of the problem - (receiver process) - 1. receiver changes sender's state to STATE_PENDING (mqueue.c:846) - 2. wake up sender process and "switch to sender" (mqueue.c:847) - Note: This context switch only happens in PREEMPT_RT_FULL kernel. - (sender process) - 3. sender check the own state in above loop (mqueue.c:452-453) - *. receiver will never wake up and cannot change sender's state to - STATE_READY because sender has higher priority - - -Signed-off-by: Yoshitake Kobayashi -Cc: viro@zeniv.linux.org.uk -Cc: dchinner@redhat.com -Cc: npiggin@kernel.dk -Cc: hch@lst.de -Cc: arnd@arndb.de -Link: http://lkml.kernel.org/r/4E2A38A0.1090601@toshiba.co.jp -Signed-off-by: Thomas Gleixner ---- - ipc/mqueue.c | 19 ++++++++++++------- - 1 file changed, 12 insertions(+), 7 deletions(-) - ---- a/ipc/mqueue.c -+++ b/ipc/mqueue.c -@@ -947,13 +947,18 @@ static inline void pipelined_receive(str - wake_up_interruptible(&info->wait_q); - return; - } -- if (msg_insert(sender->msg, info)) -- return; -- list_del(&sender->list); -- sender->state = STATE_PENDING; -- wake_up_process(sender->task); -- smp_wmb(); -- sender->state = STATE_READY; -+ /* -+ * Keep them in one critical section for PREEMPT_RT: -+ */ -+ preempt_disable_rt(); -+ if (!msg_insert(sender->msg, info)) { -+ list_del(&sender->list); -+ sender->state = STATE_PENDING; -+ wake_up_process(sender->task); -+ smp_wmb(); -+ sender->state = STATE_READY; -+ } -+ preempt_enable_rt(); - } - - SYSCALL_DEFINE5(mq_timedsend, mqd_t, mqdes, const char __user *, u_msg_ptr, diff --git a/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch b/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch index f44e4ff71..196285a42 100644 --- a/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch +++ b/debian/patches/features/all/rt/ipc-sem-rework-semaphore-wakeups.patch @@ -1,7 +1,7 @@ Subject: ipc/sem: Rework semaphore wakeups From: Peter Zijlstra Date: Wed, 14 Sep 2011 11:57:04 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Current sysv sems have a weird ass wakeup scheme that involves keeping preemption disabled over a potential O(n^2) loop and busy waiting on 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 03cb184aa..c135c0139 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/irq_work-Hide-access-to-hirq_work_list-in-PREEMPT_RT.patch b/debian/patches/features/all/rt/irq_work-Hide-access-to-hirq_work_list-in-PREEMPT_RT.patch index 5b6742eed..0650fcfdd 100644 --- a/debian/patches/features/all/rt/irq_work-Hide-access-to-hirq_work_list-in-PREEMPT_RT.patch +++ b/debian/patches/features/all/rt/irq_work-Hide-access-to-hirq_work_list-in-PREEMPT_RT.patch @@ -2,7 +2,7 @@ From eea70b5bde4fb5a6710611cf2f06d9a6b8df6d83 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 12 Mar 2015 18:08:57 -0400 Subject: [PATCH] irq_work: Hide access to hirq_work_list in PREEMPT_RT_FULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The hirq_work_list is only defined when PREEMPT_RT_FULL is configured. Most access to it is within an #ifdef CONFIG_PREEMPT_RT_FULL, except diff --git a/debian/patches/features/all/rt/irq_work-allow-certain-work-in-hard-irq-context.patch b/debian/patches/features/all/rt/irq_work-allow-certain-work-in-hard-irq-context.patch index bc281b081..58ca98fce 100644 --- a/debian/patches/features/all/rt/irq_work-allow-certain-work-in-hard-irq-context.patch +++ b/debian/patches/features/all/rt/irq_work-allow-certain-work-in-hard-irq-context.patch @@ -2,7 +2,7 @@ From 8e48945ae26991b40973b233f34937477dcf97ab Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 31 Jan 2014 14:20:31 +0100 Subject: [PATCH 1/7] irq_work: allow certain work in hard irq context -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz irq_work is processed in softirq context on -RT because we want to avoid long latencies which might arise from processing lots of perf events. diff --git a/debian/patches/features/all/rt/irq_work_Delegate_non-immediate_irq_work_to_ksoftirqd.patch b/debian/patches/features/all/rt/irq_work_Delegate_non-immediate_irq_work_to_ksoftirqd.patch index 102ce7c25..d83ea9510 100644 --- a/debian/patches/features/all/rt/irq_work_Delegate_non-immediate_irq_work_to_ksoftirqd.patch +++ b/debian/patches/features/all/rt/irq_work_Delegate_non-immediate_irq_work_to_ksoftirqd.patch @@ -1,7 +1,7 @@ From: Mike Galbraith Message-ID: <1429946448.3179.33.camel@gmail.com> Subject: irq_work: Delegate non-immediate irq work to ksoftirqd -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Based on a patch from Jan Kiszka. diff --git a/debian/patches/features/all/rt/jump-label-rt.patch b/debian/patches/features/all/rt/jump-label-rt.patch index a4fedcbdf..44748c61e 100644 --- a/debian/patches/features/all/rt/jump-label-rt.patch +++ b/debian/patches/features/all/rt/jump-label-rt.patch @@ -1,22 +1,36 @@ -Subject: jump-label-rt.patch +Subject: jump-label: disable if stop_machine() is used From: Thomas Gleixner -Date: Wed, 13 Jul 2011 11:03:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Date: Wed, 08 Jul 2015 17:14:48 +0200 +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +Some architectures are using stop_machine() while switching the opcode which +leads to latency spikes. +The architectures which use stop_machine() atm: +- ARM stop machine +- s390 stop machine + +The architecures which use other sorcery: +- MIPS +- X86 +- powerpc +- sparc +- arm64 Signed-off-by: Thomas Gleixner +[bigeasy: only ARM for now] +Signed-off-by: Sebastian Andrzej Siewior --- - include/linux/jump_label.h | 3 ++- - 1 file changed, 2 insertions(+), 1 deletion(-) + arch/arm/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) ---- a/include/linux/jump_label.h -+++ b/include/linux/jump_label.h -@@ -55,7 +55,8 @@ extern bool static_key_initialized; - "%s used before call to jump_label_init", \ - __func__) - --#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) -+#if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL) && \ -+ !defined(CONFIG_PREEMPT_BASE) - - struct static_key { - atomic_t enabled; +--- a/arch/arm/Kconfig ++++ b/arch/arm/Kconfig +@@ -30,7 +30,7 @@ config ARM + select HARDIRQS_SW_RESEND + select HAVE_ARCH_AUDITSYSCALL if (AEABI && !OABI_COMPAT) + select HAVE_ARCH_BITREVERSE if (CPU_32v7M || CPU_32v7) && !CPU_32v6 +- select HAVE_ARCH_JUMP_LABEL if !XIP_KERNEL ++ select HAVE_ARCH_JUMP_LABEL if (!XIP_KERNEL && !PREEMPT_RT_BASE) + select HAVE_ARCH_KGDB + select HAVE_ARCH_SECCOMP_FILTER if (AEABI && !OABI_COMPAT) + select HAVE_ARCH_TRACEHOOK 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 eb822a0cc..28288e866 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-a-few-options-rt.patch From: Thomas Gleixner Date: Sun, 24 Jul 2011 12:11:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 93ea722b6..8ea4d5d7b 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-preempt-rt-full.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 14:58:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch b/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch index 3fa90436f..3c114e926 100644 --- a/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch +++ b/debian/patches/features/all/rt/kernel-cpu-fix-cpu-down-problem-if-kthread-s-cpu-is-.patch @@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 7 Jun 2013 22:37:06 +0200 Subject: [PATCH] kernel/cpu: fix cpu down problem if kthread's cpu is going down -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If kthread is pinned to CPUx and CPUx is going down then we get into trouble: diff --git a/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch b/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch index 2afa04bdf..18317c881 100644 --- a/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch +++ b/debian/patches/features/all/rt/kernel-hotplug-restore-original-cpu-mask-oncpu-down.patch @@ -2,7 +2,7 @@ From 4c6df3d78817c20a147c0291f6600d002c0910d3 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 14 Jun 2013 17:16:35 +0200 Subject: [PATCH] kernel/hotplug: restore original cpu mask oncpu/down -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If a task which is allowed to run only on CPU X puts CPU Y down then it will be allowed on all CPUs but the on CPU Y after it comes back from diff --git a/debian/patches/features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch b/debian/patches/features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch index 76814b7d7..834b9f6ac 100644 --- a/debian/patches/features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch +++ b/debian/patches/features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch @@ -2,7 +2,7 @@ From 9a1a63848887fd99e6be49a3925d65751e424c8a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 19 Feb 2014 11:56:06 +0100 Subject: [PATCH] kernel/hrtimer: be non-freezeable in cpu_chill() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Since we replaced msleep() by hrtimer I see now and then (rarely) this: diff --git a/debian/patches/features/all/rt/kernel-irq_work-fix-no_hz-deadlock.patch b/debian/patches/features/all/rt/kernel-irq_work-fix-no_hz-deadlock.patch index 7a2ad5be9..035e66648 100644 --- a/debian/patches/features/all/rt/kernel-irq_work-fix-no_hz-deadlock.patch +++ b/debian/patches/features/all/rt/kernel-irq_work-fix-no_hz-deadlock.patch @@ -2,7 +2,7 @@ From e91b8d60185b030b40a9b35d88d9759e268cdcd7 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 10 Apr 2015 11:50:22 +0200 Subject: [PATCH] kernel/irq_work: fix no_hz deadlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Invoking NO_HZ's irq_work callback from timer irq is not working very well if the callback decides to invoke hrtimer_cancel(): diff --git a/debian/patches/features/all/rt/kernel-irq_work-fix-non-RT-case.patch b/debian/patches/features/all/rt/kernel-irq_work-fix-non-RT-case.patch index 56910252d..1a25e0a23 100644 --- a/debian/patches/features/all/rt/kernel-irq_work-fix-non-RT-case.patch +++ b/debian/patches/features/all/rt/kernel-irq_work-fix-non-RT-case.patch @@ -2,7 +2,7 @@ From e59cb21a0f545ea2af4c618a12c2a45f548dffcf Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 11 Jun 2015 17:31:40 +0200 Subject: [PATCH] kernel/irq_work: fix non RT case -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz After the deadlock fixed, the checked got somehow away and broke the non-RT case which could invoke IRQ-work from softirq context. diff --git a/debian/patches/features/all/rt/kgb-serial-hackaround.patch b/debian/patches/features/all/rt/kgb-serial-hackaround.patch index 3f3fcb739..da9a150fa 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/latency-hist.patch b/debian/patches/features/all/rt/latency-hist.patch index ef18f53ef..07d2b6586 100644 --- a/debian/patches/features/all/rt/latency-hist.patch +++ b/debian/patches/features/all/rt/latency-hist.patch @@ -1,7 +1,7 @@ Subject: latency-hist.patch From: Carsten Emde Date: Tue, 19 Jul 2011 14:03:41 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This patch provides a recording mechanism to store data of potential sources of system latencies. The recordings separately determine the @@ -229,7 +229,7 @@ Signed-off-by: Thomas Gleixner void *start_site; --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1702,6 +1702,12 @@ struct task_struct { +@@ -1748,6 +1748,12 @@ struct task_struct { unsigned long trace; /* bitmask and counter of trace recursion */ unsigned long trace_recursion; 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 cbfc1b66b..c88f73053 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 @@ -2,7 +2,7 @@ From 6c1733bce7ebf560b3b8bd6acaa31cb702fc39ab Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 23 Jan 2014 14:45:59 +0100 Subject: [PATCH 3/7] leds: trigger: disable CPU trigger on -RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/lglocks-rt.patch b/debian/patches/features/all/rt/lglocks-rt.patch index 2bf306bb8..ea75fba38 100644 --- a/debian/patches/features/all/rt/lglocks-rt.patch +++ b/debian/patches/features/all/rt/lglocks-rt.patch @@ -1,7 +1,7 @@ Subject: lglocks-rt.patch From: Thomas Gleixner Date: Wed, 15 Jun 2011 11:02:21 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 67ada3372..de0020042 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: [PATCH] list_bl.h: make list head locking RT safe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/local-irq-rt-depending-variants.patch b/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch index c2a09e1f6..074e5d628 100644 --- a/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch +++ b/debian/patches/features/all/rt/local-irq-rt-depending-variants.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 21 Jul 2009 22:34:14 +0200 Subject: rt: local_irq_* variants depending on RT/!RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Add local_irq_*_(no)rt variant which are mainly used to break interrupt disabled sections on PREEMPT_RT or to explicitely disable diff --git a/debian/patches/features/all/rt/local-var.patch b/debian/patches/features/all/rt/local-var.patch index 29ca91f95..338c7052b 100644 --- a/debian/patches/features/all/rt/local-var.patch +++ b/debian/patches/features/all/rt/local-var.patch @@ -1,7 +1,7 @@ Subject: local-var.patch From: Thomas Gleixner Date: Fri, 24 Jun 2011 18:40:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/local-vars-migrate-disable.patch b/debian/patches/features/all/rt/local-vars-migrate-disable.patch index 753008101..6a10c069b 100644 --- a/debian/patches/features/all/rt/local-vars-migrate-disable.patch +++ b/debian/patches/features/all/rt/local-vars-migrate-disable.patch @@ -1,7 +1,7 @@ Subject: local-vars-migrate-disable.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 20:42:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/localversion.patch b/debian/patches/features/all/rt/localversion.patch index 31867a0cf..e3ea22b25 100644 --- a/debian/patches/features/all/rt/localversion.patch +++ b/debian/patches/features/all/rt/localversion.patch @@ -1,7 +1,7 @@ Subject: localversion.patch From: Thomas Gleixner Date: Fri, 08 Jul 2011 20:25:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner Signed-off-by: Peter Zijlstra @@ -13,4 +13,4 @@ Link: http://lkml.kernel.org/n/tip-8vdw4bfcsds27cvox6rpb334@git.kernel.org --- /dev/null +++ b/localversion-rt @@ -0,0 +1 @@ -+-rt3 ++-rt6 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 b7eb7b4be..80ff60110 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-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 18:51:23 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 4f3b10652..015ada725 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 @@ -3,7 +3,7 @@ From: Josh Cartwright Date: Wed, 28 Jan 2015 13:08:45 -0600 Subject: [PATCH] lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 f27931c1d..9e6089722 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz From: Yong Zhang diff --git a/debian/patches/features/all/rt/locking-rt-provide-__up_read.patch b/debian/patches/features/all/rt/locking-rt-provide-__up_read.patch new file mode 100644 index 000000000..fe7d5ee87 --- /dev/null +++ b/debian/patches/features/all/rt/locking-rt-provide-__up_read.patch @@ -0,0 +1,66 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 13 Jul 2015 18:41:50 +0200 +Subject: locking/rt: provide __up_read() +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +it is the same thing as in up_read() except we do not have lockdep here. + +Cc: stable-rt@vger.kernel.or +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/rwsem_rt.h | 6 ++++++ + kernel/locking/rt.c | 10 ++++++++-- + 2 files changed, 14 insertions(+), 2 deletions(-) + +diff --git a/include/linux/rwsem_rt.h b/include/linux/rwsem_rt.h +index 924c2d274ab5..928a05cbf94f 100644 +--- a/include/linux/rwsem_rt.h ++++ b/include/linux/rwsem_rt.h +@@ -59,6 +59,7 @@ extern void rt_down_write_nested_lock(struct rw_semaphore *rwsem, + extern void rt_down_read(struct rw_semaphore *rwsem); + extern int rt_down_write_trylock(struct rw_semaphore *rwsem); + extern int rt_down_read_trylock(struct rw_semaphore *rwsem); ++extern void __rt_up_read(struct rw_semaphore *rwsem); + extern void rt_up_read(struct rw_semaphore *rwsem); + extern void rt_up_write(struct rw_semaphore *rwsem); + extern void rt_downgrade_write(struct rw_semaphore *rwsem); +@@ -92,6 +93,11 @@ static inline int down_write_trylock(struct rw_semaphore *sem) + return rt_down_write_trylock(sem); + } + ++static inline void __up_read(struct rw_semaphore *sem) ++{ ++ __rt_up_read(sem); ++} ++ + static inline void up_read(struct rw_semaphore *sem) + { + rt_up_read(sem); +diff --git a/kernel/locking/rt.c b/kernel/locking/rt.c +index 73c55089fb93..3482ce87ab92 100644 +--- a/kernel/locking/rt.c ++++ b/kernel/locking/rt.c +@@ -319,12 +319,18 @@ void rt_up_write(struct rw_semaphore *rwsem) + } + EXPORT_SYMBOL(rt_up_write); + +-void rt_up_read(struct rw_semaphore *rwsem) ++ ++void __rt_up_read(struct rw_semaphore *rwsem) + { +- rwsem_release(&rwsem->dep_map, 1, _RET_IP_); + if (--rwsem->read_depth == 0) + rt_mutex_unlock(&rwsem->lock); + } ++ ++void rt_up_read(struct rw_semaphore *rwsem) ++{ ++ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); ++ __rt_up_read(rwsem); ++} + EXPORT_SYMBOL(rt_up_read); + + /* +-- +2.1.4 + diff --git a/debian/patches/features/all/rt/locking-ww_mutex-fix-ww_mutex-vs-self-deadlock.patch b/debian/patches/features/all/rt/locking-ww_mutex-fix-ww_mutex-vs-self-deadlock.patch index 8f4603cfd..03ffc1436 100644 --- a/debian/patches/features/all/rt/locking-ww_mutex-fix-ww_mutex-vs-self-deadlock.patch +++ b/debian/patches/features/all/rt/locking-ww_mutex-fix-ww_mutex-vs-self-deadlock.patch @@ -2,7 +2,7 @@ From 230662ad0892c4e26500ee332084fca6fc04b7aa Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Thu, 26 Feb 2015 09:02:05 +0100 Subject: [PATCH] locking: ww_mutex: fix ww_mutex vs self-deadlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If the caller already holds the mutex, task_blocks_on_rt_mutex() returns -EDEADLK, we proceed directly to rt_mutex_handle_deadlock() @@ -18,7 +18,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -1679,12 +1679,19 @@ rt_mutex_slowlock(struct rt_mutex *lock, +@@ -1680,12 +1680,19 @@ rt_mutex_slowlock(struct rt_mutex *lock, /* sleep on the mutex */ ret = __rt_mutex_slowlock(lock, state, timeout, &waiter, ww_ctx); @@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior } else if (ww_ctx) { ww_mutex_account_lock(lock, ww_ctx); } -@@ -2223,8 +2230,7 @@ int __sched +@@ -2241,8 +2248,7 @@ int __sched might_sleep(); mutex_acquire_nest(&lock->base.dep_map, 0, 0, &ww_ctx->dep_map, _RET_IP_); @@ -49,7 +49,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (ret) mutex_release(&lock->base.dep_map, 1, _RET_IP_); else if (!ret && ww_ctx->acquired > 1) -@@ -2242,8 +2248,7 @@ int __sched +@@ -2260,8 +2266,7 @@ int __sched might_sleep(); mutex_acquire_nest(&lock->base.dep_map, 0, 0, &ww_ctx->dep_map, _RET_IP_); @@ -59,7 +59,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (ret) mutex_release(&lock->base.dep_map, 1, _RET_IP_); else if (!ret && ww_ctx->acquired > 1) -@@ -2255,11 +2260,13 @@ EXPORT_SYMBOL_GPL(__ww_mutex_lock); +@@ -2273,11 +2278,13 @@ EXPORT_SYMBOL_GPL(__ww_mutex_lock); void __sched ww_mutex_unlock(struct ww_mutex *lock) { @@ -74,7 +74,7 @@ Signed-off-by: Sebastian Andrzej Siewior #ifdef CONFIG_DEBUG_MUTEXES DEBUG_LOCKS_WARN_ON(!lock->ctx->acquired); #endif -@@ -2268,7 +2275,7 @@ void __sched ww_mutex_unlock(struct ww_m +@@ -2286,7 +2293,7 @@ void __sched ww_mutex_unlock(struct ww_m lock->ctx = NULL; } diff --git a/debian/patches/features/all/rt/md-disable-bcache.patch b/debian/patches/features/all/rt/md-disable-bcache.patch index e0dcdbb3a..1dee8f341 100644 --- a/debian/patches/features/all/rt/md-disable-bcache.patch +++ b/debian/patches/features/all/rt/md-disable-bcache.patch @@ -5,7 +5,7 @@ Subject: [PATCH] md: disable bcache 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 e06418845..23bc79bee 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz __raid_run_ops() disables preemption with get_cpu() around the access to the raid5_percpu variables. That causes scheduling while atomic diff --git a/debian/patches/features/all/rt/migrate-disable-rt-variant.patch b/debian/patches/features/all/rt/migrate-disable-rt-variant.patch index 2b18f83a8..234f1a93c 100644 --- a/debian/patches/features/all/rt/migrate-disable-rt-variant.patch +++ b/debian/patches/features/all/rt/migrate-disable-rt-variant.patch @@ -1,7 +1,7 @@ Subject: migrate-disable-rt-variant.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 19:48:20 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch index 432fb304b..d92557009 100644 --- a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch +++ b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch @@ -2,7 +2,7 @@ From cf189cc2685cbe22602cac460a75debb781e5cdb Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 29 Nov 2013 00:19:41 -0500 Subject: [PATCH] migrate_disable pushd down in atomic_dec_and_spin_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Nicholas Mc Guire Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch index f1bcdd0a1..22c729719 100644 --- a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch +++ b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch @@ -2,7 +2,7 @@ From 12e7b0fcf6bfc4035cec0a9ec0f30aaf3b3fe905 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 29 Nov 2013 00:17:27 -0500 Subject: [PATCH] migrate_disable pushd down in rt_spin_trylock_irqsave -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Nicholas Mc Guire Signed-off-by: Sebastian Andrzej Siewior diff --git a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch index 16cc89322..4ec650fd2 100644 --- a/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch +++ b/debian/patches/features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch @@ -2,7 +2,7 @@ From 1924bc91c8cf91fc4c94047a4b9985cf6b9e31f1 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 29 Nov 2013 00:21:59 -0500 Subject: [PATCH] migrate_disable pushd down in rt_write_trylock_irqsave -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Nicholas Mc Guire Signed-off-by: Sebastian Andrzej Siewior 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 309c3e600..bb4a069cb 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.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:10:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch b/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch index af63ba23b..89edffcad 100644 --- a/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch +++ b/debian/patches/features/all/rt/mips-enable-interrupts-in-signal.patch @@ -1,7 +1,7 @@ Subject: mips-enable-interrupts-in-signal.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 21:32:10 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch b/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch index c72020592..2aa781336 100644 --- a/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch +++ b/debian/patches/features/all/rt/mm-bounce-local-irq-save-nort.patch @@ -1,7 +1,7 @@ Subject: mm: bounce: Use local_irq_save_nort From: Thomas Gleixner Date: Wed, 09 Jan 2013 10:33:09 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz kmap_atomic() is preemptible on RT. 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 0e49d1a57..b6b78344b 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: convert swap to percpu locked -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner 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 117e632db..b9582cf40 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/mm-enable-slub.patch b/debian/patches/features/all/rt/mm-enable-slub.patch index 8e955ff15..4df231195 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Make SLUB RT aware and remove the restriction in Kconfig. 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 f98afa1b1..00a935468 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: [PATCH] mm: make vmstat -rt aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch b/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch index a255db807..8bb9d7539 100644 --- a/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch +++ b/debian/patches/features/all/rt/mm-memcontrol-Don-t-call-schedule_work_on-in-preempt.patch @@ -2,7 +2,7 @@ From: Yang Shi Subject: [V3 PATCH] mm/memcontrol: Don't call schedule_work_on in preemption disabled context Date: Wed, 30 Oct 2013 11:48:33 -0700 Message-ID: <1383158913-16325-1-git-send-email-yang.shi@windriver.com> -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The following trace is triggered when running ltp oom test cases: 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 4c6455555..8b02bc31b 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: [PATCH] mm/memcontrol: do no disable interrupts Date: Wed, 28 Jan 2015 17:14:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-list-last-entry.patch b/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch index 429a01bf1..bfc1f960f 100644 --- a/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch +++ b/debian/patches/features/all/rt/mm-page-alloc-use-list-last-entry.patch @@ -1,7 +1,7 @@ Subject: mm-page-alloc-use-list-last-entry.patch From: Peter Zijlstra Date: Tue, 21 Jun 2011 11:24:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 ec958f641..612665b6b 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 70548c2e8..e1b7c4c45 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, 3 Jul 2009 08:44:37 -0500 Subject: mm: page_alloc reduce lock sections further -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 2cc3ca71d..cf2464aec 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-protect-activate-switch-mm.patch b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch index 0d9d5d376..c93f8cebe 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 @@ -2,7 +2,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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 861cb77cc..85092bfca 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -230,7 +230,7 @@ Link: http://lkml.kernel.org/r/1311842631.5890.208.camel@twins #include #include -@@ -1743,6 +1744,12 @@ struct task_struct { +@@ -1789,6 +1790,12 @@ struct task_struct { struct rcu_head put_rcu; int softirq_nestcnt; #endif 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 a72808b27..b040f6345 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 dont disable irqs on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/mm-slub-move-slab-initialization-into-irq-enabled-re.patch b/debian/patches/features/all/rt/mm-slub-move-slab-initialization-into-irq-enabled-re.patch new file mode 100644 index 000000000..32fa20d77 --- /dev/null +++ b/debian/patches/features/all/rt/mm-slub-move-slab-initialization-into-irq-enabled-re.patch @@ -0,0 +1,169 @@ +From: Thomas Gleixner +Date: Mon, 13 Jul 2015 14:00:30 +0200 +Subject: mm/slub: move slab initialization into irq enabled region +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +Initializing a new slab can introduce rather large latencies because most +of the initialization runs always with interrupts disabled. + +There is no point in doing so. The newly allocated slab is not visible +yet, so there is no reason to protect it against concurrent alloc/free. + +Move the expensive parts of the initialization into allocate_slab(), so +for all allocations with GFP_WAIT set, interrupts are enabled. + +Cc: stable-rt@vger.kernel.org +Signed-off-by: Thomas Gleixner +Acked-by: Christoph Lameter +Cc: Pekka Enberg +Cc: David Rientjes +Cc: Joonsoo Kim +Cc: Sebastian Andrzej Siewior +Cc: Steven Rostedt +Cc: Peter Zijlstra +Signed-off-by: Andrew Morton +Signed-off-by: Sebastian Andrzej Siewior +--- + mm/slub.c | 89 ++++++++++++++++++++++++++++++--------------------------------- + 1 file changed, 42 insertions(+), 47 deletions(-) + +diff --git a/mm/slub.c b/mm/slub.c +index 6d7f5165a634..935ad58acde4 100644 +--- a/mm/slub.c ++++ b/mm/slub.c +@@ -1314,6 +1314,17 @@ static inline void slab_free_hook(struct kmem_cache *s, void *x) + kasan_slab_free(s, x); + } + ++static void setup_object(struct kmem_cache *s, struct page *page, ++ void *object) ++{ ++ setup_object_debug(s, page, object); ++ if (unlikely(s->ctor)) { ++ kasan_unpoison_object_data(s, object); ++ s->ctor(object); ++ kasan_poison_object_data(s, object); ++ } ++} ++ + /* + * Slab allocation and freeing + */ +@@ -1344,6 +1355,8 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) + struct page *page; + struct kmem_cache_order_objects oo = s->oo; + gfp_t alloc_gfp; ++ void *start, *p; ++ int idx, order; + bool enableirqs; + + flags &= gfp_allowed_mask; +@@ -1372,13 +1385,13 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) + * Try a lower order alloc if possible + */ + page = alloc_slab_page(s, alloc_gfp, node, oo); +- +- if (page) +- stat(s, ORDER_FALLBACK); ++ if (!unlikely(page)) ++ goto out; ++ stat(s, ORDER_FALLBACK); + } + +- if (kmemcheck_enabled && page +- && !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) { ++ if (kmemcheck_enabled && ++ !(s->flags & (SLAB_NOTRACK | DEBUG_DEFAULT_FLAGS))) { + int pages = 1 << oo_order(oo); + + kmemcheck_alloc_shadow(page, oo_order(oo), alloc_gfp, node); +@@ -1393,51 +1406,9 @@ static struct page *allocate_slab(struct kmem_cache *s, gfp_t flags, int node) + kmemcheck_mark_unallocated_pages(page, pages); + } + +- if (enableirqs) +- local_irq_disable(); +- if (!page) +- return NULL; +- + page->objects = oo_objects(oo); +- mod_zone_page_state(page_zone(page), +- (s->flags & SLAB_RECLAIM_ACCOUNT) ? +- NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE, +- 1 << oo_order(oo)); +- +- return page; +-} +- +-static void setup_object(struct kmem_cache *s, struct page *page, +- void *object) +-{ +- setup_object_debug(s, page, object); +- if (unlikely(s->ctor)) { +- kasan_unpoison_object_data(s, object); +- s->ctor(object); +- kasan_poison_object_data(s, object); +- } +-} +- +-static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) +-{ +- struct page *page; +- void *start; +- void *p; +- int order; +- int idx; +- +- if (unlikely(flags & GFP_SLAB_BUG_MASK)) { +- pr_emerg("gfp: %u\n", flags & GFP_SLAB_BUG_MASK); +- BUG(); +- } +- +- page = allocate_slab(s, +- flags & (GFP_RECLAIM_MASK | GFP_CONSTRAINT_MASK), node); +- if (!page) +- goto out; + + order = compound_order(page); +- inc_slabs_node(s, page_to_nid(page), page->objects); + page->slab_cache = s; + __SetPageSlab(page); + if (page->pfmemalloc) +@@ -1461,10 +1432,34 @@ static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) + page->freelist = start; + page->inuse = page->objects; + page->frozen = 1; ++ + out: ++ if (enableirqs) ++ local_irq_disable(); ++ if (!page) ++ return NULL; ++ ++ mod_zone_page_state(page_zone(page), ++ (s->flags & SLAB_RECLAIM_ACCOUNT) ? ++ NR_SLAB_RECLAIMABLE : NR_SLAB_UNRECLAIMABLE, ++ 1 << oo_order(oo)); ++ ++ inc_slabs_node(s, page_to_nid(page), page->objects); ++ + return page; + } + ++static struct page *new_slab(struct kmem_cache *s, gfp_t flags, int node) ++{ ++ if (unlikely(flags & GFP_SLAB_BUG_MASK)) { ++ pr_emerg("gfp: %u\n", flags & GFP_SLAB_BUG_MASK); ++ BUG(); ++ } ++ ++ return allocate_slab(s, ++ flags & (GFP_RECLAIM_MASK | GFP_CONSTRAINT_MASK), node); ++} ++ + static void __free_slab(struct kmem_cache *s, struct page *page) + { + int order = compound_order(page); +-- +2.1.4 + 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 d95253023..7f25f8429 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.patch From: Thomas Gleixner Date: Tue, 12 Jul 2011 11:39:36 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 2f26825d9..294f2214c 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 @@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 29 Jan 2015 17:19:44 +0100 Subject: [PATCH] mm/workingset: do not protect workingset_shadow_nodes with irq off -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/mmc-sdhci-don-t-provide-hard-irq-handler.patch b/debian/patches/features/all/rt/mmc-sdhci-don-t-provide-hard-irq-handler.patch index a14aff00d..813541ea0 100644 --- a/debian/patches/features/all/rt/mmc-sdhci-don-t-provide-hard-irq-handler.patch +++ b/debian/patches/features/all/rt/mmc-sdhci-don-t-provide-hard-irq-handler.patch @@ -5,7 +5,7 @@ Subject: [PATCH] mmc: sdhci: don't provide hard irq handler 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz the sdhci code provides both irq handlers: the primary and the thread handler. Initially it was meant for the primary handler to be very 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 508088919..9058d5cbb 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz On !RT interrupt runs with interrupts disabled. On RT it's in a thread, so no need to disable interrupts at all. diff --git a/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch b/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch index 5153b64c9..e9568c685 100644 --- a/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch +++ b/debian/patches/features/all/rt/move_sched_delayed_work_to_helper.patch @@ -10,7 +10,7 @@ Cc: Thomas Gleixner , Subject: [RFC][PATCH RT 5/6] rt,ntp: Move call to schedule_delayed_work() to helper thread References: <20130626192806.107564905@goodmis.org> Content-Disposition: inline; filename=ntp-sched-delay-thread.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The ntp code for notify_cmos_timer() is called from a hard interrupt context. schedule_delayed_work() under PREEMPT_RT_FULL calls spinlocks 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 1d97b71be..57f2173d5 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: mutex-no-spin-on-rt.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 dd5bead14..a3c0d0db6 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Replace it by a local lock. Though that's pretty inefficient :( 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 d4a688cb2..4f1f21ecd 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-flip-lock-dep-thingy.patch b/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch index 6f79a07d8..3b1f5f3c5 100644 --- a/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch +++ b/debian/patches/features/all/rt/net-flip-lock-dep-thingy.patch @@ -1,7 +1,7 @@ Subject: net-flip-lock-dep-thingy.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 10:59:58 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz ======================================================= [ INFO: possible circular locking dependency detected ] diff --git a/debian/patches/features/all/rt/net-gianfar-do-not-disable-interrupts.patch b/debian/patches/features/all/rt/net-gianfar-do-not-disable-interrupts.patch index 69efe601b..4aa8414ba 100644 --- a/debian/patches/features/all/rt/net-gianfar-do-not-disable-interrupts.patch +++ b/debian/patches/features/all/rt/net-gianfar-do-not-disable-interrupts.patch @@ -2,7 +2,7 @@ From 271b3e203a92b4ba55b4a6ff3281a59e99ad486c Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Tue, 25 Mar 2014 18:34:20 +0100 Subject: [PATCH] net: gianfar: do not disable interrupts -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz each per-queue lock is taken with spin_lock_irqsave() except in the case where all of them are taken for some kind of serialisation. As an 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 187bb9e83..971e15b0c 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: [PATCH] net: Add a mutex around devnet_rename_seq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-netif-rx-ni-use-local-bh-disable.patch b/debian/patches/features/all/rt/net-netif-rx-ni-use-local-bh-disable.patch index 73d298463..019de9ef7 100644 --- a/debian/patches/features/all/rt/net-netif-rx-ni-use-local-bh-disable.patch +++ b/debian/patches/features/all/rt/net-netif-rx-ni-use-local-bh-disable.patch @@ -1,7 +1,7 @@ Subject: net: Use local_bh_disable in netif_rx_ni() From: Thomas Gleixner Date: Sun, 28 Oct 2012 15:12:49 +0000 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This code triggers the new WARN in __raise_softirq_irqsoff() though it actually looks at the softirq pending bit and calls into the softirq diff --git a/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch b/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch index 5655e00be..a443b0d39 100644 --- a/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch +++ b/debian/patches/features/all/rt/net-netif_rx_ni-migrate-disable.patch @@ -1,7 +1,7 @@ Subject: net-netif_rx_ni-migrate-disable.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 16:29:27 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 d843f9e05..4224f8a57 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 @@ -3,7 +3,7 @@ From: Marc Kleine-Budde Date: Wed, 5 Mar 2014 00:49:47 +0100 Subject: [PATCH] net: sched: dev_deactivate_many(): use msleep(1) instead of yield() to wait for outstanding qdisc_run calls -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-tx-action-avoid-livelock-on-rt.patch b/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch index 4b1494270..b5130ed41 100644 --- a/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch +++ b/debian/patches/features/all/rt/net-tx-action-avoid-livelock-on-rt.patch @@ -1,7 +1,7 @@ Subject: net: Avoid livelock in net_tx_action() on RT From: Steven Rostedt Date: Thu, 06 Oct 2011 10:48:39 -0400 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz qdisc_lock is taken w/o disabling interrupts or bottom halfs. So code holding a qdisc_lock() can be interrupted and softirqs can run on the 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 88748a640..bb3e40c01 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-wireless-warn-nort.patch b/debian/patches/features/all/rt/net-wireless-warn-nort.patch index 11a1877cd..842c081a3 100644 --- a/debian/patches/features/all/rt/net-wireless-warn-nort.patch +++ b/debian/patches/features/all/rt/net-wireless-warn-nort.patch @@ -1,7 +1,7 @@ Subject: net-wireless-warn-nort.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 21:05:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 a3c4bab88..62e37ecc6 100644 --- a/debian/patches/features/all/rt/oleg-signal-rt-fix.patch +++ b/debian/patches/features/all/rt/oleg-signal-rt-fix.patch @@ -1,6 +1,6 @@ From: Oleg Nesterov Subject: signal/x86: Delay calling signals in atomic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -77,7 +77,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1479,6 +1479,10 @@ struct task_struct { +@@ -1523,6 +1523,10 @@ struct task_struct { sigset_t blocked, real_blocked; sigset_t saved_sigmask; /* restored if set_restore_sigmask() was used */ struct sigpending pending; 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 90dab139b..4a6cf4589 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,6 +1,6 @@ From: Thomas Gleixner Subject: panic: skip get_random_bytes for RT_FULL in init_oops_id -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz --- kernel/panic.c | 2 ++ 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 00aa0ef3c..fcaeada37 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-access-use-__wake_up_all_locked.patch b/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch index f4467c082..e6df09a36 100644 --- a/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch +++ b/debian/patches/features/all/rt/pci-access-use-__wake_up_all_locked.patch @@ -1,7 +1,7 @@ Subject: pci: Use __wake_up_all_locked pci_unblock_user_cfg_access() From: Thomas Gleixner Date: Thu, 01 Dec 2011 00:07:16 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The waitqueue is protected by the pci_lock, so we can just avoid to lock the waitqueue lock itself. That prevents the diff --git a/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch b/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch deleted file mode 100644 index 679c1a555..000000000 --- a/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 49faecbc581de038b423d7abbebe0d7b50ed15ef Mon Sep 17 00:00:00 2001 -From: Sebastian Andrzej Siewior -Date: Mon, 8 Apr 2013 16:08:46 +0200 -Subject: [PATCH] percpu-rwsem: compile fix -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz - -The shortcut on mainline skip lockdep. No idea why this is a good thing. - -Signed-off-by: Sebastian Andrzej Siewior ---- - kernel/locking/percpu-rwsem.c | 4 ++++ - 1 file changed, 4 insertions(+) - ---- a/kernel/locking/percpu-rwsem.c -+++ b/kernel/locking/percpu-rwsem.c -@@ -84,8 +84,12 @@ void percpu_down_read(struct percpu_rw_s - - down_read(&brw->rw_sem); - atomic_inc(&brw->slow_read_ctr); -+#ifdef CONFIG_PREEMPT_RT_FULL -+ up_read(&brw->rw_sem); -+#else - /* avoid up_read()->rwsem_release() */ - __up_read(&brw->rw_sem); -+#endif - } - - void percpu_up_read(struct percpu_rw_semaphore *brw) diff --git a/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch b/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch index 82fa6a3c8..a78a3583f 100644 --- a/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch +++ b/debian/patches/features/all/rt/percpu_ida-use-locklocks.patch @@ -2,7 +2,7 @@ From a7fac98271eef0bd3b872c56ba8fc1989646d3fd Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 9 Apr 2014 11:58:17 +0200 Subject: [PATCH] percpu_ida: use locklocks -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz the local_irq_save() + spin_lock() does not work that well on -RT diff --git a/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch b/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch index 86a9e691b..318e078f1 100644 --- a/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch +++ b/debian/patches/features/all/rt/perf-make-swevent-hrtimer-irqsafe.patch @@ -1,7 +1,7 @@ From: Yong Zhang Date: Wed, 11 Jul 2012 22:05:21 +0000 Subject: perf: Make swevent hrtimer run in irq instead of softirq -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Otherwise we get a deadlock like below: diff --git a/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch b/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch index 4a71e1af0..cb1eb045a 100644 --- a/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch +++ b/debian/patches/features/all/rt/perf-move-irq-work-to-softirq-in-rt.patch @@ -1,7 +1,7 @@ Subject: x86-no-perf-irq-work-rt.patch From: Thomas Gleixner Date: Wed, 13 Jul 2011 14:05:05 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch index ce5ba709d..7431c96d0 100644 --- a/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable-2.patch @@ -1,7 +1,7 @@ Subject: sched: Generic migrate_disable From: Peter Zijlstra Date: Thu Aug 11 15:14:58 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Make migrate_disable() be a preempt_disable() for !rt kernels. This allows generic code to use it but still enforces that these code @@ -64,7 +64,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org #ifdef CONFIG_PREEMPT_NOTIFIERS --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1319,7 +1319,9 @@ struct task_struct { +@@ -1363,7 +1363,9 @@ struct task_struct { #endif unsigned int policy; @@ -74,7 +74,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org int nr_cpus_allowed; cpumask_t cpus_allowed; -@@ -3103,11 +3105,22 @@ static inline void set_task_cpu(struct t +@@ -3149,11 +3151,22 @@ static inline void set_task_cpu(struct t #endif /* CONFIG_SMP */ @@ -117,7 +117,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org * Callback to arch code if there's nosmp or maxcpus=0 on the --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4813,7 +4813,7 @@ static struct rq *move_queued_task(struc +@@ -4859,7 +4859,7 @@ static struct rq *move_queued_task(struc void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -126,7 +126,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org if (p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, new_mask); p->nr_cpus_allowed = cpumask_weight(new_mask); -@@ -4865,7 +4865,7 @@ int set_cpus_allowed_ptr(struct task_str +@@ -4911,7 +4911,7 @@ int set_cpus_allowed_ptr(struct task_str do_set_cpus_allowed(p, new_mask); /* Can the task run on the task's current CPU? If so, we're done */ @@ -135,7 +135,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org goto out; dest_cpu = cpumask_any_and(cpu_active_mask, new_mask); -@@ -4885,6 +4885,7 @@ int set_cpus_allowed_ptr(struct task_str +@@ -4931,6 +4931,7 @@ int set_cpus_allowed_ptr(struct task_str } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); @@ -143,7 +143,7 @@ Link: http://lkml.kernel.org/n/tip-275i87sl8e1jcamtchmehonm@git.kernel.org void migrate_disable(void) { struct task_struct *p = current; -@@ -4977,6 +4978,7 @@ void migrate_enable(void) +@@ -5023,6 +5024,7 @@ void migrate_enable(void) preempt_enable(); } EXPORT_SYMBOL(migrate_enable); diff --git a/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch index b6c30073c..e4c40d404 100644 --- a/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-migrate_disable.patch @@ -1,7 +1,7 @@ Subject: sched: Optimize migrate_disable From: Peter Zijlstra Date: Thu Aug 11 15:03:35 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Change from task_rq_lock() to raw_spin_lock(&rq->lock) to avoid a few atomic ops. See comment on why it should be safe. @@ -14,7 +14,7 @@ Link: http://lkml.kernel.org/n/tip-cbz6hkl5r5mvwtx5s3tor2y6@git.kernel.org --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4905,7 +4905,19 @@ void migrate_disable(void) +@@ -4951,7 +4951,19 @@ void migrate_disable(void) preempt_enable(); return; } @@ -35,7 +35,7 @@ Link: http://lkml.kernel.org/n/tip-cbz6hkl5r5mvwtx5s3tor2y6@git.kernel.org p->migrate_disable = 1; mask = tsk_cpus_allowed(p); -@@ -4916,7 +4928,7 @@ void migrate_disable(void) +@@ -4962,7 +4974,7 @@ void migrate_disable(void) p->sched_class->set_cpus_allowed(p, mask); p->nr_cpus_allowed = cpumask_weight(mask); } @@ -44,7 +44,7 @@ Link: http://lkml.kernel.org/n/tip-cbz6hkl5r5mvwtx5s3tor2y6@git.kernel.org preempt_enable(); } EXPORT_SYMBOL(migrate_disable); -@@ -4944,7 +4956,11 @@ void migrate_enable(void) +@@ -4990,7 +5002,11 @@ void migrate_enable(void) return; } @@ -57,7 +57,7 @@ Link: http://lkml.kernel.org/n/tip-cbz6hkl5r5mvwtx5s3tor2y6@git.kernel.org p->migrate_disable = 0; mask = tsk_cpus_allowed(p); -@@ -4956,7 +4972,7 @@ void migrate_enable(void) +@@ -5002,7 +5018,7 @@ void migrate_enable(void) p->nr_cpus_allowed = cpumask_weight(mask); } 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 2362bb51a..8da73d093 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz With RT_FULL we get the below wreckage: 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 45ea482d2..146dfbce8 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 a59b5111b..032573581 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 @@ Subject: rwsem-inlcude-fix.patch From: Thomas Gleixner Date: Fri, 15 Jul 2011 21:24:27 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/ping-sysrq.patch b/debian/patches/features/all/rt/ping-sysrq.patch index 9c4abd842..233d92c15 100644 --- a/debian/patches/features/all/rt/ping-sysrq.patch +++ b/debian/patches/features/all/rt/ping-sysrq.patch @@ -1,7 +1,7 @@ Subject: net: sysrq via icmp From: Carsten Emde Date: Tue, 19 Jul 2011 13:51:17 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz There are (probably rare) situations when a system crashed and the system console becomes unresponsive but the network icmp layer still is alive. diff --git a/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch b/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch index c52552862..bcdd1f4bf 100644 --- a/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch +++ b/debian/patches/features/all/rt/posix-timers-avoid-wakeups-when-no-timers-are-active.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 08:44:44 -0500 Subject: posix-timers: Avoid wakeups when no timers are active -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Waking the thread even when no timers are scheduled is useless. 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 44d381a40..4ba127417 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-shorten-cpu-timers-thread.patch b/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch index 8dd0f1d7b..894af108d 100644 --- a/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch +++ b/debian/patches/features/all/rt/posix-timers-shorten-cpu-timers-thread.patch @@ -1,7 +1,7 @@ From: Arnaldo Carvalho de Melo Date: Fri, 3 Jul 2009 08:30:00 -0500 Subject: posix-timers: Shorten posix_cpu_timers/ kernel thread names -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Shorten the softirq kernel thread names because they always overflow the limited comm length, appearing as "posix_cpu_timer" CPU# times. 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 b0bcd393c..fc396219d 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. @@ -43,7 +43,7 @@ Signed-off-by: Thomas Gleixner [PIDTYPE_PGID] = INIT_PID_LINK(PIDTYPE_PGID), \ --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1442,6 +1442,9 @@ struct task_struct { +@@ -1486,6 +1486,9 @@ struct task_struct { struct task_cputime cputime_expires; struct list_head cpu_timers[3]; 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 a36174ee4..1edf38d45 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: power-disable-highmem-on-rt.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 17:08:34 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 1947664aa..646b392df 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,6 +1,6 @@ From: Thomas Gleixner Subject: Powerpc: Use generic rwsem on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 6d9a597d9..e3795459f 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 @@ -3,7 +3,7 @@ From: Bogdan Purcareata Date: Fri, 24 Apr 2015 15:53:13 +0000 Subject: [PATCH] powerpc/kvm: Disable in-kernel MPIC emulation for PREEMPT_RT_FULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 108b49875..40c79cae6 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: [PATCH] powerpc-preempt-lazy-support.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 369d08f1c..4d565969c 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 @@ -3,7 +3,7 @@ From: Paul Gortmaker Date: Sun, 31 May 2015 14:44:42 -0400 Subject: [PATCH] powerpc: ps3/device-init.c - adapt to completions using swait vs wait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 451fd76ff..99ead0657 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -176,7 +176,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2851,6 +2851,43 @@ static inline int test_tsk_need_resched( +@@ -2897,6 +2897,43 @@ static inline int test_tsk_need_resched( return unlikely(test_tsk_thread_flag(tsk,TIF_NEED_RESCHED)); } @@ -258,7 +258,7 @@ Signed-off-by: Thomas Gleixner default PREEMPT_NONE --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -574,6 +574,38 @@ void resched_curr(struct rq *rq) +@@ -620,6 +620,38 @@ void resched_curr(struct rq *rq) trace_sched_wake_idle_without_ipi(cpu); } @@ -297,7 +297,7 @@ Signed-off-by: Thomas Gleixner void resched_cpu(int cpu) { struct rq *rq = cpu_rq(cpu); -@@ -1988,6 +2020,9 @@ int sched_fork(unsigned long clone_flags +@@ -2034,6 +2066,9 @@ int sched_fork(unsigned long clone_flags p->on_cpu = 0; #endif init_task_preempt_count(p); @@ -307,7 +307,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SMP plist_node_init(&p->pushable_tasks, MAX_PRIO); RB_CLEAR_NODE(&p->pushable_dl_tasks); -@@ -2741,6 +2776,7 @@ void migrate_disable(void) +@@ -2787,6 +2822,7 @@ void migrate_disable(void) } preempt_disable(); @@ -315,7 +315,7 @@ Signed-off-by: Thomas Gleixner pin_current_cpu(); p->migrate_disable = 1; preempt_enable(); -@@ -2795,6 +2831,7 @@ void migrate_enable(void) +@@ -2841,6 +2877,7 @@ void migrate_enable(void) unpin_current_cpu(); preempt_enable(); @@ -323,7 +323,7 @@ Signed-off-by: Thomas Gleixner } EXPORT_SYMBOL(migrate_enable); #else -@@ -2928,6 +2965,7 @@ static void __sched __schedule(void) +@@ -2974,6 +3011,7 @@ static void __sched __schedule(void) next = pick_next_task(rq, prev); clear_tsk_need_resched(prev); @@ -331,7 +331,7 @@ Signed-off-by: Thomas Gleixner clear_preempt_need_resched(); rq->clock_skip_update = 0; -@@ -3072,6 +3110,14 @@ asmlinkage __visible void __sched notrac +@@ -3118,6 +3156,14 @@ asmlinkage __visible void __sched notrac if (likely(!preemptible())) return; @@ -346,7 +346,7 @@ Signed-off-by: Thomas Gleixner do { __preempt_count_add(PREEMPT_ACTIVE); /* -@@ -4795,7 +4841,9 @@ void init_idle(struct task_struct *idle, +@@ -4841,7 +4887,9 @@ void init_idle(struct task_struct *idle, /* Set the preempt count _outside_ the spinlocks! */ init_idle_preempt_count(idle, cpu); 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 266c2e567..625903ab5 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 3b51de7c1..d7562bfb4 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: %27force_early_printk%27 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Subject: printk: 'force_early_printk' boot param to help with debugging From: Peter Zijlstra diff --git a/debian/patches/features/all/rt/printk-kill.patch b/debian/patches/features/all/rt/printk-kill.patch index d1445f347..c7b371c8b 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-kill.patch From: Ingo Molnar Date: Fri, 22 Jul 2011 17:58:40 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/printk-rt-aware.patch b/debian/patches/features/all/rt/printk-rt-aware.patch index aaddf05b7..654cd4cf0 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-rt-aware.patch From: Thomas Gleixner Date: Wed, 19 Sep 2012 14:50:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 9dcee183b..85f7c75cb 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 @@ -2,7 +2,7 @@ From 1bd263cbd3951f8f36ee6dcfe9160dafcfdd91fe Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Thu, 29 Aug 2013 18:21:04 +0200 Subject: [PATCH] ptrace: fix ptrace vs tasklist_lock race -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz As explained by Alexander Fyodorov : @@ -43,7 +43,7 @@ Signed-off-by: Sebastian Andrzej Siewior #define task_contributes_to_load(task) \ ((task->state & TASK_UNINTERRUPTIBLE) != 0 && \ (task->flags & PF_FROZEN) == 0) -@@ -2819,6 +2816,51 @@ static inline int signal_pending_state(l +@@ -2865,6 +2862,51 @@ static inline int signal_pending_state(l return (state & TASK_INTERRUPTIBLE) || __fatal_signal_pending(p); } @@ -113,7 +113,7 @@ Signed-off-by: Sebastian Andrzej Siewior spin_unlock_irq(&task->sighand->siglock); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1159,6 +1159,18 @@ struct migration_arg { +@@ -1205,6 +1205,18 @@ struct migration_arg { static int migration_cpu_stop(void *data); @@ -132,7 +132,7 @@ Signed-off-by: Sebastian Andrzej Siewior /* * wait_task_inactive - wait for a thread to unschedule. * -@@ -1203,7 +1215,7 @@ unsigned long wait_task_inactive(struct +@@ -1249,7 +1261,7 @@ unsigned long wait_task_inactive(struct * is actually now running somewhere else! */ while (task_running(rq, p)) { @@ -141,7 +141,7 @@ Signed-off-by: Sebastian Andrzej Siewior return 0; cpu_relax(); } -@@ -1218,7 +1230,8 @@ unsigned long wait_task_inactive(struct +@@ -1264,7 +1276,8 @@ unsigned long wait_task_inactive(struct running = task_running(rq, p); queued = task_on_rq_queued(p); ncsw = 0; @@ -151,7 +151,7 @@ Signed-off-by: Sebastian Andrzej Siewior ncsw = p->nvcsw | LONG_MIN; /* sets MSB */ task_rq_unlock(rq, p, &flags); -@@ -1754,7 +1767,7 @@ static void try_to_wake_up_local(struct +@@ -1800,7 +1813,7 @@ static void try_to_wake_up_local(struct */ int wake_up_process(struct task_struct *p) { diff --git a/debian/patches/features/all/rt/radix-tree-rt-aware.patch b/debian/patches/features/all/rt/radix-tree-rt-aware.patch index bb736a87f..ee107c5a7 100644 --- a/debian/patches/features/all/rt/radix-tree-rt-aware.patch +++ b/debian/patches/features/all/rt/radix-tree-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:33:18 +0200 Subject: radix-tree-rt-aware.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 c645a2e7d..47f282812 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/rcu-Eliminate-softirq-processing-from-rcutree.patch b/debian/patches/features/all/rt/rcu-Eliminate-softirq-processing-from-rcutree.patch index 789deb28e..ba5f961ea 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 @@ -2,7 +2,7 @@ From 410f7ce05ee95307fb938e8c8061c50bb451b933 Mon Sep 17 00:00:00 2001 From: "Paul E. McKenney" Date: Mon, 4 Nov 2013 13:21:10 -0800 Subject: [PATCH] rcu: Eliminate softirq processing from rcutree -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 e516aeeb9..72f990b7e 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-make-RCU_BOOST-default-on-RT.patch b/debian/patches/features/all/rt/rcu-make-RCU_BOOST-default-on-RT.patch index 6c57b9657..003422589 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 @@ -2,7 +2,7 @@ From d8038d5a87f2a68ab1e18bdf63eef2b6b54f7f7d Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 21 Mar 2014 20:19:05 +0100 Subject: [PATCH] rcu: make RCU_BOOST default on RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 304d3a949..79fd17e73 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/rcu-more-swait-conversions.patch b/debian/patches/features/all/rt/rcu-more-swait-conversions.patch index 87e8d1359..091c0bd5b 100644 --- a/debian/patches/features/all/rt/rcu-more-swait-conversions.patch +++ b/debian/patches/features/all/rt/rcu-more-swait-conversions.patch @@ -2,7 +2,7 @@ From eddcd14571497d3d5d6ce7df0ee1bf2ecec72292 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Wed, 31 Jul 2013 19:00:35 +0200 Subject: [PATCH] rcu-more-swait-conversions.patch -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch b/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch index a0aaeab02..b35f117ce 100644 --- a/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch +++ b/debian/patches/features/all/rt/rcu-tiny-merge-bh.patch @@ -1,7 +1,7 @@ Subject: rcu-more-fallout.patch From: Thomas Gleixner Date: Mon, 14 Nov 2011 10:57:54 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 073597410..8a02fbd13 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 @@ -2,7 +2,7 @@ From 9918ea31955628691dbfabf5dd9307ab40348958 Mon Sep 17 00:00:00 2001 From: Tiejun Chen Date: Wed, 18 Dec 2013 17:51:49 +0800 Subject: [PATCH] rcutree/rcu_bh_qs: disable irq while calling rcu_preempt_qs() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-migrate_disable-race-with-cpu-hotplug-3f.patch b/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch index 37aef656f..5e61c26e8 100644 --- a/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch +++ b/debian/patches/features/all/rt/re-migrate_disable-race-with-cpu-hotplug-3f.patch @@ -1,7 +1,7 @@ From: Yong Zhang Date: Thu, 28 Jul 2011 11:16:00 +0800 Subject: hotplug: Reread hotplug_pcp on pin_current_cpu() retry -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz When retry happens, it's likely that the task has been migrated to another cpu (except unplug failed), but it still derefernces the 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 cf5199dd2..bd7cfb63c 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 ptl->lock 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch b/debian/patches/features/all/rt/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch index 38db2ece8..335617f9b 100644 --- a/debian/patches/features/all/rt/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch +++ b/debian/patches/features/all/rt/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch @@ -2,7 +2,7 @@ From 64da626bb8995d097614a41b9d77235cacbb0740 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Thu, 2 Jan 2014 10:19:15 +0100 Subject: [PATCH 5/7] read_lock migrate_disable pushdown to rt_read_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz pushdown of migrate_disable/enable from read_*lock* to the rt_read_*lock* api level diff --git a/debian/patches/features/all/rt/relay-fix-timer-madness.patch b/debian/patches/features/all/rt/relay-fix-timer-madness.patch index 6992620d6..921388470 100644 --- a/debian/patches/features/all/rt/relay-fix-timer-madness.patch +++ b/debian/patches/features/all/rt/relay-fix-timer-madness.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:07 -0500 Subject: relay: fix timer madness -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz remove timer calls (!!!) from deep within the tracing infrastructure. This was totally bogus code that can cause lockups and worse. Poll diff --git a/debian/patches/features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch b/debian/patches/features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch index 8c918ce33..921438cdb 100644 --- a/debian/patches/features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch +++ b/debian/patches/features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch @@ -2,7 +2,7 @@ From d72e9cb0b85791306e5af8ff2a5ac410ae00efe7 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Sat, 8 Feb 2014 12:39:20 +0100 Subject: [PATCH] rt: Cleanup of unnecessary do while 0 in read/write _lock() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz With the migration pushdonw a few of the do{ }while(0) loops became obsolete but got left over - this patch diff --git a/debian/patches/features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch b/debian/patches/features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch index 726720a85..c98dfa326 100644 --- a/debian/patches/features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch +++ b/debian/patches/features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch @@ -2,7 +2,7 @@ From 22ba430bbf9fc42367921a40e2e8a6327a84ff33 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 5 Feb 2014 11:51:25 -0500 Subject: [PATCH] rt: Make cpu_chill() use hrtimer instead of msleep() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Ulrich Obergfell pointed out that cpu_chill() calls msleep() which is woken up by the ksoftirqd running the TIMER softirq. But as the cpu_chill() is diff --git a/debian/patches/features/all/rt/rt-add-rt-locks.patch b/debian/patches/features/all/rt/rt-add-rt-locks.patch index ffa5181f8..c3300c10f 100644 --- a/debian/patches/features/all/rt/rt-add-rt-locks.patch +++ b/debian/patches/features/all/rt/rt-add-rt-locks.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sun, 26 Jul 2009 19:39:56 +0200 Subject: rt: Add the preempt-rt lock replacement APIs -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Map spinlocks, rwlocks, rw_semaphores and semaphores to the rt_mutex based locking functions for preempt-rt. diff --git a/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch b/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch index fca6addc0..c680df7c7 100644 --- a/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch +++ b/debian/patches/features/all/rt/rt-add-rt-spinlock-to-headers.patch @@ -1,7 +1,7 @@ Subject: rt-add-rt-spinlocks.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:43:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch b/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch index 1a61ac497..98b13b0de 100644 --- a/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch +++ b/debian/patches/features/all/rt/rt-add-rt-to-mutex-headers.patch @@ -1,7 +1,7 @@ Subject: rt-add-rt-to-mutex-headers.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:56:22 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 cc054ba90..b35ac4c81 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 299e4cbb5..80745a35c 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-local-irq-lock.patch From: Thomas Gleixner Date: Mon, 20 Jun 2011 09:03:47 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch b/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch index 133aae4b1..af9b8ace5 100644 --- a/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch +++ b/debian/patches/features/all/rt/rt-mutex-add-sleeping-spinlocks-support.patch @@ -1,7 +1,7 @@ Subject: rt-mutex-add-sleeping-spinlocks-support.patch From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:21:25 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -111,7 +111,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/futex.c +++ b/kernel/futex.c -@@ -2586,10 +2586,7 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2613,10 +2613,7 @@ static int futex_wait_requeue_pi(u32 __u * The waiter is allocated on our stack, manipulated by the requeue * code while we sleep on uaddr. */ @@ -554,7 +554,7 @@ Signed-off-by: Thomas Gleixner /* * Task blocks on lock. * -@@ -1019,7 +1361,7 @@ static void wakeup_next_waiter(struct rt +@@ -1020,7 +1362,7 @@ static void wakeup_next_waiter(struct rt * long as we hold lock->wait_lock. The waiter task needs to * acquire it in order to dequeue the waiter. */ @@ -563,7 +563,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -1101,11 +1443,11 @@ void rt_mutex_adjust_pi(struct task_stru +@@ -1102,11 +1444,11 @@ void rt_mutex_adjust_pi(struct task_stru return; } next_lock = waiter->lock; @@ -576,7 +576,7 @@ Signed-off-by: Thomas Gleixner rt_mutex_adjust_prio_chain(task, RT_MUTEX_MIN_CHAINWALK, NULL, next_lock, NULL, task); } -@@ -1191,9 +1533,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, +@@ -1192,9 +1534,7 @@ rt_mutex_slowlock(struct rt_mutex *lock, struct rt_mutex_waiter waiter; int ret = 0; @@ -587,7 +587,7 @@ Signed-off-by: Thomas Gleixner raw_spin_lock(&lock->wait_lock); -@@ -1535,13 +1875,12 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); +@@ -1553,13 +1893,12 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); void __rt_mutex_init(struct rt_mutex *lock, const char *name) { lock->owner = NULL; @@ -602,7 +602,7 @@ Signed-off-by: Thomas Gleixner /** * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a -@@ -1556,7 +1895,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init); +@@ -1574,7 +1913,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init); void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) { @@ -621,7 +621,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_DEBUG_RT_MUTEXES unsigned long ip; struct pid *deadlock_task_pid; -@@ -141,4 +142,14 @@ extern int rt_mutex_timed_futex_lock(str +@@ -145,4 +146,14 @@ extern void rt_mutex_adjust_prio(struct # include "rtmutex.h" #endif diff --git a/debian/patches/features/all/rt/rt-nohz_full-fix-nohz_full-for-PREEMPT_RT_FULL.patch b/debian/patches/features/all/rt/rt-nohz_full-fix-nohz_full-for-PREEMPT_RT_FULL.patch index f1af36290..304044f02 100644 --- a/debian/patches/features/all/rt/rt-nohz_full-fix-nohz_full-for-PREEMPT_RT_FULL.patch +++ b/debian/patches/features/all/rt/rt-nohz_full-fix-nohz_full-for-PREEMPT_RT_FULL.patch @@ -3,7 +3,7 @@ From: Mike Galbraith Date: Sat, 11 Apr 2015 15:15:59 +0200 Subject: rt, nohz_full: fix nohz_full for PREEMPT_RT_FULL Content-Type: text/plain; charset="UTF-8" -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz A task being ticked and trying to shut the tick down will fail due to having just awakened ksoftirqd, subtract it from nr_running. @@ -17,7 +17,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -696,14 +696,29 @@ static inline bool got_nohz_idle_kick(vo +@@ -742,14 +742,29 @@ static inline bool got_nohz_idle_kick(vo #endif /* CONFIG_NO_HZ_COMMON */ #ifdef CONFIG_NO_HZ_FULL 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 7e03b9c72..9c794032d 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-preempt-base-config.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 12:39:57 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/rt-rw-lockdep-annotations.patch b/debian/patches/features/all/rt/rt-rw-lockdep-annotations.patch index 17ae89173..7d5be25b6 100644 --- a/debian/patches/features/all/rt/rt-rw-lockdep-annotations.patch +++ b/debian/patches/features/all/rt/rt-rw-lockdep-annotations.patch @@ -1,7 +1,7 @@ Subject: rt: rwsem/rwlock: lockdep annotations From: Thomas Gleixner Date: Fri, 28 Sep 2012 10:49:42 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz rwlocks and rwsems on RT do not allow multiple readers. Annotate the lockdep acquire functions accordingly. diff --git a/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch b/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch index b74104424..31a7df79d 100644 --- a/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch +++ b/debian/patches/features/all/rt/rt-sched-do-not-compare-cpu-masks-in-scheduler.patch @@ -1,7 +1,7 @@ Subject: sched: Do not compare cpu masks in scheduler Date: Tue, 27 Sep 2011 08:40:24 -0400 From: Peter Zijlstra -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra @@ -15,7 +15,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2730,16 +2730,12 @@ static inline void update_migrate_disabl +@@ -2776,16 +2776,12 @@ static inline void update_migrate_disabl */ mask = tsk_cpus_allowed(p); diff --git a/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch b/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch index 8cd6d2efa..ad09ffb75 100644 --- a/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch +++ b/debian/patches/features/all/rt/rt-sched-have-migrate_disable-ignore-bounded-threads.patch @@ -1,7 +1,7 @@ Subject: sched: Have migrate_disable ignore bounded threads Date: Tue, 27 Sep 2011 08:40:25 -0400 From: Peter Zijlstra -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra @@ -15,7 +15,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2742,7 +2742,7 @@ void migrate_disable(void) +@@ -2788,7 +2788,7 @@ void migrate_disable(void) { struct task_struct *p = current; @@ -24,7 +24,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic++; #endif -@@ -2772,7 +2772,7 @@ void migrate_enable(void) +@@ -2818,7 +2818,7 @@ void migrate_enable(void) unsigned long flags; struct rq *rq; @@ -33,7 +33,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_SCHED_DEBUG p->migrate_disable_atomic--; #endif -@@ -2792,26 +2792,21 @@ void migrate_enable(void) +@@ -2838,26 +2838,21 @@ void migrate_enable(void) preempt_disable(); if (unlikely(migrate_disabled_updated(p))) { /* diff --git a/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch b/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch index 46379f879..62de7f7c5 100644 --- a/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch +++ b/debian/patches/features/all/rt/rt-sched-postpone-actual-migration-disalbe-to-schedule.patch @@ -1,7 +1,7 @@ Subject: sched: Postpone actual migration disalbe to schedule From: Steven Rostedt Date: Tue, 27 Sep 2011 08:40:23 -0400 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The migrate_disable() can cause a bit of a overhead to the RT kernel, as changing the affinity is expensive to do at every lock encountered. @@ -25,7 +25,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2702,6 +2702,135 @@ static inline void schedule_debug(struct +@@ -2748,6 +2748,135 @@ static inline void schedule_debug(struct schedstat_inc(this_rq(), sched_count); } @@ -161,7 +161,7 @@ Signed-off-by: Thomas Gleixner /* * Pick up the highest-prio task: */ -@@ -2808,6 +2937,8 @@ static void __sched __schedule(void) +@@ -2854,6 +2983,8 @@ static void __sched __schedule(void) smp_mb__before_spinlock(); raw_spin_lock_irq(&rq->lock); @@ -170,7 +170,7 @@ Signed-off-by: Thomas Gleixner rq->clock_skip_update <<= 1; /* promote REQ to ACT */ switch_count = &prev->nivcsw; -@@ -4813,7 +4944,7 @@ static struct rq *move_queued_task(struc +@@ -4859,7 +4990,7 @@ static struct rq *move_queued_task(struc void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -179,7 +179,7 @@ Signed-off-by: Thomas Gleixner if (p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, new_mask); p->nr_cpus_allowed = cpumask_weight(new_mask); -@@ -4885,124 +5016,6 @@ int set_cpus_allowed_ptr(struct task_str +@@ -4931,124 +5062,6 @@ int set_cpus_allowed_ptr(struct task_str } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); 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 9abd1e575..6a2059ead 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Beyond the warning: diff --git a/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch b/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch index 067b1be6f..61474199d 100644 --- a/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch +++ b/debian/patches/features/all/rt/rt-tracing-show-padding-as-unsigned-short.patch @@ -1,7 +1,7 @@ Subject: tracing: Show padding as unsigned short From: Steven Rostedt Date: Wed, 16 Nov 2011 13:19:35 -0500 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz RT added two bytes to trace migrate disable counting to the trace events and used two bytes of the padding to make the change. The structures and diff --git a/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch b/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch index ab3a2c8e1..e734ff4d7 100644 --- a/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch +++ b/debian/patches/features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch @@ -2,7 +2,7 @@ From fbebd5600c1b72bb707ada50d040ad719656a301 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 28 Oct 2013 09:36:37 +0100 Subject: [PATCH] rtmutex: add a first shot of ww_mutex -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz lockdep says: | -------------------------------------------------------------------------- @@ -78,7 +78,7 @@ Signed-off-by: Sebastian Andrzej Siewior static inline int try_to_take_rt_mutex(struct rt_mutex *lock, struct task_struct *task, struct rt_mutex_waiter *waiter) -@@ -1465,7 +1500,8 @@ void rt_mutex_adjust_pi(struct task_stru +@@ -1466,7 +1501,8 @@ void rt_mutex_adjust_pi(struct task_stru static int __sched __rt_mutex_slowlock(struct rt_mutex *lock, int state, struct hrtimer_sleeper *timeout, @@ -88,7 +88,7 @@ Signed-off-by: Sebastian Andrzej Siewior { int ret = 0; -@@ -1488,6 +1524,12 @@ static int __sched +@@ -1489,6 +1525,12 @@ static int __sched break; } @@ -101,7 +101,7 @@ Signed-off-by: Sebastian Andrzej Siewior raw_spin_unlock(&lock->wait_lock); debug_rt_mutex_print_deadlock(waiter); -@@ -1522,13 +1564,90 @@ static void rt_mutex_handle_deadlock(int +@@ -1523,13 +1565,90 @@ static void rt_mutex_handle_deadlock(int } } @@ -193,7 +193,7 @@ Signed-off-by: Sebastian Andrzej Siewior { struct rt_mutex_waiter waiter; int ret = 0; -@@ -1539,6 +1658,8 @@ rt_mutex_slowlock(struct rt_mutex *lock, +@@ -1540,6 +1659,8 @@ rt_mutex_slowlock(struct rt_mutex *lock, /* Try to acquire the lock again: */ if (try_to_take_rt_mutex(lock, current, NULL)) { @@ -202,7 +202,7 @@ Signed-off-by: Sebastian Andrzej Siewior raw_spin_unlock(&lock->wait_lock); return 0; } -@@ -1556,13 +1677,16 @@ rt_mutex_slowlock(struct rt_mutex *lock, +@@ -1557,13 +1678,16 @@ rt_mutex_slowlock(struct rt_mutex *lock, if (likely(!ret)) /* sleep on the mutex */ @@ -261,7 +261,7 @@ Signed-off-by: Sebastian Andrzej Siewior } static inline int -@@ -1744,7 +1873,7 @@ void __sched rt_mutex_lock(struct rt_mut +@@ -1746,7 +1875,7 @@ void __sched rt_mutex_lock(struct rt_mut { might_sleep(); @@ -270,7 +270,7 @@ Signed-off-by: Sebastian Andrzej Siewior } EXPORT_SYMBOL_GPL(rt_mutex_lock); -@@ -1761,7 +1890,7 @@ int __sched rt_mutex_lock_interruptible( +@@ -1763,7 +1892,7 @@ int __sched rt_mutex_lock_interruptible( { might_sleep(); @@ -279,7 +279,7 @@ Signed-off-by: Sebastian Andrzej Siewior } EXPORT_SYMBOL_GPL(rt_mutex_lock_interruptible); -@@ -1774,7 +1903,7 @@ int rt_mutex_timed_futex_lock(struct rt_ +@@ -1776,7 +1905,7 @@ int rt_mutex_timed_futex_lock(struct rt_ might_sleep(); return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, @@ -288,7 +288,7 @@ Signed-off-by: Sebastian Andrzej Siewior rt_mutex_slowlock); } -@@ -1793,7 +1922,7 @@ int __sched rt_mutex_lock_killable(struc +@@ -1795,7 +1924,7 @@ int __sched rt_mutex_lock_killable(struc { might_sleep(); @@ -297,7 +297,7 @@ Signed-off-by: Sebastian Andrzej Siewior } EXPORT_SYMBOL_GPL(rt_mutex_lock_killable); -@@ -1817,6 +1946,7 @@ rt_mutex_timed_lock(struct rt_mutex *loc +@@ -1819,6 +1948,7 @@ rt_mutex_timed_lock(struct rt_mutex *loc return rt_mutex_timed_fastlock(lock, TASK_INTERRUPTIBLE, timeout, RT_MUTEX_MIN_CHAINWALK, @@ -305,7 +305,7 @@ Signed-off-by: Sebastian Andrzej Siewior rt_mutex_slowlock); } EXPORT_SYMBOL_GPL(rt_mutex_timed_lock); -@@ -2042,7 +2172,7 @@ int rt_mutex_finish_proxy_lock(struct rt +@@ -2060,7 +2190,7 @@ int rt_mutex_finish_proxy_lock(struct rt set_current_state(TASK_INTERRUPTIBLE); /* sleep on the mutex */ @@ -314,7 +314,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (unlikely(ret)) remove_waiter(lock, waiter); -@@ -2057,3 +2187,88 @@ int rt_mutex_finish_proxy_lock(struct rt +@@ -2075,3 +2205,88 @@ int rt_mutex_finish_proxy_lock(struct rt return ret; } 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 8ae35d794..36587d80b 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.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 20:06:39 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/rtmutex-enable-deadlock-detection-in-ww_mutex_lock-f.patch b/debian/patches/features/all/rt/rtmutex-enable-deadlock-detection-in-ww_mutex_lock-f.patch index 27be25d06..cdce46b54 100644 --- a/debian/patches/features/all/rt/rtmutex-enable-deadlock-detection-in-ww_mutex_lock-f.patch +++ b/debian/patches/features/all/rt/rtmutex-enable-deadlock-detection-in-ww_mutex_lock-f.patch @@ -3,7 +3,7 @@ From: Gustavo Bittencourt Date: Tue, 20 Jan 2015 18:02:29 -0200 Subject: [PATCH] rtmutex: enable deadlock detection in ww_mutex_lock functions -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The functions ww_mutex_lock_interruptible and ww_mutex_lock should return -EDEADLK when faced with a deadlock. To do so, the paramenter detect_deadlock in rt_mutex_slowlock must be TRUE. @@ -18,7 +18,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -2223,7 +2223,8 @@ int __sched +@@ -2241,7 +2241,8 @@ int __sched might_sleep(); mutex_acquire_nest(&lock->base.dep_map, 0, 0, &ww_ctx->dep_map, _RET_IP_); @@ -28,7 +28,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (ret) mutex_release(&lock->base.dep_map, 1, _RET_IP_); else if (!ret && ww_ctx->acquired > 1) -@@ -2241,7 +2242,8 @@ int __sched +@@ -2259,7 +2260,8 @@ int __sched might_sleep(); mutex_acquire_nest(&lock->base.dep_map, 0, 0, &ww_ctx->dep_map, _RET_IP_); 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 cc28f5961..a2e800cc0 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-futex-prepare-rt.patch From: Thomas Gleixner Date: Fri, 10 Jun 2011 11:04:15 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -12,7 +12,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/futex.c +++ b/kernel/futex.c -@@ -1705,6 +1705,16 @@ static int futex_requeue(u32 __user *uad +@@ -1717,6 +1717,16 @@ static int futex_requeue(u32 __user *uad requeue_pi_wake_futex(this, &key2, hb2); drop_count++; continue; @@ -29,7 +29,7 @@ Signed-off-by: Thomas Gleixner } else if (ret) { /* -EDEADLK */ this->pi_state = NULL; -@@ -2549,7 +2559,7 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2576,7 +2586,7 @@ static int futex_wait_requeue_pi(u32 __u struct hrtimer_sleeper timeout, *to = NULL; struct rt_mutex_waiter rt_waiter; struct rt_mutex *pi_mutex = NULL; @@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner union futex_key key2 = FUTEX_KEY_INIT; struct futex_q q = futex_q_init; int res, ret; -@@ -2608,20 +2618,55 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2635,20 +2645,55 @@ static int futex_wait_requeue_pi(u32 __u /* Queue the futex_q, drop the hb lock, wait for wakeup. */ futex_wait_queue_me(hb, &q, to); @@ -105,7 +105,7 @@ Signed-off-by: Thomas Gleixner /* Check if the requeue code acquired the second futex for us. */ if (!q.rt_waiter) { -@@ -2630,9 +2675,10 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2657,9 +2702,10 @@ static int futex_wait_requeue_pi(u32 __u * did a lock-steal - fix up the PI-state in that case. */ if (q.pi_state && (q.pi_state->owner != current)) { @@ -118,7 +118,7 @@ Signed-off-by: Thomas Gleixner } } else { /* -@@ -2645,7 +2691,8 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2672,7 +2718,8 @@ static int futex_wait_requeue_pi(u32 __u ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter); debug_rt_mutex_free_waiter(&rt_waiter); @@ -184,7 +184,7 @@ Signed-off-by: Thomas Gleixner chain_walk = 1; } else if (rt_mutex_cond_detect_deadlock(waiter, chwalk)) { chain_walk = 1; -@@ -1010,7 +1032,7 @@ static void remove_waiter(struct rt_mute +@@ -1011,7 +1033,7 @@ static void remove_waiter(struct rt_mute { bool is_top_waiter = (waiter == rt_mutex_top_waiter(lock)); struct task_struct *owner = rt_mutex_owner(lock); @@ -193,7 +193,7 @@ Signed-off-by: Thomas Gleixner unsigned long flags; raw_spin_lock_irqsave(¤t->pi_lock, flags); -@@ -1035,7 +1057,8 @@ static void remove_waiter(struct rt_mute +@@ -1036,7 +1058,8 @@ static void remove_waiter(struct rt_mute __rt_mutex_adjust_prio(owner); /* Store the lock on which owner is blocked or NULL */ @@ -203,7 +203,7 @@ Signed-off-by: Thomas Gleixner raw_spin_unlock_irqrestore(&owner->pi_lock, flags); -@@ -1071,7 +1094,7 @@ void rt_mutex_adjust_pi(struct task_stru +@@ -1072,7 +1095,7 @@ void rt_mutex_adjust_pi(struct task_stru raw_spin_lock_irqsave(&task->pi_lock, flags); waiter = task->pi_blocked_on; diff --git a/debian/patches/features/all/rt/rtmutex-lock-killable.patch b/debian/patches/features/all/rt/rtmutex-lock-killable.patch index 0f50c45a5..aa1840cfe 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-lock-killable.patch From: Thomas Gleixner Date: Thu, 09 Jun 2011 11:43:52 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -21,7 +21,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -1439,6 +1439,25 @@ int rt_mutex_timed_futex_lock(struct rt_ +@@ -1441,6 +1441,25 @@ int rt_mutex_timed_futex_lock(struct rt_ } /** diff --git a/debian/patches/features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch b/debian/patches/features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch index 8b52cfd7c..505b6b2da 100644 --- a/debian/patches/features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch +++ b/debian/patches/features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch @@ -2,7 +2,7 @@ From c290567d076d3b59d30c6778bc3f2e401d8289fe Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 15 Nov 2013 15:46:50 +0100 Subject: [PATCH] rtmutex: use a trylock for waiter lock in trylock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Mike Galbraith captered the following: | >#11 [ffff88017b243e90] _raw_spin_lock at ffffffff815d2596 @@ -102,7 +102,7 @@ Signed-off-by: Sebastian Andrzej Siewior void __lockfunc __rt_spin_unlock(struct rt_mutex *lock) { rt_spin_lock_fastunlock(lock, rt_spin_lock_slowunlock); -@@ -1727,7 +1749,8 @@ static inline int rt_mutex_slowtrylock(s +@@ -1728,7 +1750,8 @@ static inline int rt_mutex_slowtrylock(s * The mutex has currently no owner. Lock the wait lock and * try to acquire the lock. */ diff --git a/debian/patches/features/all/rt/rtmutex-ww_mutex_fix_ww_mutex_lock_interruptible_lockdep_annotation.patch b/debian/patches/features/all/rt/rtmutex-ww_mutex_fix_ww_mutex_lock_interruptible_lockdep_annotation.patch index 544c410f0..9eac4d364 100644 --- a/debian/patches/features/all/rt/rtmutex-ww_mutex_fix_ww_mutex_lock_interruptible_lockdep_annotation.patch +++ b/debian/patches/features/all/rt/rtmutex-ww_mutex_fix_ww_mutex_lock_interruptible_lockdep_annotation.patch @@ -7,7 +7,7 @@ Cc: linux-rt-users , Thomas Gleixner , Steven Rostedt Date: Mon, 02 Jun 2014 15:12:44 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Using mutex_acquire_nest() as used in __ww_mutex_lock() fixes the splat below. Remove superfluous line break in __ww_mutex_lock() @@ -45,7 +45,7 @@ Signed-off-by: Mike Galbraith --- a/kernel/locking/rtmutex.c +++ b/kernel/locking/rtmutex.c -@@ -2222,7 +2222,7 @@ int __sched +@@ -2240,7 +2240,7 @@ int __sched might_sleep(); @@ -54,7 +54,7 @@ Signed-off-by: Mike Galbraith ret = rt_mutex_slowlock(&lock->base.lock, TASK_INTERRUPTIBLE, NULL, 0, ww_ctx); if (ret) mutex_release(&lock->base.dep_map, 1, _RET_IP_); -@@ -2240,8 +2240,7 @@ int __sched +@@ -2258,8 +2258,7 @@ int __sched might_sleep(); diff --git a/debian/patches/features/all/rt/rtmutex.c-Fix-incorrect-waiter-check.patch b/debian/patches/features/all/rt/rtmutex.c-Fix-incorrect-waiter-check.patch index a6e3d4ee0..3d4163c24 100644 --- a/debian/patches/features/all/rt/rtmutex.c-Fix-incorrect-waiter-check.patch +++ b/debian/patches/features/all/rt/rtmutex.c-Fix-incorrect-waiter-check.patch @@ -2,7 +2,7 @@ From efdefae48393aba54686cd8a0fd28d07977aaaa0 Mon Sep 17 00:00:00 2001 From: Brad Mouring Date: Wed, 14 Jan 2015 15:11:38 -0600 Subject: [PATCH] rtmutex.c: Fix incorrect waiter check -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz In task_blocks_on_lock, there's a null check on pi_blocked_on of the task_struct. This pointer can encode the fact that the diff --git a/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch b/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch index 85b96d813..ad9f87231 100644 --- a/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch +++ b/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch @@ -2,7 +2,7 @@ From 054879629df5abfef1ecfa85b12b14857d3ee6b3 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 29 Apr 2014 20:13:08 -0400 Subject: [PATCH] rwlock: disable migration before taking a lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If there's no complaints about it. I'm going to add this to the 3.12-rt stable tree. As without it, it fails horribly with the cpu hotplug diff --git a/debian/patches/features/all/rt/rwsem-add-rt-variant.patch b/debian/patches/features/all/rt/rwsem-add-rt-variant.patch index f14a290ac..07f1a0b57 100644 --- a/debian/patches/features/all/rt/rwsem-add-rt-variant.patch +++ b/debian/patches/features/all/rt/rwsem-add-rt-variant.patch @@ -1,7 +1,7 @@ Subject: rwsem-add-rt-variant.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 21:02:53 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch b/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch index f09ab242d..c52f4eb61 100644 --- a/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch +++ b/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch @@ -2,7 +2,7 @@ From 8b5243ba8bd378e30fea78efe0bae807dad706de Mon Sep 17 00:00:00 2001 From: "Steven Rostedt (Red Hat)" Date: Fri, 2 May 2014 10:53:30 +0200 Subject: [PATCH] rwsem-rt: Do not allow readers to nest -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The readers of mainline rwsems are not allowed to nest, the rwsems in the PREEMPT_RT kernel should not nest either. diff --git a/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch b/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch index 9ee1dd07d..308c2eca4 100644 --- a/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch +++ b/debian/patches/features/all/rt/sas-ata-isci-dont-t-disable-interrupts-in-qc_issue-h.patch @@ -3,7 +3,7 @@ From: Paul Gortmaker Date: Sat, 14 Feb 2015 11:01:16 -0500 Subject: [PATCH] sas-ata/isci: dont't disable interrupts in qc_issue handler -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz On 3.14-rt we see the following trace on Canoe Pass for SCSI_ISCI "Intel(R) C600 Series Chipset SAS Controller" diff --git a/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch b/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch index 7a4567e5a..8bdb2ab29 100644 --- a/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch +++ b/debian/patches/features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch @@ -1,7 +1,7 @@ Subject: sched-clear-pf-thread-bound-on-fallback-rq.patch From: Thomas Gleixner Date: Fri, 04 Nov 2011 20:48:36 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -10,7 +10,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1386,6 +1386,12 @@ static int select_fallback_rq(int cpu, s +@@ -1432,6 +1432,12 @@ static int select_fallback_rq(int cpu, s } } diff --git a/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch b/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch index afbfbaa09..dc2adf450 100644 --- a/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch +++ b/debian/patches/features/all/rt/sched-deadline-dl_task_timer-has-to-be-irqsafe.patch @@ -2,7 +2,7 @@ From adf06e9ea5d66360bb5ffcfc3d2eb86f93728c2d Mon Sep 17 00:00:00 2001 From: Juri Lelli Date: Tue, 13 May 2014 15:30:20 +0200 Subject: [PATCH] sched/deadline: dl_task_timer has to be irqsafe -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz As for rt_period_timer, dl_task_timer has to be irqsafe. 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 eaaeb2b69..b4c60dcde 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-delay-put-task.patch From: Thomas Gleixner Date: Tue, 31 May 2011 16:59:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -11,7 +11,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1727,6 +1727,9 @@ struct task_struct { +@@ -1773,6 +1773,9 @@ struct task_struct { unsigned int sequential_io; unsigned int sequential_io_avg; #endif @@ -21,7 +21,7 @@ Signed-off-by: Thomas Gleixner #ifdef CONFIG_DEBUG_ATOMIC_SLEEP unsigned long task_state_change; #endif -@@ -1924,6 +1927,15 @@ extern struct pid *cad_pid; +@@ -1970,6 +1973,15 @@ extern struct pid *cad_pid; extern void free_task(struct task_struct *tsk); #define get_task_struct(tsk) do { atomic_inc(&(tsk)->usage); } while(0) @@ -37,7 +37,7 @@ Signed-off-by: Thomas Gleixner extern void __put_task_struct(struct task_struct *t); static inline void put_task_struct(struct task_struct *t) -@@ -1931,6 +1943,7 @@ static inline void put_task_struct(struc +@@ -1977,6 +1989,7 @@ static inline void put_task_struct(struc if (atomic_dec_and_test(&t->usage)) __put_task_struct(t); } 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 8108356b5..55cb895cb 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 6f9c0e370..42a3f56d5 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.patch From: Thomas Gleixner Date: Tue, 13 Sep 2011 16:42:35 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch b/debian/patches/features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch index f8bd80e88..bc5b55c9a 100644 --- a/debian/patches/features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch +++ b/debian/patches/features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch @@ -1,7 +1,7 @@ Subject: sched: Do not clear PF_NO_SETAFFINITY flag in select_fallback_rq() From: Steven Rostedt Date: Tue, 1 Jul 2014 11:14:44 -0400 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz I talked with Peter Zijlstra about this, and he told me that the clearing @@ -34,7 +34,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1433,12 +1433,6 @@ static int select_fallback_rq(int cpu, s +@@ -1479,12 +1479,6 @@ static int select_fallback_rq(int cpu, s } } diff --git a/debian/patches/features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch b/debian/patches/features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch index 4794a0d2f..682b16741 100644 --- a/debian/patches/features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch +++ b/debian/patches/features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch @@ -2,7 +2,7 @@ From f87f3c003eb4ad513e6732dfaa76f442b8aec9ba Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Mon, 24 Mar 2014 13:18:48 +0100 Subject: [PATCH] sched: dont calculate hweight in update_migrate_disable() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Proposal for a minor optimization in update_migrate_disable - its only a few instructions saved but those are in the hot path of locks so it might be worth @@ -39,7 +39,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2732,7 +2732,8 @@ static inline void update_migrate_disabl +@@ -2778,7 +2778,8 @@ static inline void update_migrate_disabl if (p->sched_class->set_cpus_allowed) p->sched_class->set_cpus_allowed(p, mask); 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 6a6ac4d3f..2343dc161 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-nr-migrate.patch From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:12:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 516dd0f9f..b115b0b7b 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-might-sleep-do-not-account-rcu-depth.patch From: Thomas Gleixner Date: Tue, 07 Jun 2011 09:19:06 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -34,7 +34,7 @@ Signed-off-by: Thomas Gleixner /* Internal to kernel */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -7355,7 +7355,8 @@ void __init sched_init(void) +@@ -7401,7 +7401,8 @@ void __init sched_init(void) #ifdef CONFIG_DEBUG_ATOMIC_SLEEP static inline int preempt_count_equals(int preempt_offset) { diff --git a/debian/patches/features/all/rt/sched-migrate-disable.patch b/debian/patches/features/all/rt/sched-migrate-disable.patch index 8a4e4ad90..e82166471 100644 --- a/debian/patches/features/all/rt/sched-migrate-disable.patch +++ b/debian/patches/features/all/rt/sched-migrate-disable.patch @@ -1,7 +1,7 @@ Subject: sched-migrate-disable.patch From: Thomas Gleixner Date: Thu, 16 Jun 2011 13:26:08 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner # define preempt_enable_rt() preempt_enable() --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1319,6 +1319,7 @@ struct task_struct { +@@ -1363,6 +1363,7 @@ struct task_struct { #endif unsigned int policy; @@ -38,7 +38,7 @@ Signed-off-by: Thomas Gleixner int nr_cpus_allowed; cpumask_t cpus_allowed; -@@ -1737,9 +1738,6 @@ struct task_struct { +@@ -1783,9 +1784,6 @@ struct task_struct { int pagefault_disabled; }; @@ -48,7 +48,7 @@ Signed-off-by: Thomas Gleixner #define TNF_MIGRATED 0x01 #define TNF_NO_GROUP 0x02 #define TNF_SHARED 0x04 -@@ -3105,6 +3103,15 @@ static inline void set_task_cpu(struct t +@@ -3151,6 +3149,15 @@ static inline void set_task_cpu(struct t #endif /* CONFIG_SMP */ @@ -66,7 +66,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4813,11 +4813,13 @@ static struct rq *move_queued_task(struc +@@ -4859,11 +4859,13 @@ static struct rq *move_queued_task(struc void do_set_cpus_allowed(struct task_struct *p, const struct cpumask *new_mask) { @@ -83,7 +83,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -4863,7 +4865,7 @@ int set_cpus_allowed_ptr(struct task_str +@@ -4909,7 +4911,7 @@ int set_cpus_allowed_ptr(struct task_str do_set_cpus_allowed(p, new_mask); /* Can the task run on the task's current CPU? If so, we're done */ @@ -92,7 +92,7 @@ Signed-off-by: Thomas Gleixner goto out; dest_cpu = cpumask_any_and(cpu_active_mask, new_mask); -@@ -4883,6 +4885,83 @@ int set_cpus_allowed_ptr(struct task_str +@@ -4929,6 +4931,83 @@ int set_cpus_allowed_ptr(struct task_str } EXPORT_SYMBOL_GPL(set_cpus_allowed_ptr); diff --git a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch index bdea72265..c487afbf1 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-mmdrop-delayed.patch From: Thomas Gleixner Date: Mon, 06 Jun 2011 12:20:33 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Needs thread context (pgd_lock) -> ifdeffed. workqueues wont work with RT @@ -36,7 +36,7 @@ Signed-off-by: Thomas Gleixner void __user *bd_addr; --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -2495,12 +2495,24 @@ extern struct mm_struct * mm_alloc(void) +@@ -2541,12 +2541,24 @@ extern struct mm_struct * mm_alloc(void) /* mmdrop drops the mm and the page tables */ extern void __mmdrop(struct mm_struct *); @@ -85,7 +85,7 @@ Signed-off-by: Thomas Gleixner */ --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2248,8 +2248,12 @@ static struct rq *finish_task_switch(str +@@ -2294,8 +2294,12 @@ static struct rq *finish_task_switch(str finish_arch_post_lock_switch(); fire_sched_in_preempt_notifiers(current); @@ -99,7 +99,7 @@ Signed-off-by: Thomas Gleixner if (unlikely(prev_state == TASK_DEAD)) { if (prev->sched_class->task_dead) prev->sched_class->task_dead(prev); -@@ -4964,6 +4968,8 @@ static int migration_cpu_stop(void *data +@@ -5010,6 +5014,8 @@ static int migration_cpu_stop(void *data #ifdef CONFIG_HOTPLUG_CPU @@ -108,7 +108,7 @@ Signed-off-by: Thomas Gleixner /* * Ensures that the idle task is using init_mm right before its cpu goes * offline. -@@ -4978,7 +4984,11 @@ void idle_task_exit(void) +@@ -5024,7 +5030,11 @@ void idle_task_exit(void) switch_mm(mm, &init_mm, current); finish_arch_post_lock_switch(); } @@ -121,7 +121,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -5321,6 +5331,10 @@ migration_call(struct notifier_block *nf +@@ -5367,6 +5377,10 @@ migration_call(struct notifier_block *nf case CPU_DEAD: calc_load_migrate(rq); diff --git a/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch b/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch index 543df5247..a5137b3e9 100644 --- a/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch +++ b/debian/patches/features/all/rt/sched-rt-fix-migrate_enable-thinko.patch @@ -1,7 +1,7 @@ Subject: sched, rt: Fix migrate_enable() thinko From: Mike Galbraith Date: Tue, 23 Aug 2011 16:12:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Assigning mask = tsk_cpus_allowed(p) after p->migrate_disable = 0 ensures that we won't see a mask change.. no push/pull, we stack tasks on one CPU. @@ -23,7 +23,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4962,12 +4962,14 @@ void migrate_enable(void) +@@ -5008,12 +5008,14 @@ void migrate_enable(void) */ rq = this_rq(); raw_spin_lock_irqsave(&rq->lock, flags); 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 f2324882d..13feb6892 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-rt-mutex-wakeup.patch From: Thomas Gleixner Date: Sat, 25 Jun 2011 09:21:04 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -12,7 +12,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1282,6 +1282,7 @@ enum perf_event_task_context { +@@ -1326,6 +1326,7 @@ enum perf_event_task_context { struct task_struct { volatile long state; /* -1 unrunnable, 0 runnable, >0 stopped */ @@ -20,7 +20,7 @@ Signed-off-by: Thomas Gleixner void *stack; atomic_t usage; unsigned int flags; /* per process flags, defined below */ -@@ -2379,6 +2380,7 @@ extern void xtime_update(unsigned long t +@@ -2425,6 +2426,7 @@ extern void xtime_update(unsigned long t extern int wake_up_state(struct task_struct *tsk, unsigned int state); extern int wake_up_process(struct task_struct *tsk); @@ -30,7 +30,7 @@ Signed-off-by: Thomas Gleixner extern void kick_process(struct task_struct *tsk); --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1683,8 +1683,25 @@ try_to_wake_up(struct task_struct *p, un +@@ -1729,8 +1729,25 @@ try_to_wake_up(struct task_struct *p, un */ smp_mb__before_spinlock(); raw_spin_lock_irqsave(&p->pi_lock, flags); @@ -57,7 +57,7 @@ Signed-off-by: Thomas Gleixner success = 1; /* we're going to change ->state */ cpu = task_cpu(p); -@@ -1781,6 +1798,18 @@ int wake_up_process(struct task_struct * +@@ -1827,6 +1844,18 @@ int wake_up_process(struct task_struct * } EXPORT_SYMBOL(wake_up_process); diff --git a/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch b/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch index 5d4def767..06297baaf 100644 --- a/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch +++ b/debian/patches/features/all/rt/sched-teach-migrate_disable-about-atomic-contexts.patch @@ -1,7 +1,7 @@ Subject: sched: Teach migrate_disable about atomic contexts From: Peter Zijlstra Date: Fri, 02 Sep 2011 14:41:37 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Subject: sched: teach migrate_disable about atomic contexts From: Peter Zijlstra @@ -40,7 +40,7 @@ Link: http://lkml.kernel.org/n/tip-wbot4vsmwhi8vmbf83hsclk6@git.kernel.org --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1321,6 +1321,9 @@ struct task_struct { +@@ -1365,6 +1365,9 @@ struct task_struct { unsigned int policy; #ifdef CONFIG_PREEMPT_RT_FULL int migrate_disable; @@ -52,7 +52,7 @@ Link: http://lkml.kernel.org/n/tip-wbot4vsmwhi8vmbf83hsclk6@git.kernel.org cpumask_t cpus_allowed; --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -4893,6 +4893,17 @@ void migrate_disable(void) +@@ -4939,6 +4939,17 @@ void migrate_disable(void) unsigned long flags; struct rq *rq; @@ -70,7 +70,7 @@ Link: http://lkml.kernel.org/n/tip-wbot4vsmwhi8vmbf83hsclk6@git.kernel.org preempt_disable(); if (p->migrate_disable) { p->migrate_disable++; -@@ -4941,6 +4952,16 @@ void migrate_enable(void) +@@ -4987,6 +4998,16 @@ void migrate_enable(void) unsigned long flags; struct rq *rq; 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 5369bafe4..a42f8e8ff 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -21,7 +21,7 @@ Cc: stable-rt@vger.kernel.org --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1690,8 +1690,10 @@ try_to_wake_up(struct task_struct *p, un +@@ -1736,8 +1736,10 @@ try_to_wake_up(struct task_struct *p, un * if the wakeup condition is true. */ if (!(wake_flags & WF_LOCK_SLEEPER)) { 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 097410169..019355d97 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 @@ -3,7 +3,7 @@ From: Steven Rostedt Date: Mon, 18 Mar 2013 15:12:49 -0400 Subject: [PATCH] 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -26,7 +26,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2822,8 +2822,10 @@ static void __sched __schedule(void) +@@ -2868,8 +2868,10 @@ static void __sched __schedule(void) * If a worker went to sleep, notify and ask workqueue * whether it wants to wake up a task to maintain * concurrency. diff --git a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch index dc3a16b4b..a4ab995d2 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-rt-aware.patch From: Thomas Gleixner Date: Sat, 12 Nov 2011 14:00:48 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch b/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch index 7bfd38a4c..06be3f200 100644 --- a/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch +++ b/debian/patches/features/all/rt/scsi-qla2xxx-fix-bug-sleeping-function-called-from-invalid-context.patch @@ -1,7 +1,7 @@ Subject: scsi: qla2xxx: Use local_irq_save_nort() in qla2x00_poll From: John Kacur Date: Fri, 27 Apr 2012 12:48:46 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz RT triggers the following: diff --git a/debian/patches/features/all/rt/seqlock-consolidate-spin_lock-unlock-waiting-with-sp.patch b/debian/patches/features/all/rt/seqlock-consolidate-spin_lock-unlock-waiting-with-sp.patch index cc58e2355..6902f03f2 100644 --- a/debian/patches/features/all/rt/seqlock-consolidate-spin_lock-unlock-waiting-with-sp.patch +++ b/debian/patches/features/all/rt/seqlock-consolidate-spin_lock-unlock-waiting-with-sp.patch @@ -3,7 +3,7 @@ From: Nicholas Mc Guire Date: Sun, 1 Dec 2013 23:03:52 -0500 Subject: [PATCH] seqlock: consolidate spin_lock/unlock waiting with spin_unlock_wait -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz since c2f21ce ("locking: Implement new raw_spinlock") include/linux/spinlock.h includes spin_unlock_wait() to wait for a concurren 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 84433e7bb..2863640b5 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-fix-up-rcu-wreckage.patch b/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch index 263a88583..6cd404604 100644 --- a/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch +++ b/debian/patches/features/all/rt/signal-fix-up-rcu-wreckage.patch @@ -1,7 +1,7 @@ Subject: signal-fix-up-rcu-wreckage.patch From: Thomas Gleixner Date: Fri, 22 Jul 2011 08:07:08 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 1edc5e555..9598360c3 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.patch From: Thomas Gleixner Date: Wed, 21 Sep 2011 19:57:12 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 84319d170..6f732fee6 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. @@ -18,7 +18,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1474,6 +1474,7 @@ struct task_struct { +@@ -1518,6 +1518,7 @@ struct task_struct { /* signal handlers */ struct signal_struct *signal; struct sighand_struct *sighand; diff --git a/debian/patches/features/all/rt/simple-wait-rename-and-export-the-equivalent-of-wait.patch b/debian/patches/features/all/rt/simple-wait-rename-and-export-the-equivalent-of-wait.patch index 7d2da1a83..ac08c4622 100644 --- a/debian/patches/features/all/rt/simple-wait-rename-and-export-the-equivalent-of-wait.patch +++ b/debian/patches/features/all/rt/simple-wait-rename-and-export-the-equivalent-of-wait.patch @@ -3,7 +3,7 @@ From: Paul Gortmaker Date: Tue, 27 Aug 2013 14:20:26 -0400 Subject: [PATCH] simple-wait: rename and export the equivalent of waitqueue_active() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The function "swait_head_has_waiters()" was internalized into wait-simple.c but it parallels the waitqueue_active of normal diff --git a/debian/patches/features/all/rt/skbufhead-raw-lock.patch b/debian/patches/features/all/rt/skbufhead-raw-lock.patch index 8a340b2f3..e07dd2dbb 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: use skbufhead with raw lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 fefa55eb8..3e3221d3f 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 @@ -2,7 +2,7 @@ From 5f8cbeb5b6e8b6ad0112a3c24567975a1657c458 Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Wed, 15 Apr 2015 19:00:47 +0200 Subject: [PATCH 2/2] slub: disable SLUB_CPU_PARTIAL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 58b3ed2f8..b381e5597 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/slub_delay_ctor_on_rt.patch b/debian/patches/features/all/rt/slub_delay_ctor_on_rt.patch index 2fc8da3bf..007be2a3f 100644 --- a/debian/patches/features/all/rt/slub_delay_ctor_on_rt.patch +++ b/debian/patches/features/all/rt/slub_delay_ctor_on_rt.patch @@ -1,6 +1,6 @@ From: Sebastian Andrzej Siewior Subject: slub: delay ctor until the object is requested -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz It seems that allocation of plenty objects causes latency on ARM since that code can not be preempted diff --git a/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch b/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch index 9ac13ba6a..3a75bdb48 100644 --- a/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch +++ b/debian/patches/features/all/rt/snd-pcm-fix-snd_pcm_stream_lock-irqs_disabled-splats.patch @@ -3,7 +3,7 @@ From: Mike Galbraith Date: Wed, 18 Feb 2015 15:09:23 +0100 Subject: [PATCH 2/2] snd/pcm: fix snd_pcm_stream_lock*() irqs_disabled() splats -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Locking functions previously using read_lock_irq()/read_lock_irqsave() were changed to local_irq_disable/save(), leading to gripes. Use nort variants. diff --git a/debian/patches/features/all/rt/softirq-adapt-nohz-pending-debug-code-to-new-scheme.patch b/debian/patches/features/all/rt/softirq-adapt-nohz-pending-debug-code-to-new-scheme.patch index fafb498b7..656898ec3 100644 --- a/debian/patches/features/all/rt/softirq-adapt-nohz-pending-debug-code-to-new-scheme.patch +++ b/debian/patches/features/all/rt/softirq-adapt-nohz-pending-debug-code-to-new-scheme.patch @@ -1,7 +1,7 @@ Subject: softirq: Adapt NOHZ softirq pending check to new RT scheme From: Thomas Gleixner Date: Sun, 28 Oct 2012 13:46:16 +0000 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz We can't rely on ksoftirqd anymore and we need to check the tasks which run a particular softirq and if such a task is pi blocked ignore 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 d0d8b5171..5d4926d6e 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.patch From: Thomas Gleixner Date: Mon, 18 Jul 2011 13:59:17 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/softirq-init-softirq-local-lock-after-per-cpu-section-is-set-up.patch b/debian/patches/features/all/rt/softirq-init-softirq-local-lock-after-per-cpu-section-is-set-up.patch index a7d1843fe..30390003d 100644 --- a/debian/patches/features/all/rt/softirq-init-softirq-local-lock-after-per-cpu-section-is-set-up.patch +++ b/debian/patches/features/all/rt/softirq-init-softirq-local-lock-after-per-cpu-section-is-set-up.patch @@ -1,7 +1,7 @@ Subject: softirq: Init softirq local lock after per cpu section is set up From: Steven Rostedt Date: Thu, 04 Oct 2012 11:02:04 -0400 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz I discovered this bug when booting 3.4-rt on my powerpc box. It crashed with the following report: diff --git a/debian/patches/features/all/rt/softirq-local-lock.patch b/debian/patches/features/all/rt/softirq-local-lock.patch index f37a754c1..bb34def2e 100644 --- a/debian/patches/features/all/rt/softirq-local-lock.patch +++ b/debian/patches/features/all/rt/softirq-local-lock.patch @@ -1,7 +1,7 @@ Subject: softirq-local-lock.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 15:57:18 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -108,7 +108,7 @@ Signed-off-by: Thomas Gleixner * Are we in NMI context? --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1736,6 +1736,7 @@ struct task_struct { +@@ -1782,6 +1782,7 @@ struct task_struct { #endif #ifdef CONFIG_PREEMPT_RT_BASE struct rcu_head put_rcu; diff --git a/debian/patches/features/all/rt/softirq-make-fifo.patch b/debian/patches/features/all/rt/softirq-make-fifo.patch index 047f437ef..4641d6d9e 100644 --- a/debian/patches/features/all/rt/softirq-make-fifo.patch +++ b/debian/patches/features/all/rt/softirq-make-fifo.patch @@ -1,7 +1,7 @@ Subject: softirq-make-fifo.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 21:06:43 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/softirq-make-migrate-disable-enable-conditioned-on-softirq_n.patch b/debian/patches/features/all/rt/softirq-make-migrate-disable-enable-conditioned-on-softirq_n.patch index cbf848136..5e285f779 100644 --- a/debian/patches/features/all/rt/softirq-make-migrate-disable-enable-conditioned-on-softirq_n.patch +++ b/debian/patches/features/all/rt/softirq-make-migrate-disable-enable-conditioned-on-softirq_n.patch @@ -3,7 +3,7 @@ From: Nicholas Mc Guire Date: Fri, 6 Dec 2013 00:42:22 +0100 Subject: [PATCH] softirq: make migrate disable/enable conditioned on softirq_nestcnt transition -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This patch removes the recursive calls to migrate_disable/enable in local_bh_disable/enable diff --git a/debian/patches/features/all/rt/softirq-make-serving-softirqs-a-task-flag.patch b/debian/patches/features/all/rt/softirq-make-serving-softirqs-a-task-flag.patch index c6016f0a3..0de754006 100644 --- a/debian/patches/features/all/rt/softirq-make-serving-softirqs-a-task-flag.patch +++ b/debian/patches/features/all/rt/softirq-make-serving-softirqs-a-task-flag.patch @@ -1,7 +1,7 @@ Subject: softirq: Make serving softirqs a task flag From: Thomas Gleixner Date: Thu, 04 Oct 2012 14:30:25 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Avoid the percpu softirq_runner pointer magic by using a task flag. @@ -13,7 +13,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1999,6 +1999,7 @@ extern void thread_group_cputime_adjuste +@@ -2045,6 +2045,7 @@ extern void thread_group_cputime_adjuste /* * Per process flags */ 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 dbaf1d2c0..75892374d 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-sanitize-softirq-pending.patch b/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch index 13dab303c..43eecfff9 100644 --- a/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch +++ b/debian/patches/features/all/rt/softirq-sanitize-softirq-pending.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Fri, 3 Jul 2009 13:16:38 -0500 Subject: softirq: Sanitize softirq pending for NOHZ/RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/softirq-split-handling-function.patch b/debian/patches/features/all/rt/softirq-split-handling-function.patch index f55d7dce7..392c2f379 100644 --- a/debian/patches/features/all/rt/softirq-split-handling-function.patch +++ b/debian/patches/features/all/rt/softirq-split-handling-function.patch @@ -1,7 +1,7 @@ Subject: softirq: Split handling function From: Thomas Gleixner Date: Thu, 04 Oct 2012 15:33:53 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Split out the inner handling function, so RT can reuse it. diff --git a/debian/patches/features/all/rt/softirq-split-locks.patch b/debian/patches/features/all/rt/softirq-split-locks.patch index 96b656006..5b58b78c8 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 @@ Subject: softirq: Split softirq locks From: Thomas Gleixner Date: Thu, 04 Oct 2012 14:20:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -31,7 +31,7 @@ Signed-off-by: Thomas Gleixner --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1743,6 +1743,7 @@ struct task_struct { +@@ -1789,6 +1789,7 @@ struct task_struct { #ifdef CONFIG_PREEMPT_RT_BASE struct rcu_head put_rcu; int softirq_nestcnt; diff --git a/debian/patches/features/all/rt/softirq-split-out-code.patch b/debian/patches/features/all/rt/softirq-split-out-code.patch index 5c44f4e8f..f6aff4291 100644 --- a/debian/patches/features/all/rt/softirq-split-out-code.patch +++ b/debian/patches/features/all/rt/softirq-split-out-code.patch @@ -1,7 +1,7 @@ Subject: softirq-split-out-code.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 15:46:49 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/softirq-thread-do-softirq.patch b/debian/patches/features/all/rt/softirq-thread-do-softirq.patch index 2f33dc320..591e6d7ae 100644 --- a/debian/patches/features/all/rt/softirq-thread-do-softirq.patch +++ b/debian/patches/features/all/rt/softirq-thread-do-softirq.patch @@ -1,7 +1,7 @@ Subject: softirq-thread-do-softirq.patch From: Thomas Gleixner Date: Tue, 28 Jun 2011 15:44:15 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sparc-provide-EARLY_PRINTK-for-SPARC.patch b/debian/patches/features/all/rt/sparc-provide-EARLY_PRINTK-for-SPARC.patch index 96e6707f5..9ee0cb97c 100644 --- a/debian/patches/features/all/rt/sparc-provide-EARLY_PRINTK-for-SPARC.patch +++ b/debian/patches/features/all/rt/sparc-provide-EARLY_PRINTK-for-SPARC.patch @@ -2,7 +2,7 @@ From 11fab744e7819cb63788ceb271074524c214a2c4 Mon Sep 17 00:00:00 2001 From: Kirill Tkhai Date: Fri, 30 Aug 2013 21:16:08 +0400 Subject: [PATCH] sparc: provide EARLY_PRINTK for SPARC -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz sparc does not have CONFIG_EARLY_PRINTK option. 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 6c1caaedb..844e97122 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-types-separate-raw.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 19:34:01 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch b/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch index 8c0a65aa1..231190a8b 100644 --- a/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch +++ b/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch @@ -2,7 +2,7 @@ From 4f16bbdecb5aa4539d2eee8f2e86192e57866674 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Fri, 2 May 2014 13:13:22 +0200 Subject: [PATCH] stomp-machine: create lg_global_trylock_relax() primitive -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Create lg_global_trylock_relax() for use by stopper thread when it cannot schedule, to deal with stop_cpus_lock, which is now an lglock. diff --git a/debian/patches/features/all/rt/stomp-machine-raw-lock.patch b/debian/patches/features/all/rt/stomp-machine-raw-lock.patch index 3781c7fbd..1cf31480a 100644 --- a/debian/patches/features/all/rt/stomp-machine-raw-lock.patch +++ b/debian/patches/features/all/rt/stomp-machine-raw-lock.patch @@ -1,7 +1,7 @@ Subject: stomp-machine-raw-lock.patch From: Thomas Gleixner Date: Wed, 29 Jun 2011 11:01:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch b/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch index a35693921..c9341621a 100644 --- a/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch +++ b/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch @@ -3,7 +3,7 @@ From: Mike Galbraith Date: Fri, 2 May 2014 13:13:34 +0200 Subject: [PATCH] stomp-machine: use lg_global_trylock_relax() to dead with stop_cpus_lock lglock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz If the stop machinery is called from inactive CPU we cannot use lg_global_lock(), because some other stomp machine invocation might be diff --git a/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch b/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch index dfade6a61..f2bb8856f 100644 --- a/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch +++ b/debian/patches/features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:27 -0500 Subject: stop_machine: convert stop_machine_run() to PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Instead of playing with non-preemption, introduce explicit startup serialization. This is more robust and cleaner as 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 86a12b618..e0a911f38 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 @@ -2,7 +2,7 @@ From e44ce9b3585aa5acc45f4f5a07984901f4cbf3c8 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Wed, 18 Feb 2015 16:05:28 +0100 Subject: [PATCH] sunrpc: make svc_xprt_do_enqueue() use get_cpu_light() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 84283c768..60e0ffceb 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/sysctl-include-atomic-h.patch b/debian/patches/features/all/rt/sysctl-include-atomic-h.patch index 7b16f98ac..44d2a6963 100644 --- a/debian/patches/features/all/rt/sysctl-include-atomic-h.patch +++ b/debian/patches/features/all/rt/sysctl-include-atomic-h.patch @@ -1,7 +1,7 @@ Subject: sysctl-include-fix.patch From: Thomas Gleixner Date: Mon, 14 Nov 2011 10:52:34 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sysfs-realtime-entry.patch b/debian/patches/features/all/rt/sysfs-realtime-entry.patch index b01d2b5d9..edfc62c5c 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: 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Add a /sys/kernel entry to indicate that the kernel is a realtime kernel. 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 0e04f70d5..dff12b6a3 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/tasklist-lock-fix-section-conflict.patch b/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch index f23d624a5..012a92525 100644 --- a/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch +++ b/debian/patches/features/all/rt/tasklist-lock-fix-section-conflict.patch @@ -1,7 +1,7 @@ Subject: rwlocks: Fix section mismatch From: John Kacur Date: Mon, 19 Sep 2011 11:09:27 +0200 (CEST) -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This fixes the following build error for the preempt-rt kernel. 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 a2ddac3ee..6f78eaad3 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 @@ -2,7 +2,7 @@ From 8334ac498f104c00e5d93e3e83d3bcec1a993cec Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Tue, 17 Feb 2015 09:37:44 +0100 Subject: [PATCH 1/2] thermal: Defer thermal wakups to threads -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/timekeeping-split-jiffies-lock.patch b/debian/patches/features/all/rt/timekeeping-split-jiffies-lock.patch index 079b70d5c..c83272e02 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-lock.patch From: Thomas Gleixner Date: Thu, 14 Feb 2013 22:36:59 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch b/debian/patches/features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch index 997ccff0e..755d0c668 100644 --- a/debian/patches/features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch +++ b/debian/patches/features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch @@ -2,7 +2,7 @@ From 9c537765294dfce1e51cd713b9020987bb0a3ed2 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Fri, 24 Jan 2014 15:09:33 -0500 Subject: [PATCH] timer: Raise softirq if there's irq_work -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz [ Talking with Sebastian on IRC, it seems that doing the irq_work_run() from the interrupt in -rt is a bad thing. Here we simply raise the 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 d00299113..d8386c245 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz People were complaining about broken balancing with the recent -rt series. diff --git a/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch b/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch index 7f2df66dd..b98e0b8f3 100644 --- a/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch +++ b/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch @@ -2,7 +2,7 @@ From 23df989d899e6bfce466a6d7e77006a3aebb4e2a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 2 May 2014 21:31:50 +0200 Subject: [PATCH] timer: do not spin_trylock() on UP -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz This will void a warning comming from the spin-lock debugging code. The lock avoiding idea is from Steven Rostedt. 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 dbf482d49..13573bdf9 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/timer-handle-idle-trylock-in-get-next-timer-irq.patch b/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch index a43f6f8c6..23ea49fad 100644 --- a/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch +++ b/debian/patches/features/all/rt/timer-handle-idle-trylock-in-get-next-timer-irq.patch @@ -1,7 +1,7 @@ Subject: timer-handle-idle-trylock-in-get-next-timer-irq.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 22:08:38 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch b/debian/patches/features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch index 47918ffd7..a06a2a46e 100644 --- a/debian/patches/features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch +++ b/debian/patches/features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch @@ -3,7 +3,7 @@ From: Steven Rostedt Date: Fri, 31 Jan 2014 12:07:57 -0500 Subject: [PATCH 2/7] timer/rt: Always raise the softirq if there's irq_work to be done -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz It was previously discovered that some systems would hang on boot up with a previous version of 3.12-rt. This was due to RCU using irq_work, diff --git a/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch b/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch index c03823984..271a22464 100644 --- a/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch +++ b/debian/patches/features/all/rt/timers-avoid-the-base-null-otptimization-on-rt.patch @@ -1,7 +1,7 @@ Subject: timers: Avoid the switch timers base set to NULL trick on RT From: Thomas Gleixner Date: Thu, 21 Jul 2011 15:23:39 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz On RT that code is preemptible, so we cannot assign NULL to timers base as a preempter would spin forever in lock_timer_base(). diff --git a/debian/patches/features/all/rt/timers-do-not-raise-softirq-unconditionally.patch b/debian/patches/features/all/rt/timers-do-not-raise-softirq-unconditionally.patch index 235fee868..b9fbd15a4 100644 --- a/debian/patches/features/all/rt/timers-do-not-raise-softirq-unconditionally.patch +++ b/debian/patches/features/all/rt/timers-do-not-raise-softirq-unconditionally.patch @@ -2,7 +2,7 @@ From 35b6173e6176fc978c635f9e07f1778eff7b76e7 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 7 Nov 2013 12:21:11 +0100 Subject: [PATCH] timers: do not raise softirq unconditionally -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Mike, diff --git a/debian/patches/features/all/rt/timers-drop-try-lock.patch b/debian/patches/features/all/rt/timers-drop-try-lock.patch new file mode 100644 index 000000000..d77336f0f --- /dev/null +++ b/debian/patches/features/all/rt/timers-drop-try-lock.patch @@ -0,0 +1,46 @@ +From: Sebastian Andrzej Siewior +Date: Mon, 13 Jul 2015 14:35:50 +0200 +Subject: timers drop try lock +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz + +Don't try-lock in hardirq context on a rtmutex based lock. We will account +the wrong process as owner. + +Cc: stable-rt@vger.kernel.or +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/time/timer.c | 14 ++++---------- + 1 file changed, 4 insertions(+), 10 deletions(-) + +--- a/kernel/time/timer.c ++++ b/kernel/time/timer.c +@@ -1409,13 +1409,11 @@ unsigned long get_next_timer_interrupt(unsigned long now) + + #ifdef CONFIG_PREEMPT_RT_FULL + /* +- * On PREEMPT_RT we cannot sleep here. If the trylock does not +- * succeed then we return the worst-case 'expires in 1 tick' +- * value. We use the rt functions here directly to avoid a +- * migrate_disable() call. ++ * On PREEMPT_RT we cannot sleep here. As a result we can't take ++ * the base lock to check when the next timer is pending and so ++ * we assume the next jiffy. + */ +- if (!spin_do_trylock(&base->lock)) +- return now + 1; ++ return now + 1; + #else + spin_lock(&base->lock); + #endif +@@ -1424,11 +1422,7 @@ unsigned long get_next_timer_interrupt(unsigned long now) + base->next_timer = __next_timer_interrupt(base); + expires = base->next_timer; + } +-#ifdef CONFIG_PREEMPT_RT_FULL +- rt_spin_unlock_after_trylock_in_irq(&base->lock); +-#else + spin_unlock(&base->lock); +-#endif + + if (time_before_eq(expires, now)) + return now; diff --git a/debian/patches/features/all/rt/timers-preempt-rt-support.patch b/debian/patches/features/all/rt/timers-preempt-rt-support.patch index b840187c6..02dc5307a 100644 --- a/debian/patches/features/all/rt/timers-preempt-rt-support.patch +++ b/debian/patches/features/all/rt/timers-preempt-rt-support.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:20 -0500 Subject: timers: preempt-rt support -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner diff --git a/debian/patches/features/all/rt/timers-prepare-for-full-preemption-improve.patch b/debian/patches/features/all/rt/timers-prepare-for-full-preemption-improve.patch index bdd1e3af3..4bb3d63ee 100644 --- a/debian/patches/features/all/rt/timers-prepare-for-full-preemption-improve.patch +++ b/debian/patches/features/all/rt/timers-prepare-for-full-preemption-improve.patch @@ -2,7 +2,7 @@ From a57194f115acfc967aa0907bc130e95b68723121 Mon Sep 17 00:00:00 2001 From: Zhao Hongjiang Date: Wed, 17 Apr 2013 17:44:16 +0800 Subject: [PATCH] timers: prepare for full preemption improve -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz wake_up should do nothing on the nort, so we should use wakeup_timer_waiters, also fix a spell mistake. 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 ff63cfcf6..0ae856612 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 @@ -29,7 +29,7 @@ Signed-off-by: Thomas Gleixner # define del_timer_sync(t) del_timer(t) --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -592,12 +592,14 @@ void resched_cpu(int cpu) +@@ -638,12 +638,14 @@ void resched_cpu(int cpu) */ int get_nohz_timer_target(int pinned) { @@ -46,7 +46,7 @@ Signed-off-by: Thomas Gleixner rcu_read_lock(); for_each_domain(cpu, sd) { -@@ -610,6 +612,8 @@ int get_nohz_timer_target(int pinned) +@@ -656,6 +658,8 @@ int get_nohz_timer_target(int pinned) } unlock: rcu_read_unlock(); diff --git a/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch b/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch index dbc5f9e86..46a15dbd3 100644 --- a/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch +++ b/debian/patches/features/all/rt/tracing-account-for-preempt-off-in-preempt_schedule.patch @@ -1,7 +1,7 @@ From: Steven Rostedt Date: Thu, 29 Sep 2011 12:24:30 -0500 Subject: tracing: Account for preempt off in preempt_schedule() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz The preempt_schedule() uses the preempt_disable_notrace() version because it can cause infinite recursion by the function tracer as @@ -28,7 +28,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2919,7 +2919,16 @@ asmlinkage __visible void __sched notrac +@@ -2965,7 +2965,16 @@ asmlinkage __visible void __sched notrac * an infinite recursion. */ prev_ctx = exception_enter(); diff --git a/debian/patches/features/all/rt/treercu-use-simple-waitqueue.patch b/debian/patches/features/all/rt/treercu-use-simple-waitqueue.patch index 2b0514046..dd8416611 100644 --- a/debian/patches/features/all/rt/treercu-use-simple-waitqueue.patch +++ b/debian/patches/features/all/rt/treercu-use-simple-waitqueue.patch @@ -2,7 +2,7 @@ From db7ae440c333156392bc56badc610469a4d522ae Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Mon, 8 Apr 2013 16:09:57 +0200 Subject: [PATCH] kernel/treercu: use a simple waitqueue -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- 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 42fbd632a..6ab34eee5 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: [UPSTREAM]net,RT: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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-use-_nort-in-giveback.patch b/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch index e59cd7f58..6b4242f2c 100644 --- a/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch +++ b/debian/patches/features/all/rt/usb-use-_nort-in-giveback.patch @@ -2,7 +2,7 @@ From 7b1bab1c264fba44ef4c582d1acd9d8a2ef45e2a Mon Sep 17 00:00:00 2001 From: Sebastian Andrzej Siewior Date: Fri, 8 Nov 2013 17:34:54 +0100 Subject: [PATCH] usb: use _nort in giveback -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Since commit 94dfd7ed ("USB: HCD: support giveback of URB in tasklet context") I see diff --git a/debian/patches/features/all/rt/use-local-spin_locks-in-local_lock.patch b/debian/patches/features/all/rt/use-local-spin_locks-in-local_lock.patch index c65be0cfb..e41f78cc7 100644 --- a/debian/patches/features/all/rt/use-local-spin_locks-in-local_lock.patch +++ b/debian/patches/features/all/rt/use-local-spin_locks-in-local_lock.patch @@ -2,7 +2,7 @@ From 03dd6f7b4ca7aba6b5a4e6dea5c4635e22d07ab4 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Fri, 17 Jan 2014 20:41:58 +0100 Subject: [PATCH 6/7] use local spin_locks in local_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Drop recursive call to migrate_disabel/enable for local_*lock* api reported by Steven Rostedt. diff --git a/debian/patches/features/all/rt/user-use-local-irq-nort.patch b/debian/patches/features/all/rt/user-use-local-irq-nort.patch index 544fce898..7e0a8191c 100644 --- a/debian/patches/features/all/rt/user-use-local-irq-nort.patch +++ b/debian/patches/features/all/rt/user-use-local-irq-nort.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Tue, 21 Jul 2009 23:06:05 +0200 Subject: core: Do not disable interrupts on RT in kernel/users.c -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Use the local_irq_*_nort variants to reduce latencies in RT. The code is serialized by the locks. No need to disable interrupts. diff --git a/debian/patches/features/all/rt/vtime-split-lock-and-seqcount.patch b/debian/patches/features/all/rt/vtime-split-lock-and-seqcount.patch index a10a9d0b7..7719689fa 100644 --- a/debian/patches/features/all/rt/vtime-split-lock-and-seqcount.patch +++ b/debian/patches/features/all/rt/vtime-split-lock-and-seqcount.patch @@ -1,7 +1,7 @@ Subject: vtime-split-lock-and-seqcount.patch From: Thomas Gleixner Date: Tue, 23 Jul 2013 15:45:51 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- @@ -24,7 +24,7 @@ Signed-off-by: Thomas Gleixner #else --- a/include/linux/sched.h +++ b/include/linux/sched.h -@@ -1428,7 +1428,8 @@ struct task_struct { +@@ -1472,7 +1472,8 @@ struct task_struct { struct cputime prev_cputime; #endif #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN diff --git a/debian/patches/features/all/rt/wait-simple-implementation.patch b/debian/patches/features/all/rt/wait-simple-implementation.patch index b2eea79e0..2b33a9775 100644 --- a/debian/patches/features/all/rt/wait-simple-implementation.patch +++ b/debian/patches/features/all/rt/wait-simple-implementation.patch @@ -12,7 +12,7 @@ should go mainline as well, as it lowers memory consumption and runtime overhead. Signed-off-by: Thomas Gleixner -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz smp_mb() added by Steven Rostedt to fix a race condition with swait wakeups vs adding items to the list. diff --git a/debian/patches/features/all/rt/wait-simple-rework-for-completions.patch b/debian/patches/features/all/rt/wait-simple-rework-for-completions.patch index 2d3a4e80a..adc405388 100644 --- a/debian/patches/features/all/rt/wait-simple-rework-for-completions.patch +++ b/debian/patches/features/all/rt/wait-simple-rework-for-completions.patch @@ -1,7 +1,7 @@ Subject: wait-simple: Rework for use with completions From: Thomas Gleixner Date: Thu, 10 Jan 2013 11:47:35 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 c74a59636..9edc95b06 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 @@ -5,7 +5,7 @@ Subject: [PATCH] wait.h: include atomic.h 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 f9ccbb072..607a5ad37 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: [PATCH] workqueue vs ata-piix livelock fixup -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 c53a71a7a..d776d7c61 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 @@ -2,7 +2,7 @@ From c66353c50bbb5ad28862d1d7a1e79f926a06d1ee Mon Sep 17 00:00:00 2001 From: Daniel Wagner Date: Fri, 11 Jul 2014 15:26:11 +0200 Subject: [PATCH] work-simple: Simple work queue implemenation -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 e9cfc00e3..06709e23b 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz --- kernel/sched/core.c | 70 +++++++++----------------------------------- @@ -32,7 +32,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -1472,10 +1472,6 @@ static void ttwu_activate(struct rq *rq, +@@ -1518,10 +1518,6 @@ static void ttwu_activate(struct rq *rq, { activate_task(rq, p, en_flags); p->on_rq = TASK_ON_RQ_QUEUED; @@ -43,7 +43,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt } /* -@@ -1752,42 +1748,6 @@ try_to_wake_up(struct task_struct *p, un +@@ -1798,42 +1794,6 @@ try_to_wake_up(struct task_struct *p, un } /** @@ -86,7 +86,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt * wake_up_process - Wake up a specific process * @p: The process to be woken up. * -@@ -2944,21 +2904,6 @@ static void __sched __schedule(void) +@@ -2990,21 +2950,6 @@ static void __sched __schedule(void) } else { deactivate_task(rq, prev, DEQUEUE_SLEEP); prev->on_rq = 0; @@ -108,7 +108,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt } switch_count = &prev->nvcsw; } -@@ -2990,6 +2935,14 @@ static inline void sched_submit_work(str +@@ -3036,6 +2981,14 @@ static inline void sched_submit_work(str { if (!tsk->state || tsk_is_pi_blocked(tsk)) return; @@ -123,7 +123,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt /* * If we are going to sleep and we have plugged IO queued, * make sure to submit it to avoid deadlocks. -@@ -2998,6 +2951,12 @@ static inline void sched_submit_work(str +@@ -3044,6 +2997,12 @@ static inline void sched_submit_work(str blk_schedule_flush_plug(tsk); } @@ -136,7 +136,7 @@ Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt asmlinkage __visible void __sched schedule(void) { struct task_struct *tsk = current; -@@ -3006,6 +2965,7 @@ asmlinkage __visible void __sched schedu +@@ -3052,6 +3011,7 @@ asmlinkage __visible void __sched schedu do { __schedule(); } while (need_resched()); 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 ad11cd332..481ab8468 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Austin reported a XFS deadlock/stall on RT where scheduled work gets never exececuted and tasks are waiting for each other for ever. @@ -44,7 +44,7 @@ Cc: stable-rt@vger.kernel.org --- a/kernel/sched/core.c +++ b/kernel/sched/core.c -@@ -2986,9 +2986,8 @@ static void __sched __schedule(void) +@@ -3032,9 +3032,8 @@ static void __sched __schedule(void) static inline void sched_submit_work(struct task_struct *tsk) { @@ -55,7 +55,7 @@ Cc: stable-rt@vger.kernel.org /* * If a worker went to sleep, notify and ask workqueue whether * it wants to wake up a task to maintain concurrency. -@@ -2996,6 +2995,10 @@ static inline void sched_submit_work(str +@@ -3042,6 +3041,10 @@ static inline void sched_submit_work(str if (tsk->flags & PF_WQ_WORKER) wq_worker_sleeping(tsk); diff --git a/debian/patches/features/all/rt/workqueue-use-locallock.patch b/debian/patches/features/all/rt/workqueue-use-locallock.patch index 5e1245b13..9d842a6d1 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: 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/workqueue-use-rcu.patch b/debian/patches/features/all/rt/workqueue-use-rcu.patch index b5f8b9494..d9615aa51 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch b/debian/patches/features/all/rt/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch index c7c5b1b8d..6a2405699 100644 --- a/debian/patches/features/all/rt/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch +++ b/debian/patches/features/all/rt/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch @@ -2,7 +2,7 @@ From 96e366850784a9103b94c321cf5e7eb34e3b6c14 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Thu, 2 Jan 2014 10:18:42 +0100 Subject: [PATCH 4/7] write_lock migrate_disable pushdown to rt_write_lock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz pushdown of migrate_disable/enable from write_*lock* to the rt_write_*lock* api level 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 aee6f6841..14c629320 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 @@ -2,7 +2,7 @@ From 641f8d1bd0f95c615c68f809191fa59b7b4addf9 Mon Sep 17 00:00:00 2001 From: Mike Galbraith Date: Sun, 2 Nov 2014 08:31:37 +0100 Subject: [PATCH] x86: UV: raw_spinlock conversion -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 da8a9fc2b..e4f6ab6e4 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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-io-apic-migra-no-unmask.patch b/debian/patches/features/all/rt/x86-io-apic-migra-no-unmask.patch index 98ea0dfad..ddc971559 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: Do not unmask io_apic when interrupt is in progress -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 a6cbc1f7f..cf56e7512 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.patch From: Thomas Gleixner Date: Sun, 06 Nov 2011 12:26:18 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch b/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch index 57f329c92..c63068bc7 100644 --- a/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch +++ b/debian/patches/features/all/rt/x86-mce-timer-hrtimer.patch @@ -1,7 +1,7 @@ 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 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 index 663388544..4d5e88d7a 100644 --- 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 @@ -2,7 +2,7 @@ From: Daniel Wagner Subject: [PATCH] x86/mce: use swait queue for mce wakeups Date: Fri, 27 Feb 2015 15:20:37 +0100 Message-Id: <1425046838-4868-2-git-send-email-daniel.wagner@bmw-carit.de> -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz From: Steven Rostedt diff --git a/debian/patches/features/all/rt/x86-preempt-lazy.patch b/debian/patches/features/all/rt/x86-preempt-lazy.patch index b4de0bd7a..076fab358 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-preempt-lazy.patch From: Thomas Gleixner Date: Thu, 01 Nov 2012 11:03:47 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Signed-off-by: Thomas Gleixner --- 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 7cc6cacc6..5a9bc959c 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.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 3910190d2..5d2fbc0c5 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.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt. diff --git a/debian/patches/features/all/rt/xfs-Disable-percpu-SB-on-PREEMPT_RT_FULL.patch b/debian/patches/features/all/rt/xfs-Disable-percpu-SB-on-PREEMPT_RT_FULL.patch index efc38b109..a583818a0 100644 --- a/debian/patches/features/all/rt/xfs-Disable-percpu-SB-on-PREEMPT_RT_FULL.patch +++ b/debian/patches/features/all/rt/xfs-Disable-percpu-SB-on-PREEMPT_RT_FULL.patch @@ -2,7 +2,7 @@ From a4474dc1e7fdd78d95902f402ea2124b147cd2f9 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Wed, 13 May 2015 11:36:32 -0400 Subject: [PATCH] xfs: Disable percpu SB on PREEMPT_RT_FULL -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.5-rt3.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/4.0/patches-4.0.8-rt6.tar.xz Running a test on a large CPU count box with xfs, I hit a live lock with the following backtraces on several CPUs: diff --git a/debian/patches/series-rt b/debian/patches/series-rt index 368023d92..9679648a6 100644 --- a/debian/patches/series-rt +++ b/debian/patches/series-rt @@ -25,6 +25,9 @@ features/all/rt/0011-arm-futex-UP-futex_atomic_op_inuser-relies-on-disabl.patch features/all/rt/0012-futex-clarify-that-preemption-doesn-t-have-to-be-dis.patch features/all/rt/0013-mips-properly-lock-access-to-the-fpu.patch features/all/rt/0014-uaccess-decouple-preemption-from-the-pagefault-logic.patch +features/all/rt/0001-sched-Implement-lockless-wake-queues.patch +features/all/rt/0002-futex-Implement-lockless-wakeups.patch +features/all/rt/0004-ipc-mqueue-Implement-lockless-pipelined-wakeups.patch ############################################################ # Stuff broken upstream, patches submitted @@ -160,6 +163,7 @@ features/all/rt/pci-access-use-__wake_up_all_locked.patch ##################################################### # Stuff which should go mainline, but wants some care ##################################################### +features/all/rt/futex-avoid-double-wake-up-in-PI-futex-wait-wake-on-.patch # SEQLOCK @@ -273,7 +277,6 @@ features/all/rt/panic-disable-random-on-rt.patch # IPC features/all/rt/ipc-make-rt-aware.patch -features/all/rt/ipc-mqueue-add-a-critical-section-to-avoid-a-deadlock.patch # RELAY features/all/rt/relay-fix-timer-madness.patch @@ -390,7 +393,6 @@ features/all/rt/write_lock-migrate_disable-pushdown-to-rt_write_lock.patch features/all/rt/read_lock-migrate_disable-pushdown-to-rt_read_lock.patch features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch features/all/rt/rt-Cleanup-of-unnecessary-do-while-0-in-read-write-_.patch -features/all/rt/percpu-rwsem-compilefix.patch features/all/rt/rtmutex.c-Fix-incorrect-waiter-check.patch features/all/rt/rtmutex-add-a-first-shot-of-ww_mutex.patch features/all/rt/rtmutex-ww_mutex_fix_ww_mutex_lock_interruptible_lockdep_annotation.patch @@ -667,6 +669,10 @@ features/all/rt/md-disable-bcache.patch # Latest fixes features/all/rt/sched-do-not-clear-pf_no_setaffinity-flag-in-select_fallback_rq.patch features/all/rt/workqueue-prevent-deadlock-stall.patch +features/all/rt/timers-drop-try-lock.patch +features/all/rt/Revert-slub-delay-ctor-until-the-object-is-requested.patch +features/all/rt/mm-slub-move-slab-initialization-into-irq-enabled-re.patch +features/all/rt/locking-rt-provide-__up_read.patch # Add RT to version features/all/rt/localversion.patch