Function report |
Source Code:kernel\sched\core.c |
Create Date:2022-07-28 09:36:08 |
Last Modify:2022-05-22 13:40:38 | Copyright©Brick |
home page | Tree |
Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:__schedule() is the main scheduler function.* The main means of driving the scheduler and thus entering this function are:* 1. Explicit blocking: mutex, semaphore, waitqueue, etc.* 2. TIF_NEED_RESCHED flag is checked on interrupt and userspace return
Proto:static void __sched notrace __schedule(bool preempt)
Type:void
Parameter:
Type | Parameter | Name |
---|---|---|
bool | preempt |
4014 | cpu = smp_processor_id() |
4020 | If sched_feat(HRTICK) Then hrtick_clear(rq) |
4023 | local_irq_disable() |
4038 | clock_update_flags <<= 1 |
4039 | update_rq_clock(rq) |
4041 | switch_count = nivcsw |
4043 | If signal_pending_state(run state, prev) Then |
4044 | run state = Used in tsk->state: |
4045 | Else |
4048 | If in_iowait Then |
4049 | atomic_inc( & nr_iowait) |
4050 | delayacct_blkio_start() |
4057 | clear_tsk_need_resched(prev) |
4058 | clear_preempt_need_resched() |
4060 | If Value is more likely to compile time(prev != next) Then |
4061 | nr_switches++ |
4081 | ++switch_count |
4087 | Else |
4089 | rq_unlock_irq(rq, & rf) |
4092 | balance_callback(rq) |
Name | Describe |
---|---|
do_task_dead | |
schedule | |
schedule_idle | synchronize_rcu_tasks() makes sure that no task is stuck in preempted* state (have scheduled out non-voluntarily) by making sure that all* tasks have either left the run queue or have gone into user space |
preempt_schedule_common | |
preempt_schedule_irq | This is the entry point to schedule() from kernel preemption* off of irq context.* Note, that this is called and return with irqs disabled. This will* protect us against recursive calling from irq. |
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 |