All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: SeongJae Park <sj38.park@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 1/3] rcuperf: Remove unnecessary rcu_perf_writer_state variable
Date: Sun, 21 Aug 2016 16:00:33 -0700	[thread overview]
Message-ID: <20160821230033.GS3482@linux.vnet.ibm.com> (raw)
In-Reply-To: <1471766080-17501-1-git-send-email-sj38.park@gmail.com>

On Sun, Aug 21, 2016 at 04:54:38PM +0900, SeongJae Park wrote:
> rcu_perf_writer_state is being written only while nobody reads it.  This
> commit removes the unnecessary variable and macro constants for it.
> 
> Signed-off-by: SeongJae Park <sj38.park@gmail.com>
> ---

I am keeping rcu_perf_writer_state for debugging purposes, but I pulled
in the other two patches for review and testing, thank you!

							Thanx, Paul

>  kernel/rcu/rcuperf.c | 16 ++--------------
>  1 file changed, 2 insertions(+), 14 deletions(-)
> 
> diff --git a/kernel/rcu/rcuperf.c b/kernel/rcu/rcuperf.c
> index d38ab08..6025342 100644
> --- a/kernel/rcu/rcuperf.c
> +++ b/kernel/rcu/rcuperf.c
> @@ -86,13 +86,6 @@ static u64 t_rcu_perf_writer_finished;
>  static unsigned long b_rcu_perf_writer_started;
>  static unsigned long b_rcu_perf_writer_finished;
> 
> -static int rcu_perf_writer_state;
> -#define RTWS_INIT		0
> -#define RTWS_EXP_SYNC		1
> -#define RTWS_SYNC		2
> -#define RTWS_IDLE		2
> -#define RTWS_STOPPING		3
> -
>  #define MAX_MEAS 10000
>  #define MIN_MEAS 100
> 
> @@ -381,14 +374,10 @@ rcu_perf_writer(void *arg)
>  	do {
>  		wdp = &wdpp[i];
>  		*wdp = ktime_get_mono_fast_ns();
> -		if (gp_exp) {
> -			rcu_perf_writer_state = RTWS_EXP_SYNC;
> +		if (gp_exp)
>  			cur_ops->exp_sync();
> -		} else {
> -			rcu_perf_writer_state = RTWS_SYNC;
> +		else
>  			cur_ops->sync();
> -		}
> -		rcu_perf_writer_state = RTWS_IDLE;
>  		t = ktime_get_mono_fast_ns();
>  		*wdp = t - *wdp;
>  		i_max = i;
> @@ -429,7 +418,6 @@ rcu_perf_writer(void *arg)
>  			i++;
>  		rcu_perf_wait_shutdown();
>  	} while (!torture_must_stop());
> -	rcu_perf_writer_state = RTWS_STOPPING;
>  	writer_n_durations[me] = i_max;
>  	torture_kthread_stopping("rcu_perf_writer");
>  	return 0;
> -- 
> 1.9.1
> 

      parent reply	other threads:[~2016-08-22  0:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-21  7:54 [PATCH 1/3] rcuperf: Remove unnecessary rcu_perf_writer_state variable SeongJae Park
2016-08-21  7:54 ` [PATCH 2/3] rcuperf: Insert space between flag and message consistently SeongJae Park
2016-08-21  7:54 ` [PATCH 3/3] torture: TOROUT_STRING(): Insert a space between flag and message SeongJae Park
2016-08-21 23:00 ` Paul E. McKenney [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160821230033.GS3482@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sj38.park@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.