----- Original Message -----
Hmm, may be confusing here...
>> crash> runq
>> CPU 0 RUNQUEUE: ffff880028216680
>> CURRENT: PID: 5125 TASK: ffff88010799d540 COMMAND: "sh"
>> RT PRIO_ARRAY: ffff880028216808
>> [ 0] PID: 5136 TASK: ffff8801153cc040 COMMAND: "rtloop99"
>> CHILD RT PRIO_ARRAY: ffff88013b050000
>> [ 0] PID: 5133 TASK: ffff88010799c080 COMMAND:
"rtloop99"
>> [ 1] PID: 5131 TASK: ffff880037922aa0 COMMAND:
"rtloop98"
>> [ 98] PID: 5128 TASK: ffff88011bd87540 COMMAND:
"rtloop1"
>> PID: 5130 TASK: ffff8801396e7500 COMMAND:
"rtloop1"
>> PID: 5129 TASK: ffff88011bf5a080 COMMAND:
"rtloop1"
>> PID: 6 TASK: ffff88013d7c6080 COMMAND: "watchdog/0"
>> PID: 3 TASK: ffff88013d7ba040 COMMAND: "migration/0"
>> [ 1] PID: 5134 TASK: ffff8801153cd500 COMMAND: "rtloop98"
>> PID: 5135 TASK: ffff8801153ccaa0 COMMAND: "rtloop98"
>> ...
>
> whereas on cpu 1, the "CHILD RT PRIO ARRAY" line is on the same
> line as
> priority 54:
>
>> CPU 1 RUNQUEUE: ffff880028296680
>> CURRENT: PID: 5086 TASK: ffff88006eecc040 COMMAND: "bash"
>> RT PRIO_ARRAY: ffff880028296808
>> [ 0] PID: 5137 TASK: ffff880107b35540 COMMAND: "rtloop99"
>> PID: 10 TASK: ffff88013cc2cae0 COMMAND: "watchdog/1"
>> PID: 2852 TASK: ffff88013bd5aae0 COMMAND:
"rtkit-daemon"
>> [ 54] CHILD RT PRIO_ARRAY: ffff880138978000
>> [ 54] PID: 5132 TASK: ffff88006eecd500 COMMAND:
"rtloop45"
>> CFS RB_ROOT: ffff880028296718
>
> What is it a "child" of? Or maybe "CHILD" the wrong
terminology
> here?
Now, the scheduler is not limited to schedule processes, but can also
work with larger entities. This allows for implementing group
scheduling.
So for every RT PRIO_ARRAY, each linked list for each priority has
its element embedded in a structure "sched_entity". This
"sched_entity"
could represent two things: a process or a child rt runqueue.
for example, in cpu0, array[0] has four linked elements:
1. task 5136
2. a child rt rq
3. task 6
4. task 3
and the child rt rq has its own runqueue array with 5 tasks in it:
task 5133 with a priority of 0, task 5131 with a priority of 1, and the
last three tasks -- 5128, 5230, 5129 with a priority of 98.
Right, I understand. What I don't understand is the use of the "child"
terminology. If CONFIG_RT_GROUP_SCHED is configured, then the sched_rt_entity
may reference a "group" run queue. To me, it doesn't make sense to use
the term "CHILD RT PRIO_ARRAY" in the header. Wouldn't it make more sense
to
call it a "GROUP RT PRIO_ARRAY"? Like this:
crash> runq
CPU 0 RUNQUEUE: ffff880028216680
CURRENT: PID: 5125 TASK: ffff88010799d540 COMMAND: "sh"
RT PRIO_ARRAY: ffff880028216808
[ 0] PID: 5136 TASK: ffff8801153cc040 COMMAND: "rtloop99"
GROUP RT PRIO_ARRAY: ffff88013b050000
[ 0] PID: 5133 TASK: ffff88010799c080 COMMAND: "rtloop99"
[ 1] PID: 5131 TASK: ffff880037922aa0 COMMAND: "rtloop98"
[ 98] PID: 5128 TASK: ffff88011bd87540 COMMAND: "rtloop1"
PID: 5130 TASK: ffff8801396e7500 COMMAND: "rtloop1"
PID: 5129 TASK: ffff88011bf5a080 COMMAND: "rtloop1"
PID: 6 TASK: ffff88013d7c6080 COMMAND: "watchdog/0"
PID: 3 TASK: ffff88013d7ba040 COMMAND: "migration/0"
[ 1] PID: 5134 TASK: ffff8801153cd500 COMMAND: "rtloop98"
PID: 5135 TASK: ffff8801153ccaa0 COMMAND: "rtloop98"
...
CPU 1 RUNQUEUE: ffff880028296680
CURRENT: PID: 5086 TASK: ffff88006eecc040 COMMAND: "bash"
RT PRIO_ARRAY: ffff880028296808
[ 0] PID: 5137 TASK: ffff880107b35540 COMMAND: "rtloop99"
PID: 10 TASK: ffff88013cc2cae0 COMMAND: "watchdog/1"
PID: 2852 TASK: ffff88013bd5aae0 COMMAND: "rtkit-daemon"
[ 54] GROUP RT PRIO_ARRAY: ffff880138978000
[ 54] PID: 5132 TASK: ffff88006eecd500 COMMAND: "rtloop45"
CFS RB_ROOT: ffff880028296718
...
Thanks,
Dave