Subject: VM perf evaluation on i386
To: None <tech-kern@netbsd.org>
From: Ming Lei <mlei@brocade.com>
List: tech-kern
Date: 10/28/2003 15:27:02
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_01C39DAA.FDE447D0
Content-Type: text/plain;
	charset="iso-8859-1"


Does anyone have any opinions on the VM performance on linux and netbsd(UVM)
on i386. From my understand of both kernel, linux uses kind of one-to-one
mapping with a giant TLB mapping for most of its kernel space except vmalloc
and netbsd uses pure VM approach(VM and PM is different). 

Look at linux pci_alloc_consistent() just calls the physical mem allocator
and what physical allocator does is just remove the number of pages from
zone freelist; on the other hand, netbsd uses bus_dmamem_alloc() which in
turns calls uvm_pglistalloc() to loop through all the free pages to see
which is first fit for the allocate size; and then bus_dmamem_map() to map
PM with VM which is allocated by uvm_map(also does kind of transverse on map
entries).

So what I think here is in order to get flexibility of VM, netbsd sacrifices
some extent of performace(also one can count the availablity of TLB entries
for user space; netbsd kernel may use multiple TLB entries VS. linux uses
only one). I am mostly interested in seeing some real benchmark on VM perf.
Dont know if there is one.

Ming

------_=_NextPart_001_01C39DAA.FDE447D0
Content-Type: text/html;
	charset="iso-8859-1"
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=3Diso-8859-1">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2653.12">
<TITLE>VM perf evaluation on i386</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=3D2 FACE=3D"Arial">Does anyone have any opinions on the =
VM performance on linux and netbsd(UVM) on i386. From my understand of =
both kernel, linux uses kind of one-to-one mapping with a giant TLB =
mapping for most of its kernel space except vmalloc and netbsd uses =
pure VM approach(VM and PM is different). </FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Look at linux pci_alloc_consistent() =
just calls the physical mem allocator and what physical allocator does =
is just remove the number of pages from zone freelist; on the other =
hand, netbsd uses bus_dmamem_alloc() which in turns calls =
uvm_pglistalloc() to loop through all the free pages to see which is =
first fit for the allocate size; and then bus_dmamem_map() to map PM =
with VM which is allocated by uvm_map(also does kind of transverse on =
map entries).</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">So what I think here is in order to =
get flexibility of VM, netbsd sacrifices some extent of performace(also =
one can count the availablity of TLB entries for user space; netbsd =
kernel may use multiple TLB entries VS. linux uses only one). I am =
mostly interested in seeing some real benchmark on VM perf. Dont know =
if there is one.</FONT></P>

<P><FONT SIZE=3D2 FACE=3D"Arial">Ming</FONT>
</P>

</BODY>
</HTML>
------_=_NextPart_001_01C39DAA.FDE447D0--