Lines Matching defs:task
75 * RT task with a DL task could hog a CPU. But DL does
76 * not reset the period. If a deadline task was running
77 * without an RT task running, it can cause RT tasks to
410 /* Update the highest prio pushable task */
420 /* Update the new highest prio pushable task */
471 * Verify the fitness of task @p to run on @cpu taking into account the uclamp
948 * When we're idle and a woken (rt) task is
1056 * Update the current task's runtime statistics. Skip current tasks that
1213 * This may have been our highest task, and therefore
1466 * Adding/removing a task to/from a priority array:
1497 * Put task to the head or the end of the run list without the overhead of
1531 static int find_lowest_rq(struct task_struct *task);
1556 * If the current task on @p's runqueue is an RT task, then
1557 * try to see if we can wake this RT task up on another
1558 * runqueue. Otherwise simply start this RT task
1562 * task is a higher priority, then it will stay on this CPU
1563 * and the lower prio task should be moved to another CPU.
1564 * Even though this will probably make the lower prio task
1565 * lose its cache, we do not want to bounce a higher task
1572 * post-schedule router will push the preempted task away
1578 * requirement of the task - which is only important on heterogeneous
1584 * Respect the sync flag as long as the task can run on this CPU.
1603 * not running a lower priority task.
1637 * the current task but none can run 'p', so lets reschedule
1638 * to try and push the current task away:
1663 * Preempt the current task with a newly woken task if needed:
1676 * - the newly woken task is of equal priority to the current task
1677 * - the newly woken task is non-migratable while current is migratable
1683 * task.
1695 /* The running task is never eligible for pushing */
1703 * If prev task was rt, put_prev_task() has already updated the
1705 * rt task
1764 * The previous task needs to be made eligible for pushing
1787 * Return the highest pushable rq's task, which is suitable to be executed
1810 static int find_cas_cpu(struct sched_domain *sd, struct task_struct *task, struct cpumask *lowest_mask)
1820 unsigned long boosted_tutil = uclamp_task_util(task);
1824 int prev_cpu = task_cpu(task);
1828 bool boosted = uclamp_boosted(task);
1837 rtg_target = find_rtg_target(task);
1869 if (task->state == TASK_RUNNING || boosted) {
1881 * 1. add margin to support task migration
1885 if (!rt_task_fits_capacity(task, cpu)) {
1890 /* support task boost */
1920 trace_sched_find_cas_cpu_each(task, cpu, target_cpu, cpu_isolated(cpu), idle_cpu(cpu), boosted_tutil,
1927 if (!cpumask_test_cpu(cpu, task->cpus_ptr)) {
1968 trace_sched_find_cas_cpu(task, lowest_mask, boosted_tutil, prev_cpu, target_cpu);
1976 static int find_lowest_rq(struct task_struct *task)
1981 int cpu = task_cpu(task);
1992 if (task->nr_cpus_allowed == 1) {
2001 ret = cpupri_find_fitness(&task_rq(task)->rd->cpupri, task, lowest_mask, rt_task_fits_capacity);
2003 ret = cpupri_find(&task_rq(task)->rd->cpupri, task, lowest_mask);
2011 cas_cpu = find_cas_cpu(sd, task, lowest_mask);
2022 * We prioritize the last CPU that the task executed on since
2099 static struct rq *find_lock_lowest_rq(struct task_struct *task, struct rq *rq)
2106 cpu = find_lowest_rq(task);
2112 if (lowest_rq->rt.highest_prio.curr <= task->prio) {
2126 * the mean time, task could have
2130 if (unlikely(next_task != task || !cpumask_test_cpu(lowest_rq->cpu, task->cpus_ptr))) {
2138 if (lowest_rq->rt.highest_prio.curr > task->prio) {
2151 * If the current CPU has more than one RT task, see if the non
2152 * running task can migrate over to a CPU that is running a task
2191 struct task_struct *task;
2196 * We need to make sure that the task is still on the same
2197 * run-queue and is also still the next task eligible for
2200 task = pick_next_pushable_task(rq);
2201 if (task == next_task) {
2203 * The task hasn't migrated, and is still the next
2204 * eligible task, but we failed to find a run-queue
2211 if (!task) {
2220 next_task = task;
2250 * When a high priority task schedules out from a CPU and a lower priority
2251 * task is scheduled in, a check is made to see if there's any RT tasks
2252 * on other CPUs that are waiting to run because a higher priority RT task
2258 * no way to know which of these CPUs have the highest priority task waiting
2267 * of CPUs scheduling a lower priority task at the same time.
2275 * When a CPU schedules a lower priority task, it will kick off the
2277 * As it only takes the first CPU that schedules a lower priority task
2283 * All CPUs that are scheduling a lower priority task will increment the
2286 * priority task, even if the iterator is in the middle of a scan. Incrementing
2455 * task is known to be lower-priority than our current task.
2457 * logically higher, the src_rq will push this task away.
2472 * We can pull only a task, which is pushable
2477 * Do we have an RT task that preempts
2478 * the to-be-scheduled task?
2490 * current task on the run queue
2503 * case there's an even higher prio task
2564 * the balancing. But if we are the last RT task
2587 * When switching a task to RT, we may overload the runqueue
2604 * running task. If that current running task is also an RT task
2620 * Priority of the task has changed. This may cause
2640 * If there's a higher priority task waiting to run
2654 * This task is not running, but if it is
2655 * greater than the current running task
2694 * scheduler tick hitting a task of our scheduling class.
2823 static unsigned int get_rr_interval_rt(struct rq *rq, struct task_struct *task)
2828 if (task->policy == SCHED_RR) {
2884 struct task_struct *task;
2896 while (!ret && (task = css_task_iter_next(&it))) {
2897 ret |= rt_task(task);