[Top][All Lists]

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

Re: [address@hidden: [PATCH] Make __getclktck return 100 for the Hurd]

From: Richard Braun
Subject: Re: [address@hidden: [PATCH] Make __getclktck return 100 for the Hurd]
Date: Wed, 12 Jun 2013 01:05:05 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

On Tue, Jun 11, 2013 at 03:55:46PM -0700, Roland McGrath wrote:
> > The /proc file system is merely an example. Also, it's not internal to
> > libc, since it gets exported through sysconf(_SC_CLK_TCK).
> You'll have to explain what problem you think there is more thoroughly.

Basically, top doesn't report correct CPU times. This is caused by
sysconf() returning 1000000 while values read from /proc are true tick
counts, hence 100 per second at most. This discrepancy can be solved
either by making /proc scale its values, or making libc return the
actual number of ticks per second. I personally think the latter is
better for clarity, and also to limit overflows for long running
processes, although that's really secondary.

Richard Braun

reply via email to

[Prev in Thread] Current Thread [Next in Thread]