From: Rik van Riel <riel@redhat.com>
To: Arto Jantunen <viiru@iki.fi>, Len Brown <lenb@kernel.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
"Chen, Yu C" <yu.c.chen@intel.com>,
Doug Smythies <dsmythies@telus.net>,
"Rafael J. Wysocki" <rjw@rjwysocki.net>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>
Subject: Re: SKL BOOT FAILURE unless idle=nomwait (was Re: PROBLEM: Cpufreq constantly keeps frequency at maximum on 4.5-rc4)
Date: Wed, 02 Mar 2016 12:10:54 -0500 [thread overview]
Message-ID: <1456938654.17839.9.camel@redhat.com> (raw)
In-Reply-To: <87si087tsr.fsf@iki.fi>
[-- Attachment #1: Type: text/plain, Size: 5784 bytes --]
On Wed, 2016-03-02 at 18:01 +0200, Arto Jantunen wrote:
> Len Brown <lenb@kernel.org> writes:
>
> > > Since this is about cpuidle, I'll also mention that this hardware
> > > requires idle=nomwait on the command line, otherwise the kernel
> > > will not
> > > boot.
> >
> > Arto,
> >
> > A boot failure is even more disruptive than bad P-state and C-state
> > choices!
> > Please tell us more about it.
> >
> > What c-states are used when you use "idle=nomwait"?
> > you can see them this way:
> >
> > grep . /sys/devices/system/cpu/cpu0/cpuidle/*/*
>
> /sys/devices/system/cpu/cpu0/cpuidle/state0/desc:CPUIDLE CORE POLL
> IDLE
> /sys/devices/system/cpu/cpu0/cpuidle/state0/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/latency:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
> /sys/devices/system/cpu/cpu0/cpuidle/state0/power:4294967295
> /sys/devices/system/cpu/cpu0/cpuidle/state0/residency:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/time:1405175
> /sys/devices/system/cpu/cpu0/cpuidle/state0/usage:135
It looks like the system spent some time in idle
poll, but not that much.
> /sys/devices/system/cpu/cpu0/cpuidle/state1/desc:ACPI HLT
> /sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/latency:1
> /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
> /sys/devices/system/cpu/cpu0/cpuidle/state1/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/residency:2
> /sys/devices/system/cpu/cpu0/cpuidle/state1/time:69898878
> /sys/devices/system/cpu/cpu0/cpuidle/state1/usage:25539
This looks reasonable, with an exit latency of 1 us,
and a lot of idle time spent here.
> /sys/devices/system/cpu/cpu0/cpuidle/state2/desc:ACPI IOPORT 0x1816
> /sys/devices/system/cpu/cpu0/cpuidle/state2/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state2/latency:151
> /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C2
> /sys/devices/system/cpu/cpu0/cpuidle/state2/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state2/residency:302
> /sys/devices/system/cpu/cpu0/cpuidle/state2/time:28132
> /sys/devices/system/cpu/cpu0/cpuidle/state2/usage:10724
The exit latency for your C2 and C3 states look excessive,
with 151 and 1034 microseconds, respectively.
I believe there are supposed to be some lower latency
idle states in there. The skl_cstates table in
drivers/idle/intel_idle.c suggests you should be seeing
states with exit latencies of 2, 10, 70, 85, and 124
us before getting to that C2 state you see above.
As you can see from the "time" stats, your CPU spends
most of its time in HLT or polling, and very little time
in these deeper, much much slower idle states.
Having the mwait based idle states working would probably
get the CPU to spend a lot less time in HLT, and more time
in "proper" idle states.
> /sys/devices/system/cpu/cpu0/cpuidle/state3/desc:ACPI IOPORT 0x1819
> /sys/devices/system/cpu/cpu0/cpuidle/state3/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state3/latency:1034
> /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3
> /sys/devices/system/cpu/cpu0/cpuidle/state3/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state3/residency:2068
> /sys/devices/system/cpu/cpu0/cpuidle/state3/time:14169
> /sys/devices/system/cpu/cpu0/cpuidle/state3/usage:3375
> > Please boot with intel_idle.max_cstate=0
> >
> > If that also boots, please again show the available c-states via
> > the grep above.
>
> It does, here:
>
> /sys/devices/system/cpu/cpu0/cpuidle/state0/desc:CPUIDLE CORE POLL
> IDLE
> /sys/devices/system/cpu/cpu0/cpuidle/state0/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/latency:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/name:POLL
> /sys/devices/system/cpu/cpu0/cpuidle/state0/power:4294967295
> /sys/devices/system/cpu/cpu0/cpuidle/state0/residency:0
> /sys/devices/system/cpu/cpu0/cpuidle/state0/time:30951
> /sys/devices/system/cpu/cpu0/cpuidle/state0/usage:132
> /sys/devices/system/cpu/cpu0/cpuidle/state1/desc:ACPI FFH INTEL MWAIT
> 0x0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/latency:1
> /sys/devices/system/cpu/cpu0/cpuidle/state1/name:C1
> /sys/devices/system/cpu/cpu0/cpuidle/state1/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state1/residency:2
> /sys/devices/system/cpu/cpu0/cpuidle/state1/time:4231850
> /sys/devices/system/cpu/cpu0/cpuidle/state1/usage:14709
> /sys/devices/system/cpu/cpu0/cpuidle/state2/desc:ACPI FFH INTEL MWAIT
> 0x33
> /sys/devices/system/cpu/cpu0/cpuidle/state2/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state2/latency:151
> /sys/devices/system/cpu/cpu0/cpuidle/state2/name:C2
> /sys/devices/system/cpu/cpu0/cpuidle/state2/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state2/residency:302
> /sys/devices/system/cpu/cpu0/cpuidle/state2/time:6524492
> /sys/devices/system/cpu/cpu0/cpuidle/state2/usage:4621
> /sys/devices/system/cpu/cpu0/cpuidle/state3/desc:ACPI FFH INTEL MWAIT
> 0x60
> /sys/devices/system/cpu/cpu0/cpuidle/state3/disable:0
> /sys/devices/system/cpu/cpu0/cpuidle/state3/latency:1034
> /sys/devices/system/cpu/cpu0/cpuidle/state3/name:C3
> /sys/devices/system/cpu/cpu0/cpuidle/state3/power:0
> /sys/devices/system/cpu/cpu0/cpuidle/state3/residency:2068
> /sys/devices/system/cpu/cpu0/cpuidle/state3/time:52217106
> /sys/devices/system/cpu/cpu0/cpuidle/state3/usage:3364
>
> > Does it happen if you use default cmdline,
> > but edit intel_idle.c to comment out c8 and c9 support?
>
> That also boots, ts.out attached (as is the patch to do this, to make
> sure there is no miscommunication). With this change the original bug
> disappears as well.
>
--
--
All rights reversed
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 473 bytes --]
next prev parent reply other threads:[~2016-03-02 17:10 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 17:51 SKL BOOT FAILURE unless idle=nomwait (was Re: PROBLEM: Cpufreq constantly keeps frequency at maximum on 4.5-rc4) Len Brown
[not found] ` <87si087tsr.fsf@iki.fi>
2016-03-02 17:10 ` Rik van Riel [this message]
2016-03-08 21:13 ` Len Brown
2016-03-08 21:19 ` Len Brown
2016-03-09 17:01 ` Arto Jantunen
2016-03-09 23:03 ` Doug Smythies
2016-03-09 23:18 ` Rafael J. Wysocki
2016-03-09 23:45 ` Doug Smythies
2016-03-09 23:59 ` Rafael J. Wysocki
2016-03-11 14:03 ` Rik van Riel
2016-03-11 18:22 ` Doug Smythies
2016-03-11 20:30 ` Rik van Riel
2016-03-11 23:54 ` Rafael J. Wysocki
2016-03-12 0:46 ` Doug Smythies
2016-03-12 1:45 ` Rafael J. Wysocki
2016-03-12 2:02 ` Rafael J. Wysocki
2016-03-13 7:46 ` Doug Smythies
2016-03-14 1:32 ` Rafael J. Wysocki
2016-03-14 6:39 ` Doug Smythies
2016-03-14 12:47 ` Rafael J. Wysocki
2016-03-14 14:31 ` Rik van Riel
2016-03-14 15:21 ` Rafael J. Wysocki
2016-03-14 17:45 ` Rik van Riel
2016-03-14 22:55 ` Rafael J. Wysocki
2016-03-15 2:03 ` Rik van Riel
2016-03-16 0:32 ` Rafael J. Wysocki
2016-03-16 0:37 ` Rafael J. Wysocki
2016-03-16 0:55 ` Rik van Riel
2016-03-16 1:53 ` Rafael J. Wysocki
2016-03-16 13:02 ` Rafael J. Wysocki
2016-03-16 14:01 ` Rik van Riel
2016-03-16 14:14 ` Rafael J. Wysocki
2016-03-16 14:46 ` Rik van Riel
2016-03-16 15:05 ` Rafael J. Wysocki
2016-03-16 15:07 ` Rik van Riel
2016-03-16 15:09 ` Rafael J. Wysocki
2016-03-16 16:14 ` [PATCH] cpuidle: use high confidence factors only when considering polling Rik van Riel
2016-03-18 0:45 ` Rafael J. Wysocki
2016-03-18 6:32 ` Doug Smythies
2016-03-18 13:11 ` Rafael J. Wysocki
2016-03-18 18:32 ` Doug Smythies
2016-03-18 19:29 ` Rik van Riel
2016-03-18 20:59 ` Doug Smythies
2016-03-18 21:24 ` Rafael J. Wysocki
2016-03-18 21:26 ` Rik van Riel
2016-03-18 23:40 ` Rafael J. Wysocki
2016-03-18 21:35 ` Rik van Riel
2016-03-18 21:48 ` Rafael J. Wysocki
2016-03-18 21:52 ` Rik van Riel
2016-03-18 22:09 ` Rafael J. Wysocki
2016-03-18 22:28 ` Rik van Riel
2016-03-18 23:29 ` Rafael J. Wysocki
2016-03-18 21:56 ` Rafael J. Wysocki
2016-03-18 22:38 ` Rafael J. Wysocki
2016-03-18 22:56 ` Rafael J. Wysocki
2016-03-19 1:53 ` Rik van Riel
2016-03-19 2:06 ` Rafael J. Wysocki
2016-03-19 2:17 ` Rik van Riel
2016-03-19 2:33 ` Rafael J. Wysocki
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1456938654.17839.9.camel@redhat.com \
--to=riel@redhat.com \
--cc=dsmythies@telus.net \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rjw@rjwysocki.net \
--cc=srinivas.pandruvada@linux.intel.com \
--cc=viiru@iki.fi \
--cc=viresh.kumar@linaro.org \
--cc=yu.c.chen@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).