Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\idle.c Create Date:2022-07-28 09:37:48
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name: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.

Proto:static void cpuidle_idle_call(void)

Type:void

Parameter:Nothing

131  dev = cpuidle_get_device()
132  drv = cpuidle_get_cpu_driver(dev)
139  If need_resched() Then
140  The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
141  Return
150  If cpuidle_not_available(drv, dev) Then
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  Go to exit_idle
168  If idle_should_enter_s2idle() || forced_idle_latency_limit_ns Then
171  If idle_should_enter_s2idle() Then
175  If entered_state > 0 Then
183  Else
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  Else
193  bool stop_tick = true
198  next_state = cpuidle_select(drv, dev, & stop_tick)
200  If stop_tick || tick_nohz_tick_stopped() Then tick_nohz_idle_stop_tick()
202  Else 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  If WARN_ON_ONCE(Some architectures don't define arch_irqs_disabled(), so even if either* definition would be fine we need to use different ones for the time being* to avoid build issues.()) Then The local_irq_*() APIs are equal to the raw_local_irq*()* if !TRACE_IRQFLAGS.()
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.
Caller
NameDescribe
do_idleGeneric idle loop implementation* Called with polling cleared.