Error in CPU frequency reporting when nominal and min pstates are same (cpufreq)

Bug #1746174 reported by bugproxy on 2018-01-30
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
The Ubuntu-power-systems project
High
Canonical Kernel Team
linux (Ubuntu)
High
Joseph Salisbury
Artful
High
Joseph Salisbury
Bionic
High
Joseph Salisbury

Bug Description

== SRU Justification ==
Commit 09ca4c9b5958 introduced a bug in v4.8-rc2. The bug is that
an error happens in CPU frequency reporting when nominal and min pstates
are the same (cpufreq). Commit 3fa4680b8 fixes this issue.

Commit 3fa4680b8 is in mailine as of v4.16-rc1 and has been cc'd to upstream stable.

== Fix ==
commit 3fa4680b860bf48b437d6a2c039789c4abe202ae
Author: Shilpasri G Bhat <email address hidden>
Date: Fri Jan 12 12:43:53 2018 +0530

    cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

== Regression Potential ==
Low. This commit been cc'd to upstream stable, so it has had additional
upstream review.

== Test Case ==
A test kernel was built with this patch and tested by the original bug reporter.
The bug reporter states the test kernel resolved the bug.

== Comment: #0 - Shilpasri G. Bhat
+++ This bug was initially created as a clone of Bug #163527 +++

---Problem Description---
Error in CPU frequency reporting when nominal and min pstates are same

The patch for this issue is accepted to linux-next as

3fa4680b860bf48b437d6a2c039789c4abe202ae
cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

Some OpenPOWER boxes can have same pstate values for nominal and
pmin pstates. In these boxes the current code will not initialize
'powernv_pstate_info.min' variable and result in erroneous CPU
frequency reporting. This patch fixes this problem.

Fixes: 09ca4c9b5958 (cpufreq: powernv: Replacing pstate_id with frequency table index)
Reported-by: Alvin Wang <email address hidden>
Signed-off-by: Shilpasri G Bhat <email address hidden>
Acked-by: Viresh Kumar <email address hidden>
Cc: 4.8+ <email address hidden> # 4.8+
Signed-off-by: Rafael J. Wysocki <email address hidden>

https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git/commit/drivers/cpufreq/powernv-cpufreq.c?h=linux-next&id=3fa4680b860bf48b437d6a2c039789c4abe202ae

break-fix: - cf0de9a0d52ff64bcb6b20b6fa4b5d3eb4637719
break-fix: - 3fa4680b860bf48b437d6a2c039789c4abe202ae

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

I built a test kernel with commit 3fa4680b860bf48b437d6a2c039789c4abe202ae. The test kernel can be downloaded from:
http://kernel.ubuntu.com/~jsalisbury/lp1746174

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

Note, to test this kernel, you need to install both the linux-image and linux-image-extra .deb packages.

Thanks in advance!

Changed in ubuntu-power-systems:
status: New → In Progress
Manoj Iyer (manjo) on 2018-02-12
Changed in ubuntu-power-systems:
status: In Progress → Incomplete

------- Comment From <email address hidden> 2018-02-15 05:03 EDT-------
Hi,

I have tested the kernel and is working as expected.

root@bostonp9:~# uname -a
Linux bostonp9 4.13.0-17-generic #20~lp1746174 SMP Tue Jan 30 20:48:25 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

[ 4.443270] powernv-cpufreq: cpufreq pstate min 81 nominal 81 max 0
[ 4.443318] powernv-cpufreq: Workload Optimized Frequency is enabled in the platform

Thanks and Regards,
Shilpa

bugproxy (bugproxy) wrote :

------- Comment From <email address hidden> 2018-02-26 06:09 EDT-------
Hi ,
Can you please let us know in which build the fix is available ?

I am able to see issue on :

root@ltc-boston27:~# dmesg | grep freq
[ 0.000000] time_init: decrementer frequency = 512.000000 MHz
[ 0.000000] time_init: processor frequency = 2134.000000 MHz
[ 2.159457] powernv-cpufreq: cpufreq pstate min 98 nominal 98 max 0
[ 2.159459] powernv-cpufreq: Workload Optimized Frequency is enabled in the platform
[ 2.164178] powernv-cpufreq: pstate 97 is out of bound

ubuntu@ltc-boston27:~$ uname -a
Linux ltc-boston27 4.15.0-10-generic #11-Ubuntu SMP Tue Feb 13 18:21:52 UTC 2018 ppc64le ppc64le ppc64le GNU/Linux

Dimitri John Ledkov (xnox) wrote :

The bug is in progress, thus the fix for this issues is not yet available for testing.
When it is available, there will be a comment on this bug report, calling for testing and listing exact version number of the kernel which includes the fix.

