Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2001 23:08:05 -0500 (EST)
From:      Kenneth Wayne Culver <culverk@wam.umd.edu>
To:        Michal Mertl <mime@traveller.cz>
Cc:        arch@FreeBSD.ORG
Subject:   Re: 64 bit counters
Message-ID:  <Pine.GSO.4.21.0112252304230.4251-100000@rac3.wam.umd.edu>
In-Reply-To: <Pine.BSF.4.41.0112251700560.79167-100000@prg.traveller.cz>

next in thread | previous in thread | raw e-mail | index | archive | help
I did this a while back where I work for our "product" to support 64-bit
counters in FreeBSD, and it didn't cause any major problems at all. 

I had to do this on a 2.2.8 kernel, and I had to modify some mbuf handling
code that expected one type of message header to fit inside one mbuf, but
that won't be a problem in -CURRENT b/c I believe that the size of an mbuf
went up to 256 bytes from 128 bytes.

Ken

On Tue, 25 Dec 2001, Michal Mertl wrote:

> I would expect this topic already popped on the list but search didn't
> revealed anything.
> 
> As a hostmaster of several FreeBSD servers I noticed the problem of some
> counters overflowing (e.g. byte counters for IP/TCP/UDP overflow in
> several days on my systems). I looked at the source code and it seems
> pretty trivial to change the counters to 64 bits (e.g. in
> /sys/netinet/tcp_var.h change the type of members of tcpstat structure
> from u_long to u_int64_t and in usr.bin/netstat/inet.c change printf from
> %lu to %llu). I tried the change and it seems it didn't do any harm and
> the counters are correct. I am interested in hearing if someone knows
> about possible problem with that change. I would like to see it (along
> with other counters possibly - interrupts, interface, vm counters ...)
> in the RELENG_4 tree (not in 4.5 of course). Addition on 64 bit integer is
> of course little bit more expensive than 32 bit but I think it's only
> minimal slowdown. At least I'm able to saturate the 100FDX ethernet just
> as easily as before.
> 
> I volunteer to do the changes - they're straightforward. Only I don't have
> CURRENT system - but can get one quite easily I hope.
> 
> -- 
> Michal Mertl
> mime@traveller.cz
> 
> 
> 
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-arch" in the body of the message
> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-arch" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.21.0112252304230.4251-100000>