From: "Chakravarty, Souvik K" <souvik.k.chakravarty@intel.com>
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Platform Driver <platform-driver-x86@vger.kernel.org>,
"dvhart@infradead.org" <dvhart@infradead.org>,
Andy Shevchenko <andy@infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Bhardwaj, Rajneesh" <rajneesh.bhardwaj@intel.com>
Subject: RE: [PATCH v2 2/4] platform/x86: intel_telemetry: Fix suspend stats
Date: Fri, 24 Nov 2017 02:51:08 +0000 [thread overview]
Message-ID: <5F7315E704FA0841B5DFCE90329B2BB46629311B@BGSMSX102.gar.corp.intel.com> (raw)
In-Reply-To: <CAHp75VeghsstATQ2YE2MyvbWf9etmRY9HMksiNo+Xe_jUQezvg@mail.gmail.com>
On Fri, November 24, 2017 at 2:55 AM, Andy Shevchenko <andy.shevchenko@gmail.com> wrote:
> On Tue, Nov 21, 2017 at 4:36 PM, Souvik Kumar Chakravarty
> <souvik.k.chakravarty@intel.com> wrote:
> > Suspend stats are not reported consistently due to a limitation in the
> > PMC firmware. This limitation causes a delay in updating the s0ix
> > counters and residencies in the telemetry log upon s0ix exit. As a
> > consequence, reading these counters from the suspend-exit notifier may result
> in zero read.
> >
> > This patch fixes this issue by cross-verifying the s0ix residencies
> > from the GCR TELEM registers in case the counters are not incremented
> > in the telemetry log after suspend.
> >
> > This fixes https://bugzilla.kernel.org/show_bug.cgi?id=197833
> >
> > We also remove unnecessary 'static' qualifiers from local variables.
> >
> > Reported-and-tested-by: Rajneesh Bhardwaj
> > <rajneesh.bhardwaj@intel.com>
> > Signed-off-by: Souvik Kumar Chakravarty
> > <souvik.k.chakravarty@intel.com>
>
> > - static u32 suspend_shlw_ctr_exit, suspend_deep_ctr_exit;
> > - static u64 suspend_shlw_res_exit, suspend_deep_res_exit;
> > struct telemetry_debugfs_conf *conf = debugfs_conf;
> > + u32 suspend_shlw_ctr_exit, suspend_deep_ctr_exit;
> > + u64 suspend_shlw_res_exit, suspend_deep_res_exit;
> > int ret, index;
>
> > + if (suspend_shlw_ctr_exit == suspend_shlw_ctr_temp &&
> > + suspend_deep_ctr_exit == suspend_deep_ctr_temp) {
>
> kbuildbot is absolutely right. How this code is supposed to work? It's flaky.
suspend_shlw_ctr_exit & suspend_deep_ctr_exit have already been initialized before this comparison (comparing the counters before and after sleep).
I will explicitly initialize them so that kbuildbot does not complain.
>
> Please, redesign this approach.
>
> --
> With Best Regards,
> Andy Shevchenko
next prev parent reply other threads:[~2017-11-24 2:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-21 14:36 [PATCH v2 0/4] platform/x86: intel_telemetry: Fix logs and formatting Souvik Kumar Chakravarty
2017-11-21 14:36 ` [PATCH v1 1/4] platform/x86: intel_pmc_ipc: Add readq API for GCR Souvik Kumar Chakravarty
2017-11-23 21:17 ` Andy Shevchenko
2017-11-21 14:36 ` [PATCH v2 2/4] platform/x86: intel_telemetry: Fix suspend stats Souvik Kumar Chakravarty
2017-11-22 22:09 ` kbuild test robot
2017-11-23 21:25 ` Andy Shevchenko
2017-11-24 2:51 ` Chakravarty, Souvik K [this message]
2017-11-21 14:36 ` [PATCH v2 3/4] platform/x86: intel_telemetry: Improve S0ix logs Souvik Kumar Chakravarty
2017-11-21 14:36 ` [PATCH v2 4/4] platform/x86: intel_telemetry: Remove redundancies Souvik Kumar Chakravarty
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=5F7315E704FA0841B5DFCE90329B2BB46629311B@BGSMSX102.gar.corp.intel.com \
--to=souvik.k.chakravarty@intel.com \
--cc=andy.shevchenko@gmail.com \
--cc=andy@infradead.org \
--cc=dvhart@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
--cc=rajneesh.bhardwaj@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®