lkml.org 
[lkml]   [2022]   [Aug]   [31]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH rcu 2/4] srcu: Add GP and maximum requested GP to Tiny SRCU rcutorture output
    Date
    This commit adds the ->srcu_idx and ->srcu_max_idx fields to the Tiny
    SRCU rcutorture output for additional diagnostics.

    Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
    ---
    include/linux/srcutiny.h | 6 ++++--
    1 file changed, 4 insertions(+), 2 deletions(-)

    diff --git a/include/linux/srcutiny.h b/include/linux/srcutiny.h
    index 6cfaa0a9a9b96..4fcec6f5af908 100644
    --- a/include/linux/srcutiny.h
    +++ b/include/linux/srcutiny.h
    @@ -82,10 +82,12 @@ static inline void srcu_torture_stats_print(struct srcu_struct *ssp,
    int idx;

    idx = ((data_race(READ_ONCE(ssp->srcu_idx)) + 1) & 0x2) >> 1;
    - pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd)\n",
    + pr_alert("%s%s Tiny SRCU per-CPU(idx=%d): (%hd,%hd) gp: %hu->%hu\n",
    tt, tf, idx,
    data_race(READ_ONCE(ssp->srcu_lock_nesting[!idx])),
    - data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])));
    + data_race(READ_ONCE(ssp->srcu_lock_nesting[idx])),
    + data_race(READ_ONCE(ssp->srcu_idx)),
    + data_race(READ_ONCE(ssp->srcu_idx_max)));
    }

    #endif
    --
    2.31.1.189.g2e36527f23
    \
     
     \ /
      Last update: 2022-08-31 20:20    [W:2.706 / U:0.040 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site