Another query about jiffies and a simple /proc/jiffies patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have created a simple patch that creates a "/proc/jiffies" entry 
for the 2.6.x kernel. It can be downloaded off:
http://puggy.symonds.net/~hareesh/ibm/proc-entry-for-jiffies-2.6.3.patch

I have stated my problem below. I must say that it is driving me quite mad!

Value printed by uptime
-----------------------
$uptime
19:15:08 up 27 min,  1 user,  load average: 0.10, 0.10, 0.11

Value printed by the jiffies field of the 'current' task
--------------------------------------------------------
$awk '{print $22}' /proc/self/stat
183579

Which means: 	183579/100 seconds 	= 1835 seconds
		1835/60 minutes		= 30 minutes

[In userspace HZ = 100; In kernel HZ = 1000 ]

Conclusion
---------- 
Everything seems perfect.

Value printed by /proc/jiffies (through my patch)
-------------------------------------------------
$cat /proc/jiffies
jiffies = 1643009

Which means: 	1643009/1000 seconds	= 1643 seconds
		1643/60 minutes		= 27 minutes

What is wrong??
Can anyone please check my patch and tell me if anything is wrong.

Moreover, in the first 3 minutes,  cat /proc/jiffies prints junk.

Any inputs will be appreciated.

TIA
-- 
Hareesh Nagarajan
Bangalore, India
WEB: http://puggy.symonds.net/~hareesh


--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux