Merge branches 'exp.2018.05.15a', 'fixes.2018.05.15a', 'lock.2018.05.15a' and 'tortur...
authorPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:33:05 +0000 (10:33 -0700)
committerPaul E. McKenney <paulmck@linux.vnet.ibm.com>
Tue, 15 May 2018 17:33:05 +0000 (10:33 -0700)
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.

1  2  3  4 
kernel/rcu/rcu.h
kernel/rcu/rcutorture.c
kernel/rcu/tree.c
kernel/rcu/tree.h
kernel/rcu/tree_exp.h
kernel/rcu/tree_plugin.h

Simple merge
Simple merge
Simple merge
@@@@@ -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.
Simple merge
Simple merge