Subject: RE: UBC on a no swap system
To: 'cgd@broadcom.com' <cgd@broadcom.com>
From: Huy Vu <hvu@hyperchip.com>
List: tech-embed
Date: 06/17/2003 15:26:35
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_000_01C33506.5D821D30
Content-Type: multipart/alternative;
boundary="----_=_NextPart_001_01C33506.5D821D30"
------_=_NextPart_001_01C33506.5D821D30
Content-Type: text/plain;
charset="iso-8859-1"
> FYI, when sending diffs, it's often more useful to send unidiffs ("cvs
> diff -up" / "diff -up") or context diffs ("cvs diff -c" / "diff -c").
Ok, here is unidiff.
------_=_NextPart_001_01C33506.5D821D30
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>RE: UBC on a no swap system</TITLE>
</HEAD>
<BODY>
<P><FONT SIZE=2>> FYI, when sending diffs, it's often more useful to send unidiffs ("cvs</FONT>
<BR><FONT SIZE=2>> diff -up" / "diff -up") or context diffs ("cvs diff -c" / "diff -c").</FONT>
</P>
<P><FONT SIZE=2>Ok, here is unidiff.</FONT>
</P>
<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT>
</BODY>
</HTML>
------_=_NextPart_001_01C33506.5D821D30--
------_=_NextPart_000_01C33506.5D821D30
Content-Type: application/octet-stream;
name="uvm_fault.diff"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
filename="uvm_fault.diff"
Index: uvm_fault.c=0A=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A=
RCS file: /cvsroot/netbsd-current/netbsd1.6/sys/uvm/uvm_fault.c,v=0A=
retrieving revision 1.2=0A=
retrieving revision 1.3=0A=
diff -u -p -r1.2 -r1.3=0A=
--- uvm_fault.c 17 Dec 2002 21:07:50 -0000 1.2=0A=
+++ uvm_fault.c 17 Dec 2002 23:16:08 -0000 1.3=0A=
@@ -535,7 +535,10 @@ uvm_fault(orig_map, vaddr, fault_type, a=0A=
vm_prot_t enter_prot, check_prot;=0A=
boolean_t wired, narrow, promote, locked, shadowed, wire_fault, =
cow_now;=0A=
int npages, nback, nforw, centeridx, error, lcv, gotpages;=0A=
- vaddr_t startva, objaddr, currva, offset;=0A=
+#ifdef NEW_ALGORITHM=0A=
+ int t;=0A=
+#endif=0A=
+ vaddr_t startva, objaddr, currva, offset;=0A=
voff_t uoff;=0A=
paddr_t pa;=0A=
struct vm_amap *amap;=0A=
@@ -1160,7 +1163,15 @@ ReFault:=0A=
}=0A=
uvmfault_unlockall(&ufi, amap, uobj, oanon);=0A=
KASSERT(uvmexp.swpgonly <=3D uvmexp.swpages);=0A=
- if (anon =3D=3D NULL || uvmexp.swpgonly =3D=3D uvmexp.swpages) {=0A=
+=0A=
+#ifdef NEW_ALGORITHM=0A=
+ t =3D uvmexp.active + uvmexp.inactive + uvmexp.free;=0A=
+ if (anon =3D=3D NULL || (uvmexp.swpgonly =3D=3D uvmexp.swpages =
&&=0A=
+ uvmexp.filepages <=3D ((t * uvmexp.filemin) >> 8) =
&&=0A=
+ uvmexp.execpages <=3D ((t * uvmexp.execmin) >> 8))) =
{=0A=
+#else=0A=
+ if (anon =3D=3D NULL || (uvmexp.swpgonly =3D=3D uvmexp.swpages)) =
{=0A=
+#endif=0A=
UVMHIST_LOG(maphist,=0A=
"<- failed. out of VM",0,0,0,0);=0A=
uvmexp.fltnoanon++;=0A=
@@ -1576,7 +1587,15 @@ Case2:=0A=
/* unlock and fail ... */=0A=
uvmfault_unlockall(&ufi, amap, uobj, NULL);=0A=
KASSERT(uvmexp.swpgonly <=3D uvmexp.swpages);=0A=
- if (anon =3D=3D NULL || uvmexp.swpgonly =3D=3D uvmexp.swpages) {=0A=
+=0A=
+#ifdef NEW_ALGORITHM=0A=
+ t =3D uvmexp.active + uvmexp.inactive + uvmexp.free;=0A=
+ if (anon =3D=3D NULL || (uvmexp.swpgonly =3D=3D uvmexp.swpages =
&&=0A=
+ uvmexp.filepages <=3D ((t * uvmexp.filemin) >> 8) =
&&=0A=
+ uvmexp.execpages <=3D ((t * uvmexp.execmin) >> 8))) =
{=0A=
+#else=0A=
+ if (anon =3D=3D NULL || (uvmexp.swpgonly =3D=3D uvmexp.swpages)) =
{=0A=
+#endif=0A=
UVMHIST_LOG(maphist, " promote: out of VM",=0A=
0,0,0,0);=0A=
uvmexp.fltnoanon++;=0A=
------_=_NextPart_000_01C33506.5D821D30--