svn commit: r231775 - stable/9/sys/fs/tmpfs

Alan Cox alc at FreeBSD.org
Wed Feb 15 18:15:26 UTC 2012


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

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/9/sys/fs/tmpfs/tmpfs_vnops.c
Directory Properties:
  stable/9/sys/   (props changed)
  stable/9/sys/amd64/include/xen/   (props changed)
  stable/9/sys/boot/   (props changed)
  stable/9/sys/boot/i386/efi/   (props changed)
  stable/9/sys/boot/ia64/efi/   (props changed)
  stable/9/sys/boot/ia64/ski/   (props changed)
  stable/9/sys/boot/powerpc/boot1.chrp/   (props changed)
  stable/9/sys/boot/powerpc/ofw/   (props changed)
  stable/9/sys/cddl/contrib/opensolaris/   (props changed)
  stable/9/sys/conf/   (props changed)
  stable/9/sys/contrib/dev/acpica/   (props changed)
  stable/9/sys/contrib/octeon-sdk/   (props changed)
  stable/9/sys/contrib/pf/   (props changed)
  stable/9/sys/contrib/x86emu/   (props changed)

Modified: stable/9/sys/fs/tmpfs/tmpfs_vnops.c
==============================================================================
--- stable/9/sys/fs/tmpfs/tmpfs_vnops.c	Wed Feb 15 18:07:24 2012	(r231774)
+++ stable/9/sys/fs/tmpfs/tmpfs_vnops.c	Wed Feb 15 18:15:26 2012	(r231775)
@@ -442,7 +442,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);
@@ -666,7 +666,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);


More information about the svn-src-stable-9 mailing list