Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 12:44:02 -0500
From:      "Sue Wainer" <wainer@sandgate.com>
To:        "Freebsd-Arch" <freebsd-arch@FreeBSD.ORG>
Cc:        "Jon Wells" <jon@bigbang.com.au>
Subject:   Memory Alloation from kernel loadable driver
Message-ID:  <NDBBLIBAPKIAHMINJJNFIEJFCEAA.wainer@sandgate.com>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
I have a pci driver which is loaded using kldload. It is allocating a no. of
pages by calling vm_page_alloc_contig.
This convention is used by other pci drivers, though not necessarily
loadable ones.

On machines without much memory, or ones with more memory but having done
compilations prior to kldloading,
contigmalloc1 gets stuck in a continuous loop looping from the first "goto
again1." There is a comment
above configmalloc1 which might imply that this contiguous allocation does
not work after initialization.

For locked-down memory, what allocation routines should loadable drivers be
calling? Is there any source of
documentation of memory allocation which could be of value?

Thanks.

Sue Wainer
wainer@sandgate.com



[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2722.2800" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT size=2><SPAN class=395142517-23022001>I have a pci driver which is 
loaded using kldload. It is allocating a no. of pages by calling 
</SPAN></FONT><FONT size=2><SPAN 
class=395142517-23022001>vm_page_alloc_contig.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>This convention is used by 
other pci drivers, though not necessarily loadable ones.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>On machines without much 
memory, or ones with more memory but having done compilations prior to 
kldloading,</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>contigmalloc1 gets stuck in a 
continuous loop looping from the first "goto again1." There&nbsp;is a 
comment</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>above configmalloc1 which might 
imply that this contiguous allocation does not work after 
initialization.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>For locked-down memory, what 
allocation&nbsp;routines&nbsp;should loadable drivers be calling? Is there any 
source of</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>documentation of memory 
allocation which could be of value?</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>Thanks.</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001>Sue Wainer</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001><A 
href="mailto:wainer@sandgate.com">wainer@sandgate.com</A>&nbsp;</SPAN></FONT></DIV>
<DIV><FONT size=2><SPAN class=395142517-23022001></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=2><SPAN 
class=395142517-23022001></SPAN></FONT>&nbsp;</DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?NDBBLIBAPKIAHMINJJNFIEJFCEAA.wainer>