函数逻辑报告

linux kernel

5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\sched\core.c Create Date:2020-09-18 12:21:34
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载PLEAEnglish

函数名称:调度器

函数原型:static void __attribute__((__section__(".sched.text"))) __attribute__((__no_instrument_function__))__schedule(bool preempt)

返回类型:void

参数:

类型参数名称
boolpreempt
4011  rqrq
4014  cpu等于当前cpu ID()
4015  rq等于cpu_rq(cpu)
4016  prev等于当前任务
4018  调试检查和统计
4020  如果sched_feat(HRTICK)则清除高精度任务
4023  禁止中断()
4024  a PREEMPT=n context switch
4034  rq_lock(rq, & rf)
4035  provides the equivalent of a full memory barrier * between program-order earlier lock acquisitions and program-order later * memory accesses()
4038  clock_update_flags左移等于1位
4039  更新rq运行时间
4041  switch_count等于上下文切换计数
4042  如果非preempt任务状态
4044  任务状态等于就绪态
4045  否则
4046  删除进程
4048  如果in_iowait
4053  switch_count等于切换计数
4056  next等于选择下一个要运行的进程
4057  清除调度位
4058  清除CPU的内核抢占
4060  如果此条件成立可能性大(为编译器优化)(prev != next)则
4061  切换计数器自加
4066  initialize an RCU protected pointer(当前任务, next)
4081  switch_count先自加
4083  Tracepoint for task switches, performed by the scheduler:
4086  rq等于进程切换
4087  否则
4088  clock_update_flags与等于RQCF_ACT_SKIP按位或RQCF_REQ_SKIP的值的反
4089  rq_unlock_irq(rq, & rf)
4092  负载均衡配置
调用者
名称描述
do_task_dead
schedule进程调度
schedule_idlesynchronize_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_irqThis is the entry point to schedule() from kernel preemption * off of irq context