From: Paul E. McKenney Date: Tue, 15 May 2018 17:33:05 +0000 (-0700) Subject: Merge branches 'exp.2018.05.15a', 'fixes.2018.05.15a', 'lock.2018.05.15a' and 'tortur... X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=22df7316ac71dc1ac57415349938737d2a229c59;p=linux.git Merge branches 'exp.2018.05.15a', 'fixes.2018.05.15a', 'lock.2018.05.15a' and 'torture.2018.05.15a' into HEAD exp.2018.05.15a: Parallelize expedited grace-period initialization. fixes.2018.05.15a: Miscellaneous fixes. lock.2018.05.15a: Decrease lock contention on root rcu_node structure, which is a step towards merging RCU flavors. torture.2018.05.15a: Torture-test updates. --- 22df7316ac71dc1ac57415349938737d2a229c59 diff --cc kernel/rcu/tree.h index 98d33902b65c9,0b3a90ebe225e,9f97fd7f648c7,f491ab4f2e8ec..78e051dffc5bf --- a/kernel/rcu/tree.h +++ b/kernel/rcu/tree.h @@@@@ -165,10 -157,8 -156,24 -157,8 +164,26 @@@@@ struct rcu_node spinlock_t exp_lock ____cacheline_internodealigned_in_smp; unsigned long exp_seq_rq; wait_queue_head_t exp_wq[4]; +++ struct rcu_exp_work rew; +++ bool exp_need_flush; /* Need to flush workitem? */ } ____cacheline_internodealigned_in_smp; ++ +/* Accessors for ->need_future_gp[] array. */ ++ +#define need_future_gp_mask() \ ++ + (ARRAY_SIZE(((struct rcu_node *)NULL)->need_future_gp) - 1) ++ +#define need_future_gp_element(rnp, c) \ ++ + ((rnp)->need_future_gp[(c) & need_future_gp_mask()]) ++ +#define need_any_future_gp(rnp) \ ++ +({ \ ++ + int __i; \ ++ + bool __nonzero = false; \ ++ + \ ++ + for (__i = 0; __i < ARRAY_SIZE((rnp)->need_future_gp); __i++) \ ++ + __nonzero = __nonzero || \ ++ + READ_ONCE((rnp)->need_future_gp[__i]); \ ++ + __nonzero; \ ++ +}) ++ + /* * Bitmasks in an rcu_node cover the interval [grplo, grphi] of CPU IDs, and * are indexed relative to this interval rather than the global CPU ID space.