From owner-svn-src-all@freebsd.org Thu Oct 22 17:47:52 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1559A44E9DE; Thu, 22 Oct 2020 17:47:52 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4CHFFM6s2mz4GbS; Thu, 22 Oct 2020 17:47:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CE7051AA0C; Thu, 22 Oct 2020 17:47:51 +0000 (UTC) (envelope-from alc@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id 09MHlpIx053344; Thu, 22 Oct 2020 17:47:51 GMT (envelope-from alc@FreeBSD.org) Received: (from alc@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id 09MHlprO053343; Thu, 22 Oct 2020 17:47:51 GMT (envelope-from alc@FreeBSD.org) Message-Id: <202010221747.09MHlprO053343@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: alc set sender to alc@FreeBSD.org using -f From: Alan Cox Date: Thu, 22 Oct 2020 17:47:51 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r366944 - head/sys/arm64/arm64 X-SVN-Group: head X-SVN-Commit-Author: alc X-SVN-Commit-Paths: head/sys/arm64/arm64 X-SVN-Commit-Revision: 366944 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Oct 2020 17:47:52 -0000 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 #include #include -#include #include #include #include -#include +#include 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); }