Date: Sat, 10 Nov 2001 23:53:24 -0800 (PST) From: David Xu <bsddiy@yahoo.com> To: freebsd-hackers@freebsd.org Subject: Found some unnecessary code Message-ID: <20011111075324.72482.qmail@web20906.mail.yahoo.com>
index | next in thread | raw e-mail
Found some unnecessary code in FreeBSD 4.4-stable VM.
File vm_page.c, in function vm_page_startup(), vm_page
bucket is
zeroed two times, this is unnecessary.
--- vm_page.c Sun Nov 11 15:34:41 2001
+++ vm_page.c.orig Sun Nov 11 15:34:21 2001
@@ -265,6 +265,11 @@
vaddr = round_page(vaddr);
bzero((caddr_t) mapped, vaddr - mapped);
+ for (i = 0; i < vm_page_bucket_count; i++) {
+ *bucket = NULL;
+ bucket++;
+ }
+
/*
* Compute the number of pages of memory that will
be available for
* use (taking into account the overhead of a page
structure per
File vm_object.c, function vm_object_backing_scan()
calling
vm_page_deactivate() is unnecessary, this is already
done in
vm_page_rename().
--- vm_object.c.orig Sun Nov 11 15:35:22 2001
+++ vm_object.c Sun Nov 11 15:35:42 2001
@@ -1159,9 +1159,6 @@
* If the page was mapped to a process, it can
remain
* mapped through the rename.
*/
- if ((p->queue - p->pc) == PQ_CACHE)
- vm_page_deactivate(p);
-
vm_page_rename(p, object, new_pindex);
/* page automatically made dirty by rename */
}
--
David Xu
__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011111075324.72482.qmail>
