[LTP] [PATCH] syscalls/perf_event_open03: skip test on slower systems

Li Wang liwang@redhat.com
Thu Feb 24 02:34:41 CET 2022


On Wed, Feb 23, 2022 at 10:09 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> Hi!
> > Generally, this method looks good, but maybe better to limit this
> > check_progress() only perform on -debug kernel?  Otherwise,
>
> I guess that it may be pretty useful on embedded systems as well. Having
> TCONF message with "system too slow" rather than a timeout sounds like
> an improvement to me.
>

Yes, sounds reasonable.



>
> > Reviewed-by: Li Wang <liwang@redhat.com>
> >
> >
> > ======= FYI ==========
> > I'm seeking a fair way to make a global evaluation of the test
> > system to reset timeout dynamically for the whole LTP.
> >
> > My original design thoughts:
> >
> >   Create the numbers of threads equal to CPUs and bind them to
> >   the corresponding cpu for running. Use mutex lock to sync up
> >   each thread launch at the same time to collect the basic data
> >   for their CPU. Then we can compare the CPU state under the idle or
> >   busy time to get a relatively stationary _value_ to measure the system
> >   performance.
> >
> > But so far the test method is not stable&reliable as expected.
> >
> >   // do float computing + dirty 10*pagesz memory  in a limited times
> >   one_unit_of_operation();
> >
> >   // count the CPU looping numbers with (type = idel, calcu)
> >   // and call one_unit_opertaion() in 1 sec
> >   cpu_1sec_looping(int type);
> >
> >   idlespeed_loops = cpu_1sec_looping(idel);
> >   calculate_loops = cpu_1sec_looping(calcu);
> >   ...
> >   // count the _value_ from all CPU average loops
> >   ratio = calculate_avg / idealspeed_avg;
>
> I'm not sure how useful this would be, I guess that the speed of
> different syscalls will differ quite a bit on different kernel versions.
> Maybe the whole system is too complex and cannot be described by
> something as simple as this. But I guess that we will not know unless we
> try.
>

That's right, after try with many times locally I realized that we probably
need a general-purpose function or macro that can pass with a kind of
syscall to get the performance value of it. But that needs more
consideration
and practice, so I add this to my long-term TODO list.

-- 
Regards,
Li Wang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linux.it/pipermail/ltp/attachments/20220224/f69b1e27/attachment-0001.htm>


More information about the ltp mailing list