From owner-freebsd-hackers Fri Oct 12 10: 7:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from earth.backplane.com (earth-nat-cw.backplane.com [208.161.114.67]) by hub.freebsd.org (Postfix) with ESMTP id DA9FF37B407 for ; Fri, 12 Oct 2001 10:07:14 -0700 (PDT) Received: (from dillon@localhost) by earth.backplane.com (8.11.6/8.11.2) id f9CH7Ax34395; Fri, 12 Oct 2001 10:07:10 -0700 (PDT) (envelope-from dillon) Date: Fri, 12 Oct 2001 10:07:10 -0700 (PDT) From: Matt Dillon Message-Id: <200110121707.f9CH7Ax34395@earth.backplane.com> To: Patrick Cipiere Cc: tinguely@web.cs.ndsu.nodak.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: contigfree, free what? References: <200110121605.f9CG5F726010@ra.udcast.com> Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG :Mark, : :> I also placed some checks on vm_map_delete : :I did that also, and as far as I understand everything works fine. :The only thing I found was the fact that when contigmalloc() grabs the :contig pages it sets the value of pga[i] (for i in allocated pages) :note that: vm_page_t pga = vm_page_array; : :Then contigfree() does a pretty good job, but does not reset the values :of pga[i] to pqtype == PQ_FREE (pqtype = pga[i].queue - pga[i].pc) : :So the next contigmalloc() requiring the same number of pages fails on :the previously released pages because they are not PQ_FREE : :The other thing that puzzled me is the fact that in vm_map_delete() :called by contgigfree() has a variable :... I think what is going on is that contigmalloc() is wiring the pages but placing them in a pageable container (entry->wired_count == 0), so when contigfree() kmem_free()'s the block the system does not know that it must unwire the pages. This leaves the pages wired and prevents them from being freed. I haven't found a quick and easy solution to the problem yet. kmem_alloc() doesn't do what we want either. I tried calling vm_map_pageable() in contigmalloc1() but it crashed the machine, so there might be something else going on as well. -Matt To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message