How to turn scheduler tick on for current nohz_full CPU?

From: Paul E. McKenney
Date: Wed Jul 24 2019 - 07:53:48 EST


One of the callback-invocation forward-progress issues turns out to
be nohz_full CPUs not turning their scheduling-clock interrupt back on
when running in kernel mode. Given that callback floods can cause RCU's
callback-invocation loop to run for some time, it would be good for this
loop to re-enable this interrupt. Of course, this problem applies to
pretty much any kernel code that might loop for an extended time period,
not just RCU.

I took a quick look at kernel/time/tick-sched.c and the closest thing
I found was tick_nohz_full_kick_cpu(), except that (1) it isn't clear
that this does much when invoked on the current CPU and (2) it doesn't
help in rcutorture TREE04. In contrast, disabling NO_HZ_FULL and using
RCU_NOCB_CPU instead works quite well.

So what should I be calling instead of tick_nohz_full_kick_cpu() to
re-enable the current CPU's scheduling-clock interrupt?

Thanx, Paul