The following is the real time run queue structure in v3.5.4
struct rt_rq {
struct rt_prio_array active;
unsigned int rt_nr_running;
#if defined CONFIG_SMP || defined CONFIG_RT_GROUP_SCHED
struct {
int curr; /* highest queued rt task prio */
#ifdef CONFIG_SMP
int next; /* next highest */
#endif
} highest_prio;
#endif
#ifdef CONFIG_SMP
unsigned long rt_nr_migratory;
unsigned long rt_nr_total;
int overloaded;
struct plist_head pushable_tasks;
#endif
int rt_throttled;
u64 rt_time;
u64 rt_runtime;
/* Nests inside the rq lock: */
raw_spinlock_t rt_runtime_lock;
#ifdef CONFIG_RT_GROUP_SCHED
unsigned long rt_nr_boosted;
struct rq *rq;
struct list_head leaf_rt_rq_list;
struct task_group *tg;
#endif
};
I have understood what does some data members stand for but I am not completely sure for the following data members:
a) rt_nr_migratory
: (I think that) it is a counter to keep count of how many tasks can be pushed to other cpu's
b) pushable_tasks
is the list of tasks which can be pushed to other run queues if they do not have anything to run.
Please correct me if I am wrong for the above entries.
c) rt_throttled
, rt_time
, rt_runtime
, rt_nr_total
, rt_nr_boosted
: I do not understand what is the use of this.
Also why is struct rq *rq;
only required when group scheduling is there. I mean what is its significance.