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 [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to