From nobody Mon Sep 02 09:12:32 2024 X-Original-To: dev-commits-src-branches@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 4Wy31Y1ZM2z5MqlL; Mon, 02 Sep 2024 09:12:33 +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 4Wy31Y0chBz4Brj; Mon, 2 Sep 2024 09:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1725268353; 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=ET+uhm/4Qr2LbiY4KDrJvfXHB0jXjxO7JlzlYZVZ3s4=; b=rDtzpFdAe/UlqHdHFEUB8B+KcU8tw6aQ/poZhDKeF8W0ljNzTA8oWucpYFKGQef8QAfIgE 21tcMKx2YQ+0DV2Ce0I56xp0hzVq0Hi1hjPFvqW9oTGh+qruw5u71z/1quuFPu0LeOhM5a JhTIaq9WkO8eguc5UjcZgy926I8nhJFHJb+OUrhNsL5/taJKUwfcpDYGX0BqXwqIlIaNtP qDgBpcaS5xzFx2V9F6zk6WeDFDNmtws+drVTeFlGI2uxRA1HlgvkrZkQfbZ47FCbP+H7SH LkfpBWO2foZshVrjBz/DqtKMRpEk6p4TIZNxNUSLyFAQBm/Wsyhve4e1nbKpaQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1725268353; a=rsa-sha256; cv=none; b=wVPSq1w1GhY3L2iSJskM6jFLqjZqpUj9Tg3aeoVSqi1ZvXMcdbh1o7S9+ZJOE3MDNkq8iO 3zFRcs/MNNcSuL+/2n0HxdWbCXAXrvnbdjGtiY1bKTD6joMpAv9eIjWPgMfauEja06Acwj rbGKVEbJQXVeMRj2A7YW+n09yw3/CoAjID8McA8DkXVKSj4lEzqQ0Ir5vQ97pJW4q4zvXW /SMWi8Vp9RmM/ifolNrbXq7Jq+4p2/668oxFYJ6TZY8EC3jpOOkxjUBHhQ9Bl/22jb/ZxH jfllGAM7eYKoFSD/W/6NiP8F2NAI+lSI0iSpLEuki6s1IuMe+q3fPmQOPjwdNA== 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=1725268353; 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=ET+uhm/4Qr2LbiY4KDrJvfXHB0jXjxO7JlzlYZVZ3s4=; b=lG70ZOuQD7Vjbhu3jUZZHstrVVJPSJB2lLwU8XQeMIHGMVd1JkKj8gdXZdN+YM3aIBLJP4 rInxUqNFWxb3S79ftvDGrleI9/93Rv766GJav3DPgy2+3fLCnL3pRIsobVLlEpQtskp9xa El7tu3XggO9JsNbcWGAyqhnH8W1L+UrqnU8hTI8QMA7liWtwbIhipwms9YQEjKh7AhIylP fZg13AAsb2vFzhZZBLmVfknS4DzgusFvBIs/sDN0qM8HKO5SAvwnq8w4CMtH+2SCrp1EgI aOldip8vZEjttATA0BGSwnA1EQXhpoxIjSgcEnhNh8wWmmuSJpa8GvBwZVVmEA== 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 4Wy31Y09Q2z16Dj; Mon, 2 Sep 2024 09:12:33 +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 4829CWIG049337; Mon, 2 Sep 2024 09:12:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4829CWDm049334; Mon, 2 Sep 2024 09:12:32 GMT (envelope-from git) Date: Mon, 2 Sep 2024 09:12:32 GMT Message-Id: <202409020912.4829CWDm049334@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: c603969fa9e3 - stable/13 - vm: Use vmem_xalloc in kva_alloc List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@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/13 X-Git-Reftype: branch X-Git-Commit: c603969fa9e38c9db488eae1bdadfbb2be62b6fa Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c603969fa9e38c9db488eae1bdadfbb2be62b6fa commit c603969fa9e38c9db488eae1bdadfbb2be62b6fa Author: Andrew Turner AuthorDate: 2023-11-29 12:11:37 +0000 Commit: Andrew Turner CommitDate: 2024-09-02 09:11:57 +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 2d5d20d931d3..ba3badf29c3b 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -147,7 +147,8 @@ kva_alloc(vm_size_t size) vm_offset_t addr; 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); return (addr); @@ -167,7 +168,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); } static vm_page_t