1. sched class与sched policy的对应关系
完全公平调度:SCHED_NORMAL SCHED_BATCH
实时进程调度:SCHED_FIFO SCHED_RR
空闲调度:SCHED_IDLE
Deadline调度: SCHED_DEADLINE
//kernel/sched/sched.h static inline int idle_policy(int policy) { return policy == SCHED_IDLE; } static inline int fair_policy(int policy) { return policy == SCHED_NORMAL || policy == SCHED_BATCH; } static inline int rt_policy(int policy) { return policy == SCHED_FIFO || policy == SCHED_RR; } static inline int dl_policy(int policy) { return policy == SCHED_DEADLINE; }