Function report |
Source Code:kernel\sched\fair.c |
Create Date:2022-07-28 09:38:47 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:Preempt the current task with a newly woken task if needed:
Proto:static void check_preempt_wakeup(struct rq *rq, struct task_struct *p, int wake_flags)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct rq * | rq | |
| struct task_struct * | p | |
| int | wake_flags |
| 6567 | cfs_rq = task_cfs_rq(curr) |
| 6569 | next_buddy_marked = 0 |
| 6571 | If Value for the false possibility is greater at compile time(se == pse) Then Return |
| 6580 | If Value for the false possibility is greater at compile time(throttled_hierarchy(cfs_rq_of(pse))) Then Return |
| 6583 | If sched_feat(NEXT_BUDDY) && scale && Not (wake_flags & Child wakeup after fork ) Then |
| 6584 | set_next_buddy(pse) |
| 6585 | next_buddy_marked = 1 |
| 6598 | If test_tsk_need_resched(curr) Then Return |
| 6602 | If Value for the false possibility is greater at compile time(task_has_idle_policy(curr)) && Value is more likely to compile time(!task_has_idle_policy(p)) Then Go to preempt |
| 6610 | If Value for the false possibility is greater at compile time(policy != Scheduling policies) || Not sched_feat(WAKEUP_PREEMPTION) Then Return |
| 6613 | find_matching_se( & se, & pse) |
| 6616 | If wakeup_preempt_entity(se, pse) == 1 Then |
| 6621 | If Not next_buddy_marked Then set_next_buddy(pse) |
| 6623 | Go to preempt |
| 6626 | Return |
| 6628 | preempt : |
| 6639 | If Value for the false possibility is greater at compile time(!on_rq || curr == idle) Then Return |
| 6642 | If sched_feat(LAST_BUDDY) && scale && entity_is_task(se) Then set_last_buddy(se) |
| 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 |