Received: by 10.223.164.202 with SMTP id h10csp672453wrb; Tue, 7 Nov 2017 12:31:03 -0800 (PST) X-Google-Smtp-Source: ABhQp+QuB0GqA2NxYVuQmq0hPcHlsN+9nMAsrS/cf9t9Me1kGTCbsOAI8mA0I92kDYQc0UDAxP8d X-Received: by 10.101.100.216 with SMTP id t24mr19395653pgv.439.1510086663884; Tue, 07 Nov 2017 12:31:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510086663; cv=none; d=google.com; s=arc-20160816; b=aY+YLSvo2zIaqgjG/gvGcc/Fdvft2rKLezV9AHS1vghdioTX8mSTpo4e+Jvv9qEGvd ukMlpkIC9WN+Rkvin+CsJMgYevBBpSkgyNcMNwY7kUX1JWEHoGN+KznGLpa5ST0O1Lhj 2ejyLi3hTjU04gjFjb91qF2fXWj0eP0FFsG4LPGQadpzOrm8xRgXt2yXpFDATY84IMaZ allwDY2AYhQl3sdlyKX94jGhi0rpok7Tpg5/a1x+7nsWsW4WHOyOxU0f5uVIkgfALiYs nBauVJd792kmiFLUKQyScZSLWFS99QjBYYTmPUhtlKZkvk+QKJlw3AGPhBAVNM1gNeN5 vq1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-language :content-transfer-encoding:in-reply-to:mime-version:user-agent:date :from:references:to:subject:arc-authentication-results; bh=q7JrTvUOpK6puNILH24yUv2IOY7zqUWjrpVefRi/lWY=; b=p5uecQn4vjSEpW6Dj1YmmH1oZplQ/7G8cTHsrfaEYkPrtI8ShM09MxILvBTbNY1Mqw uQJV7DuZcVb+xpu1vXAPFtHJoTqdMG8lSVVWS/v1mEjj0+pbJnt9fcAx7rs5j+Ppt1sP EsYRmQgOE02ve7PyWoKwFsVAsdI/qmVNQ1kgYkaMUhjk/LLfp71Ns4bNYahKg8ODtoVS wG12+i8c5Df3zvnCFYDph6QLqgcEFOQUH097lPwFrosxWJnLKASkGV1wVEJqKpT3WuSb qOOoU0K6Xrpc/Y9ZWmSeQZhfZL4IwlIXBv42T9cLJ089esmNpGr7+JWIK3aRUtUnb2UG q2ow== 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=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r7si1919367pgf.738.2017.11.07.12.30.50; Tue, 07 Nov 2017 12:31:03 -0800 (PST) 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=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933748AbdKGJuk (ORCPT + 91 others); Tue, 7 Nov 2017 04:50:40 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:47458 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933735AbdKGJug (ORCPT ); Tue, 7 Nov 2017 04:50:36 -0500 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vA79n4qF035748 for ; Tue, 7 Nov 2017 04:50:35 -0500 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2e377ysr0e-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Tue, 07 Nov 2017 04:50:35 -0500 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 7 Nov 2017 09:50:31 -0000 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Tue, 7 Nov 2017 09:50:30 -0000 Received: from d06av24.portsmouth.uk.ibm.com (d06av24.portsmouth.uk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vA79oVar36896902; Tue, 7 Nov 2017 09:50:31 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 95C3B42042; Tue, 7 Nov 2017 09:45:36 +0000 (GMT) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 95B6D42047; Tue, 7 Nov 2017 09:45:35 +0000 (GMT) Received: from oc0383214508.ibm.com (unknown [9.124.35.229]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 7 Nov 2017 09:45:35 +0000 (GMT) Subject: Re: [PATCH v2] cpupowerutils: bench - Fix cpu online check To: Shuah Khan , Shuah Khan , Thomas Renninger , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20171107094755.49440-1-huntbag@linux.vnet.ibm.com> From: Abhishek Date: Tue, 7 Nov 2017 15:20:29 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171107094755.49440-1-huntbag@linux.vnet.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-TM-AS-GCONF: 00 x-cbid: 17110709-0016-0000-0000-000004FE6787 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17110709-0017-0000-0000-0000283A05AA Message-Id: <3a6fd547-b367-6e35-7fb5-5ab8d1139b5b@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-11-07_03:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1707230000 definitions=main-1711070138 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Can you please have a look at this also? Thanks and Regards, Abhishek Goel System Engineer IBM India Pvt. Ltd. On 11/07/2017 03:17 PM, Abhishek Goel wrote: > cpupower_is_cpu_online was incorrectly checking for 0. This patch fixes > this by checking for 1 when the cpu is online. > > Signed-off-by: Abhishek Goel > --- > v2: Commit message rephrased. > --- > tools/power/cpupower/bench/system.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/power/cpupower/bench/system.c b/tools/power/cpupower/bench/system.c > index c25a74a..2bb3eef 100644 > --- a/tools/power/cpupower/bench/system.c > +++ b/tools/power/cpupower/bench/system.c > @@ -61,7 +61,7 @@ int set_cpufreq_governor(char *governor, unsigned int cpu) > > dprintf("set %s as cpufreq governor\n", governor); > > - if (cpupower_is_cpu_online(cpu) != 0) { > + if (cpupower_is_cpu_online(cpu) != 1) { > perror("cpufreq_cpu_exists"); > fprintf(stderr, "error: cpu %u does not exist\n", cpu); > return -1; From 1583408467635273168@xxx Tue Nov 07 11:59:47 +0000 2017 X-GM-THRID: 1583408467635273168 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread