Lines Matching +full:no +full:- +full:idle
1 // SPDX-License-Identifier: GPL-2.0-only
3 * Generic entry points for the idle threads and
4 * implementation of the idle task scheduling class.
14 * sched_idle_set_state - Record idle state for the current CPU.
29 cpu_idle_force_poll--; in cpu_idle_poll_ctrl()
104 * default_idle_call - Default CPU idle routine.
132 return -EBUSY; in call_cpuidle_s2idle()
141 * The idle task must be scheduled, it is pointless to go to idle, just in call_cpuidle()
142 * update no idle residency and return. in call_cpuidle()
145 dev->last_residency_ns = 0; in call_cpuidle()
147 return -EBUSY; in call_cpuidle()
151 * Enter the idle state previously returned by the governor decision. in call_cpuidle()
153 * care of re-enabling the local interrupts in call_cpuidle()
159 * cpuidle_idle_call - the main idle function
161 * NOTE: no locks or semaphores should be used here
174 * Check if the idle task must be rescheduled. If it is the in cpuidle_idle_call()
175 * case, exit the function after re-enabling the local IRQ. in cpuidle_idle_call()
190 * Suspend-to-idle ("s2idle") is a system state in which all user space in cpuidle_idle_call()
193 * the cpuidle governor and go straight for the deepest idle state in cpuidle_idle_call()
195 * timekeeping to prevent timer interrupts from kicking us out of idle in cpuidle_idle_call()
199 if (idle_should_enter_s2idle() || dev->forced_idle_latency_limit_ns) { in cpuidle_idle_call()
210 max_latency_ns = dev->forced_idle_latency_limit_ns; in cpuidle_idle_call()
221 * Ask the cpuidle framework to choose a convenient idle state. in cpuidle_idle_call()
241 * It is up to the idle functions to re-enable local interrupts in cpuidle_idle_call()
248 * Generic idle loop implementation
264 * Our polling bit is clear if we're not scheduled (i.e. if rq->curr != in do_idle()
265 * rq->idle). This means that, if rq->idle has the polling bit set, in do_idle()
276 * Interrupts shouldn't be re-enabled from that point on until in do_idle()
284 * - SLEEP-UNTIL-PENDING-INTERRUPT based instructions such as in do_idle()
288 * - sti;mwait() couple is fine because the interrupts are in do_idle()
289 * re-enabled only upon the execution of mwait, leaving no gap in do_idle()
290 * in-between. in do_idle()
292 * - ROLLBACK based idle handlers with the sleeping instruction in do_idle()
294 * when the interrupt detects it has interrupted an idle handler, in do_idle()
296 * need_resched() check before re-executing the sleeping in do_idle()
299 * appropriate CPU sleeping instruction, then a FAST-FORWARD in do_idle()
301 * interrupted an idle handler, it must resume to the end of in do_idle()
302 * this idle handler so that the generic idle loop is iterated in do_idle()
316 * In poll mode we re-enable interrupts and spin. Also if we in do_idle()
317 * detected in the wakeup from idle path that the tick in do_idle()
319 * idle as we know that the IPI is going to arrive right away. in do_idle()
334 * This is required because for polling idle loops we will not have had in do_idle()
349 * RCU relies on this call to be done outside of an RCU read-side in do_idle()
374 WRITE_ONCE(it->done, 1); in idle_inject_timer_fn()
388 WARN_ON_ONCE(current->policy != SCHED_FIFO); in play_idle_precise()
389 WARN_ON_ONCE(current->nr_cpus_allowed != 1); in play_idle_precise()
390 WARN_ON_ONCE(!(current->flags & PF_KTHREAD)); in play_idle_precise()
391 WARN_ON_ONCE(!(current->flags & PF_NO_SETAFFINITY)); in play_idle_precise()
393 WARN_ON_ONCE(current->mm); in play_idle_precise()
397 current->flags |= PF_IDLE; in play_idle_precise()
410 current->flags &= ~PF_IDLE; in play_idle_precise()
419 current->flags |= PF_IDLE; in cpu_startup_entry()
427 * idle-task scheduling class.
434 return task_cpu(p); /* IDLE tasks as never migrated */ in select_task_rq_idle()
445 * Idle tasks are unconditionally rescheduled:
462 schedstat_inc(rq->sched_goidle); in set_next_task_idle()
463 next->se.exec_start = rq_clock_task(rq); in set_next_task_idle()
469 return rq->idle; in pick_task_idle()
473 * It is not legal to sleep in the idle task - print a warning
480 printk(KERN_ERR "bad: scheduling from the idle thread!\n"); in dequeue_task_idle()
490 * goes along full dynticks. Therefore no local assumption can be made
514 * Simple, special scheduling class for the per-CPU idle tasks:
516 DEFINE_SCHED_CLASS(idle) = {
518 /* no enqueue/yield_task for idle tasks */