简体   繁体   English

Busy%: in /sys/devices/system/cpu/cpuX/core_ctl/global_state file in android kernel 是什么意思?

[英]What does Busy%: in /sys/devices/system/cpu/cpuX/core_ctl/global_state file in android kernel means?

Here is the snippet of the file "/sys/devices/system/cpu/cpuX/core_ctl/global_state"这是文件“/sys/devices/system/cpu/cpuX/core_ctl/global_state”的片段

    CPU0
    CPU: 0
    Online: 1
    Isolated: 0
    First CPU: 0
    Busy%: 0
    Is busy: 0
    Not preferred: 0
    Nr running: 0
    Active CPUs: 2
    Need CPUs: 2
    Nr isolated CPUs: 2
    Boost: 0

    What do the Busy% indicate can anyone explain?
    Is the busy% accurate?

The "Busy%" value in the /sys/devices/system/cpu/cpuX/core_ctl/global_state file on an Android kernel represents the percentage of time that the CPU core represented by "cpuX" has spent executing instructions during a given sampling period. /sys/devices/system/cpu/cpuX/core_ctl/global_state 文件中 Android kernel 上的“Busy%”值表示“cpuX”代表的 CPU 内核在给定采样周期内执行指令的时间百分比. It is used to determine the workload on a specific CPU core and can be used to make decisions about how to allocate resources on the device.它用于确定特定 CPU 内核的工作负载,并可用于决定如何在设备上分配资源。

To determine the workload of a specific core using the "Busy%" field in /sys/devices/system/cpu/cpuX/core_ctl/global_state file, you can:要使用 /sys/devices/system/cpu/cpuX/core_ctl/global_state 文件中的“Busy%”字段确定特定核心的工作负载,您可以:

  1. Read the value of the "Busy%" field for the specific core (X) in question.读取相关特定核心 (X) 的“Busy%”字段的值。
  2. Compare the value to the values for other cores to see if the workload is distributed evenly among the cores, or if one core is being used more heavily than the others.将该值与其他内核的值进行比较,以查看工作负载是否在内核之间均匀分布,或者一个内核是否比其他内核使用得更多。
  3. If one core has a consistently higher value, it indicates that this core is handling a higher workload compared to the others.如果一个内核的值始终较高,则表明与其他内核相比,该内核正在处理更高的工作负载。

Keep in mind that this method provides a general indication of the workload and should be used in conjunction with other tools and methods to get a complete picture of the performance of the system.请记住,此方法提供了工作负载的一般指示,应与其他工具和方法结合使用以全面了解系统的性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM