On Fri, Aug 25, 2023 at 02:55:38AM +0000, Joel Fernandes wrote: > On Wed, Aug 23, 2023 at 02:07:55PM -0700, Paul E. McKenney wrote: > > On Wed, Aug 16, 2023 at 08:49:12PM +0000, Joel Fernandes (Google) wrote: > > > In the past, we see that spinning on schedule_timeout* with a wait of 1 > > > jiffie can hang the kernel. See d52d3a2bf408 ("torture: Fix hang during > > > kthread shutdown phase"). > > > > > > Recently again it showed up in torture's stutter code as well. The behavior is > > > the the function may instantly return and never go to sleep preempting whatever > > > was running under it. > > > > > > To prevent future issues, apply the same fix mentioned in the above > > > commit d52d3a2bf408 to more places. > > > > > > I took care to only apply it to places where I thought it made sense. > > > > > > Signed-off-by: Joel Fernandes (Google) <joel@xxxxxxxxxxxxxxxxx> > > > > Hearing no objections, I applied this for further review and testing. > > > > In the future, should some of these become hrtimers? > > Yes they certainly could be but we don't need these ones to be high > resolution AFAICS and the jiffie granularity should be good. True, but wouldn't avoiding the repeated wakeups, even at the lower frequency, be of some value? Thanx, Paul