From: Jochen Hein <jochen@jochen.org>
To: Len Brown <lenb@kernel.org>
Cc: Vincent Gerris <vgerris@gmail.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Linux PM <linux-pm@vger.kernel.org>,
Jacob Pan <jacob.jun.pan@linux.intel.com>,
Hans de Goede <hdegoede@redhat.com>
Subject: Re: [PATCH] intel_idle: work around errate VLP52 on Baytrail CPUs
Date: Tue, 27 Dec 2016 21:44:16 +0100 [thread overview]
Message-ID: <83ful9yue7.fsf@echidna.jochen.org> (raw)
In-Reply-To: <CAJvTdK=sFHRo3FQ-ebWM7qVY3iLadWUFA+iacB8jwfHtJyNWGA@mail.gmail.com> (Len Brown's message of "Tue, 27 Dec 2016 15:37:26 -0500")
Hi Len,
Len Brown <lenb@kernel.org> writes:
>>>> On Mon, Dec 19, 2016 at 7:19 PM, Jochen Hein <jochen@jochen.org> wrote:
>>>> >
>>>> > There are frequent hangs on Baytrail CPUs according to
>>>> > https://bugzilla.kernel.org/show_bug.cgi?id=109051.
>>>> > This patch works around the errata by disabling C6.
>>>> > +Problem:
>>>> > +If core C6 is entered after the start of an interrupt service routine but before a write
>>>> > +to the APIC EOI (End of Interrupt) register, and the core is woken up by an event
>>>> > +other than a fixed interrupt source the core may drop the EOI transaction the next
>>>> > +time APIC EOI register is written and further interrupts from the same or lower
>>>> > +priority level will be blocked.
>>>> > +
>>>> > +Implication:
>>>> > +EOI transactions may be lost and interrupts may be blocked when core C6 is used
>>>> > +during interrupt service routines.
>
> Exactly how is it possible for Linux to enter idle and issue an MWAIT
> from _within_ an interrupt handler?
I really have no idea - all I can say is that for all Kernels < 4.9 I
had to disable C6 to have a stable system.
4.9 seems stable for me now.
>>>> > +Workaround:
>>>> > +It is possible for the firmware to contain a workaround for this erratum.
>>>> > + */
>>>> > +static void byt_idle_state_table_update(void)
>>>> > +{
>>>> > + printk(PREFIX "byt_idle_state_table_update reached\n");
>>>> > + byt_cstates[1].disabled = 1; /* C6N-BYT */
>>>> > + byt_cstates[2].disabled = 1; /* C6S-BYT */
>>>> > +}
>>>> > +/*
>>>> > * sklh_idle_state_table_update(void)
>>>> > *
>>>> > * On SKL-H (model 0x5e) disable C8 and C9 if:
>>>> > @@ -1264,6 +1292,10 @@
>>>> > case 0x3e: /* IVT */
>>>> > ivt_idle_state_table_update();
>>>> > break;
>>>> > + case 0x37: /* BYT */
>>>> > + printk(PREFIX "intel_idle_state_table_update BYT 0x37 reached\n");
>>>> > + byt_idle_state_table_update();
>>>> > + break;
>
> If the right strategy were to disable C6 for all of BYT, then the
> right implementation
> would be to delete those states from byt_cstates[], rather than for a
> routine to mark
> them as disabled. Note that a user can not later enable a state that is marked
> as disabled here, it is never registered with cpuidle, and thus the effect
> is exactly the same as if the entry were never in the table in the first place.
Would that be a useful workaround for older stable kernels? I think we
should try to get stable systems to the affected users.
Jochen
--
The only problem with troubleshooting is that the trouble shoots back.
next prev parent reply other threads:[~2016-12-27 20:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-12-19 18:19 [PATCH] intel_idle: work around errate VLP52 on Baytrail CPUs Jochen Hein
2016-12-19 19:43 ` Rafael J. Wysocki
[not found] ` <CA+8K-g=fXN9TWWxkV1AEEjXJLhwJEQ2PB434gKQ9Z7bL=yf+zA@mail.gmail.com>
2016-12-27 17:24 ` Vincent Gerris
2016-12-27 20:37 ` Len Brown
2016-12-27 20:44 ` Jochen Hein [this message]
2016-12-27 21:27 ` Len Brown
2016-12-28 12:56 ` Vincent Gerris
2016-12-28 18:47 ` Jacob Pan
2017-01-11 23:14 ` Len Brown
2017-01-11 23:22 ` Jacob Pan
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=83ful9yue7.fsf@echidna.jochen.org \
--to=jochen@jochen.org \
--cc=hdegoede@redhat.com \
--cc=jacob.jun.pan@linux.intel.com \
--cc=lenb@kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=rafael@kernel.org \
--cc=vgerris@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.