From: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
To: Doug Smythies <dsmythies@telus.net>,
"'Rafael J. Wysocki'" <rafael@kernel.org>
Cc: "'Rafael J. Wysocki'" <rjw@rjwysocki.net>,
'Linux Kernel Mailing List' <linux-kernel@vger.kernel.org>,
'Linux PM' <linux-pm@vger.kernel.org>
Subject: Re: [Resend][PATCH V2] cpufreq: intel_pstate: allow trace in passive mode
Date: Fri, 05 Jan 2018 13:06:46 -0800 [thread overview]
Message-ID: <1515186406.26317.38.camel@linux.intel.com> (raw)
In-Reply-To: <001501d38661$f82af1b0$e880d510$@net>
On Fri, 2018-01-05 at 12:15 -0800, Doug Smythies wrote:
> >
[...]
> On 2017.12.18 16:25 Rafael J. Wysocki wrote:
> > > > + from = cpu->pstate.current_pstate;
> > > > + time = ktime_get();
> > > > + sample_taken = intel_pstate_sample(cpu, time);
> > > > +
> > > This is quite a bit of overhead for tracing.
> Yes, it is a bit of added code, but without tracing abilities I
> do not know how to investigate passive operation.
>
> >
> > >
> > > Why not fold the above two
> > > statements in the next if () with conditional tracing?
> No, I specifically want to do a trace sample, even if the target
> is the same as last time. Why? Because we want to know the time
> between calls to the driver, i.e. the duration. That information
> is incredibly useful.
I am not saying you don't need trace. But you can do all processing
when just trace is enabled. Which can be done by
if (trace_pstate_sample_enabled())
The above function should return true when trace is enabled.
So in your v3,
in intel_cpufreq_trace() you can simply return if
trace_pstate_sample_enabled() is false, without
calling intel_pstate_sample().
Thanks,
Srinivas
prev parent reply other threads:[~2018-01-05 21:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-16 0:43 [Resend][PATCH V2] cpufreq: intel_pstate: allow trace in passive mode Doug Smythies
2017-12-18 23:30 ` Srinivas Pandruvada
2017-12-19 0:24 ` Rafael J. Wysocki
2018-01-05 20:15 ` Doug Smythies
2018-01-05 21:06 ` Srinivas Pandruvada [this message]
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=1515186406.26317.38.camel@linux.intel.com \
--to=srinivas.pandruvada@linux.intel.com \
--cc=dsmythies@telus.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=rjw@rjwysocki.net \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).