mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Chen, Yu C" <yu.c.chen@intel.com>
To: Len Brown <lenb@kernel.org>
Cc: Linux PM list <linux-pm@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	"Zhang, Rui" <rui.zhang@intel.com>
Subject: RE: [PATCH 2/2][RFC] tools/power turbostat: Introduce reliable RAPL display
Date: Fri, 14 Aug 2020 14:34:01 +0000	[thread overview]
Message-ID: <36DF59CE26D8EE47B0655C516E9CE6405F3966F2@SHSMSX103.ccr.corp.intel.com> (raw)
In-Reply-To: <CAJvTdK=niWaTjwPwXaxr6EGfH8vxzJS01e+k5TgknEMPSDYLvQ@mail.gmail.com>

Hi Len,
> From: Len Brown <lenb@kernel.org>
> Sent: Friday, August 14, 2020 5:51 AM
> To: Chen, Yu C <yu.c.chen@intel.com>
> Cc: Linux PM list <linux-pm@vger.kernel.org>; Linux Kernel Mailing List <linux-
> kernel@vger.kernel.org>; Zhang, Rui <rui.zhang@intel.com>
> Subject: Re: [PATCH 2/2][RFC] tools/power turbostat: Introduce reliable RAPL
> display
> 
> why not simply use nanosleep(2)
> 
> 
Do you mean, use nanosleep rather than the timer to accumulate the RAPL data?
After thinking for a while, it looks like if we use nanosleep we might
 need to create a new thread within the turbostat  and sleep every few seconds
 (according to the RAPL register timeout) to accumulate the running RAPL. And might
need to deal with some race conditions between new thread and the main turbostat
thread. But yes, it can be switched to nanosleep() to check if the code would look
simpler.

BTW, we have a v3 of the patch at
https://lore.kernel.org/patchwork/project/lkml/list/?series=439330


Thanks,
Chenyu

> --
> Len Brown, Intel Open Source Technology Center

      reply	other threads:[~2020-08-14 14:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31 18:44 [PATCH 0/2][RFC] Add long time sampling time support Chen Yu
2020-03-31 18:44 ` [PATCH 1/2][RFC] tools/power turbostat: Make the energy variable to be 64 bit Chen Yu
2020-03-31 18:44 ` [PATCH 2/2][RFC] tools/power turbostat: Introduce reliable RAPL display Chen Yu
2020-08-13 21:50   ` Len Brown
2020-08-14 14:34     ` Chen, Yu C [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=36DF59CE26D8EE47B0655C516E9CE6405F3966F2@SHSMSX103.ccr.corp.intel.com \
    --to=yu.c.chen@intel.com \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=rui.zhang@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®