mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ragnar Hojland Espinosa <ragnar@jazzfree.com>
To: Tim Schmielau <tim@physik3.uni-rostock.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: HZ value used in kernel/acct.c
Date: Mon, 25 Feb 2002 21:44:37 +0100	[thread overview]
Message-ID: <20020225214437.C10218@ragnar-hojland.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0202242217070.30805-100000@gans.physik3.uni-rostock.de>
In-Reply-To: <Pine.LNX.4.33.0202242217070.30805-100000@gans.physik3.uni-rostock.de>; from tim@physik3.uni-rostock.de on Sun, Feb 24, 2002 at 10:35:33PM +0100

On Sun, Feb 24, 2002 at 10:35:33PM +0100, Tim Schmielau wrote:
> What is the supposed unit of the ac_etime field of struct acct?
> The code in kernel/acct.c currently says
> 
>    ac.ac_etime = encode_comp_t(jiffies - current->start_time);
> 
> so it is given in multiples of HZ, which makes this value 
> platform-dependent (and subject of overflow after 48.5 days with HZ=1024). 
> In include/linux/acct.h however there is the definition
> 
>    #define AHZ             100
> 
> which somehow smells like the preferred time unit.
> Comments?

The acct.c implementation followed FreeBSD's which also expressed comp_t
in terms platform dependant 1/(A)HZ   You could check the "[Patch] fix
incorrect jiffies compares" thread for a fix on uptime and 64 bit jiffies
someone sent.. didn't pay attention in why it didn't get in, tho.

-- 
____/|  Ragnar Højland      Freedom - Linux - OpenGL |    Brainbench MVP
\ o.O|  PGP94C4B2F0D27DE025BE2302C104B78C56 B72F0822 | for Unix Programming
 =(_)=  "Thou shalt not follow the NULL pointer for  | (www.brainbench.com)
   U     chaos and madness await thee at its end."      [20 pend. Mar 10]

  reply	other threads:[~2002-02-25 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-24 21:35 Tim Schmielau
2002-02-25 20:44 ` Ragnar Hojland Espinosa [this message]
2002-02-26  8:52   ` Tim Schmielau

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=20020225214437.C10218@ragnar-hojland.com \
    --to=ragnar@jazzfree.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tim@physik3.uni-rostock.de \
    /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

all inboxes | Powered by JetHome®