Received: by 2002:ac0:a582:0:0:0:0:0 with SMTP id m2-v6csp2606230imm; Thu, 18 Oct 2018 18:28:39 -0700 (PDT) X-Google-Smtp-Source: ACcGV6073lRUNkFFe+G+Vhmd36M89fU4Coe9Cg3UmdfEvO8lNmBCFKsylKhQ3bI02G7aQnoN4mes X-Received: by 2002:a65:41c6:: with SMTP id b6-v6mr31110160pgq.421.1539912519619; Thu, 18 Oct 2018 18:28:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1539912519; cv=none; d=google.com; s=arc-20160816; b=GAbDy47L8Q9zAlYZm6l65N76KrBtmmM0fPI55dk3hyo5pI2QoXscGlwYIwZkiBCaDu E0ZXWR8PVO3u0PcLeZoxnM8NWlKeg3FihKrPV7KGLQo1xsFUSOYgv8URHGTtPAzwBg0P bgzykcEaRCJl0nTgLAHkfis4Oqyn6hXdueqTpUj3knvi2f27QlFRH+fdKek7cmwfHL5E MzWs2A6KJHLGe9L3cxg6o5hAkY3xpIUSW38oZ56HyIu8R579HHzA1FFf29N2yQSdPYKo DVOu5HX+DDJuP0MlMMncze6soO0IHKqxG2LbMnEp9wFi/AD8dEakN3uqLYbbxCU1UgPW uVPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=bki4cVk1CsuBihrN6mxx9vkRI7zCGAsGgAZFG4Dow7k=; b=ttwiLuZVPhw7aSZTqlS301ICtKncu8vPzD6EaQdZ7usZ01l/0slbhBvaDn9z6DzVKK sWiWJSdsrD73ZW3wHrYl0pVKuZo24/aNOJygPB5y0xNI/PEWq3bD62fgJfTGbas35kn9 oYPWTX/pf0tb2HJ3wY89SXHqJdMTYJ7m4ByRMBMQLCRCYX/7ajHrJNL81yOYfXhQVUiX GYSOjNjr/xk1jeX0EZvYec4aloHipOhu4DVwV0eeydFSPSuKsBF7z5E9YfRBsJcmEIwm Ki3xJipr3WMJg2sy6HtP++xIUar//WrGpaogLmocFjC4VnRbuHgrLQFoXr/2X+m1lNSB 5meQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e6-v6si871103plt.330.2018.10.18.18.28.22; Thu, 18 Oct 2018 18:28:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726903AbeJSJbm (ORCPT + 99 others); Fri, 19 Oct 2018 05:31:42 -0400 Received: from mga12.intel.com ([192.55.52.136]:63668 "EHLO mga12.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726245AbeJSJbl (ORCPT ); Fri, 19 Oct 2018 05:31:41 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 18 Oct 2018 18:27:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,397,1534834800"; d="scan'208";a="82646210" Received: from ssarabia-mobl7.amr.corp.intel.com ([10.7.189.87]) by orsmga008.jf.intel.com with ESMTP; 18 Oct 2018 18:27:54 -0700 Date: Thu, 18 Oct 2018 18:27:52 -0700 From: Solio Sarabia To: Len Brown Cc: linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, shiny.sebastian@intel.com Subject: Re: turbostat-17.06.23 floating point exception Message-ID: <20181019012751.GA11600@ssarabia-MOBL7.amr.corp.intel.com> References: <20181012182630.GA13352@ssarabia-MOBL7.amr.corp.intel.com> <20181012222743.GA14100@ssarabia-MOBL7.amr.corp.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.3 (2018-01-21) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Oct 12, 2018 at 07:03:41PM -0400, Len Brown wrote: > > Why would the cpu topology report 0 cpus? I added a debug entry to > > cpu_usage_stat and /proc/stat showed it as an extra column. Then > > fscanf parsing in for_all_cpus() failed, causing the SIGFPE. > > > > This is not an issue. Thanks. > > Yes, it is true that turbostat doesn't check for systems with 0 cpus. > I'm curious how you provoked the kernel to claim that. If it is > something others might do, we can have check for it and gracefully > exit. source/tools/power/x86/turbostat/turbostat.c int for_all_proc_cpus(int (func)(int)) { retval = fscanf(fp, "cpu %*d %*d %*d %*d %*d %*d %*d %*d %*d %*d\n"); ^ This fails due to an extra debug entry in /proc/stat (total of 11 columns). I was measuring time in a hot function and decided to add this time in an extra cpu_usage_stat. This was an experiment though. Thanks, -S.