From owner-freebsd-net Wed Sep 13 19:22:52 2000 Delivered-To: freebsd-net@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 7F8F237B422 for ; Wed, 13 Sep 2000 19:22:49 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.9.3/8.9.3) id WAA04696; Wed, 13 Sep 2000 22:22:37 -0400 (EDT) (envelope-from wollman) Date: Wed, 13 Sep 2000 22:22:37 -0400 (EDT) From: Garrett Wollman Message-Id: <200009140222.WAA04696@khavrinen.lcs.mit.edu> To: Bosko Milekic Cc: freebsd-net@FreeBSD.ORG Subject: Re: Clusters larger than PAGE_SIZE and contigmalloc() In-Reply-To: References: <20000913171611.E12231@fw.wintelcom.net> Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org < said: > The drivers that typically require these larger buffers are usually > the gigabit network adapters that do jumbo frames. The code was originally written for an ATM driver than never saw the light of day, as I recall. Prior to that, you could specify a large cluster size, but there was no guarantee that the pages in the cluster would be physically contiguous, and the hardware in question did not support scatter/gather DMA. (Some of the code which did not make it into FreeBSD supported embedding the header mbuf into the cluster, a feature which would still be a good idea today.) I don't think there is anybody who still cares about that code now; it was just a stopgap measure on the way to something that never happened. The Right Way to do this, as I've been expounding for several years[0] (but never actually done the work) is to push mbuf allocation down into the driver, so that each interface can create precisely the sort of buffer that works best for it. Obviously, most Ethernet interfaces would share a common allocator, just as they do now.[1] -GAWollman [0] Van Jacobson has been saying it for at least twice as long. [1] It might be worthwhile for Ethernet interfaces to use 1536-byte clusters rather than 2048-byte clusters. 1536 is large enough to hold and Ethernet packet with complete headers, but packs eight buffers in the space of six 2kbyte clusters. With the new refcounting code this should be quite easy to accomplish. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message