From nobody Thu Nov 30 11:24:31 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Sgv3g4Brpz53CCN; Thu, 30 Nov 2023 11:24:31 +0000 (UTC) (envelope-from git@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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Sgv3g3l3Tz3NFd; Thu, 30 Nov 2023 11:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701343471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BktOj9je+17nG9k5PdKFkp6jpLPM2bi6Wlg4MgloJu0=; b=B6Fg1nWaRyg2H6jQS6HQ3uohxWaw77neZwKHE1Q7macLHXxyZbqtkE9SjFYgaDceOdO1QF iDEJruwEAQqjCjlcj5yOlUIuuBwc22b+j/xZIQwnsJX8aBjBdDsWRb9F6p0JOxxEAR5uVf OoaQ8KgPgaTsdnkfr+jdPOG3eP2CeEs7GkfFdQYsrxK00f20I7fIvMSvJb0ikgWE0GqOLX GwkimSCqYlnXT7IjJ7BEwXVy9VC5O12oMI7yzNoKGlpOEko7J89iw9mcpAbbLt5Gc+tNkv F8Dp6eB49WUrwMwtc00bk4oz+nGZMb9qrtUOxCAg0SE8g5G/YKijLm3q7P8biw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1701343471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BktOj9je+17nG9k5PdKFkp6jpLPM2bi6Wlg4MgloJu0=; b=dtt30uhK6bEEwZ1QI9Ido/9RcccZdS9V9hGMVFAGI84xePVqEeifcFLGmNVMXqur2bsNkk mgBIZdXPXite7qLVGMSGUMuDtnNSriDw8jYFhNRyVjLEAPuHvyzrwG4zEELU9LagDmtXNw WjzmDM6cmHaTBRL+Yjx25NIICPbuWgKeB/BtFr9zyCpfsFhUBznR4UdiDPqdcT2TufZ6il Hd1u72e+5ZUWn3iMECo4UpIJg6E0RcziCiaAEeAkHSn+oQZ+lCJdAogR4z0TCZLPe2rZti GaR4dRp5qV4uspJORiZSCgPRYJzmQ69hF1h/WrZXdQ211bUvTn5g62fDWtN6pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1701343471; a=rsa-sha256; cv=none; b=V71IuRWTnsdhfoKJ7rnIR8PBYg2CoNEpXi5SfgOKzjtfUnPMwPM4BVAaoegbHx9xy6K+4s 9fOrf0SUKHiq2CqbfyqlGhm05SW9Fz2DburwQG1CAc30oOcPR2LUNPNofe3pA32pHJjWmH VqssSYZ/HD12SokSyIG1FSKJEY+q2cEf4AIOwwwGinPPgWnNVMDkRo+p8xz+NDF+imtOnd sB+xq47p08oLVEBESUJ1p0VXOWGf4hPUrBZlDPZ1A8HSpGE6yuexnCtjRi6nNM6Jmbrpzu maL793AS9yONNWCF8YWd9G3hNKMoGNOhcqRnRSPq0XsJXHOgMpdbkgdv3kj8ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Sgv3g2q2dzns6; Thu, 30 Nov 2023 11:24:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3AUBOVbr037281; Thu, 30 Nov 2023 11:24:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3AUBOVhd037278; Thu, 30 Nov 2023 11:24:31 GMT (envelope-from git) Date: Thu, 30 Nov 2023 11:24:31 GMT Message-Id: <202311301124.3AUBOVhd037278@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 8daee410d2c1 - main - vm: Use vmem_xalloc in kva_alloc List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8daee410d2c13b4e8530b00e7877eeecf30bb064 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=8daee410d2c13b4e8530b00e7877eeecf30bb064 commit 8daee410d2c13b4e8530b00e7877eeecf30bb064 Author: Andrew Turner AuthorDate: 2023-11-29 12:11:37 +0000 Commit: Andrew Turner CommitDate: 2023-11-30 10:50:03 +0000 vm: Use vmem_xalloc in kva_alloc The kernel_arena used in kva_alloc has the qcache disabled. vmem_alloc will first try to use the qcache before falling back to vmem_xalloc. Rather than trying to use the qcache in vmem_alloc just call vmem_xalloc directly. Reviewed by: alc, kib, markj Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D42831 --- sys/vm/vm_kern.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index c2c908b3dc94..6b22a96bf597 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -147,7 +147,8 @@ kva_alloc(vm_size_t size) TSENTER(); size = round_page(size); - if (vmem_alloc(kernel_arena, size, M_BESTFIT | M_NOWAIT, &addr)) + if (vmem_xalloc(kernel_arena, size, 0, 0, 0, VMEM_ADDR_MIN, + VMEM_ADDR_MAX, M_BESTFIT | M_NOWAIT, &addr)) return (0); TSEXIT(); @@ -168,7 +169,7 @@ kva_free(vm_offset_t addr, vm_size_t size) { size = round_page(size); - vmem_free(kernel_arena, addr, size); + vmem_xfree(kernel_arena, addr, size); } /*