From owner-freebsd-arch Tue Dec 25 14:29:21 2001 Delivered-To: freebsd-arch@freebsd.org Received: from prg.traveller.cz (prg.traveller.cz [193.85.2.77]) by hub.freebsd.org (Postfix) with ESMTP id 672A637B405 for ; Tue, 25 Dec 2001 14:29:19 -0800 (PST) Received: from prg.traveller.cz (localhost [127.0.0.1]) by prg.traveller.cz (8.12.1[KQ-CZ](1)/8.12.1/pukvis) with ESMTP id fBPMTHvT092793 for ; Tue, 25 Dec 2001 23:29:17 +0100 (CET) Received: from localhost (mime@localhost) by prg.traveller.cz (8.12.1[KQ-CZ](1)/pukvis) with ESMTP id fBPMTHnF092790 for ; Tue, 25 Dec 2001 23:29:17 +0100 (CET) Date: Tue, 25 Dec 2001 23:29:17 +0100 (CET) From: Michal Mertl To: arch@freebsd.org Subject: 64 bit counters 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 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