Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 23 Feb 2001 15:37:34 -0500
From:      "Sue Wainer" <wainer@sandgate.com>
To:        <hackers@freebsd.org>
Subject:   RE: Memory Alloation from kernel loadable driver
Message-ID:  <NDBBLIBAPKIAHMINJJNFOEJFCEAA.wainer@sandgate.com>
In-Reply-To: <NDBBLIBAPKIAHMINJJNFIEJFCEAA.wainer@sandgate.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.

------=_NextPart_000_0007_01C09DAE.8AE15F30
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit



  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



------=_NextPart_000_0007_01C09DAE.8AE15F30
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2722.2800" name=3DGENERATOR></HEAD>
<BODY>
<DIV>&nbsp;</DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #0000ff 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px">
  <DIV align=3Dleft class=3DOutlookMessageHeader dir=3Dltr><FONT =
face=3DTahoma=20
  size=3D2>&nbsp;</DIV></FONT>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>I have a pci =
driver which is=20
  loaded using kldload. It is allocating a no. of pages by calling=20
  </SPAN></FONT><FONT size=3D2><SPAN=20
  class=3D395142517-23022001>vm_page_alloc_contig.</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>This convention =
is used by=20
  other pci drivers, though not necessarily loadable =
ones.</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>On machines =
without much=20
  memory, or ones with more memory but having done compilations prior to =

  kldloading,</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>contigmalloc1 =
gets stuck in a=20
  continuous loop looping from the first "goto again1." There&nbsp;is a=20
  comment</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>above =
configmalloc1 which=20
  might imply that this contiguous allocation does not work after=20
  initialization.</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>For locked-down =
memory, what=20
  allocation&nbsp;routines&nbsp;should loadable drivers be calling? Is =
there any=20
  source of</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>documentation of =
memory=20
  allocation which could be of value?</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001>Thanks.</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001>Sue=20
Wainer</SPAN></FONT></DIV>
  <DIV><FONT size=3D2><SPAN class=3D395142517-23022001><A=20
  =
href=3D"mailto:wainer@sandgate.com">wainer@sandgate.com</A>&nbsp;</SPAN><=
/FONT></DIV>
  <DIV><FONT size=3D2><SPAN =
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV>
  <DIV><FONT size=3D2><SPAN=20
class=3D395142517-23022001></SPAN></FONT>&nbsp;</DIV></BLOCKQUOTE></BODY>=
</HTML>

------=_NextPart_000_0007_01C09DAE.8AE15F30--


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




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