Subject: RE: how can kernel space expand to >1GB?
To: 'Jonathan Stone' <jonathan@DSG.Stanford.EDU>
From: Ming Lei <mlei@Brocade.COM>
List: tech-kern
Date: 07/31/2003 16:39:43
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C357BD.0484BFB0
Content-Type: text/plain


netbsd does have an config option to split kernel/user space to 1G/3G as
linux does. This option exists for every platform.

Jason, sorry that I didnt make myself clear in the previous emails. Let's
get an example, say I have kernel subsystem D(D is not an user app!) needs
to use *lots of memory* and I enable the code to use all the kernel memory
that I can grab. Do you think D has the limit of how much memory it can use?

I think D would first reach the limit posted by kernel 1GB virtual memory
restriction. When all the kernel virtual addess(1GB) are exhausted, and if D
wants even more memory(see there are still some phys memory left), how does
kernel do?

This is basically my question.

Thanks,
Ming

-----Original Message-----
From: Jonathan Stone [mailto:jonathan@DSG.Stanford.EDU]
Sent: Thursday, July 31, 2003 4:14 PM
To: Jason Thorpe
Cc: tech-kern@NetBSD.org
Subject: Re: how can kernel space expand to >1GB?



In message <4500011C-C3A4-11D7-BC1E-000A957650EC@wasabisystems.com>,
Jason Thorpe writes:
>
>On Thursday, July 31, 2003, at 02:57  PM, Ming Lei wrote:
>
>> On linux, there is an option called HIGHMEM support that enable the 
>> kernel to access larger physical memory, more than 1GB on i386. The 
>> way they do it, if I understand correctly, is that use a region in 
>> kernel virtual space to dynamic mapping high physical memory.
>
>NetBSD doesn't require any special options to do this.  You can still 
>dynamically remap any part of RAM into the kernel virtual address 
>space.  This is nothing really special -- it's basic functionality of 
>the VM system.

When configuring Linux 2.2 (and 2.4?) i386 kernels, you have (had) a
config-time option to select for 1Gbyte[*] or 2Gbtyes of KVA.  The max
user VA space is then, 3 Gbytes or 2Gbytes, respectively.

I suspect that's what Ming Lei is getting at.


------_=_NextPart_001_01C357BD.0484BFB0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3DUS-ASCII">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>RE: how can kernel space expand to &gt;1GB?</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2>netbsd does have an config option to split =
kernel/user space to 1G/3G as linux does. This option exists for every =
platform.</FONT></P>

<P><FONT SIZE=3D2>Jason, sorry that I didnt make myself clear in the =
previous emails. Let's get an example, say I have kernel subsystem D(D =
is not an user app!) needs to use *lots of memory* and I enable the =
code to use all the kernel memory that I can grab. Do you think D has =
the limit of how much memory it can use?</FONT></P>

<P><FONT SIZE=3D2>I think D would first reach the limit posted by =
kernel 1GB virtual memory restriction. When all the kernel virtual =
addess(1GB) are exhausted, and if D wants even more memory(see there =
are still some phys memory left), how does kernel do?</FONT></P>

<P><FONT SIZE=3D2>This is basically my question.</FONT>
</P>

<P><FONT SIZE=3D2>Thanks,</FONT>
<BR><FONT SIZE=3D2>Ming</FONT>
</P>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Jonathan Stone [<A =
HREF=3D"mailto:jonathan@DSG.Stanford.EDU">mailto:jonathan@DSG.Stanford.E=
DU</A>]</FONT>
<BR><FONT SIZE=3D2>Sent: Thursday, July 31, 2003 4:14 PM</FONT>
<BR><FONT SIZE=3D2>To: Jason Thorpe</FONT>
<BR><FONT SIZE=3D2>Cc: tech-kern@NetBSD.org</FONT>
<BR><FONT SIZE=3D2>Subject: Re: how can kernel space expand to =
&gt;1GB?</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>In message =
&lt;4500011C-C3A4-11D7-BC1E-000A957650EC@wasabisystems.com&gt;,</FONT>
<BR><FONT SIZE=3D2>Jason Thorpe writes:</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;On Thursday, July 31, 2003, at 02:57&nbsp; PM, =
Ming Lei wrote:</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;&gt; On linux, there is an option called HIGHMEM =
support that enable the </FONT>
<BR><FONT SIZE=3D2>&gt;&gt; kernel to access larger physical memory, =
more than 1GB on i386. The </FONT>
<BR><FONT SIZE=3D2>&gt;&gt; way they do it, if I understand correctly, =
is that use a region in </FONT>
<BR><FONT SIZE=3D2>&gt;&gt; kernel virtual space to dynamic mapping =
high physical memory.</FONT>
<BR><FONT SIZE=3D2>&gt;</FONT>
<BR><FONT SIZE=3D2>&gt;NetBSD doesn't require any special options to do =
this.&nbsp; You can still </FONT>
<BR><FONT SIZE=3D2>&gt;dynamically remap any part of RAM into the =
kernel virtual address </FONT>
<BR><FONT SIZE=3D2>&gt;space.&nbsp; This is nothing really special -- =
it's basic functionality of </FONT>
<BR><FONT SIZE=3D2>&gt;the VM system.</FONT>
</P>

<P><FONT SIZE=3D2>When configuring Linux 2.2 (and 2.4?) i386 kernels, =
you have (had) a</FONT>
<BR><FONT SIZE=3D2>config-time option to select for 1Gbyte[*] or =
2Gbtyes of KVA.&nbsp; The max</FONT>
<BR><FONT SIZE=3D2>user VA space is then, 3 Gbytes or 2Gbytes, =
respectively.</FONT>
</P>

<P><FONT SIZE=3D2>I suspect that's what Ming Lei is getting at.</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C357BD.0484BFB0--