From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754493AbcFPUoZ (ORCPT ); Thu, 16 Jun 2016 16:44:25 -0400 Received: from mail-io0-f194.google.com ([209.85.223.194]:32825 "EHLO mail-io0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754094AbcFPUoY (ORCPT ); Thu, 16 Jun 2016 16:44:24 -0400 From: Vince Weaver X-Google-Original-From: Vince Weaver Date: Thu, 16 Jun 2016 16:44:20 -0400 (EDT) X-X-Sender: vince@macbook-air To: Huang Rui cc: Vince Weaver , Borislav Petkov , Thomas Gleixner , Peter Zijlstra , Ingo Molnar , Andy Lutomirski , Robert Richter , Jacob Shin , Arnaldo Carvalho de Melo , Kan Liang , linux-kernel@vger.kernel.org, x86@kernel.org, Suravee Suthikulpanit , Aravind Gopalakrishnan , Borislav Petkov , Guenter Roeck , Fengguang Wu Subject: Re: [REDO PATCH v7] perf/x86/amd/power: Add AMD accumulated power reporting mechanism In-Reply-To: <20160616053802.GA7810@hr-amur2> Message-ID: References: <1457502306-2559-1-git-send-email-ray.huang@amd.com> <20160616053802.GA7810@hr-amur2> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 16 Jun 2016, Huang Rui wrote: > > 1. In theory this should also work on an amd fam16h model 30h > > processor too, correct? The current code limits things to fam15h > > even though the fam16mod30h has all the proper cpuid flags. > > > > I was told this feature would be supported on fam15h 60h, 70h and > later processors before. Just checked the fam16h model 30h BKDG, yes, > it should be also supported. But I didn't test that platform, if you > confirm it works in your side. We can enable it. I can confirm I get power readings on my fam16hmod30h board once I apply a trivial patch to the driver. I'll send the patch in a separate e-mail. > PTSC's frequency is about 100Mhz, it shouldn't be overflow. That's what I thought. I'm trying to read the value using the /dev/msr interface from userspace and I get weird results. i.e.: Jx: read 62d299b84 PTSC MSR: read 72fe92 sleep 5ms Jy: read 631b453b9 PTSC MSR: read 46b25 this happens about half the time (PTSC going backwards). Though admittedly the problem could somehow be in the MSR code I'm using. > mWatts are for processor power not system power. Below data is > calculated on fam15h model 60h which is low power platform. Even > though the method has a minor mistake, the processor power should be > in mWatts field. I have an actual wall-mounted power meter hooked up to my system and the difference from idle to all-cores-busy is 20W, so I would think that that the results we find with perf should be >1W at least. Vince