From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754666AbbJIMVG (ORCPT ); Fri, 9 Oct 2015 08:21:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32768 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754525AbbJIMVD (ORCPT ); Fri, 9 Oct 2015 08:21:03 -0400 Message-ID: <5617B12D.2070001@redhat.com> Date: Fri, 09 Oct 2015 08:21:01 -0400 From: Prarit Bhargava User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Jacob Tanenbaum , linux-pm@vger.kernel.org CC: trenn@suse.com, shreyas@linux.vnet.ibm.com, rafael.j.wysock@intel.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] Fix cpupower reporting uninitialized values for offline cpus References: <1443726584-18709-1-git-send-email-jtanenba@redhat.com> In-Reply-To: <1443726584-18709-1-git-send-email-jtanenba@redhat.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/01/2015 03:09 PM, Jacob Tanenbaum wrote: > cpupower monitor reports uninitialized values for offline cpus > > [root@hp-dl980g7-02 linux]# cpupower monitor > ... > 5472| 0| 1|******|******|******|******||******|******|******|| 0.00| 0.00| 0.00| 0.00| 0.00 *is offline > 10567| 0| 159|******|******|******|******||******|******|******|| 0.00| 0.00| 0.00| 0.00| 0.00 *is offline > 1661206560|859272560| 150|******|******|******|******||******|******|******|| 0.00| 0.00| 0.00| 0.00| 0.00 *is offline > 1661206560|943093104| 140|******|******|******|******||******|******|******|| 0.00| 0.00| 0.00| 0.00| 0.00 *is offline > > because of this cpupower also holds the incorrect value for the number > of physical packages in the machine > > Changed cpupower to initialize the values of an offline cpu's socket and > core to -1, warn the user that one or more cpus is/are > offline and not print statistics for offline cpus. > > Thomas Renninger suggested fixing the issue by checking for the > existence of the topology files which the code already does, so I > decided to use a check on if the cpu was online. Thomas, any comment? Looks good to me. The description could be cleaned up a bit but I'll let the maintainer decide if they want a new one. Reviewed-by: Prarit Bhargava P.