Skylake: intel_pstate: fix PCT_TO_HWP macro

Wang, Xiaolong xiaolong.wang at intel.com
Wed Sep 30 02:34:10 UTC 2015


Is SKL-K the frequency unlocked desktop processor? So sounds like a special SKL-S.
We don't have a SKL-K
(or we don't know if it is
  for our Qual processor do not show a brand string like "Core i7-6700K",
  it only shows "Generic Intel ... at #.##GHz")

The patch just disable HWP on processors with model ID ("model" in "family/model/stepping") 94(0x5e),
SKL-S and SKL-H share this value.
So Jason, you can check your SKL-K processor's model ID from dmidecode or /proc/cpuinfo.

-Wang, Xiaolong

-----Original Message-----
From: Zhang, Xiong Y 
Sent: Wednesday, September 30, 2015 10:07 AM
To: Jason Gerard DeRose; Wang, Xiaolong; Tim Gardner
Cc: Ubuntu Kernel Team; Zhang, Xiong Y
Subject: RE: Skylake: intel_pstate: fix PCT_TO_HWP macro

Sorry, I don't know what's the SKL-K.
It is a permanent hang once kernel is loaded at very early stage. The reproduce rate is 100% at boot each time.

thanks
> -----Original Message-----
> From: Jason Gerard DeRose [mailto:jason at system76.com]
> Sent: Tuesday, September 29, 2015 10:28 PM
> To: Zhang, Xiong Y; Wang, Xiaolong; Tim Gardner
> Cc: Ubuntu Kernel Team
> Subject: Re: Skylake: intel_pstate: fix PCT_TO_HWP macro
> 
> On 09/29/2015 03:02 AM, Zhang, Xiong Y wrote:
> > I tried the latest 15.10 kernel with "fix PCT_TO_HWP macro" patch, it indeed
> have system hang on SKL-S machine.
> > Since upstream is still debugging this issue and seems the fix couldn't catch
> up 15.10 kernel freeze, I suggest Canonical to disable HWP on SKL-S with the
> attachment patch.
> > The attachment patch is really small and won't generate regression, it only
> disable HWP on SKL-S and let legacy intel p state driver take effect on SKL-S.
> HWP is still enabled on SKL-Y/U
> 
> So does this patch disabled HWP on the Skylake K SKUs also? (Not sure
> whether you refer to them as SKL-K or not.)
> 
> Also, can you provide more details on the nature of the hang? Is it a
> temporary hang, or a permanent hang? Does it cause a kernel panic? Is
> there any data from the kernel that can confirm when these hangs occur
> (in dmesg, or /sys, or whatever)?
> 
> If it's a temporary hang, I think I have perhaps experienced it tested
> SKL-S (if so, it was pretty easy to spot during high bitrate 1080p video
> playback, but that could have been an unrelated issue).
> 
> Overall I think the rational for this is sound as obviously fixing the
> pstate driver is most important for SKL-U and SKL-H.
> 
> But I'm still personally concerned about this as System76 will soon be
> launching a laptop whose base config uses SKL-S and can be equipped with
> SKL-K.
> 
> If these hangs are temporary and don't particularly impact the user
> experience, my personal vote would probably be to keep HWP enabled on
> all Skylake SKUs :D
> 
> > thanks
> >> -----Original Message-----
> >> From: Jason Gerard DeRose [mailto:jason at system76.com]
> >> Sent: Saturday, September 26, 2015 12:10 AM
> >> To: Wang, Xiaolong; Zhang, Xiong Y
> >> Cc: Ubuntu Kernel Team
> >> Subject: Re: Skylake: intel_pstate: fix PCT_TO_HWP macro
> >>
> >> Wang,
> >>
> >> On 09/24/2015 09:01 PM, Wang, Xiaolong wrote:
> >>> Hi Jason,
> >>> We tested
> >>>     a SKL-S Beta machine
> >>>       (Processor Stepping in BIOS is Q0, F/M/S is 6/94/1), and
> >>>     a SKL-S Qual machine
> >>>       (Processor Stepping in BIOS is R0/S0, F/M/S is 6/94/3)
> >>> On the Beta machine, Processor Frequency are found tied at the highest
> >>> possible value -- HWP does not work;
> >>> On the Qual machine, it hangs just after HWP enabled on each core.
> >>
> >> Thanks for sharing these insights.
> >>
> >>> Upstream have reproduced the hang on a Beta machine (weird),
> >>> but they say removing "quiet" from boot parameters can boot to OS.
> >>> I tried removing "quiet" on my Qual machine, it didn't work.
> >>
> >> Yeah, I'd be kinda doubtful that "quiet" would have any effect either
> >> way, but I guess weirder things have happened :)
> >>
> >>> As I know, upstream is still checking it but had not get the root cause
> >>> of that hang, and there is not a clear schedule to get that solved.
> >>
> >> Thank for the info!
> >> -Jason
> >>
> >>> -Wang, Xiaolong
> >>>
> >>> On 2015/9/25 9:25, Zhang, Xiong Y wrote:
> >>>> Hi, Xiaolong:
> >>>>      Could you help me answer this ?
> >>>>
> >>>> thanks
> >>>>> -----Original Message-----
> >>>>> From: Jason Gerard DeRose [mailto:jason at system76.com]
> >>>>> Sent: Thursday, September 24, 2015 10:44 PM
> >>>>> To: Zhang, Xiong Y; Ubuntu Kernel Team
> >>>>> Subject: Re: Skylake: intel_pstate: fix PCT_TO_HWP macro
> >>>>>
> >>>>> Thus far I've been testing this on SKL-S systems (one laptop, one
> >>>>> desktop) and haven't experienced any system hangs.
> >>>>>
> >>>>> Can you share any insight into the conditions under which these hangs
> >>>>> occur, so I can try to reproduce it?
> >>>>>
> >>>>> Also, when you say that hangs occur on "some SKL-S machines", are
> there
> >>>>> any common denominators among the problematic machines? Or put
> >> another
> >>>>> way, are there some SKL-S machines that are completely immune to
> these
> >>>>> hangs, and if so, what's the difference?
> >>>>>
> >>>>> Finally, an idea on the timeline for the complete fix?
> >>>>>
> >>>>> Thanks!
> >>>>>
> >>>>> On 09/23/2015 06:27 PM, Zhang, Xiong Y wrote:
> >>>>>> Yes, this patch will resolve p states on SKL-Y and SKL-U, but it also
> >> generate
> >>>>> system hang on some SKL-S machines. We are still waiting extra patches
> to
> >> fix
> >>>>> it.
> >>>>>>
> >>>>>> thanks
> >>>>>>> -----Original Message-----
> >>>>>>> From: kernel-team-bounces at lists.ubuntu.com
> >>>>>>> [mailto:kernel-team-bounces at lists.ubuntu.com] On Behalf Of Jason
> >> Gerard
> >>>>>>> DeRose
> >>>>>>> Sent: Thursday, September 24, 2015 2:52 AM
> >>>>>>> To: Ubuntu Kernel Team
> >>>>>>> Subject: Skylake: intel_pstate: fix PCT_TO_HWP macro
> >>>>>>>
> >>>>>>> I think commit 74da56ce5c6715630aed3ccc0fcb86a9210c1a56 is
> very
> >>>>> worthy
> >>>>>>> of cherry-picking before the kernel freeze.
> >>>>>>>
> >>>>>>>     From the bug I just filed:
> >>>>>>> https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1499040
> >>>>>>>
> >>>>>>> The intel pstate driver is currently quite broken on on Skylake
> hardware.
> >>>>>>>
> >>>>>>> The symptom is that the pstate driver can scale the frequency up, but
> >>>>>>> wont then scale it back down. So as soon as you hit a decent amount
> of
> >>>>>>> CPU load, you get stuck fluctuating in the turbo frequency ranges,
> never
> >>>>>>> even dropping as low as the base clock frequency. Obviously this has
> >>>>>>> very negative consequences for battery life.
> >>>>>>>
> >>>>>>> Commit 74da56ce5c6715630aed3ccc0fcb86a9210c1a56 fixes this
> >>>>> upstream,
> >>>>>>> which is included in 4.3rc2:
> >>>>>>>
> >>>>>>>
> >>>>>
> >>
> https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/commit/?id=74d
> >>>>>>> a56ce5c6715630aed3ccc0fcb86a9210c1a56
> >>>>>>>
> >>>>>>> I built a custom Ubuntu kernel with this commit and tested it on a
> >>>>>>> laptop with a Skylake i7-6700 CPU. As measured by powerstat, this
> >> commit
> >>>>>>> dropped the idle power consumption by 11 watts (from 34 to 23
> watts,
> >>>>>>> screen backlight was off during the test).
> >>>>>>>
> >>>>>>> I also tested this custom kernel on Haswell and Ivy Bridge hardware to
> >>>>>>> make sure it didn't introduce any behaviour changes in the pstate
> driver
> >>>>>>> on older hardware. As far as I can tell, on this older hardware pstate
> >>>>>>> is behaving exactly the same with and without this commit.
> >>>>>>>
> >>>>>>> Thanks!
> >>>>>>>
> >>>>>>> --
> >>>>>>> kernel-team mailing list
> >>>>>>> kernel-team at lists.ubuntu.com
> >>>>>>> https://lists.ubuntu.com/mailman/listinfo/kernel-team




More information about the kernel-team mailing list