Date: Fri, 12 Oct 2001 10:07:10 -0700 (PDT) From: Matt Dillon <dillon@earth.backplane.com> To: Patrick Cipiere <Patrick.Cipiere@udcast.com> Cc: tinguely@web.cs.ndsu.nodak.edu, freebsd-hackers@FreeBSD.ORG Subject: Re: contigfree, free what? Message-ID: <200110121707.f9CH7Ax34395@earth.backplane.com> References: <200110121605.f9CG5F726010@ra.udcast.com>
index | next in thread | previous in thread | raw e-mail
: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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110121707.f9CH7Ax34395>
