public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@uni-koblenz.de>
To: Matt <matt@bluefishwireless.com>
Cc: linux-kernel@vger.kernel.org, procps-bugs@redhat.com,
	Alan Cox <alan@lxorguk.ukuu.org.uk>
Subject: Re: struct_task->start_time, jiffies or hz_to_std(jiffies)
Date: Mon, 17 Sep 2001 00:52:24 +0200	[thread overview]
Message-ID: <20010917005224.B23335@dea.linux-mips.net> (raw)
In-Reply-To: <20010913154855.B628@bluefishwireless.com>
In-Reply-To: <20010913154855.B628@bluefishwireless.com>; from matt@bluefishwireless.com on Thu, Sep 13, 2001 at 03:48:55PM +1000

On Thu, Sep 13, 2001 at 03:48:55PM +1000, Matt wrote:

> 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.

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
diff -u -r1.48 array.c
--- fs/proc/array.c 2001/08/24 03:38:51 1.48  
+++ fs/proc/array.c 2001/09/16 22:48:28   
@@ -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,

      reply	other threads:[~2001-09-16 22:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-13  5:48 struct_task->start_time, jiffies or hz_to_std(jiffies) Matt
2001-09-16 22:52 ` Ralf Baechle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20010917005224.B23335@dea.linux-mips.net \
    --to=ralf@uni-koblenz.de \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=matt@bluefishwireless.com \
    --cc=procps-bugs@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox