From abe58b9c4ee5f1b96216c6621c5d36b27a85ffb5 Mon Sep 17 00:00:00 2001 From: Ben Hutchings Date: Tue, 13 May 2014 18:04:41 +0000 Subject: [PATCH] [rt] Update to 3.14.3-rt5 svn path=/dists/sid/linux/; revision=21334 --- debian/changelog | 1 + ...arc64-use-generic-rwsem-spinlocks-rt.patch | 2 +- ...el-SRCU-provide-a-static-initializer.patch | 2 +- ...highmem-add-a-already-used-pte-check.patch | 2 +- .../0003-arm-highmem-flush-tlb-on-unmap.patch | 2 +- ...k-unlock-symetry-versus-pi_lock-and-.patch | 4 +- ...local_lock-not-__local_lock-for-soft.patch | 2 +- ...intk-drop-the-logbuf_lock-more-often.patch | 2 +- ...isable-pushd-down-in-atomic_dec_and_.patch | 31 ++++++ ...le-IST-stacks-for-debug-int-3-stack-.patch | 2 +- ...acpi_gbl_hardware-lock-back-to-a-raw.patch | 2 +- ...on-in-recursive-migrate_disable-call.patch | 2 +- .../all/rt/arch-use-pagefault-disabled.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 | 82 ++++++++++++++ .../all/rt/block-mq-use-cpu_light.patch | 27 +++-- ...k-shorten-interrupt-disabled-regions.patch | 2 +- .../features/all/rt/block-use-cpu-chill.patch | 2 +- .../all/rt/bug-rt-dependend-variants.patch | 2 +- ...source-tclib-allow-higher-clockrates.patch | 2 +- .../completion-use-simple-wait-queues.patch | 2 +- .../all/rt/cond-resched-lock-rt-tweak.patch | 2 +- .../all/rt/cond-resched-softirq-rt.patch | 2 +- ...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 | 2 +- .../features/all/rt/cpu-rt-variants.patch | 2 +- ...-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch | 2 +- .../cpu_down_move_migrate_enable_back.patch | 2 +- .../rt/cpumask-disable-offstack-on-rt.patch | 2 +- ...-preempt-disabled-regions-more-algos.patch | 2 +- .../features/all/rt/debugobjects-rt.patch | 2 +- .../rt/disable-lazy-preempt-on-x86-64.patch | 88 --------------- .../rt/disable-preempt-lazy-on-x86-64.patch | 24 ++++ .../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 +- .../drivers-net-gianfar-make-rt-aware.patch | 2 +- ...rivers-net-vortex-fix-locking-issues.patch | 2 +- ...andom-reduce-preempt-disabled-region.patch | 2 +- ...rivers-serial-cleanup-locking-for-rt.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 +- .../features/all/rt/filemap-fix-up.patch | 2 +- .../all/rt/fix-rt-int3-x86_32-3.2-rt.patch | 2 +- .../all/rt/fixup_opencoded_completions.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 +- .../all/rt/futex-requeue-pi-fix.patch | 2 +- .../all/rt/genirq-disable-irqpoll-on-rt.patch | 2 +- ...voke-the-affinity-callback-via-a-wor.patch | 2 +- .../all/rt/genirq-force-threading.patch | 2 +- .../all/rt/genirq-nodebug-shirq.patch | 2 +- .../rt/hotplug-light-get-online-cpus.patch | 15 +-- ...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 +- .../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 | 2 +- ...critical-section-to-avoid-a-deadlock.patch | 2 +- .../rt/ipc-sem-rework-semaphore-wakeups.patch | 2 +- ...irq-processing-in-irq-thread-context.patch | 2 +- ...low-certain-work-in-hard-irq-context.patch | 2 +- .../features/all/rt/jump-label-rt.patch | 2 +- .../rt/kconfig-disable-a-few-options-rt.patch | 19 +--- .../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 +- .../all/rt/kgb-serial-hackaround.patch | 2 +- .../features/all/rt/latency-hist.patch | 2 +- ...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 +- ...ardirq-context-test-for-raw-spinlock.patch | 2 +- .../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 +- .../all/rt/mm-cgroup-page-bit-spinlock.patch | 2 +- .../rt/mm-convert-swap-to-percpu-locked.patch | 2 +- .../features/all/rt/mm-disable-sloub-rt.patch | 6 +- .../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 +- .../features/all/rt/mm-page-alloc-fix.patch | 4 +- .../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 | 8 +- .../mm-prepare-pf-disable-discoupling.patch | 2 +- .../rt/mm-protect-activate-switch-mm.patch | 2 +- .../rt/mm-remove-preempt-count-from-pf.patch | 2 +- .../all/rt/mm-rt-kmap-atomic-scheduling.patch | 2 +- ...-scatterlist-dont-disable-irqs-on-RT.patch | 2 +- .../all/rt/mm-vmalloc-use-get-cpu-light.patch | 2 +- .../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 +- ...ot-try-to-cleanup-TX-packets-if-they.patch | 2 +- ...ast_reply-add-missing-local-serializ.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 +- ...e-cpu-light-in-ip-send-unicast-reply.patch | 2 +- .../all/rt/net-wireless-warn-nort.patch | 2 +- .../features/all/rt/oleg-signal-rt-fix.patch | 2 +- .../all/rt/panic-disable-random-on-rt.patch | 2 +- ...ce-rcu-bh-qs-where-safe-from-softirq.patch | 2 +- .../pci-access-use-__wake_up_all_locked.patch | 2 +- .../all/rt/percpu-rwsem-compilefix.patch | 2 +- .../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 | 2 +- .../peter_zijlstra-frob-migrate_disable.patch | 2 +- ...eter_zijlstra-frob-pagefault_disable.patch | 2 +- .../all/rt/peter_zijlstra-frob-rcu.patch | 2 +- .../all/rt/peterz-raw_pagefault_disable.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 | 2 +- .../all/rt/power-disable-highmem-on-rt.patch | 2 +- .../rt/power-use-generic-rwsem-on-rt.patch | 2 +- .../all/rt/powerpc-preempt-lazy-support.patch | 2 +- .../all/rt/preempt-lazy-support.patch | 37 +++---- .../all/rt/preempt-nort-rt-variants.patch | 2 +- ...27-boot-param-to-help-with-debugging.patch | 2 +- .../patches/features/all/rt/printk-kill.patch | 2 +- .../features/all/rt/printk-rt-aware.patch | 2 +- ...ace-fix-ptrace-vs-tasklist_lock-race.patch | 2 +- .../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 | 4 +- .../all/rt/relay-fix-timer-madness.patch | 2 +- .../resource-counters-use-localirq-nort.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 | 6 +- .../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 | 37 ++++--- .../all/rt/rt-preempt-base-config.patch | 2 +- .../all/rt/rt-rw-lockdep-annotations.patch | 88 +++++---------- ...o-not-compare-cpu-masks-in-scheduler.patch | 2 +- ...grate_disable-ignore-bounded-threads.patch | 2 +- ...ve-task_numa_free-to-__put_task_stru.patch | 2 +- ...actual-migration-disalbe-to-schedule.patch | 2 +- .../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 | 2 +- .../all/rt/rtmutex-avoid-include-hell.patch | 2 +- .../all/rt/rtmutex-futex-prepare-rt.patch | 12 +- .../all/rt/rtmutex-lock-killable.patch | 2 +- ...a-trylock-for-waiter-lock-in-trylock.patch | 2 +- ...rn-value-in-__mutex_lock_check_stamp.patch | 2 +- ...sable-migration-before-taking-a-lock.patch | 59 ++++++++++ .../all/rt/rwsem-add-rt-variant.patch | 2 +- ...wsem-rt-Do-not-allow-readers-to-nest.patch | 94 ++++++++++++++++ ...-better-debug-output-for-might_sleep.patch | 2 +- ...ched_reset_on_fork-when-nothing-else.patch | 2 +- ...d-Check-for-idle-task-in-might_sleep.patch | 2 +- ...Consider-pi-boosting-in-setscheduler.patch | 2 +- .../rt/sched-Fix-broken-setscheduler.patch | 2 +- .../sched-Init-idle-on_rq-in-init_idle.patch | 2 +- ...eue-RT-tasks-to-head-when-prio-drops.patch | 2 +- ...clear-pf-thread-bound-on-fallback-rq.patch | 2 +- .../features/all/rt/sched-cond-resched.patch | 2 +- .../all/rt/sched-delay-put-task.patch | 2 +- .../sched-disable-rt-group-sched-on-rt.patch | 2 +- .../all/rt/sched-disable-ttwu-queue.patch | 2 +- ...late-hweight-in-update_migrate_disab.patch | 2 +- .../all/rt/sched-limit-nr-migrate.patch | 2 +- ...might-sleep-do-not-account-rcu-depth.patch | 2 +- .../all/rt/sched-migrate-disable.patch | 2 +- .../all/rt/sched-mmdrop-delayed.patch | 2 +- .../sched-rt-fix-migrate_enable-thinko.patch | 2 +- .../all/rt/sched-rt-mutex-wakeup.patch | 2 +- ...igrate_disable-about-atomic-contexts.patch | 2 +- ...twu-ensure-success-return-is-correct.patch | 2 +- ...Only-wake-up-idle-workers-if-not-blo.patch | 2 +- .../features/all/rt/scsi-fcoe-rt-aware.patch | 2 +- ...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 | 2 +- ...me-and-export-the-equivalent-of-wait.patch | 2 +- .../features/all/rt/skbufhead-raw-lock.patch | 2 +- .../all/rt/slub-enable-irqs-for-no-wait.patch | 2 +- .../all/rt/slub_delay_ctor_on_rt.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 | 2 +- .../features/all/rt/softirq-make-fifo.patch | 2 +- ...able-enable-conditioned-on-softirq_n.patch | 2 +- ...rq-make-serving-softirqs-a-task-flag.patch | 2 +- .../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 | 2 +- .../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 | 86 +++++++++++++++ .../all/rt/stomp-machine-raw-lock.patch | 4 +- ...e-lg_global_trylock_relax-to-dead-wi.patch | 103 ++++++++++++++++++ ...nvert-stop_machine_run-to-PREEMPT_RT.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 +- .../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 | 36 ++++++ .../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-preempt-rt-support.patch | 2 +- ...-prepare-for-full-preemption-improve.patch | 2 +- .../timers-prepare-for-full-preemption.patch | 2 +- ...-for-preempt-off-in-preempt_schedule.patch | 2 +- ...ate_disable-to-prevent-beeing-pushed.patch | 93 ++++++++++++++++ .../all/rt/treercu-use-simple-waitqueue.patch | 2 +- ...ove-preemption-disabling-in-netif_rx.patch | 2 +- ...fix-mouse-problem-copying-large-data.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 | 2 +- .../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 +- .../rt/workqueue-distangle-from-rq-lock.patch | 2 +- .../all/rt/workqueue-use-locallock.patch | 2 +- .../features/all/rt/workqueue-use-rcu.patch | 2 +- ...te_disable-pushdown-to-rt_write_lock.patch | 2 +- ...ypto-reduce-preempt-disabled-regions.patch | 2 +- .../all/rt/x86-disable-debug-stack.patch | 2 +- .../all/rt/x86-io-apic-migra-no-unmask.patch | 2 +- .../rt/x86-kvm-require-const-tsc-for-rt.patch | 2 +- ...ce-wakeups-to-threads-for-PREEMPT_RT.patch | 2 +- .../all/rt/x86-mce-timer-hrtimer.patch | 2 +- .../features/all/rt/x86-preempt-lazy.patch | 45 +++++--- .../rt/x86-stackprot-no-random-on-rt.patch | 2 +- .../rt/x86-use-gen-rwsem-spinlocks-rt.patch | 2 +- debian/patches/series-rt | 20 +++- 318 files changed, 1054 insertions(+), 563 deletions(-) create mode 100644 debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch create mode 100644 debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch delete mode 100644 debian/patches/features/all/rt/disable-lazy-preempt-on-x86-64.patch create mode 100644 debian/patches/features/all/rt/disable-preempt-lazy-on-x86-64.patch create mode 100644 debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch create mode 100644 debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch create mode 100644 debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch create mode 100644 debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch create mode 100644 debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch create mode 100644 debian/patches/features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch diff --git a/debian/changelog b/debian/changelog index a87e120d0..57fbefeb1 100644 --- a/debian/changelog +++ b/debian/changelog @@ -122,6 +122,7 @@ linux (3.14.4-1) UNRELEASED; urgency=medium (Closes: #747364) * [hppa] udeb: Add xfs-modules (Closes: #746506) * udeb: Add mtip32xx, nvme to sata-modules + * [rt] Update to 3.14.3-rt5 -- Ben Hutchings Thu, 01 May 2014 01:50:30 +0100 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 504cb95a2..f042749d2 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Allen Pais Signed-off-by: Sebastian Andrzej Siewior 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 b4c547310..678957357 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-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 69810d1a4..efa77a500 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 47238244b..dbd471af8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/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 614e2fba9..b821ddc18 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz In exit_pi_state_list() we have the following locking construct: @@ -33,7 +33,7 @@ Signed-off-by: Sebastian Andrzej Siewior --- a/kernel/futex.c +++ b/kernel/futex.c -@@ -708,7 +708,9 @@ void exit_pi_state_list(struct task_stru +@@ -710,7 +710,9 @@ void exit_pi_state_list(struct task_stru * task still owns the PI-state: */ if (head->next != next) { 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 cad38df20..7799f0f19 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz trivial API cleanup - kernel/softirq.c was mimiking local_lock. 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 a8a204543..71da2d7b6 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/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 new file mode 100644 index 000000000..3a1f68243 --- /dev/null +++ b/debian/patches/features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch @@ -0,0 +1,31 @@ +From f556726721d611754d20ff00226fe029e2495274 Mon Sep 17 00:00:00 2001 +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/3.14/patches-3.14.3-rt5.tar.xz + +This reverts commit ff9c870c3e27d58c9512fad122e91436681fee5a. +Cc: stable-rt@vger.kernel.org +--- + kernel/locking/rtmutex.c | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -1028,12 +1028,12 @@ int atomic_dec_and_spin_lock(atomic_t *a + /* Subtract 1 from counter unless that drops it to 0 (ie. it was 1) */ + if (atomic_add_unless(atomic, -1, 1)) + return 0; ++ migrate_disable(); + rt_spin_lock(lock); +- if (atomic_dec_and_test(atomic)){ +- migrate_disable(); ++ if (atomic_dec_and_test(atomic)) + return 1; +- } + rt_spin_unlock(lock); ++ migrate_enable(); + return 0; + } + EXPORT_SYMBOL(atomic_dec_and_spin_lock); diff --git a/debian/patches/features/all/rt/Revert-x86-Disable-IST-stacks-for-debug-int-3-stack-.patch b/debian/patches/features/all/rt/Revert-x86-Disable-IST-stacks-for-debug-int-3-stack-.patch index 5e363868e..43ee128a6 100644 --- a/debian/patches/features/all/rt/Revert-x86-Disable-IST-stacks-for-debug-int-3-stack-.patch +++ b/debian/patches/features/all/rt/Revert-x86-Disable-IST-stacks-for-debug-int-3-stack-.patch @@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior Date: Fri, 3 Jan 2014 14:55:48 +0100 Subject: [PATCH] Revert "x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT" -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz where do I start. Let me explain what is going on here. The code sequence 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 f3335fc32..1e5553bf7 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 30e90c5d1..2ba866b65 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 diff --git a/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch b/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch index 292d24bf5..60c86e0f6 100644 --- a/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch +++ b/debian/patches/features/all/rt/arch-use-pagefault-disabled.patch @@ -1,7 +1,7 @@ Subject: mm: Fixup all fault handlers to check current->pagefault_disable From: Thomas Gleixner Date: Thu, 17 Mar 2011 11:32:28 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Necessary for decoupling pagefault disable from preempt count. 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 9ecfc6154..5dcab6cad 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fc804096a..c692083f1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 187273af9..6a8e469a0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 46d4d7942..1ed7aeb6a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 46d36bda4..2dbfeabcd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 67742f30f..a02ac0e5f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 bac9d5ce6..e9aaa0d08 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c41df77aa..66582c5ae 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 new file mode 100644 index 000000000..b22f468cb --- /dev/null +++ b/debian/patches/features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch @@ -0,0 +1,82 @@ +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/3.14/patches-3.14.3-rt5.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 +function that is blk_mq_hctx_notify(). +That function acquires the ctx->lock lock which is sleeping and I would +prefer to keep it that way. That function only moves IO-requests from +the CPU that is going offline to another CPU and it is currently the +only one. Therefore I revert the list lock back to sleeping spinlocks +and let the notifier run at POST_DEAD time. + +Signed-off-by: Sebastian Andrzej Siewior +--- + block/blk-mq-cpu.c | 17 ++++++++++------- + block/blk-mq.c | 2 +- + 2 files changed, 11 insertions(+), 8 deletions(-) + +--- a/block/blk-mq-cpu.c ++++ b/block/blk-mq-cpu.c +@@ -11,7 +11,7 @@ + #include "blk-mq.h" + + static LIST_HEAD(blk_mq_cpu_notify_list); +-static DEFINE_RAW_SPINLOCK(blk_mq_cpu_notify_lock); ++static DEFINE_SPINLOCK(blk_mq_cpu_notify_lock); + + static int blk_mq_main_cpu_notify(struct notifier_block *self, + unsigned long action, void *hcpu) +@@ -19,12 +19,15 @@ static int blk_mq_main_cpu_notify(struct + unsigned int cpu = (unsigned long) hcpu; + struct blk_mq_cpu_notifier *notify; + +- raw_spin_lock(&blk_mq_cpu_notify_lock); ++ if (action != CPU_POST_DEAD && action != CPU_POST_DEAD) ++ return NOTIFY_OK; ++ ++ spin_lock(&blk_mq_cpu_notify_lock); + + list_for_each_entry(notify, &blk_mq_cpu_notify_list, list) + notify->notify(notify->data, action, cpu); + +- raw_spin_unlock(&blk_mq_cpu_notify_lock); ++ spin_unlock(&blk_mq_cpu_notify_lock); + return NOTIFY_OK; + } + +@@ -32,16 +35,16 @@ void blk_mq_register_cpu_notifier(struct + { + BUG_ON(!notifier->notify); + +- raw_spin_lock(&blk_mq_cpu_notify_lock); ++ spin_lock(&blk_mq_cpu_notify_lock); + list_add_tail(¬ifier->list, &blk_mq_cpu_notify_list); +- raw_spin_unlock(&blk_mq_cpu_notify_lock); ++ spin_unlock(&blk_mq_cpu_notify_lock); + } + + void blk_mq_unregister_cpu_notifier(struct blk_mq_cpu_notifier *notifier) + { +- raw_spin_lock(&blk_mq_cpu_notify_lock); ++ spin_lock(&blk_mq_cpu_notify_lock); + list_del(¬ifier->list); +- raw_spin_unlock(&blk_mq_cpu_notify_lock); ++ spin_unlock(&blk_mq_cpu_notify_lock); + } + + void blk_mq_init_cpu_notifier(struct blk_mq_cpu_notifier *notifier, +--- a/block/blk-mq.c ++++ b/block/blk-mq.c +@@ -971,7 +971,7 @@ static void blk_mq_hctx_notify(void *dat + struct blk_mq_ctx *ctx; + LIST_HEAD(tmp); + +- if (action != CPU_DEAD && action != CPU_DEAD_FROZEN) ++ if (action != CPU_POST_DEAD && action != CPU_POST_DEAD) + return; + + /* 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 f46b4ed1d..0db471f46 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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() @@ -13,9 +13,9 @@ on the member and this works with irq off but on RT we would need the extra lock Signed-off-by: Sebastian Andrzej Siewior --- - block/blk-mq.c | 14 +++++++++++--- + block/blk-mq.c | 20 +++++++++++++++++--- block/blk-mq.h | 1 + - 2 files changed, 12 insertions(+), 3 deletions(-) + 2 files changed, 18 insertions(+), 3 deletions(-) --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -32,23 +32,28 @@ Signed-off-by: Sebastian Andrzej Siewior } /* -@@ -41,12 +45,13 @@ static struct blk_mq_ctx *__blk_mq_get_c +@@ -41,12 +45,18 @@ static struct blk_mq_ctx *__blk_mq_get_c */ static struct blk_mq_ctx *blk_mq_get_ctx(struct request_queue *q) { - return __blk_mq_get_ctx(q, get_cpu()); + return __blk_mq_get_ctx(q, get_cpu_light()); ++} ++ ++static void __blk_mq_put_ctx(struct blk_mq_ctx *ctx) ++{ ++ spin_unlock(&ctx->cpu_lock); } static void blk_mq_put_ctx(struct blk_mq_ctx *ctx) { - put_cpu(); -+ spin_unlock(&ctx->cpu_lock); ++ __blk_mq_put_ctx(ctx); + put_cpu_light(); } /* -@@ -897,7 +902,9 @@ static void blk_mq_make_request(struct r +@@ -897,7 +907,9 @@ static void blk_mq_make_request(struct r if (list_empty(&plug->mq_list)) trace_block_plug(q); else if (request_count >= BLK_MAX_REQUEST_COUNT) { @@ -58,7 +63,15 @@ Signed-off-by: Sebastian Andrzej Siewior trace_block_plug(q); } list_add_tail(&rq->queuelist, &plug->mq_list); -@@ -1212,6 +1219,7 @@ static void blk_mq_init_cpu_queues(struc +@@ -973,6 +985,7 @@ static void blk_mq_hctx_notify(void *dat + clear_bit(ctx->index_hw, hctx->ctx_map); + } + spin_unlock(&ctx->lock); ++ __blk_mq_put_ctx(ctx); + + if (list_empty(&tmp)) + return; +@@ -1212,6 +1225,7 @@ static void blk_mq_init_cpu_queues(struc memset(__ctx, 0, sizeof(*__ctx)); __ctx->cpu = i; spin_lock_init(&__ctx->lock); 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 deee051fb..cc5a9c4e3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 11b868ac9..97e190331 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 54ad90d0f..f63d90e7f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner 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 bb8343d61..4b3b386ea 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 4721dabdd..7bc5278f2 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Completions have no long lasting callbacks and therefor do not need the complex waitqueue variant. Use simple waitqueues which reduces the diff --git a/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch b/debian/patches/features/all/rt/cond-resched-lock-rt-tweak.patch index 6e4603abf..c2b98036c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 c1a13e508..2e3602fca 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 771174d23..555012c9d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 5d70765d4..03e272739 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 3f15351bf..0689bb602 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 cb8c8912e..d3689f51e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 diff --git a/debian/patches/features/all/rt/cpu-rt-variants.patch b/debian/patches/features/all/rt/cpu-rt-variants.patch index e98b003c0..6376f5cfe 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 846583cea..9cc7bb6e4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 aa7b67d25..bf4e566e3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/cpumask-disable-offstack-on-rt.patch b/debian/patches/features/all/rt/cpumask-disable-offstack-on-rt.patch index 5d92c7e00..cdb7eea21 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f6d600777..777b30d55 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 aad904aaa..896e91c2b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/disable-lazy-preempt-on-x86-64.patch b/debian/patches/features/all/rt/disable-lazy-preempt-on-x86-64.patch deleted file mode 100644 index 29c6b5def..000000000 --- a/debian/patches/features/all/rt/disable-lazy-preempt-on-x86-64.patch +++ /dev/null @@ -1,88 +0,0 @@ -From 27bcad87397de27b92b8651630771e032cf87116 Mon Sep 17 00:00:00 2001 -From: Sebastian Andrzej Siewior -Date: Fri, 11 Apr 2014 20:12:43 +0200 -Subject: [PATCH] disable lazy preempt on x86-64 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz - -Signed-off-by: Sebastian Andrzej Siewior ---- - arch/x86/Kconfig | 2 +- - arch/x86/kernel/entry_64.S | 28 ++++++++-------------------- - 2 files changed, 9 insertions(+), 21 deletions(-) - ---- a/arch/x86/Kconfig -+++ b/arch/x86/Kconfig -@@ -21,7 +21,7 @@ config X86_64 - ### Arch settings - config X86 - def_bool y -- select HAVE_PREEMPT_LAZY -+ select HAVE_PREEMPT_LAZY if X86_32 - select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS - select ARCH_MIGHT_HAVE_PC_PARPORT - select ARCH_MIGHT_HAVE_PC_SERIO ---- a/arch/x86/kernel/entry_64.S -+++ b/arch/x86/kernel/entry_64.S -@@ -658,8 +658,8 @@ GLOBAL(system_call_after_swapgs) - /* Handle reschedules */ - /* edx: work, edi: workmask */ - sysret_careful: -- testl $_TIF_NEED_RESCHED_MASK,%edx -- jz sysret_signal -+ bt $TIF_NEED_RESCHED,%edx -+ jnc sysret_signal - TRACE_IRQS_ON - ENABLE_INTERRUPTS(CLBR_NONE) - pushq_cfi %rdi -@@ -771,8 +771,8 @@ GLOBAL(int_with_check) - /* First do a reschedule test. */ - /* edx: work, edi: workmask */ - int_careful: -- testl $_TIF_NEED_RESCHED_MASK,%edx -- jz int_very_careful -+ bt $TIF_NEED_RESCHED,%edx -+ jnc int_very_careful - TRACE_IRQS_ON - ENABLE_INTERRUPTS(CLBR_NONE) - pushq_cfi %rdi -@@ -1071,8 +1071,8 @@ ENTRY(native_iret) - /* edi: workmask, edx: work */ - retint_careful: - CFI_RESTORE_STATE -- testl $_TIF_NEED_RESCHED_MASK,%edx -- jz retint_signal -+ bt $TIF_NEED_RESCHED,%edx -+ jnc retint_signal - TRACE_IRQS_ON - ENABLE_INTERRUPTS(CLBR_NONE) - pushq_cfi %rdi -@@ -1104,19 +1104,7 @@ ENTRY(native_iret) - /* rcx: threadinfo. interrupts off. */ - ENTRY(retint_kernel) - cmpl $0,PER_CPU_VAR(__preempt_count) -- jz check_int_off -- -- # atleast preempt count == 0 ? -- cmpl $_TIF_NEED_RESCHED,PER_CPU_VAR(__preempt_count) -- jnz retint_restore_args -- -- cmpl $0, TI_preempt_lazy_count(%rcx) -- jnz retint_restore_args -- -- bt $TIF_NEED_RESCHED_LAZY,TI_flags(%rcx) -- jnc retint_restore_args -- --check_int_off: -+ jnz retint_restore_args - bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */ - jnc retint_restore_args - call preempt_schedule_irq -@@ -1552,7 +1540,7 @@ ENTRY(paranoid_exit) - movq %rsp,%rdi /* &pt_regs */ - call sync_regs - movq %rax,%rsp /* switch stack for scheduling */ -- testl $_TIF_NEED_RESCHED_MASK,%ebx -+ testl $_TIF_NEED_RESCHED,%ebx - jnz paranoid_schedule - movl %ebx,%edx /* arg3: thread flags */ - TRACE_IRQS_ON diff --git a/debian/patches/features/all/rt/disable-preempt-lazy-on-x86-64.patch b/debian/patches/features/all/rt/disable-preempt-lazy-on-x86-64.patch new file mode 100644 index 000000000..0e600a689 --- /dev/null +++ b/debian/patches/features/all/rt/disable-preempt-lazy-on-x86-64.patch @@ -0,0 +1,24 @@ +From b862d66791544573af3ec23690f3dfa9718250b1 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Fri, 2 May 2014 21:19:26 +0200 +Subject: [PATCH] disable preempt lazy on x86-64 +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz + +it still explodes + +Signed-off-by: Sebastian Andrzej Siewior +--- + arch/x86/Kconfig | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/arch/x86/Kconfig ++++ b/arch/x86/Kconfig +@@ -21,7 +21,7 @@ config X86_64 + ### Arch settings + config X86 + def_bool y +- select HAVE_PREEMPT_LAZY ++ select HAVE_PREEMPT_LAZY if X86_32 + select ARCH_HAS_DEBUG_STRICT_USER_COPY_CHECKS + select ARCH_MIGHT_HAVE_PC_PARPORT + select ARCH_MIGHT_HAVE_PC_SERIO 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 4473e0bc6..99056a085 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 091ddec97..dbd88b3e9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1cdcaf74b..a79fc2726 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-gianfar-make-rt-aware.patch b/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch index fd2b9af1a..1187c0f35 100644 --- a/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch +++ b/debian/patches/features/all/rt/drivers-net-gianfar-make-rt-aware.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Thu, 1 Apr 2010 20:20:57 +0200 Subject: drivers: net: gianfar: Make RT aware -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The adjust_link() disables interrupts before taking the queue locks. On RT those locks are converted to "sleeping" locks and 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 01de7e842..08ee030ef 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c1001c743..1a93a4454 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz No need to keep preemption disabled across the whole function. diff --git a/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch b/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch index a5c457014..3ee065292 100644 --- a/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch +++ b/debian/patches/features/all/rt/drivers-serial-cleanup-locking-for-rt.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:01 -0500 Subject: [PATCH] serial: 8250: Clean up the locking for -rt -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz In -RT the spin_lock_irqsave() does not spin but sleep if the lock is taken. Before that, local_irq_save() is invoked which disables 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 3a7262803..b76a526f7 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1a1cc597b..1fe51a71c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ead4afbdd..5d3de0c98 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 e0486eafa..6c13ca9c4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 7bedbb9ad..0c519a40e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/filemap-fix-up.patch b/debian/patches/features/all/rt/filemap-fix-up.patch index 3aab5b90b..0e904f573 100644 --- a/debian/patches/features/all/rt/filemap-fix-up.patch +++ b/debian/patches/features/all/rt/filemap-fix-up.patch @@ -1,7 +1,7 @@ Subject: filemap-fix-up.patch From: Thomas Gleixner Date: Fri, 17 Jun 2011 18:56:24 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Cc: Peter Zijlstra 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 2cf0e441d..f6e87596e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 433d59393..0e9d32688 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Sebastian Andrzej Siewior --- 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 8047cf40d..9c4005489 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a65826846..28a3d1944 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 db7fe7cf8..5504d499a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ebd10cb1b..61508bd75 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 3fe048781..47074b6a4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 65da1ebaa..43b11d1bd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 7e1d20796..c0108f47c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 8e73067b6..151f624c0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2059a195a..83e41c4ec 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 @@ Subject: ftrace-migrate-disable-tracing.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:56:42 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 9fa3edb31..6b177709e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Requeue with timeout causes a bug with PREEMPT_RT_FULL. 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 b018326a2..6d82a3579 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ba5e2d016..0c656976c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6068c80a1..ccf951479 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 e6a894d85..70af05d33 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 a03d5fbde..31fbd4dbb 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz get_online_cpus() is a heavy weight function which involves a global mutex. migrate_disable() wants a simpler construct which prevents only @@ -14,8 +14,8 @@ tasks on the cpu which should be brought down. Signed-off-by: Thomas Gleixner --- include/linux/cpu.h | 4 + - kernel/cpu.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++++++- - 2 files changed, 124 insertions(+), 2 deletions(-) + kernel/cpu.c | 120 +++++++++++++++++++++++++++++++++++++++++++++++++++- + 2 files changed, 123 insertions(+), 1 deletion(-) --- a/include/linux/cpu.h +++ b/include/linux/cpu.h @@ -185,15 +185,6 @@ Signed-off-by: Thomas Gleixner err = __cpu_notify(CPU_DOWN_PREPARE | mod, hcpu, -1, &nr_calls); if (err) { -@@ -333,7 +449,7 @@ static int __ref _cpu_down(unsigned int - /* CPU didn't die: tell everyone. Can't complain. */ - smpboot_unpark_threads(cpu); - cpu_notify_nofail(CPU_DOWN_FAILED | mod, hcpu); -- goto out_release; -+ goto out_cancel; - } - BUG_ON(cpu_online(cpu)); - @@ -356,6 +472,8 @@ static int __ref _cpu_down(unsigned int check_for_tasks(cpu); 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 9894ee487..2355d446a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 43115e983..ef3faf0c1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1ae31c0be..5538a94b7 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b4716ecab..9a21c4715 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f8d247dd3..942815b0e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 88f183b04..3f76ef27a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 16a7f3301..145d4c59e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 690b2eb09..43c78c284 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 bcd87f6b8..e8f959b24 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 4d1a60fd9..73649fb88 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 26f6b2b95..a9ca0279b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 16ff6564c..49e079443 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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_compile_fix.patch b/debian/patches/features/all/rt/i915_compile_fix.patch index 0afe5416b..0eb67032a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 e7dd59be5..f5c8f10b9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 afe00c378..e0c17e2c9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ad74c0815..eb1fafaa6 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ac083719d..5792f5b54 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c3f8406ba..56ac6a95f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz RT serializes the code with the (rt)spinlock but keeps preemption enabled. Some parts of the code need to be atomic nevertheless. 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 index e4915d97d..14f312c7f 100644 --- 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 @@ -1,7 +1,7 @@ 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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. 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 06540ecef..deb7fac6e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 681841579..0f32429ec 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-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 2abb6e2e6..83fe6e700 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/jump-label-rt.patch b/debian/patches/features/all/rt/jump-label-rt.patch index e5a56364b..3f010730c 100644 --- a/debian/patches/features/all/rt/jump-label-rt.patch +++ b/debian/patches/features/all/rt/jump-label-rt.patch @@ -1,7 +1,7 @@ Subject: jump-label-rt.patch From: Thomas Gleixner Date: Wed, 13 Jul 2011 11:03:16 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 b69f8ac62..01604a7b9 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,16 +1,15 @@ 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Disable stuff which is known to have issues on RT Signed-off-by: Thomas Gleixner --- - arch/Kconfig | 1 + - drivers/net/Kconfig | 1 + - mm/Kconfig | 2 +- - 3 files changed, 3 insertions(+), 1 deletion(-) + arch/Kconfig | 1 + + mm/Kconfig | 2 +- + 2 files changed, 2 insertions(+), 1 deletion(-) --- a/arch/Kconfig +++ b/arch/Kconfig @@ -22,16 +21,6 @@ Signed-off-by: Thomas Gleixner select RING_BUFFER select RING_BUFFER_ALLOW_SWAP help ---- a/drivers/net/Kconfig -+++ b/drivers/net/Kconfig -@@ -160,6 +160,7 @@ config VXLAN - - config NETCONSOLE - tristate "Network console logging support" -+ depends on !PREEMPT_RT_FULL - ---help--- - If you want to log kernel messages over the network, enable this. - See for details. --- a/mm/Kconfig +++ b/mm/Kconfig @@ -393,7 +393,7 @@ config NOMMU_INITIAL_TRIM_EXCESS 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 807db4666..72387cd40 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 5cff1bfa2..dba0eb318 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9d08166f8..27a2ab9fc 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 4df224b86..e883d6aa6 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Since we replaced msleep() by hrtimer I see now and then (rarely) this: diff --git a/debian/patches/features/all/rt/kgb-serial-hackaround.patch b/debian/patches/features/all/rt/kgb-serial-hackaround.patch index 64c9c3e2a..16adad4f6 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 00f488eca..4f3933998 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz This patch provides a recording mechanism to store data of potential sources of system latencies. The recordings separately determine the 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 61d469861..865e7d0c8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9601ceb14..66a7d52b6 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f7571f07f..099094a38 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b66459afc..b0e92c364 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ac2791c6f..c3967396b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ef7fbeed0..055b1a8c2 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 adbea2ae3..006126480 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 @@ -+-rt1 ++-rt5 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 58f643bc1..b71825346 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 138008a1d..64093e290 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz From: Yong Zhang diff --git a/debian/patches/features/all/rt/md-disable-bcache.patch b/debian/patches/features/all/rt/md-disable-bcache.patch index 10b741350..f3c1a28b8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a06509764..c4a265d05 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f6c5e407c..c8e550285 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6ea5e94b9..f3d383d2e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c38f52470..dafd0d6a0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 47246a57e..e9785f98d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 51bae3332..b17075904 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 560fdc05d..62b54aecd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 632ddae33..b325688d8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz kmap_atomic() is preemptible on RT. diff --git a/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch b/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch index d54d86101..d605f0abe 100644 --- a/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch +++ b/debian/patches/features/all/rt/mm-cgroup-page-bit-spinlock.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Wed, 19 Aug 2009 09:56:42 +0200 Subject: mm: Replace cgroup_page bit spinlock -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Bit spinlocks are not working on RT. Replace them. 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 a67640446..ad856009e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 0f5461cff..296f97182 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Ingo Molnar Signed-off-by: Thomas Gleixner @@ -12,7 +12,7 @@ Signed-off-by: Thomas Gleixner --- a/init/Kconfig +++ b/init/Kconfig -@@ -1556,6 +1556,7 @@ choice +@@ -1563,6 +1563,7 @@ choice config SLAB bool "SLAB" @@ -20,7 +20,7 @@ Signed-off-by: Thomas Gleixner help The regular slab allocator that is established and known to work well in all environments. It organizes cache hot objects in -@@ -1574,6 +1575,7 @@ config SLUB +@@ -1581,6 +1582,7 @@ config SLUB config SLOB depends on EXPERT bool "SLOB (Simple Allocator)" diff --git a/debian/patches/features/all/rt/mm-enable-slub.patch b/debian/patches/features/all/rt/mm-enable-slub.patch index c8fa81777..28f371b0f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9d947fdd8..458a97302 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 3fd868eec..c6315ca46 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The following trace is triggered when running ltp oom test cases: diff --git a/debian/patches/features/all/rt/mm-page-alloc-fix.patch b/debian/patches/features/all/rt/mm-page-alloc-fix.patch index ed3ed80bc..a61550812 100644 --- a/debian/patches/features/all/rt/mm-page-alloc-fix.patch +++ b/debian/patches/features/all/rt/mm-page-alloc-fix.patch @@ -1,7 +1,7 @@ Subject: mm-page-alloc-fix.patch From: Thomas Gleixner Date: Thu, 21 Jul 2011 16:47:49 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- @@ -10,7 +10,7 @@ Signed-off-by: Thomas Gleixner --- a/mm/page_alloc.c +++ b/mm/page_alloc.c -@@ -2328,8 +2328,8 @@ static struct page * +@@ -2303,8 +2303,8 @@ static struct page * struct page *page; /* Page migration frees to the PCP lists but we want merging */ 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 f4c59726e..af531126e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 642ac62a1..69e9f65ee 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 7a6575bf7..97de4c1a0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 5292915de..81087212b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz rt-friendly per-cpu pages: convert the irqs-off per-cpu locking method into a preemptible, explicit-per-cpu-locks method. @@ -128,7 +128,7 @@ Signed-off-by: Thomas Gleixner } /* -@@ -1533,7 +1551,7 @@ again: +@@ -1533,7 +1551,7 @@ struct page *buffered_rmqueue(struct zon struct per_cpu_pages *pcp; struct list_head *list; @@ -137,7 +137,7 @@ Signed-off-by: Thomas Gleixner pcp = &this_cpu_ptr(zone->pageset)->pcp; list = &pcp->lists[migratetype]; if (list_empty(list)) { -@@ -1565,20 +1583,22 @@ again: +@@ -1565,20 +1583,22 @@ struct page *buffered_rmqueue(struct zon */ WARN_ON_ONCE(order > 1); } @@ -164,7 +164,7 @@ Signed-off-by: Thomas Gleixner VM_BUG_ON_PAGE(bad_range(zone, page), page); if (prep_new_page(page, order, gfp_flags)) -@@ -1586,7 +1606,7 @@ again: +@@ -1586,7 +1606,7 @@ struct page *buffered_rmqueue(struct zon return page; failed: diff --git a/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch b/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch index 96cb56f5d..69cd9c913 100644 --- a/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch +++ b/debian/patches/features/all/rt/mm-prepare-pf-disable-discoupling.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:30:37 -0500 Subject: mm: Prepare decoupling the page fault disabling logic -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Add a pagefault_disabled variable to task_struct to allow decoupling the pagefault-disabled logic from the preempt count. 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 8b393ad22..0960e026a 100644 --- a/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch +++ b/debian/patches/features/all/rt/mm-protect-activate-switch-mm.patch @@ -1,7 +1,7 @@ Subject: mm: Protect activate_mm() by preempt_[disable&enable]_rt() From: Yong Zhang Date: Tue, 15 May 2012 13:53:56 +0800 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-remove-preempt-count-from-pf.patch b/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch index b84556bb4..1f6995de9 100644 --- a/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch +++ b/debian/patches/features/all/rt/mm-remove-preempt-count-from-pf.patch @@ -1,7 +1,7 @@ From: Thomas Gleixner Date: Sat, 25 Jul 2009 22:06:27 +0200 Subject: mm: Remove preempt count from pagefault disable/enable -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Now that all users are cleaned up, we can remove the preemption count. 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 65b39ec11..3de29c33c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz In fact, with migrate_disable() existing one could play games with kmap_atomic. You could save/restore the kmap_atomic slots on context diff --git a/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch b/debian/patches/features/all/rt/mm-scatterlist-dont-disable-irqs-on-RT.patch index 3bfa99f62..92a8d3156 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 64cf6f9f3..30bd26552 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 29f191094..f7bb02dad 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2e1654e14..6c6b9f41c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c4bc6ad0d..5b3fb737d 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 @@ Subject: mutex-no-spin-on-rt.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:51:45 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f6d96f42c..bdba90b39 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 @@ Subject: net: Another local_irq_disable/kmalloc headache From: Thomas Gleixner Date: Wed, 26 Sep 2012 16:21:08 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b28e7d4aa..0c5604f30 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 c66e5a3ae..c1cb57646 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9cbdf5ad2..4777b494f 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 1/2] net: gianfar: do not disable interrupts -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-gianfar-do-not-try-to-cleanup-TX-packets-if-they.patch b/debian/patches/features/all/rt/net-gianfar-do-not-try-to-cleanup-TX-packets-if-they.patch index 0aeb6e624..78e9fdfa1 100644 --- a/debian/patches/features/all/rt/net-gianfar-do-not-try-to-cleanup-TX-packets-if-they.patch +++ b/debian/patches/features/all/rt/net-gianfar-do-not-try-to-cleanup-TX-packets-if-they.patch @@ -3,7 +3,7 @@ From: Sebastian Andrzej Siewior Date: Thu, 27 Mar 2014 14:09:02 +0100 Subject: [PATCH 2/2] net: gianfar: do not try to cleanup TX packets if they are not done -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz What I observe is that the TX queue is not empty and does not make any progress. gfar_clean_tx_ring() does not clean up the packet because it diff --git a/debian/patches/features/all/rt/net-ip_send_unicast_reply-add-missing-local-serializ.patch b/debian/patches/features/all/rt/net-ip_send_unicast_reply-add-missing-local-serializ.patch index 7da2b2ef7..d793cd28d 100644 --- a/debian/patches/features/all/rt/net-ip_send_unicast_reply-add-missing-local-serializ.patch +++ b/debian/patches/features/all/rt/net-ip_send_unicast_reply-add-missing-local-serializ.patch @@ -2,7 +2,7 @@ From e047fce21592ed3959e21ed803a7577d3c20e394 Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Sun, 29 Dec 2013 18:11:54 +0100 Subject: [PATCH] net: ip_send_unicast_reply: add missing local serialization -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz in response to the oops in ip_output.c:ip_send_unicast_reply under high network load with CONFIG_PREEMPT_RT_FULL=y, reported by Sami Pietikainen 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 0e35ff8ec..1e1904610 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 bdc6f5824..739997c49 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 90d28ec82..02a8caaee 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 bf88fbb4b..f388f0174 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1b78a0dc9..ef4d61d99 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 33185df90..a7b0bfeb8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Retry loops on RT might loop forever when the modifying side was preempted. Use cpu_chill() instead of cpu_relax() to let the system diff --git a/debian/patches/features/all/rt/net-use-cpu-light-in-ip-send-unicast-reply.patch b/debian/patches/features/all/rt/net-use-cpu-light-in-ip-send-unicast-reply.patch index b0e623592..b74317343 100644 --- a/debian/patches/features/all/rt/net-use-cpu-light-in-ip-send-unicast-reply.patch +++ b/debian/patches/features/all/rt/net-use-cpu-light-in-ip-send-unicast-reply.patch @@ -1,7 +1,7 @@ Subject: net: Use get_cpu_light() in ip_send_unicast_reply() From: Thomas Gleixner Date: Mon, 01 Oct 2012 17:12:35 +0100 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 af01ebcb0..28a0c981e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 990a8ae85..68b6c3fb3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz On x86_64 we must disable preemption before we enable interrupts for stack faults, int3 and debugging, because the current task is using diff --git a/debian/patches/features/all/rt/panic-disable-random-on-rt.patch b/debian/patches/features/all/rt/panic-disable-random-on-rt.patch index 4c666fc1f..edc42d2f8 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 ef3fe7b6a..dd43cdbe4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 0a6a8988e..6c38c23c4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 index 34a6dee1c..d8df49f4f 100644 --- a/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch +++ b/debian/patches/features/all/rt/percpu-rwsem-compilefix.patch @@ -2,7 +2,7 @@ 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The shortcut on mainline skip lockdep. No idea why this is a good thing. 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 43d741cca..9a4472c27 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 0bc0fdb73..4d2cd9111 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 0497c9edd..c926143c9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6a619acac..d5b7d4fc0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 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 e4acbd742..f85575767 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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. diff --git a/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch b/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch index f132cc928..4ba73e9ba 100644 --- a/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch +++ b/debian/patches/features/all/rt/peter_zijlstra-frob-pagefault_disable.patch @@ -1,7 +1,7 @@ Subject: mm: pagefault_disabled() From: Peter Zijlstra Date: Thu Aug 11 15:31:31 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Wrap the test for pagefault_disabled() into a helper, this allows us to remove the need for current->pagefault_disabled on !-rt kernels. 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 b1b5e929b..5ee1a26a0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz With RT_FULL we get the below wreckage: diff --git a/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch b/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch index ea804b54d..e6b12f604 100644 --- a/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch +++ b/debian/patches/features/all/rt/peterz-raw_pagefault_disable.patch @@ -1,7 +1,7 @@ Subject: mm: raw_pagefault_disable From: Peter Zijlstra Date: Fri Aug 05 17:16:58 CEST 2011 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Adding migrate_disable() to pagefault_disable() to preserve the per-cpu thing for kmap_atomic might not have been the best of choices. 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 a4077c921..f635ab471 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fc96d1f3d..d7e0d3c8d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fc5926af1..2b7e33427 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b3a36fd95..97453e231 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f826bedfa..5fe997931 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 94185f236..0ee9ab45f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 edbccbb2c..77b931987 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz posix-cpu-timer code takes non -rt safe locks in hard irq context. Move it to a thread. diff --git a/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch b/debian/patches/features/all/rt/power-disable-highmem-on-rt.patch index 855f8da6b..2ae70468a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 44c8e6678..b6ee3d694 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 e9d384d3a..0faf4f4e4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/preempt-lazy-support.patch b/debian/patches/features/all/rt/preempt-lazy-support.patch index 0f863e8f9..9696835a4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz It has become an obsession to mitigate the determinism vs. throughput loss of RT. Looking at the mainline semantics of preemption points @@ -53,9 +53,9 @@ performance. Signed-off-by: Thomas Gleixner --- - arch/x86/include/asm/preempt.h | 12 ++++++++-- + arch/x86/include/asm/preempt.h | 18 ++++++++++++++- include/linux/ftrace_event.h | 1 - include/linux/preempt.h | 33 +++++++++++++++++++++++++-- + include/linux/preempt.h | 29 +++++++++++++++++++++++- include/linux/sched.h | 37 ++++++++++++++++++++++++++++++ include/linux/thread_info.h | 13 ++++++++++ kernel/Kconfig.preempt | 6 +++++ @@ -66,11 +66,11 @@ Signed-off-by: Thomas Gleixner kernel/trace/trace.c | 41 ++++++++++++++++++++-------------- kernel/trace/trace.h | 2 + kernel/trace/trace_output.c | 13 +++++++++- - 13 files changed, 201 insertions(+), 34 deletions(-) + 13 files changed, 206 insertions(+), 31 deletions(-) --- a/arch/x86/include/asm/preempt.h +++ b/arch/x86/include/asm/preempt.h -@@ -85,17 +85,25 @@ static __always_inline void __preempt_co +@@ -85,17 +85,33 @@ static __always_inline void __preempt_co * a decrement which hits zero means we have no preempt_count and should * reschedule. */ @@ -84,7 +84,11 @@ Signed-off-by: Thomas Gleixner +{ + if (____preempt_count_dec_and_test()) + return true; ++#ifdef CONFIG_PREEMPT_LAZY + return test_thread_flag(TIF_NEED_RESCHED_LAZY); ++#else ++ return false; ++#endif +} + /* @@ -92,9 +96,12 @@ Signed-off-by: Thomas Gleixner */ static __always_inline bool should_resched(void) { -- return unlikely(!__this_cpu_read_4(__preempt_count)); ++#ifdef CONFIG_PREEMPT_LAZY + return unlikely(!__this_cpu_read_4(__preempt_count) || \ + test_thread_flag(TIF_NEED_RESCHED_LAZY)); ++#else + return unlikely(!__this_cpu_read_4(__preempt_count)); ++#endif } #ifdef CONFIG_PREEMPT @@ -158,24 +165,6 @@ Signed-off-by: Thomas Gleixner #else #define preempt_enable() \ do { \ -@@ -99,7 +126,8 @@ do { \ - #define preempt_enable_notrace() \ - do { \ - barrier(); \ -- if (unlikely(__preempt_count_dec_and_test())) \ -+ if (unlikely(__preempt_count_dec_and_test() || \ -+ test_thread_flag(TIF_NEED_RESCHED_LAZY))) \ - __preempt_schedule_context(); \ - } while (0) - #else -@@ -122,7 +150,6 @@ do { \ - #define sched_preempt_enable_no_resched() barrier() - #define preempt_enable_no_resched() barrier() - #define preempt_enable() barrier() --#define preempt_check_resched() do { } while (0) - - #define preempt_disable_notrace() barrier() - #define preempt_enable_no_resched_notrace() barrier() @@ -147,7 +174,7 @@ do { \ } while (0) #define preempt_fold_need_resched() \ 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 c8fa59cff..a94e03652 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 49e8cc8bd..976fce975 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 97ecd9fa9..581c7ef39 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 5e09bbe71..6db7cdb4b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fd7a1f5ca..69428b43c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz As explained by Alexander Fyodorov : 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 9d619c8dc..18101bebd 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 @@ Subject: radix-tree-rt-aware.patch From: Thomas Gleixner Date: Sun, 17 Jul 2011 21:33:18 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f83ba37cd..d768312f1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 cd7d3a2be..257021bf1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a5b82edb6..a19add794 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 e330649d2..98f2f5c16 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6228a1b1c..26dd2d32c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 442c241df..b1e847bdc 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fda2f1ccf..bae5569fc 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a1bf634bc..e1c6e05d5 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 98156ee24..5c57e959b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 aac4b2595..0f92c1023 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b8505dfac..5523ec4be 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz pushdown of migrate_disable/enable from read_*lock* to the rt_read_*lock* api level @@ -141,7 +141,7 @@ Signed-off-by: Sebastian Andrzej Siewior if (ret) { rwlock->read_depth++; - rwlock_acquire_read(&rwlock->dep_map, 0, 1, _RET_IP_); + rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_); - } else - migrate_enable(); + } 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 6db2d767c..4ae24e85f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/resource-counters-use-localirq-nort.patch b/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch index a435ac8e4..57f23f8e4 100644 --- a/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch +++ b/debian/patches/features/all/rt/resource-counters-use-localirq-nort.patch @@ -1,7 +1,7 @@ From: Ingo Molnar Date: Fri, 3 Jul 2009 08:44:33 -0500 Subject: core: Do not disable interrupts on RT in res_counter.c -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Frederic Weisbecker reported this warning: 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 2c534c026..af73fe295 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 90c4a11e7..1189ae246 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 97db24940..3c0863a91 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Map spinlocks, rwlocks, rw_semaphores and semaphores to the rt_mutex based locking functions for preempt-rt. @@ -621,7 +621,7 @@ Signed-off-by: Thomas Gleixner + + if (ret) { + rwlock->read_depth++; -+ rwlock_acquire_read(&rwlock->dep_map, 0, 1, _RET_IP_); ++ rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_); + } else + migrate_enable(); + @@ -640,7 +640,7 @@ Signed-off-by: Thomas Gleixner +{ + struct rt_mutex *lock = &rwlock->lock; + -+ rwlock_acquire_read(&rwlock->dep_map, 0, 0, _RET_IP_); ++ rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_); + + /* + * recursive read locks succeed when current owns the lock 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 4107654f2..6b21162d9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 633ae9878..68d0c4b06 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 22e1d97e2..2d7a97f9d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6082b6420..6cdaee60c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1669159d1..599044b17 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,15 +1,15 @@ 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- - include/linux/rtmutex.h | 32 ++- + include/linux/rtmutex.h | 27 ++ kernel/futex.c | 5 - kernel/locking/rtmutex.c | 375 +++++++++++++++++++++++++++++++++++++--- + kernel/locking/rtmutex.c | 377 +++++++++++++++++++++++++++++++++++++--- kernel/locking/rtmutex_common.h | 11 + - 4 files changed, 394 insertions(+), 29 deletions(-) + 4 files changed, 390 insertions(+), 30 deletions(-) --- a/include/linux/rtmutex.h +++ b/include/linux/rtmutex.h @@ -34,26 +34,24 @@ Signed-off-by: Thomas Gleixner const char *name, *file; int line; void *magic; -@@ -58,19 +62,35 @@ struct hrtimer_sleeper; - #ifdef CONFIG_DEBUG_RT_MUTEXES - # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ - , .name = #mutexname, .file = __FILE__, .line = __LINE__ --# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __func__) +@@ -55,22 +59,33 @@ struct hrtimer_sleeper; + # define rt_mutex_debug_check_no_locks_held(task) do { } while (0) + #endif + +# define rt_mutex_init(mutex) \ + do { \ + raw_spin_lock_init(&(mutex)->wait_lock); \ + __rt_mutex_init(mutex, #mutex); \ + } while (0) + + #ifdef CONFIG_DEBUG_RT_MUTEXES + # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) \ + , .name = #mutexname, .file = __FILE__, .line = __LINE__ +-# define rt_mutex_init(mutex) __rt_mutex_init(mutex, __func__) extern void rt_mutex_debug_task_free(struct task_struct *tsk); #else # define __DEBUG_RT_MUTEX_INITIALIZER(mutexname) -# define rt_mutex_init(mutex) __rt_mutex_init(mutex, NULL) -+# define rt_mutex_init(mutex) \ -+ do { \ -+ raw_spin_lock_init(&(mutex)->wait_lock); \ -+ __rt_mutex_init(mutex, #mutex); \ -+ } while (0) # define rt_mutex_debug_task_free(t) do { } while (0) #endif @@ -77,7 +75,7 @@ Signed-off-by: Thomas Gleixner struct rt_mutex mutexname = __RT_MUTEX_INITIALIZER(mutexname) --- a/kernel/futex.c +++ b/kernel/futex.c -@@ -2469,10 +2469,7 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2476,10 +2476,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. */ @@ -555,7 +553,7 @@ Signed-off-by: Thomas Gleixner raw_spin_lock(&lock->wait_lock); -@@ -1062,7 +1400,6 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); +@@ -1062,13 +1400,12 @@ EXPORT_SYMBOL_GPL(rt_mutex_destroy); void __rt_mutex_init(struct rt_mutex *lock, const char *name) { lock->owner = NULL; @@ -563,6 +561,13 @@ Signed-off-by: Thomas Gleixner lock->waiters = RB_ROOT; lock->waiters_leftmost = NULL; + debug_rt_mutex_init(lock, name); + } +-EXPORT_SYMBOL_GPL(__rt_mutex_init); ++EXPORT_SYMBOL(__rt_mutex_init); + + /** + * rt_mutex_init_proxy_locked - initialize and lock a rt_mutex on behalf of a @@ -1083,7 +1420,7 @@ EXPORT_SYMBOL_GPL(__rt_mutex_init); void rt_mutex_init_proxy_locked(struct rt_mutex *lock, struct task_struct *proxy_owner) 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 e59d5f671..8e2d17a02 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1e5c262f5..d6324ec42 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz rwlocks and rwsems on RT do not allow multiple readers. Annotate the lockdep acquire functions accordingly. @@ -9,21 +9,21 @@ lockdep acquire functions accordingly. Signed-off-by: Thomas Gleixner Cc: stable-rt@vger.kernel.org --- - kernel/locking/rt.c | 44 +++++++++++++++++++++++++------------------- - 1 file changed, 25 insertions(+), 19 deletions(-) + kernel/locking/rt.c | 25 +++++++++++++++---------- + 1 file changed, 15 insertions(+), 10 deletions(-) --- a/kernel/locking/rt.c +++ b/kernel/locking/rt.c -@@ -213,17 +213,16 @@ int __lockfunc rt_read_trylock(rwlock_t - */ +@@ -216,17 +216,17 @@ int __lockfunc rt_read_trylock(rwlock_t if (rt_mutex_owner(lock) != current) { + migrate_disable(); ret = rt_mutex_trylock(lock); -- if (ret) -+ if (ret) { +- if (!ret) ++ if (ret) + rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_); - migrate_disable(); -- -+ } ++ else + migrate_enable(); + } else if (!rwlock->read_depth) { ret = 0; } @@ -31,26 +31,27 @@ Cc: stable-rt@vger.kernel.org - if (ret) { + if (ret) rwlock->read_depth++; -- rwlock_acquire_read(&rwlock->dep_map, 0, 1, _RET_IP_); +- rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_); - } return ret; } -@@ -241,12 +240,11 @@ void __lockfunc rt_read_lock(rwlock_t *r +@@ -244,13 +244,13 @@ void __lockfunc rt_read_lock(rwlock_t *r { struct rt_mutex *lock = &rwlock->lock; -- rwlock_acquire_read(&rwlock->dep_map, 0, 0, _RET_IP_); -- +- rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_); + /* * recursive read locks succeed when current owns the lock */ if (rt_mutex_owner(lock) != current) { + migrate_disable(); + rwlock_acquire(&rwlock->dep_map, 0, 0, _RET_IP_); __rt_spin_lock(lock); - migrate_disable(); } -@@ -266,10 +264,9 @@ EXPORT_SYMBOL(rt_write_unlock); + rwlock->read_depth++; +@@ -269,10 +269,9 @@ EXPORT_SYMBOL(rt_write_unlock); void __lockfunc rt_read_unlock(rwlock_t *rwlock) { @@ -62,20 +63,7 @@ Cc: stable-rt@vger.kernel.org __rt_spin_unlock(&rwlock->lock); migrate_enable(); } -@@ -319,9 +316,10 @@ EXPORT_SYMBOL(rt_up_write); - - void rt_up_read(struct rw_semaphore *rwsem) - { -- rwsem_release(&rwsem->dep_map, 1, _RET_IP_); -- if (--rwsem->read_depth == 0) -+ if (--rwsem->read_depth == 0) { -+ rwsem_release(&rwsem->dep_map, 1, _RET_IP_); - rt_mutex_unlock(&rwsem->lock); -+ } - } - EXPORT_SYMBOL(rt_up_read); - -@@ -360,6 +358,13 @@ void rt_down_write_nested(struct rw_sem +@@ -361,6 +360,14 @@ void rt_down_write_nested(struct rw_sem } EXPORT_SYMBOL(rt_down_write_nested); @@ -85,43 +73,19 @@ Cc: stable-rt@vger.kernel.org + rwsem_acquire_nest(&rwsem->dep_map, 0, 0, nest, _RET_IP_); + rt_mutex_lock(&rwsem->lock); +} ++EXPORT_SYMBOL(rt_down_write_nested_lock); + int rt_down_read_trylock(struct rw_semaphore *rwsem) { - struct rt_mutex *lock = &rwsem->lock; -@@ -370,15 +375,16 @@ int rt_down_read_trylock(struct rw_sema - * but not when read_depth == 0 which means that the rwsem is - * write locked. - */ -- if (rt_mutex_owner(lock) != current) -+ if (rt_mutex_owner(lock) != current) { - ret = rt_mutex_trylock(&rwsem->lock); -- else if (!rwsem->read_depth) -+ if (ret) -+ rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); -+ } else if (!rwsem->read_depth) { - ret = 0; -+ } + int ret; +@@ -375,9 +382,7 @@ EXPORT_SYMBOL(rt_down_read_trylock); -- if (ret) { -+ if (ret) - rwsem->read_depth++; -- rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); -- } - return ret; - } - EXPORT_SYMBOL(rt_down_read_trylock); -@@ -387,10 +393,10 @@ static void __rt_down_read(struct rw_sem + static void __rt_down_read(struct rw_semaphore *rwsem, int subclass) { - struct rt_mutex *lock = &rwsem->lock; - -- rwsem_acquire_read(&rwsem->dep_map, subclass, 0, _RET_IP_); +- struct rt_mutex *lock = &rwsem->lock; - -- if (rt_mutex_owner(lock) != current) -+ if (rt_mutex_owner(lock) != current) { -+ rwsem_acquire(&rwsem->dep_map, subclass, 0, _RET_IP_); - rt_mutex_lock(&rwsem->lock); -+ } - rwsem->read_depth++; +- rwsem_acquire_read(&rwsem->dep_map, subclass, 0, _RET_IP_); ++ rwsem_acquire(&rwsem->dep_map, subclass, 0, _RET_IP_); + rt_mutex_lock(&rwsem->lock); } 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 740bf5d13..d18f70a4f 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra 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 48ec23244..8cc25fd27 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Peter Zijlstra Cc: Peter Zijlstra diff --git a/debian/patches/features/all/rt/rt-sched-numa-Move-task_numa_free-to-__put_task_stru.patch b/debian/patches/features/all/rt/rt-sched-numa-Move-task_numa_free-to-__put_task_stru.patch index 0162e2738..6b8defed3 100644 --- a/debian/patches/features/all/rt/rt-sched-numa-Move-task_numa_free-to-__put_task_stru.patch +++ b/debian/patches/features/all/rt/rt-sched-numa-Move-task_numa_free-to-__put_task_stru.patch @@ -3,7 +3,7 @@ From: Mike Galbraith Date: Fri, 28 Feb 2014 07:23:11 +0100 Subject: [PATCH] rt,sched,numa: Move task_numa_free() to __put_task_struct(), which -rt offloads -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Bad idea: [ 908.026136] [] rt_spin_lock_slowlock+0xaa/0x2c0 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 3e9cd1ca2..ae9d191af 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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. 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 3a34d71c5..4fee77074 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 455000da3..6d4e3bf7a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f124e5210..9601d45fd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz lockdep says: | -------------------------------------------------------------------------- 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 09e3ad2c0..d16ca8919 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 67b09ef2e..3e5103fe5 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- @@ -12,7 +12,7 @@ Signed-off-by: Thomas Gleixner --- a/kernel/futex.c +++ b/kernel/futex.c -@@ -1579,6 +1579,16 @@ static int futex_requeue(u32 __user *uad +@@ -1585,6 +1585,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; -@@ -2432,7 +2442,7 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2439,7 +2449,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; -@@ -2481,20 +2491,55 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2488,20 +2498,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) { -@@ -2503,9 +2548,10 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2510,9 +2555,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 { /* -@@ -2518,7 +2564,8 @@ static int futex_wait_requeue_pi(u32 __u +@@ -2525,7 +2571,8 @@ static int futex_wait_requeue_pi(u32 __u ret = rt_mutex_finish_proxy_lock(pi_mutex, to, &rt_waiter, 1); debug_rt_mutex_free_waiter(&rt_waiter); diff --git a/debian/patches/features/all/rt/rtmutex-lock-killable.patch b/debian/patches/features/all/rt/rtmutex-lock-killable.patch index 8f7671e71..a54a55462 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 5c38422fc..eb1fa504c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Mike Galbraith captered the following: | >#11 [ffff88017b243e90] _raw_spin_lock at ffffffff815d2596 diff --git a/debian/patches/features/all/rt/rtmutex-ww-bad-return-value-in-__mutex_lock_check_stamp.patch b/debian/patches/features/all/rt/rtmutex-ww-bad-return-value-in-__mutex_lock_check_stamp.patch index e1b89ac9c..eaf40645b 100644 --- a/debian/patches/features/all/rt/rtmutex-ww-bad-return-value-in-__mutex_lock_check_stamp.patch +++ b/debian/patches/features/all/rt/rtmutex-ww-bad-return-value-in-__mutex_lock_check_stamp.patch @@ -2,7 +2,7 @@ From 9fe76c849612387dd1991acfcc7dc9527b390caf Mon Sep 17 00:00:00 2001 From: Nicholas Mc Guire Date: Sun, 15 Dec 2013 15:40:47 +0100 Subject: [PATCH] bad return value in __mutex_lock_check_stamp -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Bad return value in _mutex_lock_check_stamp - this problem only would show up with 3.12.1 rt4 applied but CONFIG_PREEMPT_RT_FULL not enabled 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 new file mode 100644 index 000000000..2818a9cfe --- /dev/null +++ b/debian/patches/features/all/rt/rwlock-disable-migration-before-taking-a-lock.patch @@ -0,0 +1,59 @@ +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/3.14/patches-3.14.3-rt5.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 +stress test, and I wont release a stable kernel that does that. + +Signed-off-by: Steven Rostedt +--- + kernel/locking/rt.c | 17 ++++++++++------- + 1 file changed, 10 insertions(+), 7 deletions(-) + +--- a/kernel/locking/rt.c ++++ b/kernel/locking/rt.c +@@ -180,12 +180,14 @@ EXPORT_SYMBOL(_mutex_unlock); + */ + int __lockfunc rt_write_trylock(rwlock_t *rwlock) + { +- int ret = rt_mutex_trylock(&rwlock->lock); ++ int ret; + +- if (ret) { ++ migrate_disable(); ++ ret = rt_mutex_trylock(&rwlock->lock); ++ if (ret) + rwlock_acquire(&rwlock->dep_map, 0, 1, _RET_IP_); +- migrate_disable(); +- } ++ else ++ migrate_enable(); + + return ret; + } +@@ -212,9 +214,10 @@ int __lockfunc rt_read_trylock(rwlock_t + * write locked. + */ + if (rt_mutex_owner(lock) != current) { ++ migrate_disable(); + ret = rt_mutex_trylock(lock); +- if (ret) +- migrate_disable(); ++ if (!ret) ++ migrate_enable(); + + } else if (!rwlock->read_depth) { + ret = 0; +@@ -247,8 +250,8 @@ void __lockfunc rt_read_lock(rwlock_t *r + * recursive read locks succeed when current owns the lock + */ + if (rt_mutex_owner(lock) != current) { +- __rt_spin_lock(lock); + migrate_disable(); ++ __rt_spin_lock(lock); + } + rwlock->read_depth++; + } 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 1ef7aa959..1cb7226df 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 new file mode 100644 index 000000000..4c62c2a8c --- /dev/null +++ b/debian/patches/features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch @@ -0,0 +1,94 @@ +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/3.14/patches-3.14.3-rt5.tar.xz + +The readers of mainline rwsems are not allowed to nest, the rwsems in the +PREEMPT_RT kernel should not nest either. + +Signed-off-by: Steven Rostedt +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/rwsem_rt.h | 1 - + kernel/locking/rt.c | 29 ++++++----------------------- + 2 files changed, 6 insertions(+), 24 deletions(-) + +--- a/include/linux/rwsem_rt.h ++++ b/include/linux/rwsem_rt.h +@@ -20,7 +20,6 @@ + + struct rw_semaphore { + struct rt_mutex lock; +- int read_depth; + #ifdef CONFIG_DEBUG_LOCK_ALLOC + struct lockdep_map dep_map; + #endif +--- a/kernel/locking/rt.c ++++ b/kernel/locking/rt.c +@@ -316,8 +316,7 @@ EXPORT_SYMBOL(rt_up_write); + 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); ++ rt_mutex_unlock(&rwsem->lock); + } + EXPORT_SYMBOL(rt_up_read); + +@@ -328,7 +327,6 @@ EXPORT_SYMBOL(rt_up_read); + void rt_downgrade_write(struct rw_semaphore *rwsem) + { + BUG_ON(rt_mutex_owner(&rwsem->lock) != current); +- rwsem->read_depth = 1; + } + EXPORT_SYMBOL(rt_downgrade_write); + +@@ -358,23 +356,12 @@ EXPORT_SYMBOL(rt_down_write_nested); + + int rt_down_read_trylock(struct rw_semaphore *rwsem) + { +- struct rt_mutex *lock = &rwsem->lock; +- int ret = 1; +- +- /* +- * recursive read locks succeed when current owns the rwsem, +- * but not when read_depth == 0 which means that the rwsem is +- * write locked. +- */ +- if (rt_mutex_owner(lock) != current) +- ret = rt_mutex_trylock(&rwsem->lock); +- else if (!rwsem->read_depth) +- ret = 0; ++ int ret; + +- if (ret) { +- rwsem->read_depth++; ++ ret = rt_mutex_trylock(&rwsem->lock); ++ if (ret) + rwsem_acquire(&rwsem->dep_map, 0, 1, _RET_IP_); +- } ++ + return ret; + } + EXPORT_SYMBOL(rt_down_read_trylock); +@@ -384,10 +371,7 @@ static void __rt_down_read(struct rw_sem + struct rt_mutex *lock = &rwsem->lock; + + rwsem_acquire_read(&rwsem->dep_map, subclass, 0, _RET_IP_); +- +- if (rt_mutex_owner(lock) != current) +- rt_mutex_lock(&rwsem->lock); +- rwsem->read_depth++; ++ rt_mutex_lock(&rwsem->lock); + } + + void rt_down_read(struct rw_semaphore *rwsem) +@@ -412,7 +396,6 @@ void __rt_rwsem_init(struct rw_semaphor + debug_check_no_locks_freed((void *)rwsem, sizeof(*rwsem)); + lockdep_init_map(&rwsem->dep_map, name, key, 0); + #endif +- rwsem->read_depth = 0; + rwsem->lock.save_state = 0; + } + EXPORT_SYMBOL(__rt_rwsem_init); diff --git a/debian/patches/features/all/rt/sched-Add-better-debug-output-for-might_sleep.patch b/debian/patches/features/all/rt/sched-Add-better-debug-output-for-might_sleep.patch index 507be726e..b7f53755b 100644 --- a/debian/patches/features/all/rt/sched-Add-better-debug-output-for-might_sleep.patch +++ b/debian/patches/features/all/rt/sched-Add-better-debug-output-for-might_sleep.patch @@ -2,7 +2,7 @@ From 8f47b1871b8aac98f1a9d93bc3467fb97b65199a Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:39 +0100 Subject: [PATCH 3/6] sched: Add better debug output for might_sleep() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz might_sleep() can tell us where interrupts have been disabled, but we have no idea what disabled preemption. Add some debug infrastructure. diff --git a/debian/patches/features/all/rt/sched-Adjust-p-sched_reset_on_fork-when-nothing-else.patch b/debian/patches/features/all/rt/sched-Adjust-p-sched_reset_on_fork-when-nothing-else.patch index 0433ccf0d..be60a2a2f 100644 --- a/debian/patches/features/all/rt/sched-Adjust-p-sched_reset_on_fork-when-nothing-else.patch +++ b/debian/patches/features/all/rt/sched-Adjust-p-sched_reset_on_fork-when-nothing-else.patch @@ -3,7 +3,7 @@ From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:40 +0100 Subject: [PATCH 4/6] sched: Adjust p->sched_reset_on_fork when nothing else changes -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz If the policy and priority remain unchanged a possible modification of p->sched_reset_on_fork gets lost in the early exit path. diff --git a/debian/patches/features/all/rt/sched-Check-for-idle-task-in-might_sleep.patch b/debian/patches/features/all/rt/sched-Check-for-idle-task-in-might_sleep.patch index 55b26a1c4..2255091b0 100644 --- a/debian/patches/features/all/rt/sched-Check-for-idle-task-in-might_sleep.patch +++ b/debian/patches/features/all/rt/sched-Check-for-idle-task-in-might_sleep.patch @@ -2,7 +2,7 @@ From db273be2a7d42f92b3471e0f717982928214a650 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:38 +0100 Subject: [PATCH 2/6] sched: Check for idle task in might_sleep() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Idle is not allowed to call sleeping functions ever! diff --git a/debian/patches/features/all/rt/sched-Consider-pi-boosting-in-setscheduler.patch b/debian/patches/features/all/rt/sched-Consider-pi-boosting-in-setscheduler.patch index 3e69001b6..d992818a5 100644 --- a/debian/patches/features/all/rt/sched-Consider-pi-boosting-in-setscheduler.patch +++ b/debian/patches/features/all/rt/sched-Consider-pi-boosting-in-setscheduler.patch @@ -2,7 +2,7 @@ From c365c292d05908c6ea6f32708f331e21033fe71d Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:42 +0100 Subject: [PATCH 6/6] sched: Consider pi boosting in setscheduler() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz If a PI boosted task policy/priority is modified by a setscheduler() call we unconditionally dequeue and requeue the task if it is on the diff --git a/debian/patches/features/all/rt/sched-Fix-broken-setscheduler.patch b/debian/patches/features/all/rt/sched-Fix-broken-setscheduler.patch index 5754063da..6006d5090 100644 --- a/debian/patches/features/all/rt/sched-Fix-broken-setscheduler.patch +++ b/debian/patches/features/all/rt/sched-Fix-broken-setscheduler.patch @@ -2,7 +2,7 @@ From 383afd0971538b3d77532a56404b24cfe967b5dd Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Tue, 11 Mar 2014 19:24:20 -0400 Subject: [PATCH] sched: Fix broken setscheduler() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz I decided to run my tests on linux-next, and my wakeup_rt tracer was broken. After running a bisect, I found that the problem commit was: diff --git a/debian/patches/features/all/rt/sched-Init-idle-on_rq-in-init_idle.patch b/debian/patches/features/all/rt/sched-Init-idle-on_rq-in-init_idle.patch index 0b3970460..fab0beab8 100644 --- a/debian/patches/features/all/rt/sched-Init-idle-on_rq-in-init_idle.patch +++ b/debian/patches/features/all/rt/sched-Init-idle-on_rq-in-init_idle.patch @@ -2,7 +2,7 @@ From 77177856e3bf39d435b3ae4bfd164ca3c8cd4577 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:37 +0100 Subject: [PATCH 1/6] sched: Init idle->on_rq in init_idle() -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz We stumbled in RT over a SMP bringup issue on ARM where the idle->on_rq == 0 was causing try_to_wakeup() on the other cpu to run diff --git a/debian/patches/features/all/rt/sched-Queue-RT-tasks-to-head-when-prio-drops.patch b/debian/patches/features/all/rt/sched-Queue-RT-tasks-to-head-when-prio-drops.patch index 63403d56f..df606aaea 100644 --- a/debian/patches/features/all/rt/sched-Queue-RT-tasks-to-head-when-prio-drops.patch +++ b/debian/patches/features/all/rt/sched-Queue-RT-tasks-to-head-when-prio-drops.patch @@ -2,7 +2,7 @@ From 81a44c5441d7f7d2c3dc9105f4d65ad0d5818617 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Fri, 7 Feb 2014 20:58:41 +0100 Subject: [PATCH 5/6] sched: Queue RT tasks to head when prio drops -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The following scenario does not work correctly: 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 40193ad75..fb1918b15 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sched-cond-resched.patch b/debian/patches/features/all/rt/sched-cond-resched.patch index 6f3b6a32b..5927f928a 100644 --- a/debian/patches/features/all/rt/sched-cond-resched.patch +++ b/debian/patches/features/all/rt/sched-cond-resched.patch @@ -1,7 +1,7 @@ Subject: sched-cond-resched.patch From: Thomas Gleixner Date: Tue, 07 Jun 2011 11:25:03 +0200 -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 e85701a3a..4cd791526 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 731f35f91..50ccbd275 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b1082f934..9b37e6d54 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 0c6342a54..c8d5c4ca9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 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 9377b8e6b..6cc76b2d3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 1137518fa..ed8c85d4c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sched-migrate-disable.patch b/debian/patches/features/all/rt/sched-migrate-disable.patch index 96921fe3a..6f464d35c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/sched-mmdrop-delayed.patch b/debian/patches/features/all/rt/sched-mmdrop-delayed.patch index 5be1a1786..67925b18c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Needs thread context (pgd_lock) -> ifdeffed. workqueues wont work with RT 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 bf1c7fde6..369298108 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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. 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 c864a09e6..40c7accac 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 82252a9d6..ab065c214 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Subject: sched: teach migrate_disable about atomic contexts From: Peter Zijlstra 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 8a2542057..09620be42 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz When a task blocks on a rt lock, it saves the current state in p->saved_state, so a lock related wake up will not destroy the diff --git a/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch b/debian/patches/features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch index 467947629..63fcf10f3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz In -rt, most spin_locks() turn into mutexes. One of these spin_lock conversions is performed on the workqueue gcwq->lock. When the idle diff --git a/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch b/debian/patches/features/all/rt/scsi-fcoe-rt-aware.patch index 6a4e4e970..e84bc396c 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 76fe11330..19de4f362 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 3955d58b2..352b90499 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f3670cc7a..d4b9a4e50 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 e2028ec15..98ad7fe86 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 987ba4c86..7bd97af74 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6098c4bc4..536cfd317 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz To avoid allocation allow rt tasks to cache one sigqueue struct in task struct. 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 4d224ddde..f661b57a1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 04506f7e3..a40258f46 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- 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 3fde2fd2a..6a3f21a33 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9cfeafacf..ccb462cf3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/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 bfce0e59b..d53e18cea 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9927b6fe3..d2ba5a513 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a06156243..d8fad575b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 7035a9cce..7c361a883 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/softirq-make-fifo.patch b/debian/patches/features/all/rt/softirq-make-fifo.patch index e377f43f5..8b6108948 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 591035584..8eaa5d405 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2e9cf2964..fbe45bea1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Avoid the percpu softirq_runner pointer magic by using a task flag. 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 99b1d3344..0b2a6c337 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 5ec433743..f94888425 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6eaaff46e..74547e467 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2b085690c..fd5b22a7e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The 3.x RT series removed the split softirq implementation in favour of pushing softirq processing into the context of the thread which diff --git a/debian/patches/features/all/rt/softirq-split-out-code.patch b/debian/patches/features/all/rt/softirq-split-out-code.patch index 04dc514f7..e6c68d58d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 4ef2bfabd..1cf4b43bd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 b027b0f6c..1e81e07a4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 51889bbc2..dfb8ebd21 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 new file mode 100644 index 000000000..f4dd784ac --- /dev/null +++ b/debian/patches/features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch @@ -0,0 +1,86 @@ +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/3.14/patches-3.14.3-rt5.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. + +Signed-off-by: Mike Galbraith +Signed-off-by: Sebastian Andrzej Siewior +--- + include/linux/lglock.h | 6 ++++++ + include/linux/spinlock_rt.h | 1 + + kernel/locking/lglock.c | 25 +++++++++++++++++++++++++ + kernel/locking/rtmutex.c | 5 +++++ + 4 files changed, 37 insertions(+) + +--- a/include/linux/lglock.h ++++ b/include/linux/lglock.h +@@ -74,4 +74,10 @@ void lg_local_unlock_cpu(struct lglock * + void lg_global_lock(struct lglock *lg); + void lg_global_unlock(struct lglock *lg); + ++#ifndef CONFIG_PREEMPT_RT_FULL ++#define lg_global_trylock_relax(name) lg_global_lock(name) ++#else ++void lg_global_trylock_relax(struct lglock *lg); ++#endif ++ + #endif +--- a/include/linux/spinlock_rt.h ++++ b/include/linux/spinlock_rt.h +@@ -35,6 +35,7 @@ extern int atomic_dec_and_spin_lock(atom + */ + extern void __lockfunc __rt_spin_lock(struct rt_mutex *lock); + extern void __lockfunc __rt_spin_unlock(struct rt_mutex *lock); ++extern int __lockfunc __rt_spin_trylock(struct rt_mutex *lock); + + #define spin_lock(lock) \ + do { \ +--- a/kernel/locking/lglock.c ++++ b/kernel/locking/lglock.c +@@ -105,3 +105,28 @@ void lg_global_unlock(struct lglock *lg) + preempt_enable_nort(); + } + EXPORT_SYMBOL(lg_global_unlock); ++ ++#ifdef CONFIG_PREEMPT_RT_FULL ++/* ++ * HACK: If you use this, you get to keep the pieces. ++ * Used in queue_stop_cpus_work() when stop machinery ++ * is called from inactive CPU, so we can't schedule. ++ */ ++# define lg_do_trylock_relax(l) \ ++ do { \ ++ while (!__rt_spin_trylock(l)) \ ++ cpu_relax(); \ ++ } while (0) ++ ++void lg_global_trylock_relax(struct lglock *lg) ++{ ++ int i; ++ ++ lock_acquire_exclusive(&lg->lock_dep_map, 0, 0, NULL, _RET_IP_); ++ for_each_possible_cpu(i) { ++ lg_lock_ptr *lock; ++ lock = per_cpu_ptr(lg->lock, i); ++ lg_do_trylock_relax(lock); ++ } ++} ++#endif +--- a/kernel/locking/rtmutex.c ++++ b/kernel/locking/rtmutex.c +@@ -1001,6 +1001,11 @@ void __lockfunc rt_spin_unlock_wait(spin + } + EXPORT_SYMBOL(rt_spin_unlock_wait); + ++int __lockfunc __rt_spin_trylock(struct rt_mutex *lock) ++{ ++ return rt_mutex_trylock(lock); ++} ++ + int __lockfunc rt_spin_trylock(spinlock_t *lock) + { + int ret = rt_mutex_trylock(&lock->lock); 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 529cfea9e..9b7dce9b7 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- @@ -189,7 +189,7 @@ Signed-off-by: Thomas Gleixner /* Busy wait for completion. */ - while (!completion_done(&done.completion)) -+ while (!atomic_read(&done.nr_todo)) ++ while (atomic_read(&done.nr_todo)) cpu_relax(); mutex_unlock(&stop_cpus_mutex); 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 new file mode 100644 index 000000000..3f58d6ede --- /dev/null +++ b/debian/patches/features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch @@ -0,0 +1,103 @@ +From e5d045de85238a504370b091160ef0eca67f6e90 Mon Sep 17 00:00:00 2001 +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/3.14/patches-3.14.3-rt5.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 +in progress and the lock can be contended. We cannot schedule from this +context, so use the lovely new lg_global_trylock_relax() primitive to +do what we used to do via one mutex_trylock()/cpu_relax() loop. We +now do that trylock()/relax() across an entire herd of locks. Joy. + +Signed-off-by: Mike Galbraith +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/stop_machine.c | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +--- a/kernel/stop_machine.c ++++ b/kernel/stop_machine.c +@@ -266,7 +266,7 @@ int stop_two_cpus(unsigned int cpu1, uns + struct irq_cpu_stop_queue_work_info call_args; + struct multi_stop_data msdata; + +- preempt_disable(); ++ preempt_disable_nort(); + msdata = (struct multi_stop_data){ + .fn = fn, + .data = arg, +@@ -299,7 +299,7 @@ int stop_two_cpus(unsigned int cpu1, uns + * This relies on the stopper workqueues to be FIFO. + */ + if (!cpu_active(cpu1) || !cpu_active(cpu2)) { +- preempt_enable(); ++ preempt_enable_nort(); + return -ENOENT; + } + +@@ -313,7 +313,7 @@ int stop_two_cpus(unsigned int cpu1, uns + &irq_cpu_stop_queue_work, + &call_args, 1); + lg_local_unlock(&stop_cpus_lock); +- preempt_enable(); ++ preempt_enable_nort(); + + wait_for_stop_done(&done); + +@@ -346,7 +346,7 @@ static DEFINE_PER_CPU(struct cpu_stop_wo + + static void queue_stop_cpus_work(const struct cpumask *cpumask, + cpu_stop_fn_t fn, void *arg, +- struct cpu_stop_done *done) ++ struct cpu_stop_done *done, bool inactive) + { + struct cpu_stop_work *work; + unsigned int cpu; +@@ -360,11 +360,13 @@ static void queue_stop_cpus_work(const s + } + + /* +- * Disable preemption while queueing to avoid getting +- * preempted by a stopper which might wait for other stoppers +- * to enter @fn which can lead to deadlock. ++ * Make sure that all work is queued on all cpus before ++ * any of the cpus can execute it. + */ +- lg_global_lock(&stop_cpus_lock); ++ if (!inactive) ++ lg_global_lock(&stop_cpus_lock); ++ else ++ lg_global_trylock_relax(&stop_cpus_lock); + for_each_cpu(cpu, cpumask) + cpu_stop_queue_work(cpu, &per_cpu(stop_cpus_work, cpu)); + lg_global_unlock(&stop_cpus_lock); +@@ -376,7 +378,7 @@ static int __stop_cpus(const struct cpum + struct cpu_stop_done done; + + cpu_stop_init_done(&done, cpumask_weight(cpumask)); +- queue_stop_cpus_work(cpumask, fn, arg, &done); ++ queue_stop_cpus_work(cpumask, fn, arg, &done, false); + wait_for_stop_done(&done); + return done.executed ? done.ret : -ENOENT; + } +@@ -572,6 +574,8 @@ static int __init cpu_stop_init(void) + INIT_LIST_HEAD(&stopper->works); + } + ++ lg_lock_init(&stop_cpus_lock, "stop_cpus_lock"); ++ + BUG_ON(smpboot_register_percpu_thread(&cpu_stop_threads)); + stop_machine_initialized = true; + return 0; +@@ -667,7 +671,7 @@ int stop_machine_from_inactive_cpu(int ( + set_state(&msdata, MULTI_STOP_PREPARE); + cpu_stop_init_done(&done, num_active_cpus()); + queue_stop_cpus_work(cpu_active_mask, multi_cpu_stop, &msdata, +- &done); ++ &done, true); + ret = multi_cpu_stop(&msdata); + + /* Busy wait for completion. */ 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 34d2e7775..b6fa07e27 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/suspend-prevernt-might-sleep-splats.patch b/debian/patches/features/all/rt/suspend-prevernt-might-sleep-splats.patch index 9eff7bec2..b39e075aa 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 a484363ed..cdfb1d1cd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6e6220726..14aa74e4a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 599918707..ae0367453 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6b66f88bc..9564668d1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz This fixes the following build error for the preempt-rt kernel. 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 06d86de5b..0daf980fc 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 124443f11..23a40a317 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 df37ac935..dcce63a6b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 new file mode 100644 index 000000000..dd26ac525 --- /dev/null +++ b/debian/patches/features/all/rt/timer-do-not-spin_trylock-on-UP.patch @@ -0,0 +1,36 @@ +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/3.14/patches-3.14.3-rt5.tar.xz + +This will void a warning comming from the spin-lock debugging code. The +lock avoiding idea is from Steven Rostedt. + +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/timer.c | 13 +++++++++++++ + 1 file changed, 13 insertions(+) + +--- a/kernel/timer.c ++++ b/kernel/timer.c +@@ -1457,6 +1457,19 @@ void run_local_timers(void) + * the timer softirq. + */ + #ifdef CONFIG_PREEMPT_RT_FULL ++ ++#ifndef CONFIG_SMP ++ /* ++ * The spin_do_trylock() later may fail as the lock may be hold before ++ * the interrupt arrived. The spin-lock debugging code will raise a ++ * warning if the try_lock fails on UP. Since this is only an ++ * optimization for the FULL_NO_HZ case (not to run the timer softirq on ++ * an nohz_full CPU) we don't really care and shedule the softirq. ++ */ ++ raise_softirq(TIMER_SOFTIRQ); ++ return; ++#endif ++ + /* On RT, irq work runs from softirq */ + if (irq_work_needs_cpu()) { + raise_softirq(TIMER_SOFTIRQ); 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 22f88a505..fe83f3cbb 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 f1bbf4a0b..3380200ea 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 8749f70d2..26eb2d447 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 cd850cf7d..13cdad380 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 780505d6e..b1ef61f1b 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Mike, 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 accd63fa7..b2d4aa7c1 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 79652dd3f..4b90281a3 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 74b508f9e..22cf1a87d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz When softirqs can be preempted we need to make sure that cancelling the timer from the active thread can not deadlock vs. a running timer diff --git a/debian/patches/features/all/rt/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 36315c6dc..310c841ec 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz The preempt_schedule() uses the preempt_disable_notrace() version because it can cause infinite recursion by the function tracer as diff --git a/debian/patches/features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch b/debian/patches/features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch new file mode 100644 index 000000000..ec19011b8 --- /dev/null +++ b/debian/patches/features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch @@ -0,0 +1,93 @@ +From 00a909da485470178f1b1c2617ba9219f911b540 Mon Sep 17 00:00:00 2001 +From: Sebastian Andrzej Siewior +Date: Fri, 9 May 2014 11:28:55 +0200 +Subject: [PATCH] tracing: use migrate_disable() to prevent beeing pushed off + the cpu +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz + +Stanislav triggered this: + +|BUG: sleeping function called from invalid context at kernel/rtmutex.c:673 +|in_atomic(): 1, irqs_disabled(): 0, pid: 607, name: bash +|3 locks held by bash/607: +|CPU: 0 PID: 607 Comm: bash Not tainted 3.12.15-rt25+ #124 +|(rt_spin_lock+0x28/0x68) +|(free_hot_cold_page+0x84/0x3b8) +|(free_buffer_page+0x14/0x20) +|(rb_update_pages+0x280/0x338) +|(ring_buffer_resize+0x32c/0x3dc) +|(free_snapshot+0x18/0x38) +|(tracing_set_tracer+0x27c/0x2ac) + +probably via +|cd /sys/kernel/debug/tracing/ +|echo 1 > events/enable ; sleep 2 +|echo 1024 > buffer_size_kb + +The purpose of preempt_disable() is likely to prevent to run on another CPU +while doing what it is doing. This could also does migrate_disable(). + +Reported-by: Stanislav Meduna +Signed-off-by: Sebastian Andrzej Siewior +--- + kernel/trace/ring_buffer.c | 20 ++++---------------- + 1 file changed, 4 insertions(+), 16 deletions(-) + +--- a/kernel/trace/ring_buffer.c ++++ b/kernel/trace/ring_buffer.c +@@ -1682,28 +1682,22 @@ int ring_buffer_resize(struct ring_buffe + * We can't schedule on offline CPUs, but it's not necessary + * since we can change their buffer sizes without any race. + */ ++ migrate_disable(); + for_each_buffer_cpu(buffer, cpu) { + cpu_buffer = buffer->buffers[cpu]; + if (!cpu_buffer->nr_pages_to_update) + continue; + + /* The update must run on the CPU that is being updated. */ +- preempt_disable(); + if (cpu == smp_processor_id() || !cpu_online(cpu)) { + rb_update_pages(cpu_buffer); + cpu_buffer->nr_pages_to_update = 0; + } else { +- /* +- * Can not disable preemption for schedule_work_on() +- * on PREEMPT_RT. +- */ +- preempt_enable(); + schedule_work_on(cpu, + &cpu_buffer->update_pages_work); +- preempt_disable(); + } +- preempt_enable(); + } ++ migrate_enable(); + + /* wait for all the updates to complete */ + for_each_buffer_cpu(buffer, cpu) { +@@ -1740,22 +1734,16 @@ int ring_buffer_resize(struct ring_buffe + + get_online_cpus(); + +- preempt_disable(); ++ migrate_disable(); + /* The update must run on the CPU that is being updated. */ + if (cpu_id == smp_processor_id() || !cpu_online(cpu_id)) + rb_update_pages(cpu_buffer); + else { +- /* +- * Can not disable preemption for schedule_work_on() +- * on PREEMPT_RT. +- */ +- preempt_enable(); + schedule_work_on(cpu_id, + &cpu_buffer->update_pages_work); + wait_for_completion(&cpu_buffer->update_done); +- preempt_disable(); + } +- preempt_enable(); ++ migrate_enable(); + + cpu_buffer->nr_pages_to_update = 0; + put_online_cpus(); 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 b027e6387..05eac50b0 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 624dbda34..4777e6068 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-fix-mouse-problem-copying-large-data.patch b/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch index 94eb50b8a..a60582aba 100644 --- a/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch +++ b/debian/patches/features/all/rt/usb-fix-mouse-problem-copying-large-data.patch @@ -1,7 +1,7 @@ From: Wu Zhangjin Date: Mon, 4 Jan 2010 11:33:02 +0800 Subject: USB: Fix the mouse problem when copying large amounts of data -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz When copying large amounts of data between the USB storage devices and the hard disk, the USB mouse will not work, this patch fixes it. 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 cb99cbbd7..2efc9e835 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2553e38ad..a579ae74e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 fb5e33195..9fc6d9fae 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 0cd5cf5be..6b8016627 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/wait-simple-implementation.patch b/debian/patches/features/all/rt/wait-simple-implementation.patch index 39dc35d50..df4b9b73a 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 6b6073bf6..7b28f5099 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 4c5fb9fd1..4b07c41ca 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 d369ee3f1..adb407823 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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/workqueue-distangle-from-rq-lock.patch b/debian/patches/features/all/rt/workqueue-distangle-from-rq-lock.patch index 412325fe7..b4be1ad2d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz --- kernel/sched/core.c | 70 +++++++++----------------------------------- diff --git a/debian/patches/features/all/rt/workqueue-use-locallock.patch b/debian/patches/features/all/rt/workqueue-use-locallock.patch index 10d1cf154..b5c358db5 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2a3549c2c..178d8f6b4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 9c0bff97d..d75c40bfc 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-crypto-reduce-preempt-disabled-regions.patch b/debian/patches/features/all/rt/x86-crypto-reduce-preempt-disabled-regions.patch index 50a70243b..04b3787fd 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-disable-debug-stack.patch b/debian/patches/features/all/rt/x86-disable-debug-stack.patch index f36801cb9..d763f9947 100644 --- a/debian/patches/features/all/rt/x86-disable-debug-stack.patch +++ b/debian/patches/features/all/rt/x86-disable-debug-stack.patch @@ -1,7 +1,7 @@ From: Andi Kleen Date: Fri, 3 Jul 2009 08:44:10 -0500 Subject: x86: Disable IST stacks for debug/int 3/stack fault for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Normally the x86-64 trap handlers for debug/int 3/stack fault run on a special interrupt stack to make them more robust 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 32bc1eeb7..b7fa4c668 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 2e60da14a..45e30c51e 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- diff --git a/debian/patches/features/all/rt/x86-mce-Defer-mce-wakeups-to-threads-for-PREEMPT_RT.patch b/debian/patches/features/all/rt/x86-mce-Defer-mce-wakeups-to-threads-for-PREEMPT_RT.patch index 9a1ed506c..b11da00cc 100644 --- a/debian/patches/features/all/rt/x86-mce-Defer-mce-wakeups-to-threads-for-PREEMPT_RT.patch +++ b/debian/patches/features/all/rt/x86-mce-Defer-mce-wakeups-to-threads-for-PREEMPT_RT.patch @@ -2,7 +2,7 @@ From df12896518bc6db6a717de580116a07cdd19fbd9 Mon Sep 17 00:00:00 2001 From: Steven Rostedt Date: Thu, 11 Apr 2013 14:33:34 -0400 Subject: [PATCH 4/5] x86/mce: Defer mce wakeups to threads for PREEMPT_RT -Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz We had a customer report a lockup on a 3.0-rt kernel that had the following backtrace: 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 dfebaae48..b574f791d 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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-preempt-lazy.patch b/debian/patches/features/all/rt/x86-preempt-lazy.patch index f4e6eeca9..9813e8f51 100644 --- a/debian/patches/features/all/rt/x86-preempt-lazy.patch +++ b/debian/patches/features/all/rt/x86-preempt-lazy.patch @@ -1,16 +1,16 @@ 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Signed-off-by: Thomas Gleixner --- arch/x86/Kconfig | 1 + arch/x86/include/asm/thread_info.h | 6 ++++++ - arch/x86/kernel/asm-offsets.c | 1 + - arch/x86/kernel/entry_32.S | 17 +++++++++++++++-- - arch/x86/kernel/entry_64.S | 28 ++++++++++++++++++++-------- - 5 files changed, 43 insertions(+), 10 deletions(-) + arch/x86/kernel/asm-offsets.c | 2 ++ + arch/x86/kernel/entry_32.S | 20 ++++++++++++++++++-- + arch/x86/kernel/entry_64.S | 29 ++++++++++++++++++++++------- + 5 files changed, 49 insertions(+), 9 deletions(-) --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig @@ -68,31 +68,40 @@ Signed-off-by: Thomas Gleixner BLANK(); OFFSET(crypto_tfm_ctx_offset, crypto_tfm, __crt_ctx); +@@ -71,4 +72,5 @@ void common(void) { + + BLANK(); + DEFINE(PTREGS_SIZE, sizeof(struct pt_regs)); ++ DEFINE(_PREEMPT_ENABLED, PREEMPT_ENABLED); + } --- a/arch/x86/kernel/entry_32.S +++ b/arch/x86/kernel/entry_32.S -@@ -363,8 +363,21 @@ END(ret_from_exception) +@@ -363,8 +363,24 @@ END(ret_from_exception) ENTRY(resume_kernel) DISABLE_INTERRUPTS(CLBR_ANY) need_resched: + # preempt count == 0 + NEED_RS set? cmpl $0,PER_CPU_VAR(__preempt_count) ++#ifndef CONFIG_PREEMPT_LAZY + jnz restore_all ++#else + jz test_int_off + + # atleast preempt count == 0 ? -+ cmpl $_TIF_NEED_RESCHED,PER_CPU_VAR(__preempt_count) ++ cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count) + jne restore_all + + cmpl $0,TI_preempt_lazy_count(%ebp) # non-zero preempt_lazy_count ? - jnz restore_all ++ jnz restore_all + -+ testl $_TIF_NEED_RESCHED_LAZY, %ecx ++ testl $_TIF_NEED_RESCHED_LAZY, TI_flags(%ebp) + jz restore_all -+ +test_int_off: ++#endif testl $X86_EFLAGS_IF,PT_EFLAGS(%esp) # interrupts off (exception path) ? jz restore_all call preempt_schedule_irq -@@ -604,7 +617,7 @@ ENDPROC(system_call) +@@ -604,7 +620,7 @@ ENDPROC(system_call) ALIGN RING0_PTREGS_FRAME # can't unwind into user space anyway work_pending: @@ -101,7 +110,7 @@ Signed-off-by: Thomas Gleixner jz work_notifysig work_resched: call schedule -@@ -617,7 +630,7 @@ ENDPROC(system_call) +@@ -617,7 +633,7 @@ ENDPROC(system_call) andl $_TIF_WORK_MASK, %ecx # is there any work to be done other # than syscall tracing? jz restore_all @@ -145,15 +154,17 @@ Signed-off-by: Thomas Gleixner TRACE_IRQS_ON ENABLE_INTERRUPTS(CLBR_NONE) pushq_cfi %rdi -@@ -1104,7 +1104,19 @@ ENTRY(native_iret) +@@ -1104,7 +1104,22 @@ ENTRY(native_iret) /* rcx: threadinfo. interrupts off. */ ENTRY(retint_kernel) cmpl $0,PER_CPU_VAR(__preempt_count) -- jnz retint_restore_args ++#ifndef CONFIG_PREEMPT_LAZY + jnz retint_restore_args ++#else + jz check_int_off + + # atleast preempt count == 0 ? -+ cmpl $_TIF_NEED_RESCHED,PER_CPU_VAR(__preempt_count) ++ cmpl $_PREEMPT_ENABLED,PER_CPU_VAR(__preempt_count) + jnz retint_restore_args + + cmpl $0, TI_preempt_lazy_count(%rcx) @@ -161,12 +172,12 @@ Signed-off-by: Thomas Gleixner + + bt $TIF_NEED_RESCHED_LAZY,TI_flags(%rcx) + jnc retint_restore_args -+ +check_int_off: ++#endif bt $9,EFLAGS-ARGOFFSET(%rsp) /* interrupts off? */ jnc retint_restore_args call preempt_schedule_irq -@@ -1540,7 +1552,7 @@ ENTRY(paranoid_exit) +@@ -1540,7 +1555,7 @@ ENTRY(paranoid_exit) movq %rsp,%rdi /* &pt_regs */ call sync_regs movq %rax,%rsp /* switch stack for scheduling */ 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 5e0c9e667..7b4d5ece9 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.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 7fa7a7e97..1a5054fb4 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/3.14/patches-3.14.0-rt1.tar.xz +Origin: https://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patches-3.14.3-rt5.tar.xz Simplifies the separation of anon_rw_semaphores and rw_semaphores for -rt. diff --git a/debian/patches/series-rt b/debian/patches/series-rt index 6d807d3ac..f870030da 100644 --- a/debian/patches/series-rt +++ b/debian/patches/series-rt @@ -337,7 +337,6 @@ features/all/rt/sched-workqueue-Only-wake-up-idle-workers-if-not-blo.patch features/all/rt/stop_machine-convert-stop_machine_run-to-PREEMPT_RT.patch #stomp-machine-mark-stomper-thread.patch features/all/rt/stomp-machine-raw-lock.patch -# XXX stomp-machine-deal-clever-with-stopper-lock.patch # MIGRATE DISABLE AND PER CPU features/all/rt/hotplug-light-get-online-cpus.patch @@ -362,9 +361,7 @@ features/all/rt/sched-dont-calculate-hweight-in-update_migrate_disab.patch features/all/rt/sched-clear-pf-thread-bound-on-fallback-rq.patch # FTRACE -# XXX checkme ftrace-crap.patch -# CHECKME rt-ring-buffer-convert-reader_lock-from-raw_spin_lock-into-spin_lock.patch -# CHECKME rfc-ring-buffer-rt-check-for-irqs-disabled-before-grabbing-reader-lock.patch +features/all/rt/tracing-use-migrate_disable-to-prevent-beeing-pushed.patch # NETWORKING features/all/rt/net-netif_rx_ni-migrate-disable.patch @@ -404,12 +401,15 @@ features/all/rt/rt-add-rt-spinlock-to-headers.patch features/all/rt/rt-add-rt-to-mutex-headers.patch features/all/rt/rwsem-add-rt-variant.patch features/all/rt/rt-add-rt-locks.patch +features/all/rt/rwsem-rt-Do-not-allow-readers-to-nest.patch features/all/rt/condition-migration_disable-on-lock-acquisition.patch features/all/rt/migrate_disable-pushd-down-in-atomic_dec_and_spin_lo.patch +features/all/rt/Revert-migrate_disable-pushd-down-in-atomic_dec_and_.patch features/all/rt/migrate_disable-pushd-down-in-rt_spin_trylock_irqsav.patch features/all/rt/migrate_disable-pushd-down-in-rt_write_trylock_irqsa.patch 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-add-a-first-shot-of-ww_mutex.patch @@ -424,6 +424,7 @@ features/all/rt/timers-do-not-raise-softirq-unconditionally.patch features/all/rt/timer-Raise-softirq-if-there-s-irq_work.patch features/all/rt/timer-rt-Always-raise-the-softirq-if-there-s-irq_wor.patch features/all/rt/rtmutex-use-a-trylock-for-waiter-lock-in-trylock.patch +features/all/rt/timer-do-not-spin_trylock-on-UP.patch # RCU features/all/rt/peter_zijlstra-frob-rcu.patch @@ -435,6 +436,10 @@ features/all/rt/rcutree-rcu_bh_qs-disable-irq-while-calling-rcu_pree.patch # LGLOCKS - lovely features/all/rt/lglocks-rt.patch +# STOP machine (depend on lglock & rtmutex) +features/all/rt/stomp-machine-create-lg_global_trylock_relax-primiti.patch +features/all/rt/stomp-machine-use-lg_global_trylock_relax-to-dead-wi.patch + # DRIVERS SERIAL features/all/rt/drivers-serial-cleanup-locking-for-rt.patch features/all/rt/drivers-tty-fix-omap-lock-crap.patch @@ -468,6 +473,9 @@ features/all/rt/rt-Make-cpu_chill-use-hrtimer-instead-of-msleep.patch features/all/rt/kernel-hrtimer-be-non-freezeable-in-cpu_chill.patch features/all/rt/cpu_chill-Add-a-UNINTERRUPTIBLE-hrtimer_nanosleep.patch +# block +features/all/rt/blk-mq-revert-raw-locks-post-pone-notifier-to-POST_D.patchto-POST_D.patch + # BLOCK LIVELOCK PREVENTION features/all/rt/block-use-cpu-chill.patch @@ -644,8 +652,8 @@ features/all/rt/move_sched_delayed_work_to_helper.patch # bcache disabled features/all/rt/md-disable-bcache.patch -# Preempt lazy seems broken on x86-64. -features/all/rt/disable-lazy-preempt-on-x86-64.patch +# lazy preempt is broken x86-64 +features/all/rt/disable-preempt-lazy-on-x86-64.patch # Add RT to version features/all/rt/localversion.patch