Hi!
> 
> getrusage04 - accuracy of getrusage() with RUSAGE_THREAD
> 
> This program is used for testing the following upstream commit:
> 761b1d26df542fd5eb348837351e4d2f3bc7bffe.
> 
> getrusage() returns cpu resource usage with accuracy of 10ms
> when RUSAGE_THREAD is specified to the argument who. Meanwhile,
> accuracy is 1ms when RUSAGE_SELF is specified. This bad accuracy
> of getrusage() caused a big impact on some application which is
> critical to accuracy of cpu usage. The upstream fix removed
> casts to clock_t in task_u/stime(), to keep granularity of
> cputime_t over the calculation.
> 
> Note that the accuracy on powerpc and s390x systems is always
> 10ms when either RUSAGE_THREAD or RUSAGE_SELF specified, so
> this test won't be executed on those platforms.
> 
> Signed-off-by: Caspar Zhang <[email protected]>
> ---
>  testcases/kernel/syscalls/getrusage/getrusage04.c |  132 
> +++++++++++++++++++++
>  1 files changed, 132 insertions(+), 0 deletions(-)
>  create mode 100644 testcases/kernel/syscalls/getrusage/getrusage04.c

Could you please also add line into corresponding runtest file?

-- 
Cyril Hrubis
[email protected]

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to