Received: by 10.223.164.202 with SMTP id h10csp1266236wrb; Fri, 17 Nov 2017 17:38:28 -0800 (PST) X-Google-Smtp-Source: AGs4zMas9elGOXm62N/2rHV+7IyHKFWWrWGso1b59zDdbGCnfzn7Lx4CKGHmxk3j2QT1Cy1eJ5ca X-Received: by 10.98.198.28 with SMTP id m28mr3952386pfg.217.1510969107946; Fri, 17 Nov 2017 17:38:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510969107; cv=none; d=google.com; s=arc-20160816; b=rTl3LwLMryqMnrCzGU6JPh9G97cH6LO652c4zZIAIFa5cLpEPFXpLUS5opHuOzzn5n mX/eG5+OW5bFJi0MvjprX6Mzz+Ym73cnNSJknVRuOJwSWtAaK+aaQrfhxM/NGjRSpEGg oYatkOqYg/TZmPluehvb4xgEdufVPXFEmCtKwYlMjjwvQAfIjX0MO/4iafrecqg3jlps oAEXKGCwXcfKnoOLHbDH09rZKS90+e8GQshyyfSchaPygctwi++lyYCzP85AK3UEXoLj TookegbIvuzWxEclFnQhvC8g8X9Et1EK7SHM1M9orJxfuEyS68HZSSiBrog3cq+Dr8PD ookg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-language:mime-version:user-agent :date:message-id:subject:from:cc:to:arc-authentication-results; bh=L+jvxGu267vm85o8hyhs89Jxiqn80dro8X8KSPX0eow=; b=EK+VntZzfKWGNcl6A/XLDaZzeqyRTtIjG9e8z2A8xNycKZ5iKAwAftKDkdw0k1hBzH O4mxyeODz8pgAWhF+VRj/MKw1/Tlasihv97bwKpX2qLXu3VT3bTc3ZgOAxYxWM/xMCV/ 2sFkrVFPslUbavDeevD8AkFzTP3+QmA6czBoabPn0cu2ltdC7KpZ+6Ulg0tgG9EwfzMV nFMvKP+i7j9B0FkN960SSex/1JF8k5jCTN6wg9AZzGyqJiRJE0NeBIi/p7TwA2TbgRZV ruH1YDBe8KbCiCZ3f7aoGeMC7HB/DL64AQNpIrhxvRXqUQ+xvq6rL9qj+j/6FGq2EA/z T9mg== 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=samsung.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w5si3692530pgt.535.2017.11.17.17.38.15; Fri, 17 Nov 2017 17:38:27 -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=samsung.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1760241AbdKQSUX (ORCPT + 93 others); Fri, 17 Nov 2017 13:20:23 -0500 Received: from osg.samsung.com ([64.30.133.232]:58584 "EHLO osg.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752501AbdKQSUQ (ORCPT ); Fri, 17 Nov 2017 13:20:16 -0500 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 103762C81A; Fri, 17 Nov 2017 10:20:16 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id WeOvYeKn9rTb; Fri, 17 Nov 2017 10:20:14 -0800 (PST) Received: from [192.168.1.87] (c-24-9-64-241.hsd1.co.comcast.net [24.9.64.241]) by osg.samsung.com (Postfix) with ESMTPSA id 721CE2C80D; Fri, 17 Nov 2017 10:20:14 -0800 (PST) To: rafael@kernel.org Cc: Thomas Renninger , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Shuah Khan , Shuah Khan From: Shuah Khan Subject: [GIT PULL] cpupower update for 4.15-rc2 Message-ID: Date: Fri, 17 Nov 2017 11:20:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------CBA082BD6824C835664007B3" Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This is a multi-part message in MIME format. --------------CBA082BD6824C835664007B3 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hi Rafael, Please pull the cpupower update for 4.15-rc2 This update consists of fixes to tool's handling of offline cpus. The first patch fixes the tool to find information on the cpu it is running on, instead of always looking for cpu0 and failing if cpu0 happens to be offline. The second patch fixes the incorrect check for offline cpu status. Diff is attached. thanks, -- Shuah ------------------------------------------------------------------------------------------ The following changes since commit 69b6f8a9b7961efd7dcc11ab9b1d5be55ed8a15e: tools/power/cpupower: add libcpupower.so.0.0.1 to .gitignore (2017-11-09 10:52:22 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/shuah/linux tags/linux-cpupower-4.15-rc2 for you to fetch changes up to dbdc468f35ee827cab2753caa1c660bdb832243a: cpupower : Fix cpupower working when cpu0 is offline (2017-11-15 08:37:42 -0700) ---------------------------------------------------------------- linux-cpupower-4.15-rc2 This update consists of fixes to tool's handling of offline cpus. The first patch fixes the tool to find information on the cpu it is running on, instead of always looking for cpu0 and failing if cpu0 happens to be offline. The second patch fixes the incorrect check for offline cpu status. ---------------------------------------------------------------- Abhishek Goel (2): cpupowerutils: bench - Fix cpu online check cpupower : Fix cpupower working when cpu0 is offline tools/power/cpupower/bench/system.c | 2 +- tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) ------------------------------------------------------------------------------------------ --------------CBA082BD6824C835664007B3 Content-Type: text/x-patch; name="linux-cpupower-4.15-rc2.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="linux-cpupower-4.15-rc2.diff" diff --git a/tools/power/cpupower/bench/system.c b/tools/power/cpupower/b= ench/system.c index c25a74ae51ba..2bb3eef7d5c1 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 c= pu) =20 dprintf("set %s as cpufreq governor\n", governor); =20 - if (cpupower_is_cpu_online(cpu) !=3D 0) { + if (cpupower_is_cpu_online(cpu) !=3D 1) { perror("cpufreq_cpu_exists"); fprintf(stderr, "error: cpu %u does not exist\n", cpu); return -1; diff --git a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c b/to= ols/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c index 1b5da0066ebf..5b3205f16217 100644 --- a/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c +++ b/tools/power/cpupower/utils/idle_monitor/cpuidle_sysfs.c @@ -130,15 +130,18 @@ static struct cpuidle_monitor *cpuidle_register(voi= d) { int num; char *tmp; + int this_cpu; + + this_cpu =3D sched_getcpu(); =20 /* Assume idle state count is the same for all CPUs */ - cpuidle_sysfs_monitor.hw_states_num =3D cpuidle_state_count(0); + cpuidle_sysfs_monitor.hw_states_num =3D cpuidle_state_count(this_cpu); =20 if (cpuidle_sysfs_monitor.hw_states_num <=3D 0) return NULL; =20 for (num =3D 0; num < cpuidle_sysfs_monitor.hw_states_num; num++) { - tmp =3D cpuidle_state_name(0, num); + tmp =3D cpuidle_state_name(this_cpu, num); if (tmp =3D=3D NULL) continue; =20 @@ -146,7 +149,7 @@ static struct cpuidle_monitor *cpuidle_register(void)= strncpy(cpuidle_cstates[num].name, tmp, CSTATE_NAME_LEN - 1); free(tmp); =20 - tmp =3D cpuidle_state_desc(0, num); + tmp =3D cpuidle_state_desc(this_cpu, num); if (tmp =3D=3D NULL) continue; strncpy(cpuidle_cstates[num].desc, tmp, CSTATE_DESC_LEN - 1); --------------CBA082BD6824C835664007B3-- From 1586585987012557378@xxx Tue Dec 12 13:45:06 +0000 2017 X-GM-THRID: 1586585987012557378 X-Gmail-Labels: Inbox,Category Promotions,HistoricalUnread