[Top] [All Lists]

Re: [PATCH]snmp6 64-bit counter support in proc.c

To: xma@xxxxxxxxxx (Shirley Ma)
Subject: Re: [PATCH]snmp6 64-bit counter support in proc.c
From: kuznet@xxxxxxxxxxxxx
Date: Thu, 22 Jan 2004 21:26:51 +0300 (MSK)
Cc: davem@xxxxxxxxxx (David S. Miller), mashirle@xxxxxxxxxx, kuznet@xxxxxxxxxxxxx, netdev@xxxxxxxxxxx
In-reply-to: <OF1837C6DA.A9CB8829-ON87256E22.006C142B@xxxxxxxxxx> from "Shirley Ma" at 21, 2004 11:45:30
Sender: netdev-bounce@xxxxxxxxxxx

> Did you hear different voices?

Here is a little warning. It will give corrupt values on 32 bit archs
when update with 32 bit overflow happens while value is folded.

To do 64 bit arithmetics you need either to serialize reader wrt writer
or to do some funny tricks with detecting overflows while reading and
special sequence of operations at update with proper barriers, which
will be reflected in performance anyway. Essentially, this haemorhoids
is the reason why they stayed 32 bit.


<Prev in Thread] Current Thread [Next in Thread>