From owner-freebsd-hackers Thu Feb 6 12:18:07 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id MAA01936 for hackers-outgoing; Thu, 6 Feb 1997 12:18:07 -0800 (PST) Received: from sendero.i-connect.net ([206.190.144.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id MAA01890; Thu, 6 Feb 1997 12:17:57 -0800 (PST) Received: (from shimon@localhost) by sendero.i-connect.net (8.8.5/8.8.4) id NAA09330; Thu, 6 Feb 1997 13:17:01 -0800 (PST) Message-ID: X-Mailer: XFMail 1.1-alpha [p0] on FreeBSD Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: <199702060512.AAA10010@dyson.iquest.net> Date: Thu, 06 Feb 1997 09:55:40 -0800 (PST) Organization: iConnect Corp. From: Simon Shapiro To: "John S. Dyson" Subject: Re: Contigious (spelling?) allocation in kernel Cc: freebsd-hackers@FreeBSD.ORG, freebsd-scsi@FreeBSD.ORG Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Hi John S. Dyson; On 06-Feb-97 you wrote: > Take a look at contigmalloc() or vm_page_alloc_contig() > as defined in /sys/vm/vm_page.c. These are almost > guaranteed NOT to work after the system is fully up. Thanx. If you (or someone else) please elaborate on the last sentence, please... I can re-structure the driver a bit (make it more risky), to avoid the need for large contigious blocks, but the (obvious) question is: Does the kernel malloc guarantee that allocations smaller than (or equal to) a page are in the same page? Having a page or less, limits the Scatter/Gather operations in the kernel, for most hardware, to 512 entries (segments). Under high fragmentation, this can result in 256KB-2MB floating limit. While not a problem for most applications (mine included), it is still a limit that is not absolutely necessary. Any opposing opinions (before I re-code the darn thing :-)? BACKGROUND: One of my engineers, who is heavily involved in Linux SCSI development is strongly opposed to calling malloc on demand in a device driver. He quotes heavy performance penalties, and worse; Failure (under heavy load) to obtain the memory when needed. Thanx, Simon