Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Oct 2020 17:47:51 +0000 (UTC)
From:      Alan Cox <alc@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r366944 - head/sys/arm64/arm64
Message-ID:  <202010221747.09MHlprO053343@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202010221747.09MHlprO053343>