Lines Matching refs:dl
25 return container_of(dl_se, struct task_struct, dl); in dl_task_of()
30 return container_of(dl_rq, struct rq, dl); in rq_of_dl_rq()
38 return &rq->dl; in dl_rq_of_se()
69 return &cpu_rq(i)->dl.dl_bw; in dl_bw_of()
160 BUG_ON(p->dl.flags & SCHED_FLAG_SUGOV); in dl_change_utilization()
166 if (p->dl.dl_non_contending) { in dl_change_utilization()
167 sub_running_bw(&p->dl, &rq->dl); in dl_change_utilization()
168 p->dl.dl_non_contending = 0; in dl_change_utilization()
176 if (hrtimer_try_to_cancel(&p->dl.inactive_timer) == 1) in dl_change_utilization()
179 __sub_rq_bw(p->dl.dl_bw, &rq->dl); in dl_change_utilization()
180 __add_rq_bw(new_bw, &rq->dl); in dl_change_utilization()
239 struct sched_dl_entity *dl_se = &p->dl; in task_non_contending()
279 sub_rq_bw(&p->dl, &rq->dl); in task_non_contending()
281 __dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); in task_non_contending()
333 struct sched_dl_entity *dl_se = &p->dl; in is_leftmost()
448 struct dl_rq *dl_rq = &rq->dl; in enqueue_pushable_dl_task()
460 if (dl_entity_preempt(&p->dl, &entry->dl)) in enqueue_pushable_dl_task()
469 dl_rq->earliest_dl.next = p->dl.deadline; in enqueue_pushable_dl_task()
478 struct dl_rq *dl_rq = &rq->dl; in dequeue_pushable_dl_task()
489 struct task_struct, pushable_dl_tasks)->dl.deadline; in dequeue_pushable_dl_task()
499 return !RB_EMPTY_ROOT(&rq->dl.pushable_dl_tasks_root.rb_root); in has_pushable_dl_tasks()
890 struct sched_dl_entity *dl_se = &p->dl; in start_dl_timer()
1123 u64 u_inact = rq->dl.this_bw - rq->dl.running_bw; /* Utot - Uact */ in grub_reclaim()
1125 u64 u_act_min = (dl_se->dl_bw * rq->dl.bw_ratio) >> RATIO_SHIFT; in grub_reclaim()
1135 if (u_inact + rq->dl.extra_bw > BW_UNIT - u_act_min) in grub_reclaim()
1138 u_act = BW_UNIT - u_inact - rq->dl.extra_bw; in grub_reclaim()
1150 struct sched_dl_entity *dl_se = &curr->dl; in update_curr_dl()
1196 &curr->dl); in update_curr_dl()
1220 if (!is_leftmost(curr, &rq->dl)) in update_curr_dl()
1268 sub_running_bw(&p->dl, dl_rq_of_se(&p->dl)); in inactive_task_timer()
1269 sub_rq_bw(&p->dl, dl_rq_of_se(&p->dl)); in inactive_task_timer()
1274 __dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); in inactive_task_timer()
1283 sub_running_bw(dl_se, &rq->dl); in inactive_task_timer()
1443 struct sched_dl_entity *pi_se = &p->dl; in enqueue_task_dl()
1453 if (pi_task && dl_prio(pi_task->normal_prio) && p->dl.dl_boosted) { in enqueue_task_dl()
1454 pi_se = &pi_task->dl; in enqueue_task_dl()
1463 BUG_ON(!p->dl.dl_boosted || flags != ENQUEUE_REPLENISH); in enqueue_task_dl()
1473 if (!p->dl.dl_throttled && !dl_is_implicit(&p->dl)) in enqueue_task_dl()
1474 dl_check_constrained_dl(&p->dl); in enqueue_task_dl()
1477 add_rq_bw(&p->dl, &rq->dl); in enqueue_task_dl()
1478 add_running_bw(&p->dl, &rq->dl); in enqueue_task_dl()
1493 if (p->dl.dl_throttled && !(flags & ENQUEUE_REPLENISH)) { in enqueue_task_dl()
1495 task_contending(&p->dl, flags); in enqueue_task_dl()
1500 enqueue_dl_entity(&p->dl, pi_se, flags); in enqueue_task_dl()
1508 dequeue_dl_entity(&p->dl); in __dequeue_task_dl()
1518 sub_running_bw(&p->dl, &rq->dl); in dequeue_task_dl()
1519 sub_rq_bw(&p->dl, &rq->dl); in dequeue_task_dl()
1553 rq->curr->dl.dl_yielded = 1; in yield_task_dl()
1594 !dl_entity_preempt(&p->dl, &curr->dl)) && in select_task_rq_dl()
1599 (dl_time_before(p->dl.deadline, in select_task_rq_dl()
1600 cpu_rq(target)->dl.earliest_dl.curr) || in select_task_rq_dl()
1601 (cpu_rq(target)->dl.dl_nr_running == 0))) in select_task_rq_dl()
1624 if (p->dl.dl_non_contending) { in migrate_task_rq_dl()
1625 sub_running_bw(&p->dl, &rq->dl); in migrate_task_rq_dl()
1626 p->dl.dl_non_contending = 0; in migrate_task_rq_dl()
1634 if (hrtimer_try_to_cancel(&p->dl.inactive_timer) == 1) in migrate_task_rq_dl()
1637 sub_rq_bw(&p->dl, &rq->dl); in migrate_task_rq_dl()
1671 if (dl_entity_preempt(&p->dl, &rq->curr->dl)) { in check_preempt_curr_dl()
1681 if ((p->dl.deadline == rq->curr->dl.deadline) && in check_preempt_curr_dl()
1690 hrtick_start(rq, p->dl.runtime); in start_hrtick_dl()
1716 dl_rq = &rq->dl; in pick_next_task_dl()
1774 if (on_dl_rq(&p->dl) && p->nr_cpus_allowed > 1) in put_prev_task_dl()
1796 if (hrtick_enabled(rq) && queued && p->dl.runtime > 0 && in task_tick_dl()
1797 is_leftmost(p, &rq->dl)) in task_tick_dl()
1838 struct rb_node *next_node = rq->dl.pushable_dl_tasks_root.rb_leftmost; in pick_earliest_pushable_dl_task()
1962 if (later_rq->dl.dl_nr_running && in find_lock_later_rq()
1963 !dl_time_before(task->dl.deadline, in find_lock_later_rq()
1964 later_rq->dl.earliest_dl.curr)) { in find_lock_later_rq()
1992 if (!later_rq->dl.dl_nr_running || in find_lock_later_rq()
1993 dl_time_before(task->dl.deadline, in find_lock_later_rq()
1994 later_rq->dl.earliest_dl.curr)) in find_lock_later_rq()
2012 p = rb_entry(rq->dl.pushable_dl_tasks_root.rb_leftmost, in pick_next_pushable_dl_task()
2036 if (!rq->dl.overloaded) in push_dl_task()
2055 dl_time_before(next_task->dl.deadline, rq->curr->dl.deadline) && in push_dl_task()
2093 sub_running_bw(&next_task->dl, &rq->dl); in push_dl_task()
2094 sub_rq_bw(&next_task->dl, &rq->dl); in push_dl_task()
2096 add_rq_bw(&next_task->dl, &later_rq->dl); in push_dl_task()
2103 add_running_bw(&next_task->dl, &later_rq->dl); in push_dl_task()
2151 if (this_rq->dl.dl_nr_running && in pull_dl_task()
2152 dl_time_before(this_rq->dl.earliest_dl.curr, in pull_dl_task()
2153 src_rq->dl.earliest_dl.next)) in pull_dl_task()
2163 if (src_rq->dl.dl_nr_running <= 1) in pull_dl_task()
2173 if (p && dl_time_before(p->dl.deadline, dmin) && in pull_dl_task()
2174 (!this_rq->dl.dl_nr_running || in pull_dl_task()
2175 dl_time_before(p->dl.deadline, in pull_dl_task()
2176 this_rq->dl.earliest_dl.curr))) { in pull_dl_task()
2184 if (dl_time_before(p->dl.deadline, in pull_dl_task()
2185 src_rq->curr->dl.deadline)) in pull_dl_task()
2191 sub_running_bw(&p->dl, &src_rq->dl); in pull_dl_task()
2192 sub_rq_bw(&p->dl, &src_rq->dl); in pull_dl_task()
2194 add_rq_bw(&p->dl, &this_rq->dl); in pull_dl_task()
2195 add_running_bw(&p->dl, &this_rq->dl); in pull_dl_task()
2197 dmin = p->dl.deadline; in pull_dl_task()
2220 !dl_entity_preempt(&p->dl, &rq->curr->dl))) { in task_woken_dl()
2251 __dl_sub(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p))); in set_cpus_allowed_dl()
2261 if (rq->dl.overloaded) in rq_online_dl()
2265 if (rq->dl.dl_nr_running > 0) in rq_online_dl()
2266 cpudl_set(&rq->rd->cpudl, rq->cpu, rq->dl.earliest_dl.curr); in rq_online_dl()
2272 if (rq->dl.overloaded) in rq_offline_dl()
2300 if (task_on_rq_queued(p) && p->dl.dl_runtime) in switched_from_dl()
2310 if (p->dl.dl_non_contending) in switched_from_dl()
2311 sub_running_bw(&p->dl, &rq->dl); in switched_from_dl()
2312 sub_rq_bw(&p->dl, &rq->dl); in switched_from_dl()
2320 if (p->dl.dl_non_contending) in switched_from_dl()
2321 p->dl.dl_non_contending = 0; in switched_from_dl()
2328 if (!task_on_rq_queued(p) || rq->dl.dl_nr_running) in switched_from_dl()
2340 if (hrtimer_try_to_cancel(&p->dl.inactive_timer) == 1) in switched_to_dl()
2345 add_rq_bw(&p->dl, &rq->dl); in switched_to_dl()
2352 if (p->nr_cpus_allowed > 1 && rq->dl.overloaded) in switched_to_dl()
2377 if (!rq->dl.overloaded) in prio_changed_dl()
2385 if (dl_time_before(rq->dl.earliest_dl.curr, p->dl.deadline)) in prio_changed_dl()
2503 init_dl_rq_bw_ratio(&cpu_rq(cpu)->dl); in sched_dl_do_global()
2528 if (new_bw == p->dl.dl_bw && task_has_dl_policy(p)) in sched_dl_overflow()
2540 if (hrtimer_active(&p->dl.inactive_timer)) in sched_dl_overflow()
2541 __dl_sub(dl_b, p->dl.dl_bw, cpus); in sched_dl_overflow()
2545 !__dl_overflow(dl_b, cpus, p->dl.dl_bw, new_bw)) { in sched_dl_overflow()
2553 __dl_sub(dl_b, p->dl.dl_bw, cpus); in sched_dl_overflow()
2580 struct sched_dl_entity *dl_se = &p->dl; in __setparam_dl()
2592 struct sched_dl_entity *dl_se = &p->dl; in __getparam_dl()
2650 struct sched_dl_entity *dl_se = &p->dl; in __dl_clear_params()
2667 struct sched_dl_entity *dl_se = &p->dl; in dl_param_changed()
2693 overflow = __dl_overflow(dl_b, cpus, 0, p->dl.dl_bw); in dl_task_can_attach()
2703 __dl_add(dl_b, p->dl.dl_bw, cpus); in dl_task_can_attach()
2755 print_dl_rq(m, cpu, &cpu_rq(cpu)->dl); in print_dl_stats()