4.14.170-rt75
Subsystems (12)
Hello RT Folks!
I'm pleased to announce the 4.14.170-rt75 stable release.
You can get this release via the git tree at:
git://git.kernel.org/pub/scm/linux/kernel/git/rt/linux-stable-rt.git
branch: v4.14-rt
Head SHA1: 0e16752bdd50bea7991924098b0922eb2a62794b
Or to build 4.14.170-rt75 directly, the following patches should be applied:
https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.14.tar.xz
https://www.kernel.org/pub/linux/kernel/v4.x/patch-4.14.170.xz
https://www.kernel.org/pub/linux/kernel/projects/rt/4.14/patch-4.14.170-rt75.patch.xz
You can also build from 4.14.170-rt74 by applying the incremental patch:
https://www.kernel.org/pub/linux/kernel/projects/rt/4.14/incr/patch-4.14.170-rt74-rt75.patch.xz
Enjoy!
Tom
Changes from v4.14.170-rt74:
---
Daniel Wagner (1):
lib/smp_processor_id: Adjust check_preemption_disabled()
Joe Korty (1):
Fix wrong-variable use in irq_set_affinity_notifier
Julien Grall (1):
lib/ubsan: Don't seralize UBSAN report
Juri Lelli (1):
sched/deadline: Ensure inactive_timer runs in hardirq context
Liu Haitao (1):
kmemleak: Change the lock of kmemleak_object to raw_spinlock_t
Peter Zijlstra (1):
locking/rtmutex: Clean ->pi_blocked_on in the error case
Scott Wood (7):
sched: migrate_dis/enable: Use sleeping_lock…() to annotate sleeping points
sched: __set_cpus_allowed_ptr: Check cpus_mask, not cpus_ptr
sched: Remove dead __migrate_disabled() check
sched: migrate disable: Protect cpus_ptr with lock
sched: migrate_enable: Use select_fallback_rq()
sched: Lazy migrate_disable processing
sched: migrate_enable: Use stop_one_cpu_nowait()
Sebastian Andrzej Siewior (8):
i2c: exynos5: Remove IRQF_ONESHOT
i2c: hix5hd2: Remove IRQF_ONESHOT
x86: preempt: Check preemption level before looking at lazy-preempt
futex: Make the futex_hash_bucket spinlock_t again and bring back its old state Revert "ARM: Initialize split page table locks for vector page"
locking: Make spinlock_t and rwlock_t a RCU section on RT sched/core: migrate_enable() must access takedown_cpu_task on !HOTPLUG_CPU
sched: migrate_enable: Busy loop until the migration request is completed
Tom Zanussi (1):
Linux 4.14.170-rt75
Waiman Long (1):
lib/smp_processor_id: Don't use cpumask_equal()
---arch/arm/kernel/process.c | 24 ----
arch/x86/include/asm/preempt.h | 2 + drivers/i2c/busses/i2c-exynos5.c | 4 +- drivers/i2c/busses/i2c-hix5hd2.c | 3 +- include/linux/cpu.h | 4 - include/linux/init_task.h | 9 ++ include/linux/sched.h | 11 +- include/linux/stop_machine.h | 2 + kernel/cpu.c | 103 +++++++---------- kernel/futex.c | 231 ++++++++++++++++++++++----------------- kernel/irq/manage.c | 2 +- kernel/locking/rtmutex.c | 114 +++++++++++++++---- kernel/locking/rtmutex_common.h | 3 + kernel/locking/rwlock-rt.c | 6 + kernel/sched/core.c | 211 +++++++++++++++-------------------- kernel/sched/deadline.c | 4 +- kernel/sched/sched.h | 4 + kernel/stop_machine.c | 7 +- lib/smp_processor_id.c | 7 +- lib/ubsan.c | 76 +++++-------- localversion-rt | 2 +- mm/kmemleak.c | 72 ++++++------ 22 files changed, 461 insertions(+), 440 deletions(-)
---
arch/arm/kernel/process.c +0 -24
@@ -325,30 +325,6 @@ unsigned long arch_randomize_brk(struct mm_struct *mm) }#ifdef CONFIG_MMU -/* -* CONFIG_SPLIT_PTLOCK_CPUS results in a page->ptl lock. If the lock is not -* initialized by pgtable_page_ctor() then a coredump of the vector page will -* fail. -*/ -static int __init vectors_user_mapping_init_page (void ) -{ -struct page *page; -unsigned long addr =0xffff0000 ; -pgd_t *pgd; -pud_t *pud; -pmd_t *pmd; - - pgd =pgd_offset_k (addr); - pud =pud_offset (pgd, addr); - pmd =pmd_offset (pud, addr); - page =pmd_page (*(pmd)); - -pgtable_page_ctor (page); - -return 0 ; -} -late_initcall (vectors_user_mapping_init_page); -#ifdef CONFIG_KUSER_HELPERS /* * The vectors page is always readable from user space for the
arch/x86/include/asm/preempt.h +2 -0
@@ -96,6 +96,8 @@ static __always_inline bool __preempt_count_dec_and_test(void)if (____preempt_count_dec_and_test ())return true;#ifdef CONFIG_PREEMPT_LAZY +if (preempt_count ()) +return false;if (current_thread_info ()->preempt_lazy_count)return false;return test_thread_flag (TIF_NEED_RESCHED_LAZY );
drivers/i2c/busses/i2c-exynos5.c +1 -3
@@ -758,9 +758,7 @@ static int exynos5_i2c_probe(struct platform_device *pdev) } ret =devm_request_irq (&pdev->dev, i2c->irq, exynos5_i2c_irq, -IRQF_NO_SUSPEND |IRQF_ONESHOT , -dev_name (&pdev->dev), i2c); - +IRQF_NO_SUSPEND ,dev_name (&pdev->dev), i2c);if (ret !=0 ) {dev_err (&pdev->dev,"cannot request HS-I2C IRQ %d\n" , i2c->irq); goto err_clk;
drivers/i2c/busses/i2c-hix5hd2.c +1 -2
@@ -464,8 +464,7 @@ static int hix5hd2_i2c_probe(struct platform_device *pdev)hix5hd2_i2c_init (priv); ret =devm_request_irq (&pdev->dev, irq, hix5hd2_i2c_irq, -IRQF_NO_SUSPEND |IRQF_ONESHOT , -dev_name (&pdev->dev), priv); +IRQF_NO_SUSPEND ,dev_name (&pdev->dev), priv);if (ret !=0 ) {dev_err (&pdev->dev,"cannot request HS-I2C IRQ %d\n" , irq); goto err_clk;
include/linux/cpu.h +0 -4
@@ -127,8 +127,6 @@ extern void cpu_hotplug_disable(void);extern void cpu_hotplug_enable (void );void clear_tasks_mm_cpumask (int cpu);int cpu_down (unsigned int cpu); -extern void pin_current_cpu (void ); -extern void unpin_current_cpu (void );#else /* CONFIG_HOTPLUG_CPU */
@@ -139,8 +137,6 @@ static inline void cpus_read_unlock(void) { }static inline void lockdep_assert_cpus_held (void ) { }static inline void cpu_hotplug_disable (void ) { }static inline void cpu_hotplug_enable (void ) { } -static inline void pin_current_cpu (void ) { } -static inline void unpin_current_cpu (void ) { }#endif /* !CONFIG_HOTPLUG_CPU */
include/linux/init_task.h +9 -0
@@ -225,6 +225,14 @@ extern struct cred init_cred;#define INIT_TASK_SECURITY #endif +#if defined(CONFIG_SMP ) && defined(CONFIG_PREEMPT_RT_BASE ) && \ + defined(CONFIG_SCHED_DEBUG ) +# define INIT_LAZY_MIGRATE (tsk) \ + .pinned_on_cpu = -1, +#else +# define INIT_LAZY_MIGRATE (tsk) +#endif +/* * INIT_TASK is used to set up the first task table, touch at * your own risk!. Base=0, limit=0x1fffff (=2MB)
@@ -243,6 +251,7 @@ extern struct cred init_cred; .cpus_ptr = &tsk.cpus_mask, \ .cpus_mask = CPU_MASK_ALL, \ .nr_cpus_allowed=NR_CPUS , \ +INIT_LAZY_MIGRATE (tsk) \ .mm =NULL , \ .active_mm = &init_mm, \ .restart_block = { \
include/linux/sched.h +6 -5
@@ -229,6 +229,8 @@ extern void io_schedule_finish(int token);extern long io_schedule_timeout (long timeout);extern void io_schedule (void ); +int cpu_nr_pinned (int cpu); +/** * struct prev_cputime - snapshot of system and user cputime * @utime: time spent in user mode
@@ -628,16 +630,13 @@ struct task_struct {cpumask_t cpus_mask;#if defined(CONFIG_SMP ) && defined(CONFIG_PREEMPT_RT_BASE )int migrate_disable; -int migrate_disable_update; -int pinned_on_cpu; +bool migrate_disable_scheduled;# ifdef CONFIG_SCHED_DEBUG -int migrate_disable_atomic; +int pinned_on_cpu;# endif -#elif !defined(CONFIG_SMP ) && defined(CONFIG_PREEMPT_RT_BASE )# ifdef CONFIG_SCHED_DEBUG int migrate_disable; -int migrate_disable_atomic;# endif #endif #ifdef CONFIG_PREEMPT_RT_FULL
@@ -1883,4 +1882,6 @@ extern long sched_getaffinity(pid_t pid, struct cpumask *mask);#define TASK_SIZE_OF (tsk) TASK_SIZE#endif +extern struct task_struct *takedown_cpu_task; +#endif
include/linux/stop_machine.h +2 -0
@@ -26,6 +26,8 @@ struct cpu_stop_work {cpu_stop_fn_t fn;void *arg;struct cpu_stop_done *done; +/* Did not run due to disabled stopper; for nowait debug checks */ +bool disabled; };int stop_one_cpu (unsigned int cpu,cpu_stop_fn_t fn,void *arg);
kernel/cpu.c +40 -63
148 lines not on this page · raw message
kernel/futex.c +132 -99
519 lines not on this page · raw message
kernel/irq/manage.c +1 -1
@@ -353,7 +353,7 @@ irq_set_affinity_notifier(unsigned int irq, struct irq_affinity_notify *notify)if (old_notify) {#ifdef CONFIG_PREEMPT_RT_BASE -kthread_cancel_work_sync (¬ify->work); +kthread_cancel_work_sync (&old_notify->work);#else cancel_work_sync (&old_notify->work);#endif
kernel/locking/rtmutex.c +90 -24
228 lines not on this page · raw message
kernel/locking/rtmutex_common.h +3 -0
@@ -131,6 +131,9 @@ enum rtmutex_chainwalk {/* * PI-futex support (proxy locking functions, etc.): */ +#define PI_WAKEUP_INPROGRESS ((struct rt_mutex_waiter *) 1) +#define PI_REQUEUE_INPROGRESS ((struct rt_mutex_waiter *) 2) +extern struct task_struct *rt_mutex_next_owner (struct rt_mutex *lock);extern void rt_mutex_init_proxy_locked (struct rt_mutex *lock,struct task_struct *proxy_owner);
kernel/locking/rwlock-rt.c +6 -0
@@ -310,6 +310,7 @@ int __lockfunc rt_read_trylock(rwlock_t *rwlock) ret =do_read_rt_trylock (rwlock);if (ret) {rwlock_acquire_read (&rwlock->dep_map,0 ,1 , _RET_IP_); +rcu_read_lock (); }else {migrate_enable ();sleeping_lock_dec ();
@@ -327,6 +328,7 @@ int __lockfunc rt_write_trylock(rwlock_t *rwlock) ret =do_write_rt_trylock (rwlock);if (ret) {rwlock_acquire (&rwlock->dep_map,0 ,1 , _RET_IP_); +rcu_read_lock (); }else {migrate_enable ();sleeping_lock_dec ();
@@ -338,6 +340,7 @@ EXPORT_SYMBOL(rt_write_trylock); void __lockfunc rt_read_lock(rwlock_t *rwlock) {sleeping_lock_inc (); +rcu_read_lock ();migrate_disable ();rwlock_acquire_read (&rwlock->dep_map,0 ,0 , _RET_IP_);do_read_rt_lock (rwlock);
@@ -347,6 +350,7 @@ EXPORT_SYMBOL(rt_read_lock); void __lockfunc rt_write_lock(rwlock_t *rwlock) {sleeping_lock_inc (); +rcu_read_lock ();migrate_disable ();rwlock_acquire (&rwlock->dep_map,0 ,0 , _RET_IP_);do_write_rt_lock (rwlock);
@@ -358,6 +362,7 @@ void __lockfunc rt_read_unlock(rwlock_t *rwlock)rwlock_release (&rwlock->dep_map,1 , _RET_IP_);do_read_rt_unlock (rwlock);migrate_enable (); +rcu_read_unlock ();sleeping_lock_dec (); }EXPORT_SYMBOL (rt_read_unlock);
@@ -367,6 +372,7 @@ void __lockfunc rt_write_unlock(rwlock_t *rwlock)rwlock_release (&rwlock->dep_map,1 , _RET_IP_);do_write_rt_unlock (rwlock);migrate_enable (); +rcu_read_unlock ();sleeping_lock_dec (); }EXPORT_SYMBOL (rt_write_unlock);
kernel/sched/core.c +87 -124
350 lines not on this page · raw message
kernel/sched/deadline.c +2 -2
@@ -252,7 +252,7 @@ static void task_non_contending(struct task_struct *p) dl_se->dl_non_contending =1 ;get_task_struct (p); -hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL ); +hrtimer_start (timer,ns_to_ktime (zerolag_time),HRTIMER_MODE_REL_HARD ); }static void task_contending (struct sched_dl_entity *dl_se,int flags)
@@ -1234,7 +1234,7 @@ void init_dl_inactive_task_timer(struct sched_dl_entity *dl_se) {struct hrtimer *timer = &dl_se->inactive_timer; -hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL ); +hrtimer_init (timer,CLOCK_MONOTONIC ,HRTIMER_MODE_REL_HARD ); timer->function = inactive_task_timer; }
kernel/sched/sched.h +4 -0
@@ -811,6 +811,10 @@ struct rq {/* Must be inspected within a rcu lock section */ struct cpuidle_state *idle_state;#endif + +#if defined(CONFIG_PREEMPT_RT_BASE ) && defined(CONFIG_SMP ) +int nr_pinned; +#endif };static inline int cpu_of (struct rq *rq)
kernel/stop_machine.c +5 -2
@@ -86,8 +86,11 @@ static bool cpu_stop_queue_work(unsigned int cpu, struct cpu_stop_work *work) enabled = stopper->enabled;if (enabled)__cpu_stop_queue_work (stopper, work, &wakeq); -else if (work->done) -cpu_stop_signal_done (work->done); +else { + work->disabled = true; +if (work->done) +cpu_stop_signal_done (work->done); + }raw_spin_unlock_irqrestore (&stopper->lock, flags);wake_up_q (&wakeq);
lib/smp_processor_id.c +6 -1
@@ -23,7 +23,12 @@ notrace static unsigned int check_preemption_disabled(const char *what1,* Kernel threads bound to a single CPU can safely use * smp_processor_id(): */ -if (cpumask_equal (current->cpus_ptr,cpumask_of (this_cpu))) +#if defined(CONFIG_PREEMPT_RT_BASE ) && (defined(CONFIG_SMP ) || defined(CONFIG_SCHED_DEBUG )) +if (current->migrate_disable) + goto out; +#endif + +if (current->nr_cpus_allowed ==1 ) goto out;/*
lib/ubsan.c +27 -49
270 lines not on this page · raw message
localversion-rt +1 -1
@@ -1 +1 @@ --rt74 +-rt75
mm/kmemleak.c +36 -36
236 lines not on this page · raw message