Diff for /src/sys/vm/vm_page.h between versions 1.10 and 1.11

version 1.10, 2004/02/16 19:35:53 version 1.11, 2004/05/13 17:40:19
Line 444  vm_offset_t vm_contig_pg_kmap(int, u_lon Line 444  vm_offset_t vm_contig_pg_kmap(int, u_lon
 void vm_contig_pg_free(int, u_long);  void vm_contig_pg_free(int, u_long);
   
 /*  /*
 * Keep page from being freed by the page daemon * Holding a page keeps it from being reused.  Other parts of the system
 * much of the same effect as wiring, except much lower * can still disassociate the page from its current object and free it, or
 * overhead and should be used only for *very* temporary * perform read or write I/O on it and/or otherwise manipulate the page,
 * holding ("wiring"). * but if the page is held the VM system will leave the page and its data
  * intact and not reuse the page for other purposes until the last hold
  * reference is released.  (see vm_page_wire() if you want to prevent the
  * page from being disassociated from its object too).
  *
  * This routine must be called while at splvm() or better.
  *
  * The caller must still validate the contents of the page and, if necessary,
  * wait for any pending I/O (e.g. vm_page_sleep_busy() loop) to complete
  * before manipulating the page.
  */   */
 static __inline void  static __inline void
 vm_page_hold(vm_page_t mem)  vm_page_hold(vm_page_t mem)
Line 456  vm_page_hold(vm_page_t mem) Line 465  vm_page_hold(vm_page_t mem)
 }  }
   
 /*  /*
 *      vm_page_protect: * Reduce the protection of a page.  This routine never raises the 
  * protection and therefore can be safely called if the page is already
  * at VM_PROT_NONE (it will be a NOP effectively ).
  *
  * VM_PROT_NONE will remove all user mappings of a page.  This is often
  * necessary when a page changes state (for example, turns into a copy-on-write
  * page or needs to be frozen for write I/O) in order to force a fault, or
  * to force a page's dirty bits to be synchronized and avoid hardware
  * (modified/accessed) bit update races with pmap changes.
  *   *
 *      Reduce the protection of a page.  This routine never raises the  * Since 'prot' is usually a constant, this inline usually winds up optimizing
 *      protection and therefore can be safely called if the page is already * out the primary conditional.
 *      at VM_PROT_NONE (it will be a NOP effectively ). 
  */   */
   
 static __inline void  static __inline void
 vm_page_protect(vm_page_t mem, int prot)  vm_page_protect(vm_page_t mem, int prot)
 {  {
Line 478  vm_page_protect(vm_page_t mem, int prot) Line 493  vm_page_protect(vm_page_t mem, int prot)
 }  }
   
 /*  /*
 *      vm_page_zero_fill: * Zero-fill the specified page.  The entire contents of the page will be
 * * zero'd out.
 *        Zero-fill the specified page. 
 *       Written as a standard pagein routine, to 
 *      be used by the zero-fill object. 
  */   */
 static __inline boolean_t  static __inline boolean_t
vm_page_zero_fill(m)vm_page_zero_fill(vm_page_t m)
        vm_page_t m; 
 {  {
         pmap_zero_page(VM_PAGE_TO_PHYS(m));          pmap_zero_page(VM_PAGE_TO_PHYS(m));
         return (TRUE);          return (TRUE);
 }  }
   
 /*  /*
 *      vm_page_copy: * Copy the contents of src_m to dest_m.  The pages must be stable but spl
 * * and other protections depend on context.
 *        Copy one page to another 
  */   */
 static __inline void  static __inline void
vm_page_copy(src_m, dest_m)vm_page_copy(vm_page_t src_m, vm_page_t dest_m)
        vm_page_t src_m; 
        vm_page_t dest_m; 
 {  {
         pmap_copy_page(VM_PAGE_TO_PHYS(src_m), VM_PAGE_TO_PHYS(dest_m));          pmap_copy_page(VM_PAGE_TO_PHYS(src_m), VM_PAGE_TO_PHYS(dest_m));
         dest_m->valid = VM_PAGE_BITS_ALL;          dest_m->valid = VM_PAGE_BITS_ALL;

Removed from v.1.10  
changed lines
  Added in v.1.11