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

Re: Bug#460331: still have this problem on kfreebsd-i386



On Thu, Feb 11, 2010 at 09:23:02PM +0100, Petr Salinger wrote:
> The 32-bit overflow during calculation is responsible
> for remaining problem.
That overflow is in the kernel itself then? I'm using bc to do these
calculations and it seems ok with large numbers.  procps itself uses
long longs. May explain why the calculation varies so much.

> In mean time please use "100" as hardcoded value of HZ for GNU/kFreeBSD.
The code can use HZ from /usr/include/asm/param.h This is set at 100
now, as Peter's bug report says (the assume is from HZ):
| weasel@field:~$ uptime
| Unknown HZ value! (45) Assume 100.

The code conditionally (#ifdef __linux__) uses elf notes so around there
I'll put a #ifdef __FreeBSD__ clause and
  a) if HZ is available, use that
  b) make it 100
or can asm/param.h HZ not be trusted?

Thanks everyone for your time, it's cleared up this problem quite
quickly.

 - Craig
-- 
Craig Small      GnuPG:1C1B D893 1418 2AF4 45EE  95CB C76C E5AC 12CA DFA5
http://www.enc.com.au/                             csmall at : enc.com.au
http://www.debian.org/          Debian GNU/Linux, software should be Free 


Reply to: