Re: Why was the timehands_count sysctl added?

From: Konstantin Belousov <kostikbel_at_gmail.com>
Date: Sat, 09 Oct 2021 21:21:39 UTC
On Sat, Oct 09, 2021 at 09:07:29PM +0000, Poul-Henning Kamp wrote:
> --------
> Warner Losh writes:
> 
> > > To allow for experimentation, and to satisfy some requests where people
> > > wanted to have more that 2 timehands.
> >
> > When would someone want that? What's the use case?
> 
> The reason there were originally 10 timehands was that latency in
> the early SMP kernels was ... ehh ... variable ... and some of the
> time-counters rolled over quite fast compared to that.
> 
> I really hope no relevant current hardware has that problem.

The current algorithm to read timehands is resilient to the wrap-out
of the current hand.  You really need to experience enourmous delays
in the reader loop to make it lock-step with tc_windup() updates,
in which case it could indeed be better to have more than two timehands.

I believe it was Ian who reported that 16 timehands worked better for him
than 2.