From owner-freebsd-arch Tue Dec 25 20: 8:14 2001 Delivered-To: freebsd-arch@freebsd.org Received: from po3.wam.umd.edu (po3.wam.umd.edu [128.8.10.165]) by hub.freebsd.org (Postfix) with ESMTP id 63FA637B41B for ; Tue, 25 Dec 2001 20:08:09 -0800 (PST) Received: from rac3.wam.umd.edu (IDENT:root@rac3.wam.umd.edu [128.8.10.143]) by po3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id XAA06317; Tue, 25 Dec 2001 23:08:05 -0500 (EST) Received: from rac3.wam.umd.edu (IDENT:sendmail@localhost [127.0.0.1]) by rac3.wam.umd.edu (8.9.3/8.9.3) with SMTP id XAA04573; Tue, 25 Dec 2001 23:08:05 -0500 (EST) Received: from localhost (culverk@localhost) by rac3.wam.umd.edu (8.9.3/8.9.3) with ESMTP id XAA04569; Tue, 25 Dec 2001 23:08:05 -0500 (EST) X-Authentication-Warning: rac3.wam.umd.edu: culverk owned process doing -bs Date: Tue, 25 Dec 2001 23:08:05 -0500 (EST) From: Kenneth Wayne Culver To: Michal Mertl Cc: arch@FreeBSD.ORG Subject: Re: 64 bit counters In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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