From owner-freebsd-hackers Fri Jun 11 6:48:14 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from ns1.yes.no (ns1.yes.no [195.204.136.10]) by hub.freebsd.org (Postfix) with ESMTP id BC104154FD for ; Fri, 11 Jun 1999 06:48:07 -0700 (PDT) (envelope-from eivind@bitbox.follo.net) Received: from bitbox.follo.net (bitbox.follo.net [195.204.143.218]) by ns1.yes.no (8.9.1a/8.9.1) with ESMTP id PAA10444; Fri, 11 Jun 1999 15:48:03 +0200 (CEST) Received: (from eivind@localhost) by bitbox.follo.net (8.8.8/8.8.6) id PAA26304; Fri, 11 Jun 1999 15:48:02 +0200 (MET DST) Date: Fri, 11 Jun 1999 15:48:01 +0200 From: Eivind Eklund To: Roger Hardiman Cc: hackers@FreeBSD.ORG, new-bus-arch@bostonradio.org Subject: Re: KLD bt848 driver and vm_page_alloc_contig Message-ID: <19990611154801.A26249@bitbox.follo.net> References: <37610728.7640C257@cs.strath.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.1i In-Reply-To: <37610728.7640C257@cs.strath.ac.uk>; from Roger Hardiman on Fri, Jun 11, 1999 at 01:55:04PM +0100 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Fri, Jun 11, 1999 at 01:55:04PM +0100, Roger Hardiman wrote: > Hi, > > Is there a way to fix > vm_page_alloc_contig() > so it can allocate contiguous memory once userland has got up > and running and memory has been fragmented/filled. John Dyson answered this about 2 years ago with something like 'Yes, but it is a bit of work', and I think that is still true (I don't see any reason it shouldn't be possible, but I don't know the data structures involved well enough to know exactly how to do it. > Clearly the kernel would need to swap out user process memory pages > to make room for the contigous memory vm_page_alloc_contig() > requires. No, not really. The VM mapping internally is virtualized, so you can move pages around without swapping them out. You'd just have to find some place where you want to put the continuous block, and either move all pages in the block away from it, or drop them (if they're clean), in order to be able so you can return the block. It would destroy cache coherence, of course, but that isn't horribly expensive. Eivind. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message