----- Original Message -----
At 2012-3-7 23:36, Dave Anderson wrote:
>
>
> ----- Original Message -----
>> Hello Dave,
>>
>> I was recommended to add the display of ST when using ps -l. Because it
>> is simple, so I made the patch at first and then talk about the merit of
>> patch with you.
>>
>> The display is like below:
>>
>> crash> ps -l
>> [100126284069406] PID: 2389 TASK: ffff88047416aa80 ST:IN CPU: 12 COMMAND:
"kondemand/12"
>> [100126285814043] PID: 795 TASK: ffff880470cb3540 ST:UN CPU: 0 COMMAND:
"jbd2/sda2-8"
>> [100126284061076] PID: 2377 TASK: ffff88047426c100 ST:IN CPU: 0 COMMAND:
"kondemand/0"
>> [100126284058337] PID: 70050 TASK: ffff88045beaeac0 ST:RU CPU: 3 COMMAND:
"crash"
>> [100126285834369] PID: 70781 TASK: ffff88046929e100 ST:RU CPU: 0 COMMAND:
"dd"
>> ...
>>
>> I think "ps -l", which displays task sorted by last_run/timestamp, is
>> concerning about the state of the task. Taking it into consideration, on
>> a live system with original code, we use "ps -l" to show the sorted
>> tasks at first, then use "ps" to display the state. The two pieces of
>> information in such situation are not consonant. This is the reason why
>> ST is needed.
>
> Your patch is unacceptable as-is because it changes the task header display
> for *all* context-specific commands, like "bt", "vm",
"files", "task", etc.
>
> But it does make sense that the task's timestamp and its state could
> be correlated by "ps -l" output. Maybe something like this, with an
> explanation in the ps help page?:
>
> crash> ps -l
> [100126284069406] [IN] PID: 2389 TASK: ffff88047416aa80 CPU: 12 COMMAND:
"kondemand/12"
> [100126285814043] [UN] PID: 795 TASK: ffff880470cb3540 CPU: 0 COMMAND:
"jbd2/sda2-8"
> [100126284061076] [IN] PID: 2377 TASK: ffff88047426c100 CPU: 0 COMMAND:
"kondemand/0"
> [100126284058337] [RU] PID: 70050 TASK: ffff88045beaeac0 CPU: 3 COMMAND:
"crash"
> [100126285834369] [RU] PID: 70781 TASK: ffff88046929e100 CPU: 0 COMMAND:
"dd"
> ...
String like "PID: 2389 TASK: ffff88047416aa80 CPU: 12 COMMAND:
"kondemand/12""
is printed by a function. The change of the function, which I made in the last patch,
causes the change of other commands. The new patch will add "ST:.." out of the
command,
the output is like below:
[2567398667393] ST:IN PID: 154 TASK: ffff880475292b40 CPU: 0 COMMAND:
"kblockd/0"
[2567399925204] ST:IN PID: 4380 TASK: ffff880464665500 CPU: 1 COMMAND:
"qemu-system-x86"
[2567396569308] ST:IN PID: 4411 TASK: ffff880467227500 CPU: 1 COMMAND:
"qemu-system-x86"
[2567395016839] ST:RU PID: 5338 TASK: ffff880464664ac0 CPU: 2 COMMAND:
"crash"
This is OK, but aesthetically I prefer to bracket the status identifier
the same way as is done by the last_run/timestamp value. Queued for
crash-6.0.5.
Dave