[LTP] [RFC] [PATCH] pselect01: Tune thresholds
Cyril Hrubis
chrubis@suse.cz
Fri May 12 15:59:34 CEST 2017
Hi!
> > Additionally, please keep in mind that on some architectures the
> > time measured is based on the jiffies clock resolution which depends
> > on the CONFIG_HZ value and results in a resolutions of e.g. 0.01,
> > 0.004, or 0.001 seconds which is way above the resolution you get
> > on the x86 platform (with the TSC clock).
> >
> > This testcase was failing for me on the parisc platform because of this inaccuracy.
> >
> > Maybe the resolution of the CLOCK_MONOTONIC clock (which is basically used in this
> > test) should be checked with clock_getres() and it's result included in the calculation?
>
> Right, I've dusted off old pxa270 and indeed we cannot measure less than
> 20us interval there. But clock_getres() returns 10ms which is much more
> than the actuall measured value...
And I did a mistake in conversion, looks like 20ms is minimal time the
pselect() can sleep there while reported precision is 10ms, so adding
2 * clock_monotonic_resolution fixes the test there. I will send v2
for the testcase right away.
--
Cyril Hrubis
chrubis@suse.cz
More information about the ltp
mailing list