Function report |
Source Code:kernel\sched\deadline.c |
Create Date:2022-07-28 09:40:31 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:We must be sure that accepting a new task (or allowing changing the* parameters of an existing one) is consistent with the bandwidth* constraints. If yes, this function also accordingly updates the currently
Proto:int sched_dl_overflow(struct task_struct *p, int policy, const struct sched_attr *attr)
Type:int
Parameter:
Type | Parameter | Name |
---|---|---|
struct task_struct * | p | |
int | policy | |
const struct sched_attr * | attr |
2553 | period = If sched_period Else sched_deadline |
2554 | runtime = SCHED_DEADLINE |
2556 | err = -1 |
2562 | If new_bw == dl_runtime / dl_period && task_has_dl_policy(p) Then Return 0 |
2570 | raw_spin_lock( & lock) |
2571 | cpus = dl_bw_cpus(task_cpu(p)) |
2572 | If dl_policy(policy) && Not task_has_dl_policy(p) && Not __dl_overflow(dl_b, cpus, 0, new_bw) Then |
2577 | err = 0 |
2578 | Else if dl_policy(policy) && task_has_dl_policy(p) && Not __dl_overflow(dl_b, cpus, dl_runtime / dl_period , new_bw) Then |
2587 | __dl_sub(dl_b, dl_runtime / dl_period , cpus) |
2589 | dl_change_utilization(p, new_bw) |
2590 | err = 0 |
2591 | Else if Not dl_policy(policy) && task_has_dl_policy(p) Then |
2597 | err = 0 |
2599 | raw_spin_unlock( & lock) |
2601 | Return err |
Name | Describe |
---|---|
__sched_setscheduler |
Source code conversion tool public plug-in interface | X |
---|---|
Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |