linux rt任务调度器
首先来看下rt任务调度器的回调函数
 
 本篇主要从以下几个方面来研究rt的调度策略
 1、task的入队
 2、任务调度挑选task的逻辑
 3、tick定时器的处理
task的入队
其调用的流程为
 enqueue_task_rt ->enqueue_rt_entity -> __enqueue_rt_entity
static void __enqueue_rt_entity(struct sched_rt_entity *rt_se, unsigned int flags)
{struct rt_rq *rt_rq = rt_rq_of_se(rt_se);struct rt_prio_array *array = &rt_rq->active;struct rt_rq *group_rq = group_rt_rq(rt_se);struct list_head *queue = array->queue + rt_se_prio(rt_se);/** Don't enqueue the group if its throttled, or when empty.* The latter is a consequence of the former when a child group* get throttled and the current group doesn't have any other* active members.*/if (group_rq && (rt_rq_throttled(group_rq) || !group_rq->rt_nr_running)) {if (rt_se->on_list)__delist_rt_entity(rt_se, array);return;}if (move_entity(flags)) {WARN_ON_ONCE(rt_se->on_list);if (flags & ENQUEUE_HEAD)