Author: alc
Date: Thu Oct 22 17:47:51 2020
New Revision: 366944
URL: https://svnweb.freebsd.org/changeset/base/366944

Log:
  Micro-optimize uma_small_alloc().  Replace bzero(..., PAGE_SIZE) by
  pagezero().  Ultimately, they use the same method for bulk zeroing, but
  the generality of bzero() requires size and alignment checks that
  pagezero() does not.
  
  Eliminate an unnecessary #include.
  
  Reviewed by:  emaste, markj
  MFC after:    1 week
  Differential Revision:        https://reviews.freebsd.org/D26876

Modified:
  head/sys/arm64/arm64/uma_machdep.c

Modified: head/sys/arm64/arm64/uma_machdep.c
==============================================================================
--- head/sys/arm64/arm64/uma_machdep.c  Thu Oct 22 17:46:55 2020        
(r366943)
+++ head/sys/arm64/arm64/uma_machdep.c  Thu Oct 22 17:47:51 2020        
(r366944)
@@ -36,11 +36,10 @@ __FBSDID("$FreeBSD$");
 #include <vm/vm.h>
 #include <vm/vm_param.h>
 #include <vm/vm_page.h>
-#include <vm/vm_pageout.h>
 #include <vm/vm_dumpset.h>
 #include <vm/uma.h>
 #include <vm/uma_int.h>
-#include <machine/md_var.h>
+#include <machine/machdep.h>
 
 void *
 uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int domain, u_int8_t *flags,
@@ -60,7 +59,7 @@ uma_small_alloc(uma_zone_t zone, vm_size_t bytes, int 
                dump_add_page(pa);
        va = (void *)PHYS_TO_DMAP(pa);
        if ((wait & M_ZERO) && (m->flags & PG_ZERO) == 0)
-               bzero(va, PAGE_SIZE);
+               pagezero(va);
        return (va);
 }
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to