[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CAOTQ16LL_W+RqDWQLzsvnRaYGT_9E9EMN_9hdr-vie8hp83gAA@mail.gmail.com>
Date: Fri, 22 Jun 2018 17:09:12 +0200
From: Thommy Jakobsson <thommyj@...il.com>
To: linux-kernel@...r.kernel.org
Subject: BUG? DOC: Really jiffies in /proc/schedstat?
Hi,
I am measuring cpu runtime for a couple of processes, and is using
/proc/schedstat and /proc/[pid]/schedstat to do so. According to the
schedstat doc
(https://www.kernel.org/doc/Documentation/scheduler/sched-stats.txt) the last
three values are in jiffies. Doing something like
root@...4-base-pd-b-rev1:~# cat /proc/schedstat | grep cpu3; sleep
2; cat /proc/schedstat | grep cpu3;
cpu3 0 0 0 0 0 0 41155818663320 17173365985560 1011370906
cpu3 0 0 0 0 0 0 41157858979020 17176095339120 1011430425
on a heavy loaded system seems to suggest that at least the sum of running tasks
is in nanoseconds, not jiffies. Which I also think looks correct when
checking the
code.
For /proc/[pid]/schedstat the documentation is a bit vague on unit,
but I interpret it
to be the same as the corresponding global values. Which would mean jiffies.
Also here it looks to be in nanoseconds on my system though.
Am I just confused? is it configuration/system dependent? or is the
doc just plain
wrong?
Thanks,
Thommy Jakobsson
Powered by blists - more mailing lists