Date: Wed, 21 May 2003 11:18:48 +0200 (CEST) From: Michal Mertl <mime@traveller.cz> To: freebsd-stable@freebsd.org Subject: Re: 4GB limit with netstat Message-ID: <20030521104442.G65751@prg.traveller.cz>
next in thread | raw e-mail | index | archive | help
I also didn't like the limitation and we had long discussions about 64 bit counters in Jan 2002. The problem is that there isn't really cheap way to do safe (atomic) updates of 64 bit numbers on SMP x86. The conclusion at time was mostly that counting in 64 bit on 32 bit arch was too expensive. I have a patch which increases the width and adds small api for safe updating of wide counters (for 4.5 or something). Other solution is to keep the type of kernel-updated counters and if needed (on 32 bit archs) have some aggregation counters which would be once in a while (e.g. 10 times a second) updated with some kernel thread. I also have proof-of-concept patch with this approach. As SMPng locking of network stack and drivers is taking place it seems some counters could be made u_int64 rather cheaply - the structures containing the counters should be locked for update anyway so the update can be achieved then by simple means even on 32bit arch. -- Michal Mertl mime@traveller.cz
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030521104442.G65751>