From owner-freebsd-arch Sun Jan 13 23: 5:55 2002 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 4A80937B402 for ; Sun, 13 Jan 2002 23:05:51 -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 g0E75nle083548; Mon, 14 Jan 2002 08:05:50 +0100 (CET) Received: from localhost (mime@localhost) by prg.traveller.cz (8.12.1[KQ-CZ](1)/pukvis) with ESMTP id g0E75noR083545; Mon, 14 Jan 2002 08:05:49 +0100 (CET) Date: Mon, 14 Jan 2002 08:05:49 +0100 (CET) From: Michal Mertl To: Terry Lambert Cc: arch@FreeBSD.ORG Subject: Re: 64 bit counters again In-Reply-To: <3C41F3FD.4ECC8CD@mindspring.com> 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 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