[lkml]   [2020]   [Aug]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRE: [PATCH 2/2][RFC] tools/power turbostat: Introduce reliable RAPL display
Hi Len,
> From: Len Brown <>
> Sent: Friday, August 14, 2020 5:51 AM
> To: Chen, Yu C <>
> Cc: Linux PM list <>; Linux Kernel Mailing List <linux-
>>; Zhang, Rui <>
> 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

BTW, we have a v3 of the patch at


> --
> Len Brown, Intel Open Source Technology Center
 \ /
  Last update: 2020-08-14 16:35    [W:0.059 / U:0.092 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site