[Crash-utility] What is the unit for 'last_arrival' in 'task_struct.sched_info.last_arrival'.

oliver yang yangoliver at gmail.com
Mon Jan 26 03:44:50 UTC 2015


2015-01-13 19:06 GMT+08:00 Saravanan Palanisamy <sarpalan at gmail.com>:
> Hi,
>
>     What is the unit for 'last_arrival' in
> 'task_struct.sched_info.last_arrival' ?

Depending on the your hardware and kernel implementation.

If you are using recent x64 platform, the value should be read from
TSC register.
So the unit is ns.

You can easily confirm that by write some code by issuing rdtsc instruments.

Usually, when we debug process stuck problem, I can use "ps -l" and
"ps -l | head -n1" to get two timestamp. Then I can know how many
seconds the process never got scheduled.


-- 
------------------
Oliver Yang




More information about the Crash-utility mailing list