tags: added: kernel-bug-break-fix
description: updated
Changed in linux (Ubuntu Bionic):
status: In Progress → Fix Committed
Changed in linux (Ubuntu Artful):
status: In Progress → Fix Committed
Manoj Iyer (manjo) on 2018-03-05
Changed in ubuntu-power-systems:
status: Incomplete → Fix Committed
Stefan Bader (smb) wrote :

This bug is awaiting verification that the kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-artful' to 'verification-done-artful'. If the problem still exists, change the tag 'verification-needed-artful' to 'verification-failed-artful'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: verification-needed-artful
Launchpad Janitor (janitor) wrote :
Download full text (18.9 KiB)

This bug was fixed in the package linux - 4.13.0-38.43

---------------
linux (4.13.0-38.43) artful; urgency=medium

  * linux: 4.13.0-38.43 -proposed tracker (LP: #1755762)

  * Servers going OOM after updating kernel from 4.10 to 4.13 (LP: #1748408)
    - i40e: Fix memory leak related filter programming status
    - i40e: Add programming descriptors to cleaned_count

  * [SRU] Lenovo E41 Mic mute hotkey is not responding (LP: #1753347)
    - platform/x86: ideapad-laptop: Increase timeout to wait for EC answer

  * fails to dump with latest kpti fixes (LP: #1750021)
    - kdump: write correct address of mem_section into vmcoreinfo

  * headset mic can't be detected on two Dell machines (LP: #1748807)
    - ALSA: hda/realtek - Support headset mode for ALC215/ALC285/ALC289
    - ALSA: hda - Fix headset mic detection problem for two Dell machines
    - ALSA: hda - Fix a wrong FIXUP for alc289 on Dell machines

  * CIFS SMB2/SMB3 does not work for domain based DFS (LP: #1747572)
    - CIFS: make IPC a regular tcon
    - CIFS: use tcon_ipc instead of use_ipc parameter of SMB2_ioctl
    - CIFS: dump IPC tcon in debug proc file

  * i2c-thunderx: erroneous error message "unhandled state: 0" (LP: #1754076)
    - i2c: octeon: Prevent error message on bus error

  * hisi_sas: Add disk LED support (LP: #1752695)
    - scsi: hisi_sas: directly attached disk LED feature for v2 hw

  * EDAC, sb_edac: Backport 1 patch to Ubuntu 17.10 (Fix missing DIMM sysfs
    entries with KNL SNC2/SNC4 mode) (LP: #1743856)
    - EDAC, sb_edac: Fix missing DIMM sysfs entries with KNL SNC2/SNC4 mode

  * [regression] Colour banding and artefacts appear system-wide on an Asus
    Zenbook UX303LA with Intel HD 4400 graphics (LP: #1749420)
    - drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA

  * DVB Card with SAA7146 chipset not working (LP: #1742316)
    - vmalloc: fix __GFP_HIGHMEM usage for vmalloc_32 on 32b systems

  * [Asus UX360UA] battery status in unity-panel is not changing when battery is
    being charged (LP: #1661876) // AC adapter status not detected on Asus
    ZenBook UX410UAK (LP: #1745032)
    - ACPI / battery: Add quirk for Asus UX360UA and UX410UAK

  * ASUS UX305LA - Battery state not detected correctly (LP: #1482390)
    - ACPI / battery: Add quirk for Asus GL502VSK and UX305LA

  * support thunderx2 vendor pmu events (LP: #1747523)
    - perf pmu: Extract function to get JSON alias map
    - perf pmu: Pass pmu as a parameter to get_cpuid_str()
    - perf tools arm64: Add support for get_cpuid_str function.
    - perf pmu: Add helper function is_pmu_core to detect PMU CORE devices
    - perf vendor events arm64: Add ThunderX2 implementation defined pmu core
      events
    - perf pmu: Add check for valid cpuid in perf_pmu__find_map()

  * lpfc.ko module doesn't work (LP: #1746970)
    - scsi: lpfc: Fix loop mode target discovery

  * Ubuntu 17.10 crashes on vmalloc.c (LP: #1739498)
    - powerpc/mm/book3s64: Make KERN_IO_START a variable
    - powerpc/mm/slb: Move comment next to the code it's referring to
    - powerpc/mm/hash64: Make vmalloc 56T on hash

  * ethtool -p fails to light NIC LED on HiSilicon D05 systems (LP: #1748567)
    - net...

Changed in linux (Ubuntu Artful):
status: Fix Committed → Fix Released
Manoj Iyer (manjo) wrote :

Marking bionic as fix-released, since the patch identified here is in bionic-master
cf0de9a0d52f cpufreq: powernv: Dont assume distinct pstate values for nominal and pmin

Changed in linux (Ubuntu Bionic):
status: Fix Committed → Fix Released
Changed in ubuntu-power-systems:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers