Bug 93797 - [BXT-P/APL] Low performance on UI, even without graphic interface
Summary: [BXT-P/APL] Low performance on UI, even without graphic interface
Status: CLOSED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: DRM/Intel (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: Humberto Israel Perez Rodriguez
QA Contact: Intel GFX Bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-01-20 18:00 UTC by Elio
Modified: 2016-08-25 16:19 UTC (History)
5 users (show)

See Also:
i915 platform: BXT
i915 features:


Attachments
Slow performance dmesg (155.94 KB, text/plain)
2016-01-20 18:00 UTC, Elio
no flags Details
Fix system clock frequency (1.79 KB, patch)
2016-01-20 22:09 UTC, Imre Deak
no flags Details | Splinter Review
Dmesg log after patch (155.28 KB, text/plain)
2016-01-21 16:48 UTC, Elio
no flags Details

Description Elio 2016-01-20 18:00:43 UTC
Created attachment 121155 [details]
Slow performance dmesg

With the following configuration, the system seems to be really slow performing any kind of action. Even without the graphic interface (text mode).
Setup
Platform: Broxton P A0 Platform 
CPU Name : Intel(R) @ 1.2 GHz (family: 6, model: 92, stepping: 8) – 4 cores
SoC : BROXTON-P A0
CRB : Apollo Lake RVP…
Reworks : …
Software 
BIOS (IFWI Version): …
BIOS : 119 …
CSE FW : …
KSC : …
Software
Linux distribution: Ubuntu 15.10 64 bits
Kernel: drm-intel-nightly 4.4.0 8114b00 from http://cgit.freedesktop.org/drm-intel/
drm: tag libdrm-2.4.66 e342c0f from http://cgit.freedesktop.org/mesa/drm/
mesa: tag mesa-11.0.8 261daab from http://cgit.freedesktop.org/mesa/mesa/
cairo: tag 1.15.2 db8a7f1 from http://cgit.freedesktop.org/cairo
waffle: master bb29b2a from https://github.com/waffle-gl/waffle
xorg-server-macros: master d7acec2 from git://git.freedesktop.org/git/xorg/util/macros
libva: tag libva-1.6.1 cb418f6 from http://cgit.freedesktop.org/libva/
vaapi-intel-driver: tag 1.6.1 2110b3a from http://cgit.freedesktop.org/vaapi/intel-driver
Comment 1 Chris Wilson 2016-01-20 20:49:28 UTC
[    1.070360] clocksource: timekeeping watchdog: Marking clocksource 'tsc' as unstable because the skew is too large:
[    1.070361] clocksource:                       'hpet' wd_now: 53c870a wd_last: 4a8f15f mask: ffffffff
[    1.070362] clocksource:                       'tsc' cs_now: a6714a774 cs_last: a43566810 mask: ffffffffffffffff

is the first bad sign.
Comment 2 Imre Deak 2016-01-20 22:09:21 UTC
Created attachment 121165 [details] [review]
Fix system clock frequency

(In reply to Chris Wilson from comment #1)
> [    1.070360] clocksource: timekeeping watchdog: Marking clocksource 'tsc'
> as unstable because the skew is too large:
> [    1.070361] clocksource:                       'hpet' wd_now: 53c870a
> wd_last: 4a8f15f mask: ffffffff
> [    1.070362] clocksource:                       'tsc' cs_now: a6714a774
> cs_last: a43566810 mask: ffffffffffffffff
> 
> is the first bad sign.

Elio, please give a try to the attached patch, if it:
- gets rid of the above message
- gets rid of the slow-down
Comment 3 cprigent 2016-01-21 11:40:11 UTC
Assigned to Elio to check the patch.
Comment 4 Elio 2016-01-21 16:48:00 UTC
The kernel with the patch seems to improve performance, but it is not gone 100%, our improvement is about a 50%, i will share the log as soon as possible.
Comment 5 Elio 2016-01-21 16:48:33 UTC
Created attachment 121187 [details]
Dmesg log after patch
Comment 6 Imre Deak 2016-01-21 17:06:41 UTC
(In reply to Elio from comment #5)
> Created attachment 121187 [details]
> Dmesg log after patch

At least BogoMIPS looks sane now. Not sure what's the effect of this issue, I just noticed that I ran for a while without this fix and don't see any obvious slow-down.

Could you provide your BIOS info:
# dmidecode | grep -A3 "BIOS Information"

If it's not the latest working version, please try to upgrade.
Comment 7 Elio 2016-01-21 17:50:09 UTC
APLK_IFWI_X64_R_2016_02_4_00
Comment 8 Elio 2016-01-21 17:51:02 UTC
APLKRVPA.X64.0119.R10.160131622
Comment 9 Imre Deak 2016-01-22 11:48:31 UTC
(In reply to Elio from comment #7)
> APLK_IFWI_X64_R_2016_02_4_00

(In reply to Elio from comment #8)
> APLKRVPA.X64.0119.R10.160131622

Not sure about these BIOS versions. The latest official BIOS version is the following, please try to flash these:
IFWI: APLK_IFWI_X64_R_2015_52_4_00 (APLKRVPA.X64.0116.R20.1512211905)
KSC: 1.06

Please contact Sam Huston on where to get these, or if in doubt.
Comment 10 Elio 2016-01-22 19:04:36 UTC
Sure, in the middle time in setting maxcpus in grub with 1 and it looks a lot better.
Comment 11 Imre Deak 2016-01-25 17:14:46 UTC
(In reply to Elio from comment #10)
> Sure, in the middle time in setting maxcpus in grub with 1 and it looks a
> lot better.

Ok, I can confirm this, I can see it on my system as well now. This started to happen when I upgraded to the BIOS I suggested to you in comment#9, so probably that won't solve your problem. Booting with maxcpus=1 gets rid of the issue for me too. I will try now different BIOS versions to see which one is the latest that works.

Meanwhile this isn't a graphics driver issue, I can see the problem even if I don't start the graphical interface, just by trying to type something on the text console. I notified already the core people (Mika Westerberg), he promised to take a look at this.
Comment 12 Imre Deak 2016-01-25 17:52:25 UTC
(In reply to Imre Deak from comment #11)
> (In reply to Elio from comment #10)
> > Sure, in the middle time in setting maxcpus in grub with 1 and it looks a
> > lot better.
> 
> Ok, I can confirm this, I can see it on my system as well now. This started
> to happen when I upgraded to the BIOS I suggested to you in comment#9, so
> probably that won't solve your problem. Booting with maxcpus=1 gets rid of
> the issue for me too. I will try now different BIOS versions to see which
> one is the latest that works.
> 
> Meanwhile this isn't a graphics driver issue, I can see the problem even if
> I don't start the graphical interface, just by trying to type something on
> the text console. I notified already the core people (Mika Westerberg), he
> promised to take a look at this.

One more thing I noticed that this is somehow related to GFX RC6 state. If we disable that via BIOS (Uncore/Render:C6 disable, GT PM: disable) or by booting with i915.enable_rc6=0 then we also don't have the problem. I assume entering RC6 would enable some deeper CPU/system level power state, which could cause this lag.
Comment 13 Imre Deak 2016-01-26 12:58:03 UTC
(In reply to Imre Deak from comment #12)
> (In reply to Imre Deak from comment #11)
> > (In reply to Elio from comment #10)
> > > Sure, in the middle time in setting maxcpus in grub with 1 and it looks a
> > > lot better.
> > 
> > Ok, I can confirm this, I can see it on my system as well now. This started
> > to happen when I upgraded to the BIOS I suggested to you in comment#9, so
> > probably that won't solve your problem. Booting with maxcpus=1 gets rid of
> > the issue for me too. I will try now different BIOS versions to see which
> > one is the latest that works.
> > 
> > Meanwhile this isn't a graphics driver issue, I can see the problem even if
> > I don't start the graphical interface, just by trying to type something on
> > the text console. I notified already the core people (Mika Westerberg), he
> > promised to take a look at this.
> 
> One more thing I noticed that this is somehow related to GFX RC6 state. If
> we disable that via BIOS (Uncore/Render:C6 disable, GT PM: disable) or by
> booting with i915.enable_rc6=0 then we also don't have the problem. I assume
> entering RC6 would enable some deeper CPU/system level power state, which
> could cause this lag.

Two other BIOS setup options under 'CPU Configuration'/'CPU Power Management' to get rid of the lag (either one alone gets rid of the lag while having the above RC6 and GT PM options enabled):
1. Max Core C State: 'Fused value'->'Core C6'
2. Max Package C State: 'S0ix default' -> 'C0'/'PC2'
Comment 14 Imre Deak 2016-01-26 13:07:05 UTC
(In reply to Imre Deak from comment #13)
> Two other BIOS setup options under 'CPU Configuration'/'CPU Power
> Management' to get rid of the lag (either one alone gets rid of the lag
> while having the above RC6 and GT PM options enabled):
> 1. Max Core C State: 'Fused value'->'Core C6'
> 2. Max Package C State: 'S0ix default' -> 'C0'/'PC2'

Err, the above correctly is 'S0ix default' -> 'C0'. Setting it to PC2 is not enough.
Comment 15 Humberto Israel Perez Rodriguez 2016-01-27 17:19:43 UTC
(In reply to Imre Deak from comment #14)
> (In reply to Imre Deak from comment #13)
> > Two other BIOS setup options under 'CPU Configuration'/'CPU Power
> > Management' to get rid of the lag (either one alone gets rid of the lag
> > while having the above RC6 and GT PM options enabled):
> > 1. Max Core C State: 'Fused value'->'Core C6'
> > 2. Max Package C State: 'S0ix default' -> 'C0'/'PC2'
> 
> Err, the above correctly is 'S0ix default' -> 'C0'. Setting it to PC2 is not
> enough.

Hi Imre Deak :

Can you teach me how to set up this two BIOS features in the grub 

1. Max Core C State: 'Fused value'->'Core C6'
2. Max Package C State: 'S0ix default' -> 'C0'


like in your previous comment , i mean something like this :
i915.enable_rc6=0

i would appreciate your help in this, because i can set up in the BIOS, but is most comfortable set it in grub menu, thanks in advanced
Comment 16 Imre Deak 2016-01-28 15:28:20 UTC
(In reply to Humberto Israel Perez Rodriguez from comment #15)
> (In reply to Imre Deak from comment #14)
> > (In reply to Imre Deak from comment #13)
> > > Two other BIOS setup options under 'CPU Configuration'/'CPU Power
> > > Management' to get rid of the lag (either one alone gets rid of the lag
> > > while having the above RC6 and GT PM options enabled):
> > > 1. Max Core C State: 'Fused value'->'Core C6'
> > > 2. Max Package C State: 'S0ix default' -> 'C0'/'PC2'
> > 
> > Err, the above correctly is 'S0ix default' -> 'C0'. Setting it to PC2 is not
> > enough.
> 
> Hi Imre Deak :
> 
> Can you teach me how to set up this two BIOS features in the grub 
> 
> 1. Max Core C State: 'Fused value'->'Core C6'
> 2. Max Package C State: 'S0ix default' -> 'C0'
> 
> like in your previous comment , i mean something like this :
> i915.enable_rc6=0
> 
> i would appreciate your help in this, because i can set up in the BIOS, but
> is most comfortable set it in grub menu, thanks in advanced

I don't know of any option to limit the package C state. There seems to be processor.max_cstate to limit the core C state, but for some reason I had to limit it to C2 as opposed to the C6 limit I set in BIOS. So removing the i915.enable_rc6=0 option and booting with processor.max_cstate=2 also gets rid of the problem.
Comment 17 Imre Deak 2016-03-30 21:30:07 UTC

*** This bug has been marked as a duplicate of bug 94706 ***
Comment 18 Humberto Israel Perez Rodriguez 2016-08-25 16:19:34 UTC
this issue does not occurs with bios 147.21 APL


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.