Author: alc
Date: Wed Feb 15 18:18:29 2012
New Revision: 231776
URL: http://svn.freebsd.org/changeset/base/231776

Log:
  MFC r229363
    Don't pass VM_ALLOC_ZERO to vm_page_grab() in tmpfs_mappedwrite() and
    tmpfs_nocacheread().  It is both unnecessary and a pessimization.  It
    results in either the page being zeroed twice or zeroed first and then
    overwritten by an I/O operation.

Modified:
  stable/8/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/boot/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)
  stable/8/sys/dev/e1000/   (props changed)

Modified: stable/8/sys/fs/tmpfs/tmpfs_vnops.c
==============================================================================
--- stable/8/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 15 18:15:26 2012        
(r231775)
+++ stable/8/sys/fs/tmpfs/tmpfs_vnops.c Wed Feb 15 18:18:29 2012        
(r231776)
@@ -437,7 +437,7 @@ tmpfs_nocacheread(vm_object_t tobj, vm_p
        VM_OBJECT_LOCK(tobj);
        vm_object_pip_add(tobj, 1);
        m = vm_page_grab(tobj, idx, VM_ALLOC_WIRED |
-           VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+           VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
        if (m->valid != VM_PAGE_BITS_ALL) {
                if (vm_pager_has_page(tobj, idx, NULL, NULL)) {
                        error = vm_pager_get_pages(tobj, &m, 1, 0);
@@ -638,7 +638,7 @@ nocache:
        VM_OBJECT_LOCK(tobj);
        vm_object_pip_add(tobj, 1);
        tpg = vm_page_grab(tobj, idx, VM_ALLOC_WIRED |
-           VM_ALLOC_ZERO | VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
+           VM_ALLOC_NORMAL | VM_ALLOC_RETRY);
        if (tpg->valid != VM_PAGE_BITS_ALL) {
                if (vm_pager_has_page(tobj, idx, NULL, NULL)) {
                        error = vm_pager_get_pages(tobj, &tpg, 1, 0);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to