Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 25 Dec 2001 23:29:17 +0100 (CET)
From:      Michal Mertl <mime@traveller.cz>
To:        arch@freebsd.org
Subject:   64 bit counters
Message-ID:  <Pine.BSF.4.41.0112251700560.79167-100000@prg.traveller.cz>

next in thread | raw e-mail | index | archive | help
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




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