All of lore.kernel.org
 help / color / mirror / Atom feed
From: Namhyung Kim <namhyung@kernel.org>
To: Adrian Hunter <adrian.hunter@intel.com>
Cc: Arnaldo Carvalho de Melo <acme@infradead.org>,
	Ingo Molnar <mingo@kernel.org>,
	linux-kernel@vger.kernel.org, David Ahern <dsahern@gmail.com>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Jiri Olsa <jolsa@redhat.com>, Mike Galbraith <efault@gmx.de>,
	Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <peterz@infradead.org>,
	Stephane Eranian <eranian@google.com>
Subject: Re: [PATCH 10/10] perf tests: Use lower sample_freq in sw clock event period test
Date: Tue, 12 Nov 2013 17:40:39 +0900	[thread overview]
Message-ID: <87ob5qui60.fsf@sejong.aot.lge.com> (raw)
In-Reply-To: <5281D3B8.2030104@intel.com> (Adrian Hunter's message of "Tue, 12 Nov 2013 09:07:36 +0200")

Hi Adrian,

On Tue, 12 Nov 2013 09:07:36 +0200, Adrian Hunter wrote:
> On 11/11/13 22:22, Arnaldo Carvalho de Melo wrote:
>> From: Arnaldo Carvalho de Melo <acme@redhat.com>
>>
>> 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

Or else, why not using the max_sample_rate as the freq value?

Thanks,
Namhyung

  reply	other threads:[~2013-11-12  8:40 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 20:22 [GIT PULL 00/10] perf/core improvements and fixes Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 01/10] perf ui tui progress: Don't force a refresh during progress update Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 02/10] perf evsel: Remove idx parm from constructor Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 03/10] perf record: Synthesize non-exec MMAP records when --data used Arnaldo Carvalho de Melo
2013-11-11 20:38   ` David Ahern
2013-11-11 21:02     ` Vince Weaver
2013-11-11 20:22 ` [PATCH 04/10] perf machine: Introduce synthesize_threads method out of open coded equivalent Arnaldo Carvalho de Melo
2013-11-11 20:40   ` David Ahern
2013-11-11 20:50     ` Ingo Molnar
2013-11-12 11:34       ` Arnaldo Carvalho de Melo
2013-11-12 12:44         ` Ingo Molnar
2013-11-12 21:57         ` [tip:perf/urgent] perf target: Shorten perf_target__ to target__ tip-bot for Arnaldo Carvalho de Melo
2014-01-12 18:33         ` [tip:perf/core] perf tools: Rename 'perf_record_opts' to ' record_opts tip-bot for Arnaldo Carvalho de Melo
2014-01-12 18:35         ` [tip:perf/core] perf report: Rename 'perf_report' to 'report' tip-bot for Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 05/10] perf machine: Simplify synthesize_threads method Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 06/10] perf tools: Prevent condition that all sort keys are elided Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 07/10] perf record: Use correct return type for write() Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 08/10] perf record: Move existing write_output into helper function Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 09/10] perf tests: Check return of perf_evlist__open sw clock event period test Arnaldo Carvalho de Melo
2013-11-11 20:22 ` [PATCH 10/10] perf tests: Use lower sample_freq in " Arnaldo Carvalho de Melo
2013-11-11 20:45   ` David Ahern
2013-11-12  7:07   ` Adrian Hunter
2013-11-12  8:40     ` Namhyung Kim [this message]
2013-11-12 11:59       ` Arnaldo Carvalho de Melo
2013-11-12 14:41     ` Arnaldo Carvalho de Melo
2013-11-15  6:03       ` Namhyung Kim
2013-11-12 21:56     ` [tip:perf/urgent] perf tests: Compensate lower sample freq with longer test loop tip-bot for Adrian Hunter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ob5qui60.fsf@sejong.aot.lge.com \
    --to=namhyung@kernel.org \
    --cc=acme@infradead.org \
    --cc=adrian.hunter@intel.com \
    --cc=dsahern@gmail.com \
    --cc=efault@gmx.de \
    --cc=eranian@google.com \
    --cc=fweisbec@gmail.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.