powerpc64 head -r344018 stuck sleeping problems: th->th_scale * tc_delta(th) overflows unsigned 64 bits sometimes [patched failed]

Konstantin Belousov kostikbel at gmail.com
Sat Mar 2 10:57:02 UTC 2019


On Fri, Mar 01, 2019 at 02:11:33PM -0700, Ian Lepore wrote:
> On Fri, 2019-03-01 at 20:57 +0000, Poul-Henning Kamp wrote:
> > --------
> > In message <679402FF-907C-43AF-B18C-8C9CC857D7A6 at yahoo.com>, Mark
> > Millard via freebsd-hackers writes:
> > 
> > > > I must admit that 2 seconds of interval where the timehands where
> > > > not updated is too much.
> > 
> > I have no idea how you got in that situation, but it is very far
> > from how timecounters were designed to work.
> > 
> 
> I wonder if it's fallout from reducing the number of timehands to 2,
> which always struck me as a really bad idea. I know of at least one arm
> configuration which fails because of it (it takes a combo of a single-
> core system, and a pps capture driver that uses hardware latching of
> the timer and the polling method for reading the latched value; given
> all that, at least 4 sets of timehands are needed to avoid losing PPS
> events due to generation changes).

Using more than two timehands increases a chance of reader to try to
use outdated timehands.  In theory, on the hardware with very high
inter-core propagation (e.g. with sufficiently large store buffers)
it is possible for other CPU to use non-current timehands.  More
timehands you have, larger is the relative error.

If you have very specific configuration which contradicts to the typical
modern hardware configuration, I do not see a problem restoring some more
timehands entries under a config option.


More information about the freebsd-hackers mailing list