Navigation

    全志在线开发者论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • 在线文档
    • 社区主页

    请教如何调节 Tina 的 cpufreq policy

    Linux
    3
    11
    441
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • RayZhang
      RayZhang LV 5 last edited by

      Hello,刚刚看到

      这个。

      我们的产品可能需要提高一下性能看看效果(不是特别注重功耗)。 所以想请教一下如何调节到 “performance” 的 cpufreq policy 模式? 🙂

      我们的产品是 R818 芯片。(我有看到 D1芯片 的相关方法,但不知道适用不适用 R818)

      C 1 Reply Last reply Reply Quote Share 0
      • C
        chengwei_peng LV 6 @RayZhang last edited by

        @rayzhang 使用的,可以在make kernel_menuconfig中将CPU的调频模式配置为performance,也可以通过echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor将CPU调频模式设置为performance。

        RayZhang 1 Reply Last reply Reply Quote Share 0
        • RayZhang
          RayZhang LV 5 @chengwei_peng last edited by

          hello @chengwei_peng

          在我的编译环境里,

          source ./build/envsetup.sh
          lunch 1
          make kernel_menuconfig
          

          之后就是这样的配置

          90025087-3324-4037-a568-dd30f8dc818e-image.png

          这里默认就是 性能模式 了吧?

          另外我在设备上,没有找到相应的文件节点,不知道如何 double check 当前的CPU 是否处于 性能模式呢? 我的寻找方法如下(没有找到 scaling_governor 文件):

          
          root@TinaLinux:/sys/devices/system/cpu/cpu0# uname -a
          Linux TinaLinux 4.9.191 #122 SMP PREEMPT Mon Nov 21 10:38:26 UTC 2022 aarch64 GNU/Linux
          root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -la
          drwxr-xr-x    6 root     root             0 Jan  1 00:01 .
          drwxr-xr-x    9 root     root             0 Jan  1 00:01 ..
          drwxr-xr-x    2 root     root             0 Jan  1 00:10 hotplug
          lrwxrwxrwx    1 root     root             0 Jan  1 00:10 of_node -> ../../../../firmware/devicetree/base/cpus/cpu@0
          -rw-r--r--    1 root     root          4096 Jan  1 00:10 online
          drwxr-xr-x    2 root     root             0 Jan  1 00:10 power
          drwxr-xr-x    3 root     root             0 Jan  1 00:10 regs
          lrwxrwxrwx    1 root     root             0 Jan  1 00:10 subsystem -> ../../../../bus/cpu
          drwxr-xr-x    2 root     root             0 Jan  1 00:10 topology
          -rw-r--r--    1 root     root          4096 Jan  1 00:01 uevent
          root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpu
          cpu0/     cpu1/     cpu2/     cpu3/     cpufreq/
          root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpu
          cpu0/     cpu1/     cpu2/     cpu3/     cpufreq/
          root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpufreq/
          root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -la ../cpufreq/
          drwxr-xr-x    2 root     root             0 Jan  1 00:10 .
          drwxr-xr-x    9 root     root             0 Jan  1 00:01 ..
          root@TinaLinux:/sys/devices/system/cpu/cpu0#
          
          C RayZhang 2 Replies Last reply Reply Quote Share 0
          • C
            chengwei_peng LV 6 @RayZhang last edited by

            @rayzhang 居然没有,你的是什么平台,SDK哪里来的?

            RayZhang 1 Reply Last reply Reply Quote Share 0
            • RayZhang
              RayZhang LV 5 @chengwei_peng last edited by

              @chengwei_peng 我们产品是基于 R818(A133_LINUX), SDK供应商给的,也不知道从哪拿的 😥

              或者看能否方便对接一下全志官方的渠道获取最新的系统源码,便于方便调试和排查问题~~~

              xiaowenge 1 Reply Last reply Reply Quote Share 0
              • xiaowenge
                DOT小文哥 LV 8 @RayZhang last edited by

                @rayzhang 在 请教如何调节 Tina 的 cpufreq policy 中说:

                @chengwei_peng 我们产品是基于 R818(A133_LINUX), SDK供应商给的,也不知道从哪拿的 😥

                或者看能否方便对接一下全志官方的渠道获取最新的系统源码,便于方便调试和排查问题~~~

                跟代理商确认一下,按道理最新版本应该是有的(不是最新也有啊,这个功能在内核里有些年了

                1 Reply Last reply Reply Quote Share 0
                • RayZhang
                  RayZhang LV 5 last edited by

                  hello @xiaowenge , 话说还有没有什么方法可以知道当前CPU是否在最佳性能状态下运行呢

                  C 1 Reply Last reply Reply Quote Share 0
                  • C
                    chengwei_peng LV 6 @RayZhang last edited by

                    @rayzhang 从目前的来看,没有调频调压,应该不是最高频运行。

                    1 Reply Last reply Reply Quote Share 0
                    • RayZhang
                      RayZhang LV 5 @RayZhang last edited by

                      hello @chengwei_peng ,不过我在 make kernel_menuconfig 当中,却有这个选项,不知道为啥机器上没有这个文件节点呢?

                      @rayzhang 在 请教如何调节 Tina 的 cpufreq policy 中说:

                      hello @chengwei_peng

                      在我的编译环境里,

                      source ./build/envsetup.sh
                      lunch 1
                      make kernel_menuconfig
                      

                      之后就是这样的配置

                      90025087-3324-4037-a568-dd30f8dc818e-image.png

                      这里默认就是 性能模式 了吧?

                      另外我在设备上,没有找到相应的文件节点,不知道如何 double check 当前的CPU 是否处于 性能模式呢? 我的寻找方法如下(没有找到 scaling_governor 文件):

                      
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# uname -a
                      Linux TinaLinux 4.9.191 #122 SMP PREEMPT Mon Nov 21 10:38:26 UTC 2022 aarch64 GNU/Linux
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -la
                      drwxr-xr-x    6 root     root             0 Jan  1 00:01 .
                      drwxr-xr-x    9 root     root             0 Jan  1 00:01 ..
                      drwxr-xr-x    2 root     root             0 Jan  1 00:10 hotplug
                      lrwxrwxrwx    1 root     root             0 Jan  1 00:10 of_node -> ../../../../firmware/devicetree/base/cpus/cpu@0
                      -rw-r--r--    1 root     root          4096 Jan  1 00:10 online
                      drwxr-xr-x    2 root     root             0 Jan  1 00:10 power
                      drwxr-xr-x    3 root     root             0 Jan  1 00:10 regs
                      lrwxrwxrwx    1 root     root             0 Jan  1 00:10 subsystem -> ../../../../bus/cpu
                      drwxr-xr-x    2 root     root             0 Jan  1 00:10 topology
                      -rw-r--r--    1 root     root          4096 Jan  1 00:01 uevent
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpu
                      cpu0/     cpu1/     cpu2/     cpu3/     cpufreq/
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpu
                      cpu0/     cpu1/     cpu2/     cpu3/     cpufreq/
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -l ../cpufreq/
                      root@TinaLinux:/sys/devices/system/cpu/cpu0# ls -la ../cpufreq/
                      drwxr-xr-x    2 root     root             0 Jan  1 00:10 .
                      drwxr-xr-x    9 root     root             0 Jan  1 00:01 ..
                      root@TinaLinux:/sys/devices/system/cpu/cpu0#
                      
                      C 1 Reply Last reply Reply Quote Share 0
                      • C
                        chengwei_peng LV 6 @RayZhang last edited by

                        @rayzhang 你的配置已经是性能模式了,但是启动之后却不是。应该是你SDK有什么异常修改了,和提供SDK的人确认吧

                        1 Reply Last reply Reply Quote Share 0
                        • RayZhang
                          RayZhang LV 5 last edited by

                          @chengwei_peng 我们后来找代理厂商拿到了最新的SDK后, 能够cat 该节点~

                          多谢各位大佬支持 ✌ ✌ ✌ ✌ ✌ ✌

                          1 Reply Last reply Reply Quote Share 0
                          • 1 / 1
                          • First post
                            Last post

                          Copyright © 2022 深圳全志在线有限公司 粤ICP备2021084185号 粤公网安备44030502007680号

                          行为准则 | 用户协议 | 隐私权政策