* Re: [PATCH] turbostat: Running on virtual machine is not supported
[not found] ` <CAJvTdKmZqPkvUrgEJitYrBv7EJzpemLjN-nfYUnT3b127LNSQA@mail.gmail.com>
@ 2017-07-28 11:54 ` Prarit Bhargava
2017-08-05 6:50 ` Len Brown
0 siblings, 1 reply; 2+ messages in thread
From: Prarit Bhargava @ 2017-07-28 11:54 UTC (permalink / raw)
To: Len Brown, Henrique de Moraes Holschuh
Cc: linux-kernel@vger.kernel.org, Len Brown, linux-pm@vger.kernel.org
On 07/26/2017 11:09 PM, Len Brown wrote:
> Henrique,
>
> I like your suggestion, thanks!
>
> BTW. let's discuss (and patch) turbostat on linux-pm, rather than on lkml.
>
> thanks,
> -Len
>
>
> On Tue, Jul 25, 2017 at 11:59 AM, Henrique de Moraes Holschuh
> <hmh@hmh.eng.br> wrote:
>> On Tue, 25 Jul 2017, Prarit Bhargava wrote:
>>> A common way of determining if the system is a virtual machine is to
>>> search /proc/cpuinfo flags entry for "hypervisor". turbostat must output
>>> a proper error message when found.
>>
>> Maybe you could output that message only if it fails to both use
>> /dev/msr and perf *and* it is under a virtual machine? That would have
>> better forward compatibility, maybe someday /dev/msr or perf will work
>> inside a VM for what turbostat needs...
To answer Len's previous question: I was wrong in my description. perf does
work (mostly) under virt. So this would only be for the msr code. I'll post a
v2 to linux-pm, and take Henrique's suggestion to only trigger on an msr read
failure.
P.
>>
>> --
>> Henrique Holschuh
>
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] turbostat: Running on virtual machine is not supported
2017-07-28 11:54 ` [PATCH] turbostat: Running on virtual machine is not supported Prarit Bhargava
@ 2017-08-05 6:50 ` Len Brown
0 siblings, 0 replies; 2+ messages in thread
From: Len Brown @ 2017-08-05 6:50 UTC (permalink / raw)
To: Prarit Bhargava
Cc: Henrique de Moraes Holschuh, Len Brown, linux-pm@vger.kernel.org
> perf does work (mostly) under virt.
Let's hold off on this patch for a bit till the port to perf is ready,
since this logic is going to change slightly.
I think something like this:
1. make the debug info (the stuff hidden with --quiet) optional
don't bail out if it fails. (but continue to bail out of anything
that is needed to provide a column fails)
2. attempt the faster of /dev/msr or perf first, and try the 2nd
only when the 1st doesn't work.
(currently /dev/msr is faster, but I'm not done w/ the perf work)
3. When neither /dev/msr or perf work, then check for virt
to see if it may be the cause.
Print the error message about permissions for perf and /dev/msr and
virt, as appropriate.
thanks,
Len Brown, Intel Open Source Technology Center
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-08-05 6:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1500987324-507-1-git-send-email-prarit@redhat.com>
[not found] ` <20170725155911.ihtjkz5cuwdpwoxp@khazad-dum.debian.net>
[not found] ` <CAJvTdKmZqPkvUrgEJitYrBv7EJzpemLjN-nfYUnT3b127LNSQA@mail.gmail.com>
2017-07-28 11:54 ` [PATCH] turbostat: Running on virtual machine is not supported Prarit Bhargava
2017-08-05 6:50 ` Len Brown
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).