Re: [PATCH v3 1/2] kernel: time: Add udelay_test module to validate udelay

From: Doug Anderson
Date: Thu Jun 12 2014 - 18:54:25 EST


David,

On Thu, Jun 12, 2014 at 1:13 PM, David Riley <davidriley@xxxxxxxxxxxx> wrote:
> Create a module that allows udelay() to be executed to ensure that
> it is delaying at least as long as requested (with a little bit of
> error allowed).
>
> There are some configurations which don't have reliably udelay
> due to using a loop delay with cpufreq changes which should use
> a counter time based delay instead. This test aims to identify
> those configurations where timing is unreliable.
>
> Signed-off-by: David Riley <davidriley@xxxxxxxxxxxx>
> ---
> kernel/time/Kconfig | 7 ++
> kernel/time/Makefile | 1 +
> kernel/time/udelay_test.c | 170 ++++++++++++++++++++++++++++++++++++++++++++++
> 3 files changed, 178 insertions(+)

Looks good to me. Also properly demonstrates that utter brokenness
that is udelay on exynos5420 and exynos5800 right now upstream, like:

171 usecs x 100: exp=171000 allowed=170145 min=57791 avg=61586
max=435750 FAIL=99

...the same kernel on exynos5250 shows all passes (though I didn't
stress the low speeds where there are known problems due to the
intermediate freq transition).

Reviewed-by: Doug Anderson <dianders@xxxxxxxxxxxx>
Tested-by: Doug Anderson <dianders@xxxxxxxxxxxx>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/