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 01/13] rcu: Remove rcutorture test version and sequence number
    Date
    Back when RCU had a debugfs interface, there was a test version and
    sequence number that allowed associating debugfs data with a particular
    test run, where the test run started with modprobe and ended with rmmod,
    which was how tests were run back on the old ABAT system within IBM.
    But rcutorture testing no longer runs on ABAT, and there is no longer an
    RCU debugfs interface, so there is no longer any need for test versions
    and sequence numbers.

    This commit therefore removes the rcutorture_record_test_transition()
    and rcutorture_record_progress() functions, and along with them the
    rcutorture_testseq and rcutorture_vernum variables that they update.

    Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
    ---
    kernel/rcu/rcu.h | 4 ----
    kernel/rcu/rcutorture.c | 4 +---
    kernel/rcu/tree.c | 37 -------------------------------------
    3 files changed, 1 insertion(+), 44 deletions(-)

    diff --git a/kernel/rcu/rcu.h b/kernel/rcu/rcu.h
    index aa215d6355f8..0453a7d12b3f 100644
    --- a/kernel/rcu/rcu.h
    +++ b/kernel/rcu/rcu.h
    @@ -444,7 +444,6 @@ enum rcutorture_type {
    #if defined(CONFIG_TREE_RCU) || defined(CONFIG_PREEMPT_RCU)
    void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
    unsigned long *gp_seq);
    -void rcutorture_record_test_transition(void);
    void rcutorture_record_progress(unsigned long vernum);
    void do_trace_rcu_torture_read(const char *rcutorturename,
    struct rcu_head *rhp,
    @@ -458,7 +457,6 @@ static inline void rcutorture_get_gp_data(enum rcutorture_type test_type,
    *flags = 0;
    *gp_seq = 0;
    }
    -static inline void rcutorture_record_test_transition(void) { }
    static inline void rcutorture_record_progress(unsigned long vernum) { }
    #ifdef CONFIG_RCU_TRACE
    void do_trace_rcu_torture_read(const char *rcutorturename,
    @@ -505,8 +503,6 @@ static inline void rcu_bh_force_quiescent_state(void) { }
    static inline void rcu_sched_force_quiescent_state(void) { }
    static inline void show_rcu_gp_kthreads(void) { }
    #else /* #ifdef CONFIG_TINY_RCU */
    -extern unsigned long rcutorture_testseq;
    -extern unsigned long rcutorture_vernum;
    unsigned long rcu_get_gp_seq(void);
    unsigned long rcu_bh_get_gp_seq(void);
    unsigned long rcu_sched_get_gp_seq(void);
    diff --git a/kernel/rcu/rcutorture.c b/kernel/rcu/rcutorture.c
    index eb6d4915b4e6..335387fabac2 100644
    --- a/kernel/rcu/rcutorture.c
    +++ b/kernel/rcu/rcutorture.c
    @@ -1016,7 +1016,7 @@ rcu_torture_writer(void *arg)
    break;
    }
    }
    - rcutorture_record_progress(++rcu_torture_current_version);
    + rcu_torture_current_version++;
    /* Cycle through nesting levels of rcu_expedite_gp() calls. */
    if (can_expedite &&
    !(torture_random(&rand) & 0xff & (!!expediting - 1))) {
    @@ -1613,7 +1613,6 @@ rcu_torture_cleanup(void)
    unsigned long gp_seq = 0;
    int i;

    - rcutorture_record_test_transition();
    if (torture_cleanup_begin()) {
    if (cur_ops->cb_barrier != NULL)
    cur_ops->cb_barrier();
    @@ -1918,7 +1917,6 @@ rcu_torture_init(void)
    goto unwind;
    }
    }
    - rcutorture_record_test_transition();
    torture_init_end();
    return 0;

    diff --git a/kernel/rcu/tree.c b/kernel/rcu/tree.c
    index 4b0aee4f9318..21878aada657 100644
    --- a/kernel/rcu/tree.c
    +++ b/kernel/rcu/tree.c
    @@ -191,18 +191,6 @@ module_param(gp_cleanup_delay, int, 0444);
    */
    #define PER_RCU_NODE_PERIOD 3 /* Number of grace periods between delays. */

    -/*
    - * Track the rcutorture test sequence number and the update version
    - * number within a given test. The rcutorture_testseq is incremented
    - * on every rcutorture module load and unload, so has an odd value
    - * when a test is running. The rcutorture_vernum is set to zero
    - * when rcutorture starts and is incremented on each rcutorture update.
    - * These variables enable correlating rcutorture output with the
    - * RCU tracing information.
    - */
    -unsigned long rcutorture_testseq;
    -unsigned long rcutorture_vernum;
    -
    /*
    * Compute the mask of online CPUs for the specified rcu_node structure.
    * This will not be stable unless the rcu_node structure's ->lock is
    @@ -622,20 +610,6 @@ void show_rcu_gp_kthreads(void)
    }
    EXPORT_SYMBOL_GPL(show_rcu_gp_kthreads);

    -/*
    - * Record the number of times rcutorture tests have been initiated and
    - * terminated. This information allows the debugfs tracing stats to be
    - * correlated to the rcutorture messages, even when the rcutorture module
    - * is being repeatedly loaded and unloaded. In other words, we cannot
    - * store this state in rcutorture itself.
    - */
    -void rcutorture_record_test_transition(void)
    -{
    - rcutorture_testseq++;
    - rcutorture_vernum = 0;
    -}
    -EXPORT_SYMBOL_GPL(rcutorture_record_test_transition);
    -
    /*
    * Send along grace-period-related data for rcutorture diagnostics.
    */
    @@ -664,17 +638,6 @@ void rcutorture_get_gp_data(enum rcutorture_type test_type, int *flags,
    }
    EXPORT_SYMBOL_GPL(rcutorture_get_gp_data);

    -/*
    - * Record the number of writer passes through the current rcutorture test.
    - * This is also used to correlate debugfs tracing stats with the rcutorture
    - * messages.
    - */
    -void rcutorture_record_progress(unsigned long vernum)
    -{
    - rcutorture_vernum++;
    -}
    -EXPORT_SYMBOL_GPL(rcutorture_record_progress);
    -
    /*
    * Return the root node of the specified rcu_state structure.
    */
    --
    2.17.1
    \
     
     \ /
      Last update: 2018-06-26 02:51    [W:8.130 / U:0.276 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site