Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clockevent period test

From: Arnaldo Carvalho de Melo
Date: Tue Nov 12 2013 - 09:41:24 EST


Em Tue, Nov 12, 2013 at 09:07:36AM +0200, Adrian Hunter escreveu:
> On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
> > We were using it at 10 kHz, which doesn't work in machines where somehow
> > the max freq was auto reduced by the kernel:
> >
> > [root@ssdandy ~]# perf test 19
> > 19: Test software clock events have valid period values : FAILED!
> > [root@ssdandy ~]# perf test -v 19
> > 19: Test software clock events have valid period values :
> > --- start ---
> > Couldn't open evlist: Invalid argument
> > ---- end ----
> > Test software clock events have valid period values: FAILED!
> > [root@ssdandy ~]#
> >
> > [root@ssdandy ~]# cat /proc/sys/kernel/perf_event_max_sample_rate
> > 7000
> >
> > Reducing it to 500 Hz should be good enough for this test and also
> > shouldn't affect what it is testing.
> >
> > But warn the user if it fails, informing the knob and the freq tried.
>
> Doesn't work for me:
>
> ./perf test -v 19
> 19: Test software clock events have valid period values :
> --- start ---
> mmap size 528384B
> mmap size 528384B
> All (0) samples have period value of 1!
> ---- end ----
> Test software clock events have valid period values: FAILED!
>
> But this fixes it:
>
> diff --git a/tools/perf/tests/sw-clock.c b/tools/perf/tests/sw-clock.c
> index 93a7139..6664a7c 100644
> --- a/tools/perf/tests/sw-clock.c
> +++ b/tools/perf/tests/sw-clock.c
> @@ -9,7 +9,7 @@
> #include "util/cpumap.h"
> #include "util/thread_map.h"
>
> -#define NR_LOOPS 1000000
> +#define NR_LOOPS 10000000

Lower frequency, need to generate more noise, ugh. Adding that, but I
think this test needs to be reworked, Namhyung?

- Arnaldo
--
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/