Question on __torture_rt_boost() else clause

From: Paul E. McKenney
Date: Mon Aug 21 2023 - 23:12:56 EST


Hello, Joel!

A quick question for you...

I am doing catch-up additions of locktorture module parameters
to kernel-parameters.txt, and came across rt_boost_factor. The
multiplication by cxt.nrealwriters_stress in the !rt_task(current)
then-clause makes sense: No matter how many writers you have, the
number of boost operations per unit time remains roughly constant.
But I am having some difficulty rationalizing a similar multiplication
in the else-clause. That would seem to leave boosting in effect for
longer times the more writers there were.

Is that the intent?

Also, I am rationalizing the choice of 2 as default for rt_boost by
noting that "mutex" and "ww_mutex_lock" don't do boosting and that
preemption-disabling makes non-RT spinlocks immune from priority
inversion. Is this what you had in mind, or am I off in the weeds here?

I am putting my best guess in the patch, and am including you on CC.

Thanx, Paul