函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\cpu\mce\intel.c Create Date:2022-07-27 09:02:52
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:cmci_storm_detect

函数原型:static bool cmci_storm_detect(void)

返回类型:bool

参数:

217  cnt等于Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(cmci_storm_cnt)
218  ts等于Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(cmci_time_stamp)
219  now等于jiffies
222  如果Operations for contexts that are safe from preemption/interrupts. These* operations verify that preemption is disabled.(cmci_storm_state)不等于CMCI_STORM_NONE则返回:true
225  如果time_before_eq(now, ts + CMCI_STORM_INTERVAL)则
226  cnt自加
227  否则
228  cnt等于1
229  __this_cpu_write(cmci_time_stamp, now)
231  __this_cpu_write(cmci_storm_cnt, cnt)
233  如果cnt小于等于CMCI_STORM_THRESHOLD则返回:false
236  cmci_toggle_interrupt_mode(false)
237  __this_cpu_write(cmci_storm_state, CMCI_STORM_ACTIVE)
238  r等于atomic_add_return(1, & cmci_storm_on_cpus)
239  Ensure that the timer is firing in @interval from now.
240  抢占保护下的写CPU(CMCI storm detection backoff counter* During storm, we reset this counter to INITIAL_CHECK_INTERVAL in case we've* encountered an error. If not, we decrement it by one. We signal the end of* the CMCI storm when it reaches 0., 5 minutes )
242  如果r恒等于1则打印注释信息("CMCI storm detected: switching to poll mode\n")
244  返回:true
调用者
名称描述
intel_threshold_interruptThe interrupt handler. This is called on every event.* Just call the poller directly to log any events.* This could in theory increase the threshold under high load,* but doesn't for now.