Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 14 Jan 2002 08:05:49 +0100 (CET)
From:      Michal Mertl <mime@traveller.cz>
To:        Terry Lambert <tlambert2@mindspring.com>
Cc:        arch@FreeBSD.ORG
Subject:   Re: 64 bit counters again
Message-ID:  <Pine.BSF.4.41.0201140750390.82342-100000@prg.traveller.cz>
In-Reply-To: <3C41F3FD.4ECC8CD@mindspring.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 13 Jan 2002, Terry Lambert wrote:

> Michal Mertl wrote:
> > But anyway I continued on some work on STABLE (but believe lot of my work
> > could be used on CURRENT after some modification) and get kernel and world
> > building with 64 bit counters on network interfaces (struct if_data)
> > and in protocols (struct ipstat, tcpstat, udpstat, icmpstat, igmpstat).
>
> Not to discount the value of this work, but...
>
> 1)	It makes counting slower on 32 bit processors.

How much slower? 64 bit addition on i386 is only 2 simple instructions
instead of 1 for 32 bit.

>
> 2)	The values are not accessible from SNMP, which is
> 	limited to 32 bit counters.
>

Not true. You do better check things before explaining them to anyone.

> 3)	While you could export these values as strings and
> 	not numbers over SNMP, doing this would mean you
> 	would need to use a MIB which was not a superset
> 	of an RFC'ed MIB.

As stated before there is 64bit counter type in SNMP. On cisco I use it
every other day.

> So it seems to me that the utility of this on 32 bit machines
> is incredibly limited (e.g. shell programs).
>

I don't see that much utility either, only to have right values. But I got
at least one email asking for the patch because the guy uses the counters.
He said they overflow in several minutes for him so are really useless.

> PS:	FWIW, I agree that these things should be 64 bits on
> 	64 bit architectures, even if they can only export
> 	the low 32 bits for SNMP.
>

I think some counters are already 64 bit on 64 bit architectures, because
they are defined as u_long which is (I believe) 64 bit.

The most importatnt thing is that I don't believe the operations are
expensive (when not using locked atomic ops at least).

-- 
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.0201140750390.82342-100000>