Skip to contentSkip to conversation

struct_task->start_time, jiffies or hz_to_std(jiffies)

DISCUSSION Matt 2 participants 2 messages Sep 13, 2001 – Sep 16, 2001

lore
Share & tools
lore

Matt

author
#0 lore raw

given

2.4.9-ac10 linux/kernel/fork.c:658

        p->start_time = jiffies;

is this

2.4.9-ac10 linux/fs/proc/array.c

                task->start_time,

correct? or should it be

		hz_to_std(task->start_time),

??

i know this will affect libproc, however libproc appears to be broken anyway; i changed HZ and CLOCKS_PER_SEC to 1024 in include/asm/param.h on x86 and top / ps etc are giving me very whacked out numbers.. the machine itself is stable however and appears to be working just fine.

matt

#1 lore raw
Quoted 9 lines · Matt

2.4.9-ac10 linux/kernel/fork.c:658

        p->start_time = jiffies;

is this

2.4.9-ac10 linux/fs/proc/array.c

                task->start_time,

correct? or should it be

Quoted 8 lines
		hz_to_std(task->start_time),

??

i know this will affect libproc, however libproc appears to be broken anyway; i changed HZ and CLOCKS_PER_SEC to 1024 in include/asm/param.h on x86 and top / ps etc are giving me very whacked out numbers.. the machine itself is stable however and appears to be working just fine.

Antirely correct; I'll make a patch and send it to Alan in case he doesn't have this one yet.

A quick grep also shows that kernel accounting also seems to have it's issues with time granularity. Bad, accounting date should be portable between architectures.

Alan, real patch below in case this isn't yet in -ac please apply.

Ralf

Index: fs/proc/array.c
===================================================================
RCS file: /home/pub/cvs/linux/fs/proc/array.c,v
retrieving revision 1.48

proc/array.c 2001/09/16 22:48:28 renamed from proc/array.c 2001/08/24 03:38:51 1.48 +1 -1
diff -u -r1.48 array.c
@@ -365,7 +365,7 @@
 		nice,
 		0UL /* removed */,
 		task->it_real_value,
-		task->start_time,
+		hz_to_std(task->start_time),
 		vsize,
 		mm ? mm->rss : 0, /* you might want to shift this left 3 */
 		task->rlim[RLIMIT_RSS].rlim_cur,