Re: [PATCH 25/28] hazptr: Select TRACING for HAZPTR_TORTURE_TEST to enable tracepoint

From: KunWu Chan

Date: Thu Nov 12 2026 - 12:17:07 EST


On Wed, Nov 11, 2026 at 5:50 AM Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
>
> On Thu, Nov 05, 2026 at 12:54:43AM +0800, Kunwu Chan wrote:
> > The hazptr torture test registers the hazptr_waiter_enqueue
> > tracepoint for its hot-address scenario; select TRACING so
> > that the register_trace_*() API is available.
> >
> > Signed-off-by: Kunwu Chan <kunwu.chan@xxxxxxxxx>
>
> It is useful to run the torture tests without CONFIG_TRACING=y in order
> to quickly isolate RCU bugs that tracing related. Is there a way to do
> this so that people wanting to register tracing can do so, but so that
> it is still easy to run the tests without tracing?
>

Agreed. Only the HOTADDR and LONGHOLD scenarios need the enqueue
tracepoint; the other hazptrtorture scenarios should remain usable
without tracing.

I'll drop the select TRACING changes, make the tracepoint-dependent
scenarios conditional on CONFIG_TRACING, and enable tracing
explicitly in their scripted runs.

Thanks,
Kunwu

> Thanx, Paul
>
> > ---
> > kernel/rcu/Kconfig.debug | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/kernel/rcu/Kconfig.debug b/kernel/rcu/Kconfig.debug
> > index b500e96ea1c1..8fc6434a05d1 100644
> > --- a/kernel/rcu/Kconfig.debug
> > +++ b/kernel/rcu/Kconfig.debug
> > @@ -27,6 +27,7 @@ config RCU_SCALE_TEST
> > tristate "performance tests for RCU"
> > depends on DEBUG_KERNEL
> > select TORTURE_TEST
> > + select TRACING
> > default n
> > help
> > This option provides a kernel module that runs performance
> > @@ -42,6 +43,7 @@ config RCU_TORTURE_TEST
> > tristate "torture tests for RCU"
> > depends on DEBUG_KERNEL
> > select TORTURE_TEST
> > + select TRACING
> > default n
> > help
> > This option provides a kernel module that runs torture tests
> > @@ -102,6 +104,7 @@ config RCU_REF_SCALE_TEST
> > tristate "Scalability tests for read-side synchronization (RCU and others)"
> > depends on DEBUG_KERNEL
> > select TORTURE_TEST
> > + select TRACING
> > default n
> > help
> > This option provides a kernel module that runs performance tests
> > @@ -117,6 +120,7 @@ config HAZPTR_TORTURE_TEST
> > tristate "Torture tests for hazard pointers"
> > depends on DEBUG_KERNEL
> > select TORTURE_TEST
> > + select TRACING
> > default n
> > help
> > This option provides in-kernel hazard-pointer stress tests.
> > --
> > 2.43.0
> >