Re: [Question] sched: migrate RT task on throttled leaf RTrunqueue?

From: Steven Rostedt
Date: Thu Jul 14 2011 - 11:22:37 EST


On Thu, 2011-07-14 at 22:58 +0800, Hillf Danton wrote:
> On Thu, Jul 14, 2011 at 10:09 PM, Steven Rostedt <rostedt@xxxxxxxxxxx> wrote:
> > On Thu, 2011-07-14 at 21:43 +0800, Hillf Danton wrote:
> >> Hi Steven
> >>
> >> When a non-boosted RT task is enqueued, if it is attached to task group, as
> >> shown in the following diff format for clarity, and even if the RT runqueue
> >> owned by the task group is throttled, the rt_rq is loaded up as leaf and the
> >> task is added to pushable list if it is pushable.
> >>
> >> Since RT tasks on throttled rt_runqueue will not be picked to be the next task
> >> when scheduling, could they be migrated by pushing and pulling?
> >
> > Note, run queues are not throttled, groups are. And tasks on a throttled
> > group should not be touched by the push/pull algorithm.
> >
>
> Task group is one of the hard to understand in RT scheduler, according to the
> following two functions, if task group is throttled, could say its ->rt_rq[cpu]
> also throttled, where cpu could be anyone of the active_cpu_mask?
>
> And how to relate rt_rq_throttled(p->rt.rt_rq) to throttled task group?

Best to ask Peter, as that is his work.

-- Steve

>
> Thanks,
> Hillf
>
> /* Change a task's cfs_rq and parent entity if it moves across CPUs/groups */
> static inline void set_task_rq(struct task_struct *p, unsigned int cpu)
> {
> #ifdef CONFIG_FAIR_GROUP_SCHED
> p->se.cfs_rq = task_group(p)->cfs_rq[cpu];
> p->se.parent = task_group(p)->se[cpu];
> #endif
>
> #ifdef CONFIG_RT_GROUP_SCHED
> p->rt.rt_rq = task_group(p)->rt_rq[cpu];
> p->rt.parent = task_group(p)->rt_se[cpu];
> #endif
> }
>
> static inline struct rt_rq *rt_rq_of_se(struct sched_rt_entity *rt_se)
> {
> return rt_se->rt_rq;
> }


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/