Bug 102566

Summary: [IGT][KBL] pm_rc6_residency@rc6-accuracy is failing with assertion: ratio > 0.9 && ratio <= 1
Product: DRI Reporter: Armando Antonio <armando.antoniox.mora.reos>
Component: IGTAssignee: Default DRI bug account <dri-devel>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: medium CC: intel-gfx-bugs
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: KBL i915 features: power/runtime PM
Attachments:
Description Flags
test log
none
dmesg log none

Description Armando Antonio 2017-09-06 16:57:52 UTC
The following test cases fail on KBL with latest configuration.

=====================================
Test list
=====================================
igt@pm_rc6_residency@rc6-accuracy

======================================
             Software
======================================
kernel version              : 4.13.0-drm-tip-ww36-commit-59fbfaa+
hostname                    : gfx-desktop
architecture                : x86_64
os version                  : Ubuntu 16.10
os codename                 : yakkety
kernel driver               : i915
bios revision               : 5.12
bios release date           : 09/12/2016
hardware acceleration       : disabled
swap partition              : enabled on (/dev/sda3)

======================================
        Graphic drivers
======================================
grep: /opt/X11R7/var/log/Xorg.0.log: No such file or directory
libdrm                      : 2.4.83
cairo                       : 1.15.9
intel-gpu-tools (tag)       : intel-gpu-tools-1.19-234-g490b386
intel-gpu-tools (commit)    : 490b386

======================================
             Hardware
======================================
platform                   : Kabylake-Nuc
motherboard model          : MS-B142
motherboard id             : MS-B1421
form factor                : Desktop
manufacturer               : Micro-StarInternationalCo.,Ltd.
cpu family                 : Core i7
cpu family id              : 6
cpu information            : Intel(R) Core(TM) i7-7500U CPU @ 2.70GHz
gpu card                   : Intel Corporation Device 5916 (rev 02) (prog-if 00 [VGA controller])
memory ram                 : 15.55 GB
max memory ram             : 64 GB
cpu thread                 : 4
cpu core                   : 2
cpu model                  : 142
cpu stepping               : 9
socket                     : Other
signature                  : Type 0, Family 6, Model 142, Stepping 9
hard drive                 : 111GiB (120GB)
current cd clock frequency : 337500 kHz
maximum cd clock frequency : 675000 kHz
displays connected         : DP-1 HDMI-A-2

======================================
             Firmware
======================================
dmc fw loaded             : yes
dmc version               : 1.1
guc fw loaded             : SUCCESS
guc version wanted        : 9.14
guc version found         : 9.14

======================================
             kernel parameters
======================================
drm.debug=0x1e quiet splash i915.enable_guc_submission=2 i915.enable_guc_loading=2 i915.alpha_support=1

======================================
output sample
======================================
Residency in rc6 or deeper state: 0 ms (sleep duration 3000 ms) (ratio to expected duration: 0.00)
(pm_rc6_residency:2078) CRITICAL: Test assertion failure function residency_accuracy, file pm_rc6_residency.c:86:
(pm_rc6_residency:2078) CRITICAL: Failed assertion: ratio > 0.9 && ratio <= 1
(pm_rc6_residency:2078) CRITICAL: Sysfs RC6 residency counter is inaccurate.
Stack trace:
  #0 [__igt_fail_assert+0x101]
  #1 [residency_accuracy+0x8e]
  #2 [__real_main168+0x9e]
  #3 [main+0x33]
  #4 [__libc_start_main+0xf1]
  #5 [_start+0x29]
  #6 [<unknown>+0x29]
Subtest rc6-accuracy failed.
Comment 1 Armando Antonio 2017-09-06 16:58:30 UTC
Created attachment 134018 [details]
test log
Comment 2 Armando Antonio 2017-09-06 16:59:45 UTC
Created attachment 134019 [details]
dmesg log
Comment 3 Chris Wilson 2017-09-06 17:17:51 UTC
Dmesg is incomplete. We cannot check whether the dmc was loaded. If it was, what happens if you don't force load the guc.
Comment 4 Marta Löfstedt 2017-10-09 10:18:57 UTC
At least from CI_DRM_3111 KBL-shards:

(pm_rc6_residency:1701) CRITICAL: Test assertion failure function residency_accuracy, file pm_rc6_residency.c:85:
(pm_rc6_residency:1701) CRITICAL: Failed assertion: ratio > 0.9 && ratio <= 1
(pm_rc6_residency:1701) CRITICAL: Sysfs RC6 residency counter is inaccurate.
Subtest rc6-accuracy failed.

Example full data:
https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3190/shard-kbl7/igt@pm_rc6_residency@rc6-accuracy.html
Comment 5 Chris Wilson 2017-10-18 10:13:18 UTC
commit 62616c672a623b635141473133674321a4acbdc5 (upstream/master, origin/master, origin/HEAD)
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Tue Oct 17 11:19:38 2017 +0100

    igt/pm_rc6_residency: Allow some leeway on the upper %% bound
    
    As we use rounding when converting from hw clocks to time, we may report
    a residency greater than wallclock (by a small margin), so allow us to
    overshoot by 5% (just due to our inaccuracy).
Comment 6 Marta Löfstedt 2017-10-18 10:21:26 UTC
Reproduced on GLK-shards:

(pm_rc6_residency:2203) CRITICAL: Test assertion failure function residency_accuracy, file pm_rc6_residency.c:85:
(pm_rc6_residency:2203) CRITICAL: Failed assertion: ratio > 0.9 && ratio <= 1
(pm_rc6_residency:2203) CRITICAL: Sysfs RC6 residency counter is inaccurate.
Subtest rc6-accuracy failed.

https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_3252/shard-glkb5/igt@pm_rc6_residency@rc6-accuracy.html
Comment 7 Chris Wilson 2017-10-18 10:24:21 UTC
Which as you will note is from before the fix.
Comment 8 Marta Löfstedt 2017-10-18 14:17:42 UTC
(In reply to Chris Wilson from comment #7)
> Which as you will note is from before the fix.

I'm sorry Chris.

The issue has not been reproduced after CI_DRM_3254

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.