Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 8 Dec 2017 11:36:12 +0800
From:      Sepherosa Ziehau <sepherosa@gmail.com>
To:        Andriy Gapon <avg@freebsd.org>
Cc:        Alexey Dokuchaev <danfe@freebsd.org>, Jung-uk Kim <jkim@freebsd.org>, svn-src-head@freebsd.org,  svn-src-all@freebsd.org, src-committers <src-committers@freebsd.org>, cem@freebsd.org
Subject:   Re: svn commit: r326383 - head/sys/x86/cpufreq
Message-ID:  <CAMOc5czSLcQ3sF1U265GBbvF57w_9aeHXefOjddahf%2B2rFSDYA@mail.gmail.com>
In-Reply-To: <d91cbdff-d5ce-35a3-19e3-c16b9237d10e@FreeBSD.org>
References:  <201711300140.vAU1e7dC001292@repo.freebsd.org> <CAG6CVpVyooSG3rPG1GvqRZHT9Lyh48JBQb_tFf2-CzWmfW8JyQ@mail.gmail.com> <e412e02d-8b52-221f-1f3c-8c300b1b3067@FreeBSD.org> <CAG6CVpVtm%2BUUw1zxxGXEjKT8MqL8ZjqSaQh4=_0NJbFmcbQxVw@mail.gmail.com> <af56c6b4-d964-4a19-5647-3778eb0cc508@FreeBSD.org> <20171207100345.GA59559@FreeBSD.org> <d91cbdff-d5ce-35a3-19e3-c16b9237d10e@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Dec 8, 2017 at 6:23 AM, Andriy Gapon <avg@freebsd.org> wrote:
> On 07/12/2017 12:03, Alexey Dokuchaev wrote:
>> On Thu, Nov 30, 2017 at 03:08:49PM -0500, Jung-uk Kim wrote:
>>> ...
>>> Probably.  However, I am just trying to fix my FX-8350 and A10-6800 and
>>> I don't have Zen processors to verify the MSRs are actually working on
>>> those CPUs.
>>
>> Ah, that's so lovely, thanks Jung-uk; I feel that our support for AMD
>> fam. 15h CPUs is lacking.  E.g. only four P-states are reported for my
>> A8-5550M, while it supports boosted P-states per BKDG, and reading MSRs
>> directly via `sysutils/amdmsrtweaker' reports eight of them (P0 .. P7),
>> with three turbo P-states P0 P1 P2.
>>
>> Since you have A10-6800 you might try to reproduce what I see here with
>> A8-5550M.
>
> I think that the boosted states are supposed to be hidden from the OS.
> It may be possible to query them though hardware specific registers, but they
> can not be set by software directly anyway.

For most of the modern Intel CPUs, boosted state is _not_ hidden from
OS, it normally shows as max_freq+1, e.g. if max_freq is 3400, then
the boosted state will have freq 3401.

> My impression is that the proper way to observe the boost states is via APERF /
> MPERF MSRs.  They are useful for other things, e.g. C0 residency, too.

Yeah, that's the only way to observe the current frequency of the cpu;
on most of the modern Intel CPUs, P-state just sets the frequency
upper limit.

Thanks,
sephe



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMOc5czSLcQ3sF1U265GBbvF57w_9aeHXefOjddahf%2B2rFSDYA>