>
> I am not trying to be argumentative. I never got an understanding of
> what was going wrong with that earlier patch and am hoping for some
> understanding now.
Well, if calibrate_delay() calls run in parallel then different hyperthreads
will impact each other.
> Why does it spectacularly miscalibrate? Can anything be done to correct
> that miscalibration? Doesn't this patch indicate another problem with
> the calibration for hotplug cpus? Isn't there already a problem if
> you boot a cpu normally, then hot-remove a hyperthread of a cpu, run a
> userland task which fully loads up all the cores on that socket, then
> hot-add that hyperthread back in? If the lpj value is that volatile,
> what value does it really have?
The typical CPU hotplug usecase is suspend/resume, where we bring down the CPUs
in a more or less controlled manner.
Yes, you could achieve something similar by frobbing /sys/*/*/online but that's
a big difference to *always* running the calibration loops in parallel.
I'd argue for the opposite direction: only calibrate a physical CPU once per
CPU per bootup - this would also make CPU hotplug faster btw.
( Virtual CPUs (KVM, etc.) need a recalibration per bringup, because the new
CPU could be running on different hardware - but that's a detail: 4096 UV
CPUs are not in this category. )
Really, there's no good reason why every CPU should be calibrated on a system
running identical CPUs, right? Mixed-frequency systems are rather elusive on
x86.