u64 nr_switches; u64 nr_migrations_in;structcfs_rq cfs;structrt_rq rt; #ifdef CONFIG_FAIR_GROUP_SCHED/*list of leaf cfs_rq on this cpu:*/structlist_head leaf_cfs_rq_list;#endif#ifdef CONFIG_RT_GROUP_SCHEDstructlist_head leaf_rt_rq_list;#endif/** This is part of a global counte...
const struct sched_avg *sched_trace_cfs_rq_avg(struct cfs_rq *cfs_rq); char *sched_trace_cfs_rq_path(struct cfs_rq *cfs_rq, char *str, int len); int sched_trace_cfs_rq_cpu(struct cfs_rq *cfs_rq);const struct sched_avg *sched_trace_rq_avg_rt(struct rq *rq); const struct ...
/** nr_running and cpu_load should be in the same cacheline because* remote CPUs use both these fields when doing load calculation.*/unsigned int nr_running;/* 三个调度队列:CFS调度,RT调度,DL调度 */struct cfs_rq cfs;struct rt_rq rt;struct dl_rq dl; /* stop指向迁移内核线程, idle指...
//是否在运行队列上 int on_rq; //优先级 int prio; int static_prio; int normal_prio; unsigned int rt_priority; //调度器类 const struct sched_class *sched_class; //调度实体 struct sched_entity se; struct sched_rt_entity rt; struct sched_dl_entity dl; //调度策略 unsigned int policy;...
int on_rq; //优先级 int prio; int static_prio; int normal_prio; unsigned int rt_priority; //调度器类const struct sched_class *sched_class; //调度实体 struct sched_entity se; struct sched_rt_entity rt; struct sched_dl_entity dl; ...
static __always_inline struct rq *context_switch(struct rq *rq, struct task_struct *prev,struct task_struct *next, struct rq_flags *rf) 这样,通过context_switch函数就可以将当前进程调度出去,而将新的进程调度进来。 context_switch最终会调度到一个平台相关的函数,而这个函数是汇编语言实现的,主要实现...
void(*yield_task)(struct rq*rq); 源码路径 :linux-5.6.18\kernel\sched\sched.h#1717 ; 二、check_preempt_curr 函数 ( 检查进程是否可以被抢占 ) sched_class调度类结构体 中的check_preempt_curr函数指针 , 指向一个函数 , 调用该函数 , 主要是检查 当前 " 进程 " 是否可以被 其它进程 抢占 ; ...
int on_rq; //优先级 int prio; int static_prio; int normal_prio; unsigned int rt_priority; //调度器类 const struct sched_class *sched_class; //调度实体 struct sched_entity se; struct sched_rt_entity rt; struct sched_dl_entity dl; ...
depth; int prio; int static_prio; int normal_prio; unsigned int rt_priority...
//task_rq_lock函数所使用的锁 /* Protection of the PI data structures: */ spinlock_t pi_lock; //基于PI协议的等待互斥锁 #ifdef CONFIG_RT_MUTEXES /* PI waiters blocked on a rt_mutex held by this task */ struct plist_head pi_waiters; ...