public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Li Zhong <zhong@linux.vnet.ibm.com>
Cc: LKML <linux-kernel@vger.kernel.org>, dipankar@in.ibm.com
Subject: Re: [PATCH rcu] Move TINY_RCU quiescent state out of extended quiescent state
Date: Thu, 20 Sep 2012 20:04:22 -0700	[thread overview]
Message-ID: <20120921030422.GB2458@linux.vnet.ibm.com> (raw)
In-Reply-To: <1348193336.2371.76.camel@ThinkPad-T420>

On Fri, Sep 21, 2012 at 10:08:56AM +0800, Li Zhong wrote:
> TINY_RCU's rcu_idle_enter_common() invokes rcu_sched_qs() in order
> to inform the RCU core of the quiescent state implied by idle entry.
> Of course, idle is also an extended quiescent state, so that the call
> to rcu_sched_qs() speeds up RCU's invoking of any callbacks that might
> be queued.  This speed-up is important when entering into dyntick-idle
> mode -- if there are no further scheduling-clock interrupts, the callbacks
> might never be invoked, which could result in a system hang.
> 
> However, processing callbacks does event tracing, which in turn
> implies RCU read-side critical sections, which are illegal in extended
> quiescent states.  This patch therefore moves the call to rcu_sched_qs()
> so that it precedes the point at which we set the new value of 
> rcu_dynticks_nesting, which may indicate RCU is in an extended quiescent
> state. 

Thank you, Zhong.  Queued, as those checking the SOBs below might
guess.  ;-)

							Thanx, paul

> Signed-off-by: Li Zhong <zhong@linux.vnet.ibm.com>
> Signed-off-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
> ---
>  kernel/rcutiny.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/kernel/rcutiny.c b/kernel/rcutiny.c
> index 2e073a2..e4c6a59 100644
> --- a/kernel/rcutiny.c
> +++ b/kernel/rcutiny.c
> @@ -75,9 +75,9 @@ static void rcu_idle_enter_common(long long newval)
>  			  current->pid, current->comm,
>  			  idle->pid, idle->comm); /* must be idle task! */
>  	}
> +	rcu_sched_qs(0); /* implies rcu_bh_qsctr_inc(0) */
>  	barrier();
>  	rcu_dynticks_nesting = newval;
> -	rcu_sched_qs(0); /* implies rcu_bh_qsctr_inc(0) */
>  }
> 
>  /*
> -- 
> 1.7.9.5
> 
> 
> 


      reply	other threads:[~2012-09-21  3:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-21  2:08 [PATCH rcu] Move TINY_RCU quiescent state out of extended quiescent state Li Zhong
2012-09-21  3:04 ` 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=20120921030422.GB2458@linux.vnet.ibm.com \
    --to=paulmck@linux.vnet.ibm.com \
    --cc=dipankar@in.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=zhong@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox