Function report |
Source Code:arch\x86\kernel\cpu\mce\therm_throt.c |
Create Date:2022-07-28 08:04:12 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:throttle_active_work
Proto:static void __maybe_unused throttle_active_work(struct work_struct *work)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
struct work_struct * | work |
242 | this_cpu = smp_processor_id() |
243 | now = get_jiffies_64() |
247 | get_therm_status(level, & hot, & temp) |
249 | If Not hot && temp > baseline_temp Then |
250 | If rate_control_active Then pr_info("CPU%d: %s temperature/speed normal (total events = %lu)\n", this_cpu, level == CORE_LEVEL ? "Core" : "Package", count) |
256 | rate_control_active = false |
257 | Return |
260 | If time_before64(now, next_check) && rate_control_active Then Go to re_arm |
266 | If count != last_count Then |
274 | temp_samples[sample_index] = temp |
275 | sample_count++ |
276 | sample_index = (sample_index + 1) % ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) |
277 | If sample_count < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) Then Go to re_arm |
280 | avg = 0 |
281 | When i < ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) cycle avg += temp_samples[i] |
284 | avg /= ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(temp_samples) |
287 | pr_warn("CPU%d: %s temperature is above threshold, cpu clock is throttled (total events = %lu)\n", this_cpu, level == CORE_LEVEL ? "Core" : "Package", count) |
291 | rate_control_active = true |
296 | re_arm : |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |