Ubuntu18.04: PowerNV - cpupower monitor will not work when cpu0 is offline

Bug #1743541 reported by bugproxy on 2018-01-16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
Canonical Kernel Team
linux (Ubuntu)
Status tracked in Bionic
Joseph Salisbury

Bug Description

== Comment: #0 - Shriya R. Kulkarni <email address hidden> - 2018-01-16 04:58:48 ==
Problem Description :

cpupower monitor fails to show stop states when cpu 0 is made offline.

Testing :
root@ltc-wspoon12:~# echo 0 > /sys/devices/system/cpu/cpu0/online
root@ltc-wspoon12:~# cpupower monitor
WARNING: at least one cpu is offline
No HW Cstate monitors found
root@ltc-wspoon12:~# cpupower -c 12 monitor
WARNING: at least one cpu is offline
No HW Cstate monitors found

root@ltc-wspoon12:~# echo 1 > /sys/devices/system/cpu/cpu0/online
root@ltc-wspoon12:~# cpupower -c 12 monitor
PKG |CORE|CPU | snoo | stop | stop | stop | stop
   0| 12| 12| 0.00| 0.00| 0.00| 0.00| 0.01

Details :
uname -a : Linux ltc-wspoon12 4.13.0-25-generic #29-Ubuntu SMP Mon Jan 8 21:15:55 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

OS : Ubuntu 18.04
Machine : Witherspoon ( DD2.1) and Boston (DD.01)

Patch :
Patch that fixes the issue : https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=dbdc468f35ee827cab2753caa1c660bdb832243a

== Comment: #1 - VIPIN K. PARASHAR <email address hidden> - 2018-01-16 05:09:40 ==
(In reply to comment #0)

> Patch :
> ====
> Patch that fixes the issue :
> https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/
> ?id=dbdc468f35ee827cab2753caa1c660bdb832243a

$ git log dbdc468f35ee827 -1
commit dbdc468f35ee827cab2753caa1c660bdb832243a
Author: Abhishek Goel <email address hidden>
Date: Wed Nov 15 14:10:02 2017 +0530

    cpupower : Fix cpupower working when cpu0 is offline

    cpuidle_monitor used to assume that cpu0 is always online which is not
    a valid assumption on POWER machines. This patch fixes this by getting
    the cpu on which the current thread is running, instead of always using
    cpu0 for monitoring which may not be online.

    Signed-off-by: Abhishek Goel <email address hidden>
    Signed-off-by: Shuah Khan <email address hidden>

Commit dbdc468f3 is available with 4.15-rc2 onwards.

bugproxy (bugproxy) on 2018-01-16
tags: added: architecture-ppc64le bugnameltc-163623 severity-high targetmilestone-inin1804
Changed in ubuntu:
assignee: nobody → Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage)
affects: ubuntu → linux (Ubuntu)
Changed in ubuntu-power-systems:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Canonical Kernel Team (canonical-kernel-team)
tags: added: triage-g
Changed in linux (Ubuntu):
importance: Undecided → High
Joseph Salisbury (jsalisbury) wrote :

I built a test kernel with commit dbdc468f35ee827c. The test kernel can be downloaded from:

Can you test this kernel and see if it resolves this bug?

Changed in linux (Ubuntu):
status: New → In Progress
Changed in linux (Ubuntu Bionic):
assignee: Ubuntu on IBM Power Systems Bug Triage (ubuntu-power-triage) → Joseph Salisbury (jsalisbury)
Changed in ubuntu-power-systems:
status: Triaged → In Progress

------- Comment From <email address hidden> 2018-01-16 23:25 EDT-------
Hi ,
I tried to setup this kernel : http://kernel.ubuntu.com/~jsalisbury/lp1743541/ ,

but to install cpupower tool , I need : linux-tools-<kernel version>-generic , linux-tools-common package ,

From the above link i see only linux-tools-common_4.13.0-17.20_all.deb is provided and hence I am unable to test it .

ltc-wspoon12:~/shriya/kernel# dpkg -i linux-tools-common_4.13.0-17.20_all.deb
(Reading database ... 113696 files and directories currently installed.)
Preparing to unpack linux-tools-common_4.13.0-17.20_all.deb ...
Unpacking linux-tools-common (4.13.0-17.20) over (4.13.0-17.20) ...
Setting up linux-tools-common (4.13.0-17.20) ...
root@ltc-wspoon12:~/shriya/kernel# cpupower
The program 'cpupower' is currently not installed. You can install it by typing:
apt install linux-tools-common

Joseph Salisbury (jsalisbury) wrote :

Sorry for not posting the tools packages. It should be available now:

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-01-18 00:36 EDT-------
Hi ,
Can you please provide ppc64el packages , here I see 'amd' packages in the link mentioned above.

Ex : http://kernel.ubuntu.com/~jsalisbury/lp1743541/linux-tools-4.13.0-17_4.13.0-17.20_amd64.deb


Joseph Salisbury (jsalisbury) wrote :

There is a ppc64 tools package there now. Can you see if that package works for you?

Manoj Iyer (manjo) on 2018-02-12
Changed in ubuntu-power-systems:
status: In Progress → Incomplete
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers