Date: Mon, 17 Feb 2003 09:56:21 -0500 From: Bosko Milekic <bmilekic@unixdaemons.com> To: Dag-Erling Smorgrav <des@ofug.org> Cc: freebsd-arch@freebsd.org Subject: Re: mb_alloc cache balancer / garbage collector Message-ID: <20030217095621.C64558@unixdaemons.com> In-Reply-To: <xzp3cmne4x8.fsf@flood.ping.uio.no>; from des@ofug.org on Mon, Feb 17, 2003 at 08:34:43AM %2B0100 References: <20030216213552.A63109@unixdaemons.com> <xzp3cmne4x8.fsf@flood.ping.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Feb 17, 2003 at 08:34:43AM +0100, Dag-Erling Smorgrav wrote: > Bosko Milekic <bmilekic@unixdaemons.com> writes: > > What does this mean for us on the long term? One of the things it > > means is that we continue to have a high performance scalable network > > buffer allocations but while also being able to free resources to the > > rest of the system. > > Does this render nmbclusters obsolete? Heh. Another good question. Right now, no. One could argue though that it's now technically OK to remove that limit but, personally, I think I would still argue that we should keep it. Several reasons: 1) It's good to cap the amount of virtual address space reserved for network buffers; we've seen over the years that a lot of resource-exhausting DoS attacks relied on a code path in the network code that could be used to exhaust system resources by over-allocating to network buffers. At least the virtual address cap allows us to eventually level out and - now with the cache balancer/garbage collector - recover completely. 2) A few optimizations, notably the one regarding mbuf cluster reference counts, relies on mbuf clusters coming from a contiguous virtual address map. Then you can do things like keep an array of reference counters for clusters and index into it based on the virtual address of the cluster for reference counting. I know I've been knocking my head against my desk trying to figure out if there's a better way to do reference counting while maintaining the same level of performance (and I'm sure others have to, judging from countless discussions and the amount of times this code has changed), but we haven't had that G-dly revelation yet. :-) > DES > -- > Dag-Erling Smorgrav - des@ofug.org -- Bosko Milekic * bmilekic@unixdaemons.com * bmilekic@FreeBSD.org "If we open a quarrel between the past and the present, we shall find that we have lost the future." 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?20030217095621.C64558>