函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\idle.c Create Date:2022-07-27 10:38:21
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:puidle_idle_call - the main idle function* NOTE: no locks or semaphores should be used here* On archs that support TIF_POLLING_NRFLAG, is called with polling* set, and it returns with polling set. If it ever stops polling, it* must clear the polling bit.

函数原型:static void cpuidle_idle_call(void)

返回类型:void

参数:

131  dev等于cpuidle_get_device()
132  drv等于cpuidle_get_cpu_driver(dev)
139  如果need_resched()则
140  开中断()
141  返回
150  如果cpuidle_not_available(drv, dev)则
151  tick_nohz_idle_stop_tick()
152  _idle_enter - inform RCU that current CPU is entering idle* Enter idle mode, in other words, -leave- the mode in which RCU* read-side critical sections can occur. (Though RCU read-side* critical sections can occur in irq handlers in idle, a possibility
154  default_idle_call - Default CPU idle routine.* To use when the cpuidle framework cannot be used.
155  转到:exit_idle
168  如果idle_should_enter_s2idle()或forced_idle_latency_limit_ns
171  如果idle_should_enter_s2idle()则
175  如果entered_state大于0则
176  开中断()
177  转到:exit_idle
182  max_latency_ns等于U64_MAX
183  否则
187  tick_nohz_idle_stop_tick()
188  _idle_enter - inform RCU that current CPU is entering idle* Enter idle mode, in other words, -leave- the mode in which RCU* read-side critical sections can occur. (Though RCU read-side* critical sections can occur in irq handlers in idle, a possibility
190  next_state等于cpuidle_find_deepest_state(drv, dev, max_latency_ns)
191  call_cpuidle(drv, dev, next_state)
192  否则
193  bool stop_tick = true
198  next_state等于cpuidle_select(drv, dev, & stop_tick)
200  如果stop_ticktick_nohz_tick_stopped()则tick_nohz_idle_stop_tick()
202  否则tick_nohz_idle_retain_tick()
205  _idle_enter - inform RCU that current CPU is entering idle* Enter idle mode, in other words, -leave- the mode in which RCU* read-side critical sections can occur. (Though RCU read-side* critical sections can occur in irq handlers in idle, a possibility
207  entered_state等于call_cpuidle(drv, dev, next_state)
211  cpuidle_reflect(dev, entered_state)
214  exit_idle :
215  Idle thread specific functions to determine the need_resched* polling state.
220  如果WARN_ON_ONCE(已禁止中断())则开中断()
223  _idle_exit - inform RCU that current CPU is leaving idle* Exit idle mode, in other words, -enter- the mode in which RCU* read-side critical sections can occur.* If you add or remove a call to rcu_idle_exit(), be sure to test with* CONFIG_RCU_EQS_DEBUG=y.
调用者
名称描述
do_idleGeneric idle loop implementation* Called with polling cleared.