This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [rbraun at sceen dot net: [PATCH] Make __getclktck return 100 for the Hurd]


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]