All of lore.kernel.org
 help / color / mirror / Atom feed
From: Josh Triplett <josh@joshtriplett.org>
To: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org, mingo@elte.hu,
	laijs@cn.fujitsu.com, dipankar@in.ibm.com,
	akpm@linux-foundation.org, mathieu.desnoyers@polymtl.ca,
	niv@us.ibm.com, tglx@linutronix.de, peterz@infradead.org,
	rostedt@goodmis.org, Valdis.Kletnieks@vt.edu,
	dhowells@redhat.com, eric.dumazet@gmail.com, darren@dvhart.com,
	patches@linaro.org, "Paul E. McKenney" <paul.mckenney@linaro.org>
Subject: Re: [PATCH tip/core/rcu 5/9] rcu: Make RCU use the new is_idle_task() API
Date: Tue, 15 Nov 2011 13:35:14 -0800	[thread overview]
Message-ID: <20111115213514.GC31473@leaf> (raw)
In-Reply-To: <1321388885-11211-5-git-send-email-paulmck@linux.vnet.ibm.com>

On Tue, Nov 15, 2011 at 12:28:01PM -0800, Paul E. McKenney wrote:
> From: Paul E. McKenney <paul.mckenney@linaro.org>
> 
> Change from direct comparison of ->pid with zero to is_idle_task().
> 
> Signed-off-by: Paul E. McKenney <paul.mckenney@linaro.org>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---

Reviewed-by: Josh Triplett <josh@joshtriplett.org>

>  kernel/rcutiny.c |    4 ++--
>  kernel/rcutree.c |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
> index 4e16ce3..e5bd949 100644
> --- a/kernel/rcutiny.c
> +++ b/kernel/rcutiny.c
> @@ -64,7 +64,7 @@ static void rcu_idle_enter_common(long long oldval)
>  		return;
>  	}
>  	RCU_TRACE(trace_rcu_dyntick("Start", oldval, rcu_dynticks_nesting));
> -	if (current->pid != 0) {
> +	if (!is_idle_task(current)) {
>  		struct task_struct *idle = idle_task(smp_processor_id());
>  
>  		RCU_TRACE(trace_rcu_dyntick("Error on entry: not idle task",
> @@ -118,7 +118,7 @@ static void rcu_idle_exit_common(long long oldval)
>  		return;
>  	}
>  	RCU_TRACE(trace_rcu_dyntick("End", oldval, rcu_dynticks_nesting));
> -	if (current->pid != 0) {
> +	if (!is_idle_task(current)) {
>  		struct task_struct *idle = idle_task(smp_processor_id());
>  
>  		RCU_TRACE(trace_rcu_dyntick("Error on exit: not idle task",
> diff --git a/kernel/rcutree.c b/kernel/rcutree.c
> index 49e0783..7fb8b0e 100644
> --- a/kernel/rcutree.c
> +++ b/kernel/rcutree.c
> @@ -355,7 +355,7 @@ static void rcu_idle_enter_common(struct rcu_dynticks *rdtp, long long oldval)
>  		return;
>  	}
>  	trace_rcu_dyntick("Start", oldval, rdtp->dynticks_nesting);
> -	if (current->pid != 0) {
> +	if (!is_idle_task(current)) {
>  		struct task_struct *idle = idle_task(smp_processor_id());
>  
>  		trace_rcu_dyntick("Error on entry: not idle task",
> @@ -449,7 +449,7 @@ static void rcu_idle_exit_common(struct rcu_dynticks *rdtp, long long oldval)
>  	smp_mb__after_atomic_inc();  /* See above. */
>  	WARN_ON_ONCE(!(atomic_read(&rdtp->dynticks) & 0x1));
>  	trace_rcu_dyntick("End", oldval, rdtp->dynticks_nesting);
> -	if (current->pid != 0) {
> +	if (!is_idle_task(current)) {
>  		struct task_struct *idle = idle_task(smp_processor_id());
>  
>  		trace_rcu_dyntick("Error on exit: not idle task",
> -- 
> 1.7.3.2
> 

  reply	other threads:[~2011-11-15 21:35 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-15 20:27 [PATCH tip/core/rcu 0/9] Preview of additional RCU changes for 3.3 Paul E. McKenney
2011-11-15 20:27 ` [PATCH tip/core/rcu 1/9] rcu: Permit RCU_FAST_NO_HZ to be used by TREE_PREEMPT_RCU Paul E. McKenney
2011-11-15 20:27 ` [PATCH tip/core/rcu 2/9] rcu: Add rcutorture system-shutdown capability Paul E. McKenney
2011-11-15 21:46   ` Josh Triplett
2011-11-16 20:32     ` Paul E. McKenney
2011-11-16 22:15       ` Josh Triplett
2011-11-16 22:44         ` Paul E. McKenney
2011-11-16 22:58           ` Josh Triplett
2011-11-16 23:43             ` Paul E. McKenney
2011-11-17  0:48               ` Josh Triplett
2011-11-17  0:49               ` Josh Triplett
2011-11-17  1:40                 ` Paul E. McKenney
2011-11-17 23:57                   ` Josh Triplett
2011-11-18  0:27                     ` Paul E. McKenney
2011-11-15 20:27 ` [PATCH tip/core/rcu 3/9] rcu: Control rcutorture startup from kernel boot parameters Paul E. McKenney
2011-11-15 21:49   ` Josh Triplett
2011-11-16 20:38     ` Paul E. McKenney
2011-11-16 22:17       ` Josh Triplett
2011-11-15 20:28 ` [PATCH tip/core/rcu 4/9] sched: add is_idle_task() to handle invalidated uses of idle_cpu() Paul E. McKenney
2011-11-15 21:13   ` Josh Triplett
2011-11-16 19:54     ` Paul E. McKenney
2011-11-15 20:28 ` [PATCH tip/core/rcu 5/9] rcu: Make RCU use the new is_idle_task() API Paul E. McKenney
2011-11-15 21:35   ` Josh Triplett [this message]
2011-11-15 20:28 ` [PATCH tip/core/rcu 6/9] sparc: Make SPARC " Paul E. McKenney
2011-11-15 21:15   ` David Miller
2011-11-15 20:28 ` [PATCH tip/core/rcu 7/9] kdb: Make KDB " Paul E. McKenney
2011-11-15 20:28 ` [PATCH tip/core/rcu 8/9] events: Make events " Paul E. McKenney
2011-11-15 20:28 ` [PATCH tip/core/rcu 9/9] tile: Make tile " Paul E. McKenney
2011-11-23 17:03   ` Chris Metcalf
2011-11-28 23:02     ` Paul E. McKenney
2011-11-15 21:50 ` [PATCH tip/core/rcu 0/9] Preview of additional RCU changes for 3.3 Josh Triplett
2011-11-16 20:39   ` Paul E. McKenney

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=20111115213514.GC31473@leaf \
    --to=josh@joshtriplett.org \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=akpm@linux-foundation.org \
    --cc=darren@dvhart.com \
    --cc=dhowells@redhat.com \
    --cc=dipankar@in.ibm.com \
    --cc=eric.dumazet@gmail.com \
    --cc=laijs@cn.fujitsu.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=niv@us.ibm.com \
    --cc=patches@linaro.org \
    --cc=paul.mckenney@linaro.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=tglx@linutronix.de \
    /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.