【问题标题】:What does kernel thermal zone mean in dts file?dts 文件中的内核热区是什么意思?
【发布时间】:2018-11-01 03:21:27
【问题描述】:

在我的内核的 dts 文件中,我有:

thermal-zones {
    cpu0_thermal: cpu0-thermal {
        thermal-sensors = <&tmuctrl_0>;
        polling-delay-passive = <1000>;
        polling-delay = <1000>;
        trips {
            cpu_alert0: cpu-alert-0 {
                temperature = <100000>;
                hysteresis = <1000>;
                type = "active";
            };
            cpu_alert1: cpu-alert-1 {
                temperature = <110000>;
                hysteresis = <1000>;
                type = "passive";
            };
            cpu_alert2: cpu-alert-2 {
                temperature = <120000>;
                hysteresis = <1000>;
                type = "passive";
            };
            cpu-crit-0 {
                temperature = <130000>;
                hysteresis = <1000>;
                type = "critical";
            };
        };

        cooling-maps {
            map0 {
                trip = <&cpu_alert0>;
                cooling-device = <&cpu0 1 1>;
            };
            map1 {
                trip = <&cpu_alert1>;
                cooling-device = <&cpu0 4 4>;
            };
            map2 {
                trip = <&cpu_alert2>;
                cooling-device = <&cpu0 10 10>;
            };
        };
    };
};

似乎被动意味着只使用CPU,主动意味着使用任何风扇冷却设备。

我的问题:这两个数字在 CPU 的冷却装置中代表什么?

https://www.kernel.org/doc/Documentation/devicetree/bindings/thermal/thermal.txt 说:“冷却状态由单个无符号整数表示,其中较大的数字意味着更大的散热。”

但是 1、4 和 10 是什么?仅当 cpufreq 按需提供时才适用吗?如何计算“冷却”频率? DTS 的其他部分是否与这些值相关联?

【问题讨论】:

    标签: linux-kernel dts heat


    【解决方案1】:

    我不完全确定它是通用的还是特定于我的 ARM 设备的,但我通过阅读提交 cmets 发现数字 (1、4、10) 仅在按需模式下对应于 CPU 的节流。在我的特定情况下,这些数字代表 100MHz 的节流测量值。因此,10 表示 CPU 在低于其最大频率 1GHz 时节流。

    【讨论】:

      【解决方案2】:

      in DTScooling-device = 用于表示与热区跳变点绑定的冷却设备的状态。在您的情况下,冷却设备是 cpu,这意味着您的热区跳闸点与 cpu 绑定,dts 中的 1 1 表示节流状态。所有这些都可以从 sysfs 接口读取,也可以从用户空间读取。通过以下链接了解详细信息: https://www.lookup2learn.com/post/thermal-management-in-linux

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2019-07-28
        • 2015-05-16
        • 1970-01-01
        • 1970-01-01
        • 2012-03-29
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多