linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jason Wessel <jason.wessel@windriver.com>
To: paulmck@linux.vnet.ibm.com
Cc: linux-kernel@vger.kernel.org,
	kgdb-bugreport@lists.sourceforge.net,
	Dipankar Sarma <dipankar@in.ibm.com>, Ingo Molnar <mingo@elte.hu>
Subject: Re: [RFC PATCH 2/2] rcu,debug_core: allow the kernel debugger to reset the rcu stall timer
Date: Mon, 09 Aug 2010 13:26:19 -0500	[thread overview]
Message-ID: <4C60484B.8030002@windriver.com> (raw)
In-Reply-To: <20100809174353.GH3026@linux.vnet.ibm.com>

On 08/09/2010 12:43 PM, Paul E. McKenney wrote:
> On Mon, Aug 09, 2010 at 12:12:12AM -0500, Jason Wessel wrote:
>
>> +void rcu_cpu_stall_reset(void)
>> +{
>> +    rcu_sched_state.jiffies_stall = 0;
>> +    rcu_bh_state.jiffies_stall = 0;
>> +}
>> +
>
> OK, so you are suppressing RCU CPU stall warnings for rcu_sched and
> rcu_bh, but not for preemptible RCU.  I believe that you want all of
> them covered.
>

What is the state variable for the preemptible RCU I had not hit a
warning in my testing so I must needs some more test cases. :-)

> I have a number of recent patches that allow RCU CPU stall warnings to
> be suppressed, one of which allows them to be suppressed using sysfs.
> Would that work for you, or do you need an in-kernel interface?
>

We need an in-kernel interface for sure.

> If you do need an in-kernel interface, I could export (and probably
> rename) rcu_panic(), which is a static in 2.6.35.  This assumes that you
> never want to re-enable RCU CPU stall warnings once you suppress them,
> which is what your patch appears to do.
>
> So, if I export a suppress_rcu_cpu_stall() function that permanently
> disabled RCU CPU stall warnings, would that work for you?  (They could
> be manually re-enabled via sysfs.)
>

This is an RFC patch for a reason.  The intent behind the interface is
to allow for one stall check cycle to go by after resuming kernel
execution and after that the normal rules are in play.  Code flow
wise, it looked like the easiest thing to do was set the jiffies_stall
value to zero and then exit when the.  The patch I created was
supposed to only ignore one stall cycle.

Here is the pseudo code.

/* before restarting kernel execution zero out the jiffies_stall  value.

__rcu_pending() {

    check_cpu_stall();  <- Here we check if the stall val is set to zero
and just return
    /* do all normal work */

}

In the normal flow of things rc_start_gp() will ultimately call
record_gp_stall_check_time which updates the jiffies_stall back to non
zero and the stall accounting is back in play.


Jason.

  reply	other threads:[~2010-08-09 18:27 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-09  5:12 [RFC PATCH 0/2] RCU stall handler for kernel debugger Jason Wessel
2010-08-09  5:12 ` [RFC PATCH 1/2] debug_core: move all watch dog syncs to a single function Jason Wessel
2010-08-09  5:12   ` [RFC PATCH 2/2] rcu,debug_core: allow the kernel debugger to reset the rcu stall timer Jason Wessel
2010-08-09 17:43     ` Paul E. McKenney
2010-08-09 18:26       ` Jason Wessel [this message]
2010-08-09 19:01         ` Paul E. McKenney
2010-08-11  4:01           ` Paul E. McKenney
2010-08-11 14:07             ` Jason Wessel
2010-08-11 16:32               ` Paul E. McKenney
2018-06-19 21:18     ` Paul E. McKenney
2018-06-20  9:55   ` [Kgdb-bugreport] [RFC PATCH 1/2] debug_core: move all watch dog syncs to a single function Daniel Thompson

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=4C60484B.8030002@windriver.com \
    --to=jason.wessel@windriver.com \
    --cc=dipankar@in.ibm.com \
    --cc=kgdb-bugreport@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=paulmck@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;
as well as URLs for NNTP newsgroup(s).