Re: [LTP] [PATCH] getrusage/getrusage04.c: Fix factor_nr = 1 -> factor_nr = 5

chrubis
2013-10-15T14:39:40Z

Hi!
> > The problem with the test is that it tries to assert that granurality of
> > gerusage CPU time accounting is as good as possible. The granularity
> > itself depends on kernel config options, mainly on CONFIG_HZ. But as the
> > kernel compilation options are not exported (by running kernel) in any
> > reliable way the code I've added tries to guess them by side channel
> > (the CLOCK_REALTIME_COARSE resolution). If CLOCK_REALTIME_COARSE is not
> > supported it goes with 4ms which should correspond with CONFIG_HZ=250.
> >
> > Now the accuracy on xen may be off for several reasons. It can have
> > CONFIG_HZ=100. Or xen may not be able to account virtual CPU time with
> > the same accuracy as on the real CPU...
>
> Drew (from xen team) mentioned something along these lines as well.
>
> Do we have some simple way to detect that test is running on xen (dom0/domU),
> so we could end test with TCONF in that case?

I'm not aware of any. But feel free to add a function into LTP lib/.

--
Cyril Hrubis
chrubis@suse.cz

------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register >