Re: [PATCH v2 09/10] rcu-tasks: Disable callback contend/collapse messages by default
From: Paul E. McKenney
Date: Tue Nov 10 2026 - 22:52:43 EST
On Tue, Nov 10, 2026 at 06:35:10PM -0800, Song Liu wrote:
> On Wed, Oct 7, 2026 at 1:45 PM Paul E. McKenney <paulmck@xxxxxxxxxx> wrote:
> [...]
> > index 627295396cd91..fcac7361ec51e 100644
> > --- a/kernel/rcu/tasks.h
> > +++ b/kernel/rcu/tasks.h
> > @@ -178,6 +178,8 @@ static int rcu_task_contend_lim __read_mostly = 100;
> > module_param(rcu_task_contend_lim, int, 0444);
> > static int rcu_task_collapse_lim __read_mostly = 10;
> > module_param(rcu_task_collapse_lim, int, 0444);
> > +static bool rcu_task_collapse_debug __read_mostly;
> > +module_param(rcu_task_collapse_debug, bool, 0644);
> > static int rcu_task_lazy_lim __read_mostly = 32;
> > module_param(rcu_task_lazy_lim, int, 0444);
>
> Rookie question: Instead of adding a new module_param and gating the
> pr_info with it, can we use pr_debug here?
Good question, actually. If it is OK for everyone (not just our
employer!) for the global pr_debug() control to also control this,
that would be fewer lines of code.
This one is already in mainline. If you feel strongly enough about it and
are sure that pr_debug() works globally, would you like to send a patch?
Thanx, Paul
> Thanks,
> Song
>
>
> > @@ -390,7 +392,8 @@ static void call_rcu_tasks_generic(struct rcu_head *rhp, rcu_callback_t func,
> > WRITE_ONCE(rtp->percpu_enqueue_shift, 0);
> > WRITE_ONCE(rtp->percpu_dequeue_lim, rcu_task_cpu_ids);
> > smp_store_release(&rtp->percpu_enqueue_lim, rcu_task_cpu_ids);
> > - pr_info("Switching %s to per-CPU callback queuing.\n", rtp->name);
> > + if (data_race(rcu_task_collapse_debug))
> > + pr_info("Switching %s to per-CPU callback queuing.\n", rtp->name);
> [...]