Skip to content

Add more information about DVFS #1906

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
May 21, 2021
Merged

Conversation

WizardTim
Copy link
Contributor

Added some useful information about DVFS that was hidden away in some forum posts.

WizardTim added 2 commits May 20, 2021 12:58
Information added in this commit is from
- Own experimentation
- Forum post https://www.raspberrypi.org/forums/viewtopic.php?p=1804133#p1804133
@lurch
Copy link
Contributor

lurch commented May 20, 2021

ping @pelwell and @popcornmix for confirmation.

@pelwell
Copy link
Contributor

pelwell commented May 20, 2021

That works for me.

@JamesH65
Copy link
Contributor

LGTM.

Copy link
Contributor

@lurch lurch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@JamesH65 JamesH65 merged commit d1df94e into raspberrypi:master May 21, 2021
@seamusdemora

This comment was marked as abuse.

@pelwell
Copy link
Contributor

pelwell commented Jul 4, 2021

What is dtfs? I take it you mean dvfs? Where do you get the idea that our Device Tree is controlling DVFS in some way?

@seamusdemora

This comment was marked as abuse.

@JamesH65
Copy link
Contributor

JamesH65 commented Jul 4, 2021

Those config.txt entries are unrelated to device tree.

@seamusdemora

This comment was marked as abuse.

@seamusdemora

This comment was marked as abuse.

@WizardTim
Copy link
Contributor Author

You don't need to set dvfs=1 to change the CPU governor. The 'powersave' governor just limits the CPU frequency to the default idle 600 MHz (on RPi4). I have found a small difference in power consumption at idle between 'ondemand' and 'powersave' to be < 0.2 W.

Using dvfs=1 in addition I got a further reduction of 0.03 to 0.05 W at idle, but at 1.8 GHz OC I got a reduction of 0.36 W (+75 mV vs +15 mV core voltage offset).

  • Tests done on a Raspberry Pi CM4 with headless Raspbian Lite install.


On Raspberry Pi 4 Model B, firmware from late November 2019 onwards implements Dynamic Voltage and Frequency Scaling. This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4B to run at lower temperatures whilst still providing the same performance.
Raspberry Pi 4 devices implement Dynamic Voltage and Frequency Scaling (DVFS). This technique (outlined on Wikipedia [here](https://en.wikipedia.org/wiki/Dynamic_voltage_scaling)) allows Raspberry Pi 4 devices to run at lower temperatures whilst still providing the same performance.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this was an existing reference to Wikipedia. But going forward post-#1911 I'm going to be stripping these out. Wikipedia is not a valid reference source.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is on many subjects. Certainly that article is fine.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right now, yes. But after someone vandalises the page or someone comes and makes major edits that are just wrong. Potentially not.

This comment was marked as abuse.

@seamusdemora

This comment was marked as abuse.

@JamesH65
Copy link
Contributor

JamesH65 commented Jul 5, 2021

The schematics vs Wiki stripping is easy to explain - done by completely different people/teams. So its not a priority thing, its a who has time to do stuff thing. But not, we don't supply full schematics, and never have. and have no plans at present to do so.

@seamusdemora

This comment was marked as abuse.

@WizardTim
Copy link
Contributor Author

@seamusdemora from what I've gathered:

  • dvfs=0 - DFS only, core voltage is fixed for highest clock speed even at idle
  • dvfs=1 - Allows under-voltage at low clocks and over-voltage at high clocks, default offset is -25 mV at idle (0.835 V)
  • dvfs=2 - Disallows any under-voltage but over-voltage at higher clocks is still permitted

I believe the mapping between frequency and voltage is unrelated to which governor you select but it can be changed with over_voltage=0x#####.

@seamusdemora

This comment was marked as abuse.

@JamesH65
Copy link
Contributor

JamesH65 commented Jul 5, 2021

Indeed, DVFS was implemented to keep the heat down on the Pi4, and it does a really good job, you can run fairly intensive tasks without too much throttling, as long as the duty cycle isn't too insane.

Note that we will always go for reliability/temperature control over the need to allow overclocking, so some changes we make might make overclocking less good, which I think has happened once in the past. But we do try to keep backwards functionality where possible.

@lurch
Copy link
Contributor

lurch commented Jul 5, 2021

See https://www.raspberrypi.org/blog/thermal-testing-raspberry-pi-4/ for more background info (but bear in mind it was written over 18 months ago, so things may have changed further since then).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants