From nobody Mon Sep 02 08:50:34 2024 X-Original-To: dev-commits-src-all@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 4Wy2XB5kZ6z5MnSS; Mon, 02 Sep 2024 08:50:34 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wy2XB5CFgz421b; Mon, 2 Sep 2024 08:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725267034; 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=fYVYwuRpjjFGd1nw0c5y0/2PQgp4OfX4XslXi0YWrbg=; b=ce9G2C1l/WOK6izz0+ZARKMDHDuMH9+9xY7ETPGrPm+er+Pkx3k7Dh99LxYydB20G1W6UG j7jcZh3rDqoktW1OKvD3mhkKIFts7HUloyZWGduo0day9ZcMvGEnNdHuKNGlkRO9H9OArH EJyg43maBS5gxHiRKVcA17BFKgKzh8n3OMwtgNKDyoLn0+CXg/GMOJr5uLUcr7bea14dp7 IR9aTEhCsDEW5pk4KVKz+ALMzyU9GX87MkUXspeWWLme+6uct+QZTwXlUzHEkBtRLI4GCN AQTB+SJJ+/gEGW1ZDX1gjNqzXu9KVO9grkYE0TUGSYIITnU8CFQVXlV9q8HIiw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725267034; a=rsa-sha256; cv=none; b=K73BlaL0jVdWRjMG/B6XlEoJMXOgClz+Qi5ouzAP0xtdPwG8FbI2gppe1ybnzUrKxUTGT5 CI45j2lhTqLD904aFfueW+vjt3VdBpduxOH8HA1dMkCNxrHQD+mIRiEkUx+8Lpc0uyLFsh 7l+z5+EYu5nVa5Y2nIySDPXSMFesGMU5fng8tiBBuiQw6mRf/px4Db/2d0lCEoOUaHpCF7 c1aVoyPxcrbrynFFCY6Y/dLuh9y/mcLV6dWiNXWsvoDfBwA3OvoLU1hK6OHREoUUCgV4NG a3I9T4ygRrE4QBkcyY/8dY9eBbki2dtCllz6hpLF/8yiD5uPxQonjmcTCbaPPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725267034; 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=fYVYwuRpjjFGd1nw0c5y0/2PQgp4OfX4XslXi0YWrbg=; b=CBYRKLabZKiN/AQ9R6zeYktM48c3jNxDl4S7fsTCCI23vDPZzJ3UULb8HLGA0+Entnx5E1 ynL6+Fm/ECHBobDICVAC4bLi1xrIhIHZoMfdwGHiTjNVYROi88SG4ccqk0N37ZatJJxf6Y E067Vq6PUKvaKx1WUw9vKC4zqd8aJyN2GGBH3yZVD/NT1s/G/xRo0g10UlHn8w5//AwCmA mZyKqENXmCP0TqGl0BchSw7UZdQMoMzM9vjMVjgtUr6O/xFNacz8JocPNzx41KSSJfMGiF YlNbU0XktU6QGMMfYO6Pfj7ZkG739RKkaVEHflUkv3z0kfKR2flNSGwcTtkplw== 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 4Wy2XB4d35z158y; Mon, 2 Sep 2024 08:50:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4828oYX4006758; Mon, 2 Sep 2024 08:50:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4828oYTH006755; Mon, 2 Sep 2024 08:50:34 GMT (envelope-from git) Date: Mon, 2 Sep 2024 08:50:34 GMT Message-Id: <202409020850.4828oYTH006755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: 3736b79f0fa7 - stable/14 - vm: Use vmem_xalloc in kva_alloc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 3736b79f0fa7655288f922d085b90eb5e0347067 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=3736b79f0fa7655288f922d085b90eb5e0347067 commit 3736b79f0fa7655288f922d085b90eb5e0347067 Author: Andrew Turner AuthorDate: 2023-11-29 12:11:37 +0000 Commit: Andrew Turner CommitDate: 2024-09-02 08:43:01 +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 (cherry picked from commit 8daee410d2c13b4e8530b00e7877eeecf30bb064) --- 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 f94200d77c47..35dbae20449f 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -149,7 +149,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(); @@ -170,7 +171,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); } /*