dl_bw
extern int dl_bw_alloc(int cpu, u64 dl_bw);
extern void dl_bw_free(int cpu, u64 dl_bw);
u64 dl_bw; /* dl_runtime / dl_period */
cs->sum_migrate_dl_bw += task->dl.dl_bw;
static inline struct dl_bw *dl_bw_of(int i)
return &cpu_rq(i)->rd->dl_bw;
if (u_inact + rq->dl.extra_bw > rq->dl.max_bw - dl_se->dl_bw)
u_act = dl_se->dl_bw;
void __dl_update(struct dl_bw *dl_b, s64 bw)
struct root_domain *rd = container_of(dl_b, struct root_domain, dl_bw);
u64 new_bw = dl_se->dl_bw;
struct dl_bw *dl_b;
struct dl_bw *dl_b;
void __dl_sub(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
__dl_sub(dl_b, dl_se->dl_bw, cpus);
dl_se->dl_bw = to_ratio(dl_se->dl_period, dl_se->dl_runtime);
void __dl_add(struct dl_bw *dl_b, u64 tsk_bw, int cpus)
struct dl_bw *dl_b = dl_bw_of(task_cpu(p));
__dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
__dl_overflow(struct dl_bw *dl_b, unsigned long cap, u64 old_bw, u64 new_bw)
void __add_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
dl_rq->running_bw += dl_bw;
void __sub_running_bw(u64 dl_bw, struct dl_rq *dl_rq)
dl_rq->running_bw -= dl_bw;
void __add_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)
dl_rq->this_bw += dl_bw;
void __sub_rq_bw(u64 dl_bw, struct dl_rq *dl_rq)
dl_rq->this_bw -= dl_bw;
__add_rq_bw(dl_se->dl_bw, dl_rq);
__sub_rq_bw(dl_se->dl_bw, dl_rq);
__add_running_bw(dl_se->dl_bw, dl_rq);
__sub_running_bw(dl_se->dl_bw, dl_rq);
__sub_rq_bw(dl_se->dl_bw, &rq->dl);
struct dl_bw *src_dl_b;
__dl_sub(src_dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
struct dl_bw *dl_b;
dl_b = &rq->rd->dl_bw;
__dl_add(dl_b, p->dl.dl_bw, cpumask_weight(rq->rd->span));
__dl_add(&rd->dl_bw, dl_se->dl_bw, dl_bw_cpus(cpu));
__dl_add(&rd->dl_bw, dl_se->dl_bw, dl_bw_cpus(cpu));
u64 dl_bw = 0;
dl_bw += cpu_rq(cpu)->fair_server.dl_bw;
dl_bw += cpu_rq(cpu)->ext_server.dl_bw;
return dl_bw;
guard(raw_spinlock_irqsave)(&rd->dl_bw.lock);
rd->dl_bw.total_bw = 0;
struct dl_bw *dl_b;
struct dl_bw *dl_b;
struct dl_bw *dl_b = dl_bw_of(cpu);
if (new_bw == p->dl.dl_bw && task_has_dl_policy(p))
__dl_sub(dl_b, p->dl.dl_bw, cpus);
!__dl_overflow(dl_b, cap, p->dl.dl_bw, new_bw)) {
__dl_sub(dl_b, p->dl.dl_bw, cpus);
dl_se->dl_bw = to_ratio(dl_se->dl_period, dl_se->dl_runtime);
dl_se->dl_bw = 0;
struct dl_bw *cur_dl_b;
static int dl_bw_manage(enum dl_bw_request req, int cpu, u64 dl_bw)
struct dl_bw *dl_b;
__dl_sub(dl_b, dl_bw, dl_bw_cpus(cpu));
overflow = __dl_overflow(dl_b, cap, 0, dl_bw);
__dl_add(dl_b, dl_bw, dl_bw_cpus(cpu));
int dl_bw_alloc(int cpu, u64 dl_bw)
return dl_bw_manage(dl_bw_req_alloc, cpu, dl_bw);
void dl_bw_free(int cpu, u64 dl_bw)
dl_bw_manage(dl_bw_req_free, cpu, dl_bw);
struct dl_bw *dl_b = dl_bw_of(task_cpu(p));
__dl_sub(dl_b, dl_se->dl_bw, dl_bw_cpus(task_cpu(p)));
void init_dl_bw(struct dl_bw *dl_b)
struct dl_bw *dl_b;
dl_b = &rq->rd->dl_bw;
__dl_sub(dl_b, p->dl.dl_bw, cpumask_weight(rq->rd->span));
dl_b = &later_rq->rd->dl_bw;
__dl_add(dl_b, p->dl.dl_bw, cpumask_weight(later_rq->rd->span));
struct dl_bw *dl_bw;
dl_bw = &cpu_rq(cpu)->rd->dl_bw;
SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->bw", dl_bw->bw);
SEQ_printf(m, " .%-30s: %lld\n", "dl_bw->total_bw", dl_bw->total_bw);
struct dl_bw dl_bw;
extern void init_dl_bw(struct dl_bw *dl_b);
rq->rd->dl_bw.bw == 0) {
init_dl_bw(&rd->dl_bw);