Re: Mysterious CFQ crash and RCU

From: Paul E. McKenney
Date: Wed May 25 2011 - 11:33:39 EST


On Wed, May 25, 2011 at 12:17:16PM +0200, Paul Bolle wrote:
> > Polling is fine. Please see attached for a script to poll at 15-second
> > intervals. Please also feel free to adjust, just tell me what you
> > adjusted.
>
> 0) I have not yet tried this script, but I did have a look at it (to see
> what's needed to run it).
>
> 1) All debugfs files it polls come from kernel/rcutree_trace.c. That
> file is written as a module (and will only be built if
> CONFIG_TREE_RCU_TRACE isn't "n"). But in init/Kconfig, the
> TREE_RCU_TRACE config entry is set to "def_bool".
>
> 2) So shouldn't either the config entry be set to "tristate" or the
> module support removed from kernel/rcutree_trace.c?

No.

Just set CONFIG_RCU_TRACE=y and you will have RCU tracing. Here is why:

CONFIG_TREE_RCU_TRACE is defined as follows:

config TREE_RCU_TRACE
def_bool RCU_TRACE && ( TREE_RCU || TREE_PREEMPT_RCU )
select DEBUG_FS
help
This option provides tracing for the TREE_RCU and
TREE_PREEMPT_RCU implementations, permitting Makefile to
trivially select kernel/rcutree_trace.c.

In other words, CONFIG_TREE_RCU_TRACE will be set to "y" if CONFIG_RCU_TRACE=y
and if either CONFIG_TREE_RCU=y or CONFIG_TREE_PREEMPT_RCU=y. If you
are running CONFIG_SMP=y, then we are guaranteed that either
CONFIG_TREE_RCU=y or CONFIG_TREE_PREEMPT_RCU=y, which leaves
CONFIG_RCU_TRACE.

CONFIG_RCU_TRACE is defined as follows:

config RCU_TRACE
bool "Enable tracing for RCU"
help
This option provides tracing in RCU which presents stats
in debugfs for debugging RCU implementation.

Say Y here if you want to enable RCU tracing
Say N if you are unsure.

So you can set CONFIG_RCU_TRACE, and if you are running CONFIG_SMP=y,
you will have RCU tracing in your kernel.

Thanx, Paul
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/