lkml.org 
[lkml]   [2018]   [Jun]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH tip/core/rcu 08/40] rcu: Convert rcu_gpnum_ovf() to ->gp_seq
    Date
    This commit converts rcu_gpnum_ovf() to use ->gp_seq instead of ->gpnum.
    Same size unsigned long, so same approach.

    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    kernel/rcu/tree.c | 5 +++--
    1 file changed, 3 insertions(+), 2 deletions(-)

    diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
    index a8c19363c979..eda23797a7f4 100644
    --- a/kernel/rcu/tree.c
    +++ b/kernel/rcu/tree.c
    @@ -1089,14 +1089,15 @@ static int rcu_is_cpu_rrupt_from_idle(void)
    /*
    * We are reporting a quiescent state on behalf of some other CPU, so
    * it is our responsibility to check for and handle potential overflow
    - * of the rcu_node ->gpnum counter with respect to the rcu_data counters.
    + * of the rcu_node ->gp_seq counter with respect to the rcu_data counters.
    * After all, the CPU might be in deep idle state, and thus executing no
    * code whatsoever.
    */
    static void rcu_gpnum_ovf(struct rcu_node *rnp, struct rcu_data *rdp)
    {
    raw_lockdep_assert_held_rcu_node(rnp);
    - if (ULONG_CMP_LT(READ_ONCE(rdp->gpnum) + ULONG_MAX / 4, rnp->gpnum))
    + if (ULONG_CMP_LT(rcu_seq_current(&rdp->gp_seq) + ULONG_MAX / 4,
    + rnp->gp_seq))
    WRITE_ONCE(rdp->gpwrap, true);
    if (ULONG_CMP_LT(rdp->rcu_iw_gpnum + ULONG_MAX / 4, rnp->gpnum))
    rdp->rcu_iw_gpnum = rnp->gpnum + ULONG_MAX / 4;
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-06-26 02:16    [W:4.045 / U:0.080 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site