4GB limit with netstat
Nils Vogels
nivo+freebsd-stable at yuckfou.org
Thu May 22 02:25:07 PDT 2003
On Wed, May 21, 2003 at 11:18:48AM +0200, Michal Mertl (MM) wrote:
MM> I also didn't like the limitation and we had long discussions about 64 bit
MM> counters in Jan 2002. The problem is that there isn't really cheap way to
MM> do safe (atomic) updates of 64 bit numbers on SMP x86. The conclusion at
MM> time was mostly that counting in 64 bit on 32 bit arch was too expensive.
To start off, I am not a kernel coder by any means, so what I'm about to say
might sound totally outrageous for various reasons :)
Wouldn't it be possible to still do the actual counting of packets/bytes in
32b, but keep an additional counter somewhere that simply tracks the number of
times the 32b counter has rolled over?
The tools that query the counters could then also check how many times the
counter has rolled over and simply add the appropriate number of
bytes/packets to the returned result.
Greetings,
Nils.
More information about the freebsd-stable
mailing list