----- Original Message -----
Hi Dave,
I have cleaned up the code and added another change.
OK thanks -- the patch runs through my sample set of vmcores with no problem.
The current running task is not in the rb tree (rb_root), so run -q
displays it like:
CURRENT: PID: 9048 TASK: ffff8808b07e4200 COMMAND: "actmain"
TASK_GROUP RT_RQ: ffff880002493820
RT PRIO_ARRAY: ffff880002493820
[no tasks queued]
TASK_GROUP CFS_RQ: ffff8800024936e0
CFS RB_ROOT: ffff880002493710
GROUP CFS RB_ROOT: ffff882d609ce830 <TDAT>
GROUP CFS RB_ROOT: ffff883f0bcbfa30 <User>
[no tasks queued]
I can understand why the current running task is not displayed.
However, the "-g" option displays all the task_groups the task
belongs to but at the end it shows "[no tasks queued]". That is
just strange. The new change is to display the task that is running like:
CURRENT: PID: 9048 CFS: ffff88039351a800 TASK: ffff8808b07e4200 COMMAND:
"actmain"
TASK_GROUP RT_RQ: ffff880002493820
RT PRIO_ARRAY: ffff880002493820
[no tasks queued]
TASK_GROUP CFS_RQ: ffff8800024936e0
CFS RB_ROOT: ffff880002493710
GROUP: ffff884052bc9800 CFS_RQ: ffff882d609ce800 RB_ROOT: ffff882d609ce830
<TDAT> nr_running: 1 h_nr_running: 1
GROUP: ffff884058f1d000 CFS_RQ: ffff883f0bcbfa00 RB_ROOT: ffff883f0bcbfa30
<User> nr_running: 1 h_nr_running: 1
[120] PID: 9048 TASK: ffff8808b07e4200 COMMAND: "actmain"
OK -- I guess I understand why it probably makes sense to duplicate the
CURRENT task underneath its own GROUP list -- but if that is done, then
why clutter the CURRENT line with the CFS_RQ address? And it's not clear
to me why in your example above, the CFS address of ffff88039351a800
doesn't show up as the CFS_RQ address above the "actmain" line?
Taking a simple example, I see this:
crash> runq -g
CPU 0
CURRENT: PID: 0 CFS: ffff88000c7d6aa8 TASK: ffffffff8178ba60 COMMAND:
"swapper"
TASK_GROUP RT_RQ: ffff88000c7d6b58
RT PRIO_ARRAY: ffff88000c7d6b58
[no tasks queued]
TASK_GROUP CFS_RQ: ffff88000c7d6aa8
CFS RB_ROOT: ffff88000c7d6ad0
[no tasks queued]
CPU 1
CURRENT: PID: 1268 CFS: ffff88000c9b5aa8 TASK: ffff88002f11c620 COMMAND:
"bash"
TASK_GROUP RT_RQ: ffff88000c9b5b58
RT PRIO_ARRAY: ffff88000c9b5b58
[no tasks queued]
TASK_GROUP CFS_RQ: ffff88000c9b5aa8
CFS RB_ROOT: ffff88000c9b5ad0
[120] PID: 1268 TASK: ffff88002f11c620 COMMAND: "bash"
crash>
Where the newly-interspersed CFS address redundantly shows the TASK_GROUP CFS_RQ
below. But adding the CFS address to the "swapper" line doesn't seem to
make
much sense, or help in any way, since the idle task is a special case that never
gets queued. And since the CFS address in the "bash" line is redundant with
the
TASK_GROUP CFS_RQ below, why bother showing it?
And in a more complicated example, with your patch, the "qemu-kvm" task also
shows up underneath its group:
CPU 0
CURRENT: PID: 3144 CFS: ffff88022aab2600 TASK: ffff88022a446040 COMMAND:
"qemu-kvm"
TASK_GROUP RT_RQ: ffff880133c16148
RT PRIO_ARRAY: ffff880133c16148
[no tasks queued]
TASK_GROUP CFS_RQ: ffff880133c16028
CFS RB_ROOT: ffff880133c16058
GROUP: ffff88012b880800 CFS_RQ: ffff88022ac8f000 RB_ROOT: ffff88022ac8f030
<libvirt> nr_running: 1 h_nr_running: 1
GROUP: ffff88012c078000 CFS_RQ: ffff88022c075000 RB_ROOT: ffff88022c075030
<qemu> nr_running: 1 h_nr_running: 1
GROUP: ffff88012b0fb400 CFS_RQ: ffff88022af94c00 RB_ROOT: ffff88022af94c30
<guest1> nr_running: 1 h_nr_running: 1
GROUP: ffff88022c6bbc00 CFS_RQ: ffff88022aab2600 RB_ROOT: ffff88022aab2630
<vcpu1> nr_running: 1 h_nr_running: 1
[120] PID: 3144 TASK: ffff88022a446040 COMMAND: "qemu-kvm"
And note that its interspersed CFS address of ffff88022aab2600 is redundantly shown
as the CFS_RQ of its GROUP down below.
So I don't understand why your example shows different CFS addresses in the
CURRENT line vs. the GROUP CFS_RQ address above the queued "acctmain" task:
CURRENT: PID: 9048 CFS: ffff88039351a800 TASK: ffff8808b07e4200
COMMAND: "actmain"
TASK_GROUP RT_RQ: ffff880002493820
RT PRIO_ARRAY: ffff880002493820
[no tasks queued]
TASK_GROUP CFS_RQ: ffff8800024936e0
CFS RB_ROOT: ffff880002493710
GROUP: ffff884052bc9800 CFS_RQ: ffff882d609ce800 RB_ROOT: ffff882d609ce830
<TDAT> nr_running: 1 h_nr_running: 1
GROUP: ffff884058f1d000 CFS_RQ: ffff883f0bcbfa00 RB_ROOT: ffff883f0bcbfa30
<User> nr_running: 1 h_nr_running: 1
[120] PID: 9048 TASK: ffff8808b07e4200 COMMAND: "actmain"
Am I missing something? Or is there cut-and-paste error?
Dave