All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>,
	Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [PATCH i-g-t 3/3] tools: Allow user to set poll delay in i915 perf recorder
Date: Wed, 25 Mar 2020 21:20:37 +0200	[thread overview]
Message-ID: <8840762f-5e2f-3d07-d84a-c2a79e62b091@intel.com> (raw)
In-Reply-To: <87ftdwtfsf.wl-ashutosh.dixit@intel.com>

On 25/03/2020 21:06, Dixit, Ashutosh wrote:
> On Thu, 19 Mar 2020 15:52:54 -0700, Umesh Nerlige Ramappa wrote:
>> Add poll delay parameter to the i915-perf-recorder tool so that the user
>> can set the frequency of the poll timer that checks for available
>> reports in the OA buffer.
>>
>> v2:
>> - Change poll period parameter type to match kernel interface (Lionel)
>> - Update to use poll period in the code (Ashutosh)
>>
>> Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
>> Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
>> ---
>>   tools/i915-perf/i915_perf_recorder.c | 37 +++++++++++++++++++++++++---
>>   1 file changed, 34 insertions(+), 3 deletions(-)
>>
>> diff --git a/tools/i915-perf/i915_perf_recorder.c b/tools/i915-perf/i915_perf_recorder.c
>> index 6bbc451e..ca4f13ea 100644
>> --- a/tools/i915-perf/i915_perf_recorder.c
>> +++ b/tools/i915-perf/i915_perf_recorder.c
>> @@ -374,6 +391,11 @@ perf_open(struct recording_context *ctx)
>> 	properties[p++] = DRM_I915_PERF_PROP_OA_EXPONENT;
>> 	properties[p++] = ctx->oa_exponent;
>>
>> +	if (revision >= 4) {
> Isn't this revision >= 5?


Well spotted :)


>
>> @@ -720,7 +742,10 @@ usage(const char *name)
>> 		"                                       (To use with i915-perf-control)\n"
>> 		"     --output,             -o <path>   Output file (default = i915_perf.record)\n"
>> 		"     --cpu-clock,          -k <path>   Cpu clock to use for correlations\n"
>> -		"                                       Values: boot, mono, mono_raw (default = mono)\n",
>> +		"                                       Values: boot, mono, mono_raw (default = mono)\n"
>> +		"     --poll-delay          -P <value>  Polling interval in microseconds used by a timer in the driver to query\n"
> Call this poll-period too?
>
>> @@ -788,9 +814,11 @@ main(int argc, char *argv[])
>>
>> 		.command_fifo = I915_PERF_RECORD_FIFO_PATH,
>> 		.command_fifo_fd = -1,
>> +
>> +		.poll_period = 5 * 1000 * 1000,
> Put a comment above that this is 5 ms?
>
> Otherwise, one thing missing in the patch is that if timer poll period is
> long we may need a larger buffer than the 4K buffer being used in
> write_i915_perf_data(). To address this I have just posted the following
> i915 patch:
>
> https://patchwork.freedesktop.org/series/75085/


write_i915_perf_data() just pulls the data and writes it back into the output.
It doesn't matter that it's 4k, it just needs to be bigger enough to hold at least one report.

-Lionel

>
> So I think we should not increase the size of the buffer here but use the
> kernel patch above to handle the small user read buffer
> situation. Thoughts?
> --
> Ashutosh


_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2020-03-25 19:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-19 22:52 [igt-dev] [PATCH i-g-t 0/3] Test configurable poll delay in perf OA Umesh Nerlige Ramappa
2020-03-19 22:52 ` [igt-dev] [PATCH i-g-t 1/3] include/drm-uapi: Update i915_drm.h for perf OA APIs Umesh Nerlige Ramappa
2020-03-25 19:16   ` Dixit, Ashutosh
2020-03-19 22:52 ` [igt-dev] [PATCH i-g-t 2/3] tests/perf: new tests for parameterized OA buffer polling Umesh Nerlige Ramappa
2020-03-25 19:37   ` Dixit, Ashutosh
2020-03-19 22:52 ` [igt-dev] [PATCH i-g-t 3/3] tools: Allow user to set poll delay in i915 perf recorder Umesh Nerlige Ramappa
2020-03-25 19:06   ` Dixit, Ashutosh
2020-03-25 19:20     ` Lionel Landwerlin [this message]
2020-03-25 19:54       ` Dixit, Ashutosh
2020-03-19 23:36 ` [igt-dev] ✓ Fi.CI.BAT: success for Test configurable poll delay in perf OA (rev3) Patchwork
2020-03-20  2:35 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork
  -- strict thread matches above, loose matches on Subject: below --
2020-03-13 19:53 [igt-dev] [PATCH i-g-t 0/3] Test configurable poll delay in perf OA Umesh Nerlige Ramappa
2020-03-13 19:53 ` [igt-dev] [PATCH i-g-t 3/3] tools: Allow user to set poll delay in i915 perf recorder Umesh Nerlige Ramappa
2020-03-16  9:52   ` Lionel Landwerlin

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=8840762f-5e2f-3d07-d84a-c2a79e62b091@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=ashutosh.dixit@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=umesh.nerlige.ramappa@intel.com \
    /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.