How fast can CPU governors change their frequency?


Question

All CPU governors descriptions that I could find use subjective words such as slow and fast to explain how the frequency changes over certain conditions.



What are the typical values here, are we taking about over or under 1ms?



I'm curious about a) how fast can the hardware go from min to max and vice versa and b) what would be a reasonably conservative number such as in a on demand cool down?



Are there any typical values for say an open source ROM or any other, in such and such device, available anywhere? Or in the lack of it, is it feasible to measure my own device over adb/ndk/sdk tinkering?


Answer

This is what I got on my S4 international with CyanogenMod Rom 4.4.4 nightly build from 2015-06-14 with an on demand cpu governor.



On this test I opened the coursera app then browsed for some section. So it's a typical one touch action what you're going to see here.



So I did an adb shell and started tinkering. I found nothing usefull on /proc/cpuinfo, then I headed for dmesg.



Note: to run dmesg you need to be root.



Note 2: dmesg -c clears the buffer, so you can be sure you won't see the same thing twice. It helps because it's kinda confusing because it's going up and down all the time.



root@ja3g:/proc # dmesg -c | grep -i clock

  
<6>[74960.230777] B0 23943 PVR_K: SGX change clock [177] Mhz -> [266] MHz req [266] MHz / M[800] / B[0]
<6>[74960.330888] B0 23943 PVR_K: SGX change clock [266] Mhz -> [350] MHz req [350] MHz / M[800] / B[0]
<6>[74960.431147] L0 23943 PVR_K: SGX change clock [350] Mhz -> [480] MHz req [480] MHz / M[800] / B[0]
<6>[74960.630002] L0 23943 PVR_K: SGX change clock [480] Mhz -> [350] MHz req [350] MHz / M[800] / B[0]
<6>[74960.930147] B0 23943 PVR_K: SGX change clock [350] Mhz -> [266] MHz req [266] MHz / M[800] / B[0]
<6>[74961.229909] B0 23943 PVR_K: SGX change clock [266] Mhz -> [177] MHz req [177] MHz / M[800] / B[0]
<6>[74962.330790] L0 23943 PVR_K: SGX change clock [177] Mhz -> [266] MHz req [266] MHz / M[800] / B[0]
<6>[74962.734868] L0 23943 PVR_K: SGX change clock [266] Mhz -> [177] MHz req [177] MHz / M[800] / B[0]


My interpretation of the data is the following:
I touched the screen and it started transitioning about 74960.230777 seconds from boot, when the governor kicked in.
It went from min frequency (177) to 266 then 350 and finally 480 Mhz at 74960.431147 seconds, meaning about 200 ms after it started throttling up.



Then it started slowing down on 74960.630002, reaching minimal speed on 74961.229909 (600 ms later). I have no clue what happened after that, probably it was still building something on the screen and throttled up and down again.



I don't even know if this makes sense, I have 4 slow processor and another 4 fast/power hungry processors, maybe I should run some heavy lifting tasks to be more sure of what happens.



It's funny though to notice that even incoming unread hangout text messages make a small bump from 177 to 266 to 177 MHz.


Topics


2D Engines   3D Engines   9-Patch   Action Bars   Activities   ADB   Advertisements   Analytics   Animations   ANR   AOP   API   APK   APT   Architecture   Audio   Autocomplete   Background Processing   Backward Compatibility   Badges   Bar Codes   Benchmarking   Bitmaps   Bluetooth   Blur Effects   Bread Crumbs   BRMS   Browser Extensions   Build Systems   Bundles   Buttons   Caching   Camera   Canvas   Cards   Carousels   Changelog   Checkboxes   Cloud Storages   Color Analysis   Color Pickers   Colors   Comet/Push   Compass Sensors   Conferences   Content Providers   Continuous Integration   Crash Reports   Credit Cards   Credits   CSV   Curl/Flip   Data Binding   Data Generators   Data Structures   Database   Database Browsers   Date &   Debugging   Decompilers   Deep Links   Dependency Injections   Design   Design Patterns   Dex   Dialogs   Distributed Computing   Distribution Platforms   Download Managers   Drawables   Emoji   Emulators   EPUB   Equalizers &   Event Buses   Exception Handling   Face Recognition   Feedback &   File System   File/Directory   Fingerprint   Floating Action   Fonts   Forms   Fragments   FRP   FSM   Functional Programming   Gamepads   Games   Geocaching   Gestures   GIF   Glow Pad   Gradle Plugins   Graphics   Grid Views   Highlighting   HTML   HTTP Mocking   Icons   IDE   IDE Plugins   Image Croppers   Image Loaders   Image Pickers   Image Processing   Image Views   Instrumentation   Intents   Job Schedulers   JSON   Keyboard   Kotlin   Layouts   Library Demos   List View   List Views   Localization   Location   Lock Patterns   Logcat   Logging   Mails   Maps   Markdown   Mathematics   Maven Plugins   MBaaS   Media   Menus   Messaging   MIME   Mobile Web   Native Image   Navigation   NDK   Networking   NFC   NoSQL   Number Pickers   OAuth   Object Mocking   OCR Engines   OpenGL   ORM   Other Pickers   Parallax List   Parcelables   Particle Systems   Password Inputs   PDF   Permissions   Physics Engines   Platforms   Plugin Frameworks   Preferences   Progress Indicators   ProGuard   Properties   Protocol Buffer   Pull To   Purchases   Push/Pull   QR Codes   Quick Return   Radio Buttons   Range Bars   Ratings   Recycler Views   Resources   REST   Ripple Effects   RSS   Screenshots   Scripting   Scroll Views   SDK   Search Inputs   Security   Sensors   Services   Showcase Views   Signatures   Sliding Panels   Snackbars   SOAP   Social Networks   Spannable   Spinners   Splash Screens   SSH   Static Analysis   Status Bars   Styling   SVG   System   Tags   Task Managers   TDD &   Template Engines   Testing   Testing Tools   Text Formatting   Text Views   Text Watchers   Text-to   Toasts   Toolkits For   Tools   Tooltips   Trainings   TV   Twitter   Updaters   USB   User Stories   Utils   Validation   Video   View Adapters   View Pagers   Views   Watch Face   Wearable Data   Wearables   Weather   Web Tools   Web Views   WebRTC   WebSockets   Wheel Widgets   Wi-Fi   Widgets   Windows   Wizards   XML   XMPP   YAML   ZIP Codes