Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 May 2020 23:17:22 +0200
From:      Andreas Nilsson <andrnils@gmail.com>
To:        Diane Bruce <db@db.net>
Cc:        cem@freebsd.org, "Andrey V. Elsukov" <bu7cher@yandex.ru>,  Current FreeBSD <freebsd-current@freebsd.org>
Subject:   Re: hwpstate_intel hangs kernel
Message-ID:  <CAPS9%2BSsobn0%2Bze5=Ro5omC6Se5K47nK9qFFA1iG_-5L%2BKCOzOw@mail.gmail.com>
In-Reply-To: <20200527191242.GB13064@night.db.net>
References:  <CAPS9%2BSukk_MFzUFBjs2K8bjsayL%2BTedhtY9aC8VF-UCHKEpp-w@mail.gmail.com> <a2a81eb9-c7d8-869a-5024-6bf0000c22a1@yandex.ru> <ccebd015-ae44-b4b9-aca6-080528bc0d64@yandex.ru> <CAG6CVpXq1xL=u=yYWd_srCDFb2s1asN%2Bm9%2BGA43WF3%2BQmpq5aw@mail.gmail.com> <CAPS9%2BSuniZZ6mvQzFmMvY=5i-G%2BOjCF5A_yMnBYmrZWo77dOug@mail.gmail.com> <CAPS9%2BSs__9HTg6RAu1JrLa5YOB8hK1%2BZFD05mNP%2BSnih8qiO8w@mail.gmail.com> <20200521235659.GA14173@night.db.net> <CAPS9%2BSsMD67ck103wEX-TqXu7NG9sLjSpYVb6FeTfBDs9yr2uQ@mail.gmail.com> <20200527191242.GB13064@night.db.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, May 27, 2020, 21:12 Diane Bruce <db@db.net> wrote:

> On Wed, May 27, 2020 at 08:25:52PM +0200, Andreas Nilsson wrote:
> > On Fri, May 22, 2020 at 1:57 AM Diane Bruce <db@db.net> wrote:
> >
> > > On Wed, Feb 05, 2020 at 02:45:50PM +0100, Andreas Nilsson wrote:
> > >
> > > Ok I am going to respond to this old email from February..
> > >
> > > > Hello,
> > > >
> > > > I upgraded to a newer version,  git 87d669d3863-c266265, and I do not
> > > > experience the random hang anymore. The machine still hangs on boot
> on
> > > > "hwpstate_intel0: <Intel Speed Shift> on cpu0" unless I set
> > > > 'hint.hwpstate_intel.0.disabled="1"' in loader.conf.
> > > >
> > >
> > > As a few others know on IRC I ran into exactly this same problem
> > > on a brand new Lenovo Carbon. I missed this thread somehow.
> > > I also had to bisect the commit. Would it be possible to put
> > > a note into UPDATING and default to disabled=1 for now? ;)
> > >
> >
> >
> > Well, I've been trying to chase this a bit more. But I could sure use
> some
> > help from more experienced kernel developers.
> >
> >  debug.hwpstate_verbose="1" in loader.conf, and booting in verbose mode I
> > get this:
> >
> > pcib0: allocated type 4 (8x3f8-8xaf8) for rid 8 of uart0
> > uart0 failed to probe at port 0x3f8 irg 4 on isa0
> > pcib0: allocated type 4 (0x2f8-0x2f8) for rid 0 uart1
> > uart1 failed to probe at port 0x2f8 irq 3 on isa0
> > isa_probe_children: probing PnP devices
> > Acpi0sExecute: task queue not started
> > cpu0: hwpstate registered
> > Acpi0sExecute: task queue not started
> > cpu1: hwpstate registered
> > Acpi0sExecute; task queue not started
> > cpu2: hwpstate registered
> > Acpi0sExecute: task queue not started
> > cpu3: hwpstate registered
> > hwpstate_intel0: <Intel Speed Shift> on cpu0
> > hwpstate_intel0: hwpstate_attach1
> > hwpstate_intel0: hwpstate_attach2
> > hwpstate_intel0: hwpstate_attach3
> >
> > where the hwpstate_attachX is some
> device_printf(dev,"hwpstate_attachX\n");
> > I've sprinkled in to try to where it actually fails.
> >
> > I'm not sure about if device_printf happens immediately. The
> modifications
> > have been made to the function intel_hwpstate_attach around line 480 in
> >  sys/x86/cpufreq/hwpstate_intel.c
>
>
> In my tests No it does not fail immediately it fails after a few minutes.
> Thinking that was a possible bogus setting I have tried this:
>
>
> +#if 0
>         sc->high = IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(caps);
>         sc->guaranteed =
> IA32_HWP_CAPABILITIES_GUARANTEED_PERFORMANCE(caps);
>         sc->efficient = IA32_HWP_CAPABILITIES_EFFICIENT_PERFORMANCE(caps);
>         sc->low = IA32_HWP_CAPABILITIES_LOWEST_PERFORMANCE(caps);
> -
> +#else
> +       sc->high = IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(caps);
> +       sc->guaranteed = IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(caps);
> +       sc->efficient = IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(caps);
> +       sc->low =  IA32_HWP_CAPABILITIES_HIGHEST_PERFORMANCE(caps);
> +#endif
>
> e.g. setting all the steps to the same state.
>
> It still hangs but not immediately. What is confounding the matter is
> the Lenovo bios also allows one to set Intel Speed Shift.
>
> I've also been poking at this and reading the fine docs but I also
> have other stuff to look at and do.
>

Thanks for the info! I tried as you to have them all point to the same
state. My machine still hangs during attach.

What settings did you use in the bios? I could only choose min/max, no is
control which I seem to remember being able to on my other machines.

Could this all be down to a buggy bios?

Best regards
Andreas

.
>
> > > Yep. I also had to bisect this from what is now some 5 months ago :-(
> > >
> > > Diane
> > > --
> > > - db@FreeBSD.org db@db.net http://www.db.net/~db
> > >
>
> --
> - db@FreeBSD.org db@db.net http://www.db.net/~db
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAPS9%2BSsobn0%2Bze5=Ro5omC6Se5K47nK9qFFA1iG_-5L%2BKCOzOw>