* On a tickless kernel, how to convert jiffies into a real time
@ 2015-01-11 16:00 David Hagood
0 siblings, 0 replies; only message in thread
From: David Hagood @ 2015-01-11 16:00 UTC (permalink / raw)
To: linux-kernel
On a kernel configured for full tickless operation, how can a user space
program take a value reported by the kernel in jiffies and convert it
into a meaningful wall clock time?
I am asking specifically in terms of parsing the output from
/proc/net/xt_recent/*, but there are other places where user space gets
jiffies from the kernel, so this is a bit more generic.
I have seen several suggestions of just reading the parameters via
sysconf(_SC_CLK_TCK), but that does not work - that reports 1000 jiffies
per second, but that is NOT the value that is being used by the kernel -
as best as I can tell by inspection, it seems to be running somewhere
around 2145 ticks per second, and seems to vary based upon what the
system is doing. If the value does indeed vary, then there's really no
way to compute a jiffies value to wall clock time save at the instant
that jiffies value is captured.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-01-11 16:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-11 16:00 On a tickless kernel, how to convert jiffies into a real time David Hagood
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).