I have read through the comments but still don't understand a lot of
things:

Please explain why a higher ratio results in a lower speed.

Please explain in detail what the `CpuRatio` UPD actually does. How does
it relate to `BootFrequency`?

Also, it seems to me that the measurements are void, because the currently
simplified tsc_freq_mhz() implementation doesn't support "flex ratio". I
think we should implement tsc_freq_mhz() correctly first, before jumping
to any conclusions.

Please don't assume thing just because there is one issue going on where tsc_freq is in question. I can ensures that issue doesn't have anything related to this work.

No, I was assuming things because the SDM implies the opposite behaviour
for CPUID+0x16 (that it doesn't reflect the actual speed). Please don't
just accept such documentation problems. If the documentation isn't fixed
and there is no comment in the code about the broken documentation, you
have to expect such disarray.

We have run some experiment to minimize platform power consumption by running CPU at lower speed and found that running at lower freq provides better boot time number specifically running below code

https://chromium.googlesource.com/chromiumos/platform/vboot/+/refs/heads/master/_vboot_reference/bdb/sha.c#115


>
> Additionally, for the interested reader: flex ratio adapts the maximum
> non-turbo ratio. And is mainly a feature to influence the TSC rate...

We are using CPU speed independent timer hence running at HFM or LFM doesn't matter to TSC

The current ratio doesn't matter, but the flex ratio does. You can see that
the timestamps stay correct with different flex-ratio settings while CPUID
+0x16 EAX changes. So the TSC rate has to change too.

View Change

1 comment:

To view, visit change 36864. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib01650f52f3d402f669e7e7f5b28a648b86f08ec
Gerrit-Change-Number: 36864
Gerrit-PatchSet: 8
Gerrit-Owner: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Aamir Bohra <aamir.bohra@intel.com>
Gerrit-Reviewer: Aaron Durbin <adurbin@chromium.org>
Gerrit-Reviewer: Duncan Laurie <dlaurie@chromium.org>
Gerrit-Reviewer: Furquan Shaikh <furquan@google.com>
Gerrit-Reviewer: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Gerrit-Reviewer: Patrick Rudolph <siro@das-labor.org>
Gerrit-Reviewer: Subrata Banik <subrata.banik@intel.com>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@chromium.org>
Gerrit-Reviewer: Tim Wawrzynczak <twawrzynczak@google.com>
Gerrit-Reviewer: V Sowmya <v.sowmya@intel.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-CC: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-CC: Nico Huber <nico.h@gmx.de>
Gerrit-CC: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Comment-Date: Mon, 18 Nov 2019 17:04:04 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Subrata Banik <subrata.banik@intel.com>
Comment-In-Reply-To: Arthur Heymans <arthur@aheymans.xyz>
Comment-In-Reply-To: Nico Huber <nico.h@gmx.de>
Gerrit-MessageType: comment