From: Paul E. McKenney Date: Tue, 29 Jan 2013 06:25:02 +0000 (-0800) Subject: Merge branches 'doctorture.2013.01.29a', 'fixes.2013.01.26a', 'tagcb.2013.01.24a... X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=40393f525fe698e2b639cf1851ef0a40e7e158a8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge branches 'doctorture.2013.01.29a', 'fixes.2013.01.26a', 'tagcb.2013.01.24a' and 'tiny.2013.01.29b' into HEAD doctorture.2013.01.11a: Changes to rcutorture and to RCU documentation. fixes.2013.01.26a: Miscellaneous fixes. tagcb.2013.01.24a: Tag RCU callbacks with grace-period number to simplify callback advancement. tiny.2013.01.29b: Enhancements to uniprocessor handling in tiny RCU. --- 40393f525fe698e2b639cf1851ef0a40e7e158a8 diff --cc kernel/rcupdate.c index 303359d1ca88,a2cf76177b44,a2cf76177b44,076730d95acc..48ab70384a4c --- a/kernel/rcupdate.c +++ b/kernel/rcupdate.c @@@@@ -412,6 -410,5 -410,5 -410,56 +412,57 @@@@@ void do_trace_rcu_torture_read(char *rc } EXPORT_SYMBOL_GPL(do_trace_rcu_torture_read); #else ---#define do_trace_rcu_torture_read(rcutorturename, rhp) do { } while (0) +++#define do_trace_rcu_torture_read(rcutorturename, rhp, secs, c_old, c) \ +++ do { } while (0) #endif +++ +++ #ifdef CONFIG_RCU_STALL_COMMON +++ +++ #ifdef CONFIG_PROVE_RCU +++ #define RCU_STALL_DELAY_DELTA (5 * HZ) +++ #else +++ #define RCU_STALL_DELAY_DELTA 0 +++ #endif +++ +++ int rcu_cpu_stall_suppress __read_mostly; /* 1 = suppress stall warnings. */ +++ int rcu_cpu_stall_timeout __read_mostly = CONFIG_RCU_CPU_STALL_TIMEOUT; +++ +++ module_param(rcu_cpu_stall_suppress, int, 0644); +++ module_param(rcu_cpu_stall_timeout, int, 0644); +++ +++ int rcu_jiffies_till_stall_check(void) +++ { +++ int till_stall_check = ACCESS_ONCE(rcu_cpu_stall_timeout); +++ +++ /* +++ * Limit check must be consistent with the Kconfig limits +++ * for CONFIG_RCU_CPU_STALL_TIMEOUT. +++ */ +++ if (till_stall_check < 3) { +++ ACCESS_ONCE(rcu_cpu_stall_timeout) = 3; +++ till_stall_check = 3; +++ } else if (till_stall_check > 300) { +++ ACCESS_ONCE(rcu_cpu_stall_timeout) = 300; +++ till_stall_check = 300; +++ } +++ return till_stall_check * HZ + RCU_STALL_DELAY_DELTA; +++ } +++ +++ static int rcu_panic(struct notifier_block *this, unsigned long ev, void *ptr) +++ { +++ rcu_cpu_stall_suppress = 1; +++ return NOTIFY_DONE; +++ } +++ +++ static struct notifier_block rcu_panic_block = { +++ .notifier_call = rcu_panic, +++ }; +++ +++ static int __init check_cpu_stall_init(void) +++ { +++ atomic_notifier_chain_register(&panic_notifier_list, &rcu_panic_block); +++ return 0; +++ } +++ early_initcall(check_cpu_stall_init); +++ +++ #endif /* #ifdef CONFIG_RCU_STALL_COMMON */ diff --cc kernel/rcutree.c index e441b77b614e,8a13c8ef9642,e9dce4fa76d8,d069430f0974..5b8ad827fd86 --- a/kernel/rcutree.c +++ b/kernel/rcutree.c @@@@@ -1080,12 -1080,12 -1229,15 -1041,12 +1190,15 @@@@@ static voi __rcu_process_gp_end(struct rcu_state *rsp, struct rcu_node *rnp, struct rcu_data *rdp) { /* Did another grace period end? */ -- - if (rdp->completed != rnp->completed) { ++ + if (rdp->completed == rnp->completed) { + + - /* Advance callbacks. No harm if list empty. */ - rdp->nxttail[RCU_DONE_TAIL] = rdp->nxttail[RCU_WAIT_TAIL]; - rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_READY_TAIL]; - rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; ++ + /* No, so just accelerate recent callbacks. */ ++ + rcu_accelerate_cbs(rsp, rnp, rdp); + + - /* Advance callbacks. No harm if list empty. */ - rdp->nxttail[RCU_DONE_TAIL] = rdp->nxttail[RCU_WAIT_TAIL]; - rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_READY_TAIL]; - rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; ++ + } else { ++ - /* Advance callbacks. No harm if list empty. */ - rdp->nxttail[RCU_DONE_TAIL] = rdp->nxttail[RCU_WAIT_TAIL]; - rdp->nxttail[RCU_WAIT_TAIL] = rdp->nxttail[RCU_NEXT_READY_TAIL]; - rdp->nxttail[RCU_NEXT_READY_TAIL] = rdp->nxttail[RCU_NEXT_TAIL]; ++ + /* Advance callbacks. */ ++ + rcu_advance_cbs(rsp, rnp, rdp); /* Remember that we saw this grace-period completion. */ rdp->completed = rnp->completed;