Linux 3.14.34-rt32-rc2
cover Linux 3.14.34-rt32-rc2
Dear RT Folks,
This is the RT stable review cycle of patch 3.14.34-rt32-rc2.
Please scream at me if I messed something up. Please test the patches too.
The -rc release will be uploaded to kernel.org and will be deleted when the final release is out. This is just a review release (or release candidate).
The pre-releases will not be pushed to the git repository, only the final release is.
If all goes well, this patch will be converted to the next main release on 3/20/2015.
I'm only posting the patches that were added since rc1.
Enjoy,
-- Steve
To build 3.14.34-rt32-rc2 directly, the following patches should be applied:
http://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.tar.xz
http://www.kernel.org/pub/linux/kernel/v3.x/patch-3.14.34.xz
http://www.kernel.org/pub/linux/kernel/projects/rt/3.14/patch-3.14.34-rt32-rc2.patch.xz
You can also build from 3.14.34-rt31 by applying the incremental patch:
http://www.kernel.org/pub/linux/kernel/projects/rt/3.14/incr/patch-3.14.34-rt31-rt32-rc2.patch.xz
Changes from 3.14.34-rt31:
---
Brad Mouring (1):
rtmutex.c: Fix incorrect waiter check
Daniel Wagner (2):
work-simple: Simple work queue implemenation
thermal: Defer thermal wakups to threads
Gustavo Bittencourt (1):
rtmutex: enable deadlock detection in ww_mutex_lock functions
Josh Cartwright (1):
lockdep: selftest: fix warnings due to missing PREEMPT_RT conditionals
Kevin Hao (1):
netpoll: guard the access to dev->npinfo with rcu_read_lock/unlock_bh() for CONFIG_PREEMPT_RT_FULL=y
Mike Galbraith (6):
rt,locking: fix __ww_mutex_lock_interruptible() lockdep annotation
x86: UV: raw_spinlock conversion
scheduling while atomic in cgroup code
sunrpc: make svc_xprt_do_enqueue() use get_cpu_light()
locking: ww_mutex: fix ww_mutex vs self-deadlock fs,btrfs: fix rt deadlock on extent_buffer->lock
Paul E. McKenney (4):
timers: Track total number of timers in list
timers: Reduce __run_timers() latency for empty list
timers: Reduce future __run_timers() latency for newly emptied list
timers: Reduce future __run_timers() latency for first add to empty list
Paul Gortmaker (1):
sas-ata/isci: dont't disable interrupts in qc_issue handler
Sebastian Andrzej Siewior (5):
gpio: omap: use raw locks for locking
locking/rt-mutex: avoid a NULL pointer dereference on deadlock arm/futex: disable preemption during futex_atomic_cmpxchg_inatomic() Revert "rwsem-rt: Do not allow readers to nest"
fs/aio: simple simple work
Steven Rostedt (Red Hat) (3):
staging: Mark rtl8821ae as broken
Revert "timers: do not raise softirq unconditionally" Linux 3.14.34-rt32-rc2
Thomas Gleixner (14):
rtmutex: Simplify rtmutex_slowtrylock()
rtmutex: Simplify and document try_to_take_rtmutex()
rtmutex: No need to keep task ref for lock owner check
rtmutex: Clarify the boost/deboost part
rtmutex: Document pi chain walk
rtmutex: Simplify remove_waiter()
rtmutex: Confine deadlock logic to futex
rtmutex: Cleanup deadlock detector debug logic
rtmutex: Avoid pointless requeueing in the deadlock detection chain walk
futex: Make unlock_pi more robust
futex: Use futex_top_waiter() in lookup_pi_state()
futex: Split out the waiter check from lookup_pi_state()
futex: Split out the first waiter attachment from lookup_pi_state()
futex: Simplify futex_lock_pi_atomic() and make it more robust
Yadi.hu (1):
ARM: enable irq in translation/section permission fault handlers
Yang Shi (1):
mips: rt: Replace pagefault_* to raw version
Yong Zhang (1):
ARM: cmpxchg: define __HAVE_ARCH_CMPXCHG for armv6 and later
----
arch/arm/include/asm/cmpxchg.h | 2 + arch/arm/include/asm/futex.h | 4 + arch/arm/mm/fault.c | 6 + arch/mips/mm/init.c | 4 +- arch/x86/include/asm/uv/uv_bau.h | 14 +- arch/x86/include/asm/uv/uv_hub.h | 2 +- arch/x86/kernel/apic/x2apic_uv_x.c | 2 +- arch/x86/platform/uv/tlb_uv.c | 26 +- arch/x86/platform/uv/uv_time.c | 21 +- drivers/gpio/gpio-omap.c | 72 ++-- drivers/scsi/libsas/sas_ata.c | 4 +- drivers/staging/rtl8821ae/Kconfig | 1 + drivers/thermal/x86_pkg_temp_thermal.c | 50 ++- fs/aio.c | 24 +- fs/btrfs/ctree.c | 4 +- fs/btrfs/extent-tree.c | 8 - include/linux/hrtimer.h | 3 +- include/linux/netpoll.h | 16 +- include/linux/rtmutex.h | 8 +- include/linux/rwsem_rt.h | 1 + include/linux/work-simple.h | 24 ++ kernel/futex.c | 402 +++++++++++------------ kernel/hrtimer.c | 31 +- kernel/locking/rt.c | 37 ++- kernel/locking/rtmutex-debug.c | 5 +- kernel/locking/rtmutex-debug.h | 7 +- kernel/locking/rtmutex-tester.c | 4 +- kernel/locking/rtmutex.c | 582 ++++++++++++++++++++++++--------- kernel/locking/rtmutex.h | 7 +- kernel/locking/rtmutex_common.h | 22 +- kernel/sched/Makefile | 2 +- kernel/sched/work-simple.c | 172 ++++++++++ kernel/timer.c | 72 ++-- lib/locking-selftest.c | 27 ++ localversion-rt | 2 +- mm/memcontrol.c | 7 +- net/sunrpc/svc_xprt.c | 4 +- 37 files changed, 1133 insertions(+), 546 deletions(-)
PATCH 1/4 fs,btrfs: fix rt deadlock on extent_buffer->lock
3.14.34-rt32-rc2 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Mike Galbraith <[email protected]>
Sat Jul 14 12:30:41 CEST 2012
Trivially repeatable deadlock is cured by enabling lockdep code in btrfs_clear_path_blocking() as suggested by Chris Mason. He also suggested restricting blocking reader count to one, and not allowing a spinning reader while blocking reader exists. This has proven to be unnecessary, the strict lock order enforcement is enough.. or rather that's my box's opinion after long hours of hard pounding.
Note: extent-tree.c bit is additional recommendation from Chris
Mason, split into a separate patch after discussion.
--- fs/btrfs/ctree.c | 4 ++-- fs/btrfs/extent-tree.c | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-)
fs/btrfs/ctree.c +2 -2
@@ -80,7 +80,7 @@ noinline void btrfs_clear_path_blocking(struct btrfs_path *p, {int i; -#ifdef CONFIG_DEBUG_LOCK_ALLOC +#if (defined(CONFIG_DEBUG_LOCK_ALLOC ) || defined(CONFIG_PREEMPT_RT_BASE ))/* lockdep really cares that we take all of these spinlocks * in the right order. If any of the locks in the path are not * currently blocking, it is going to complain. So, make really
@@ -107,7 +107,7 @@ noinline void btrfs_clear_path_blocking(struct btrfs_path *p, } } -#ifdef CONFIG_DEBUG_LOCK_ALLOC +#if (defined(CONFIG_DEBUG_LOCK_ALLOC ) || defined(CONFIG_PREEMPT_RT_BASE ))if (held)btrfs_clear_lock_blocking_rw (held, held_rw);#endif
fs/btrfs/extent-tree.c +0 -8
@@ -6940,14 +6940,6 @@ again: goto again; } -if (btrfs_test_opt (root,ENOSPC_DEBUG )) { - static DEFINE_RATELIMIT_STATE(_rs, - DEFAULT_RATELIMIT_INTERVAL * 10, - /*DEFAULT_RATELIMIT_BURST*/ 1); -if (__ratelimit (&_rs)) -WARN (1 ,KERN_DEBUG -"BTRFS: block rsv returned %d\n" , ret); - } try_reserve: ret =reserve_metadata_bytes (root, block_rsv, blocksize,BTRFS_RESERVE_NO_FLUSH );
Signature · 1 line
2.1.4
PATCH 2/4 Revert "timers: do not raise softirq unconditionally"
In reply to Steven Rostedt3.14.34-rt32-rc2 stable review patch.
If anyone has any objections, please let me know.
------------------
From: "Steven Rostedt (Red Hat)" <[email protected]>
This reverts commit 891f510568343d93c5aa2f477b6bebe009b48f05.
Conflicts:
kernel/timer.c
--- include/linux/hrtimer.h | 3 ++- kernel/hrtimer.c | 31 ++++++++++++++++++++++++------- kernel/timer.c | 46 ++-------------------------------------------- 3 files changed, 28 insertions(+), 52 deletions(-)
include/linux/hrtimer.h +2 -1
@@ -461,8 +461,9 @@ extern int schedule_hrtimeout_range_clock(ktime_t *expires, unsigned long delta, const enum hrtimer_mode mode, int clock);extern int schedule_hrtimeout (ktime_t *expires,const enum hrtimer_mode mode); -/* Called from the periodic timer tick */ +/* Soft interrupt function to run the hrtimer queues: */ extern void hrtimer_run_queues (void ); +extern void hrtimer_run_pending (void );/* Bootup initialization: */ extern void __init hrtimers_init (void );
kernel/hrtimer.c +24 -7
@@ -1717,6 +1717,30 @@ static void run_hrtimer_softirq(struct softirq_action *h) }/* +* Called from timer softirq every jiffy, expire hrtimers: +* +* For HRT its the fall back code to run the softirq in the timer +* softirq context in case the hrtimer initialization failed or has +* not been done yet. +*/ +void hrtimer_run_pending (void ) +{ +if (hrtimer_hres_active ()) +return ; + +/* +* This _is_ ugly: We have to check in the softirq context, +* whether we can switch to highres and / or nohz mode. The +* clocksource switch happens in the timer interrupt with +* xtime_lock held. Notification from there only sets the +* check bit in the tick_oneshot code, otherwise we might +* deadlock vs. xtime_lock. +*/ +if (tick_check_oneshot_change (!hrtimer_is_hres_enabled ())) +hrtimer_switch_to_hres (); +} + +/* * Called from hardirq context every jiffy */ void hrtimer_run_queues (void )
@@ -1729,13 +1753,6 @@ void hrtimer_run_queues(void)if (hrtimer_hres_active ())return ; -/* -* Check whether we can switch to highres mode. -*/ -if (tick_check_oneshot_change (!hrtimer_is_hres_enabled ()) - &&hrtimer_switch_to_hres ()) -return ; -for (index =0 ; index <HRTIMER_MAX_CLOCK_BASES ; index++) { base = &cpu_base->clock_base[index];if (!timerqueue_getnext (&base->active))
kernel/timer.c +2 -44
60 lines not on this page · raw message
Signature · 1 line
2.1.4
PATCH 3/4 netpoll: guard the access to dev->npinfo with rcu_read_lock/unlock_bh() for CONFIG_PREEMPT_RT_FULL=y
In reply to Steven Rostedt3.14.34-rt32-rc2 stable review patch.
If anyone has any objections, please let me know.
------------------
From: Kevin Hao <[email protected]>
For vanilla kernel we don't need to invoke rcu_read_lock/unlock_bh
explicitly to mark an RCU-bh critical section in the softirq context
because bh is already disabled in this case. But for a rt kernel,
the commit ("rcu: Merge RCU-bh into RCU-preempt") implements the
RCU-bh in term of RCU-preempt. So we have to use
rcu_read_lock/unlock_bh() to mark an RCU-bh critical section even in
a softirq context. Otherwise we will get a call trace like this:
include/linux/netpoll.h:90 suspicious rcu_dereference_check() usage!
other info that might help us debug this:
rcu_scheduler_active = 1, debug_locks = 0
1 lock held by irq/177-eth0_g0/129:
#0: (&per_cpu(local_softirq_locks[i], __cpu).lock){+.+...}, at: [<8002f544>] do_current_softirqs+0x12c/0x5ec
stack backtrace: CPU: 0 PID: 129 Comm: irq/177-eth0_g0 Not tainted 3.14.23 #11 [<80018c0c>] (unwind_backtrace) from [<800138b0>] (show_stack+0x20/0x24) [<800138b0>] (show_stack) from [<8075c3bc>] (dump_stack+0x84/0xd0) [<8075c3bc>] (dump_stack) from [<8008111c>] (lockdep_rcu_suspicious+0xe8/0x11c) [<8008111c>] (lockdep_rcu_suspicious) from [<805e94e8>] (dev_gro_receive+0x240/0x724) [<805e94e8>] (dev_gro_receive) from [<805e9c34>] (napi_gro_receive+0x3c/0x1e8) [<805e9c34>] (napi_gro_receive) from [<804b01ac>] (gfar_clean_rx_ring+0x2d4/0x624) [<804b01ac>] (gfar_clean_rx_ring) from [<804b078c>] (gfar_poll_rx_sq+0x58/0xe8) [<804b078c>] (gfar_poll_rx_sq) from [<805eada8>] (net_rx_action+0x1c8/0x418) [<805eada8>] (net_rx_action) from [<8002f62c>] (do_current_softirqs+0x214/0x5ec) [<8002f62c>] (do_current_softirqs) from [<8002fa88>] (__local_bh_enable+0x84/0x9c) [<8002fa88>] (__local_bh_enable) from [<8002fab8>] (local_bh_enable+0x18/0x1c) [<8002fab8>] (local_bh_enable) from [<80093924>] (irq_forced_thread_fn+0x50/0x74) [<80093924>] (irq_forced_thread_fn) from [<80093c30>] (irq_thread+0x158/0x1c4) [<80093c30>] (irq_thread) from [<800555b8>] (kthread+0xd4/0xe8) [<800555b8>] (kthread) from [<8000ee88>] (ret_from_fork+0x14/0x20)
--- include/linux/netpoll.h | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-)
include/linux/netpoll.h +14 -2
@@ -87,9 +87,21 @@ static inline void netpoll_send_skb(struct netpoll *np, struct sk_buff *skb)#ifdef CONFIG_NETPOLL static inline bool netpoll_rx_on (struct sk_buff *skb) { -struct netpoll_info *npinfo =rcu_dereference_bh (skb->dev->npinfo); +struct netpoll_info *npinfo; +bool ret; + +#ifdef CONFIG_PREEMPT_RT_FULL +rcu_read_lock_bh (); +#endif + + npinfo =rcu_dereference_bh (skb->dev->npinfo); + ret = npinfo && (!list_empty (&npinfo->rx_np) || npinfo->rx_flags); + +#ifdef CONFIG_PREEMPT_RT_FULL +rcu_read_unlock_bh (); +#endif -return npinfo && (!list_empty (&npinfo->rx_np) || npinfo->rx_flags); +return ret; }static inline bool netpoll_rx (struct sk_buff *skb)
Signature · 1 line
2.1.4
PATCH 4/4 Linux 3.14.34-rt32-rc2
In reply to Steven Rostedt3.14.34-rt32-rc2 stable review patch.
If anyone has any objections, please let me know.
------------------
From: "Steven Rostedt (Red Hat)" <[email protected]>
--- localversion-rt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
localversion-rt +1 -1
@@ -1 +1 @@ --rt31 +-rt32-rc2
Signature · 1 line
2.1.4