From nobody Sat Apr 09 00:27:51 2022 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 E1D971AABC31; Sat, 9 Apr 2022 00:27:52 +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 4KZwtw3Qs4z3pG0; Sat, 9 Apr 2022 00:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649464072; 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=ncY6BDPiFfGjTbdxddXgvYfvoDz0TvTVB0LyUB072lQ=; b=LZhideBXq7518uh9FE4oopq6lS76SPNH0pNzzeoiKCcvR0cuWgayRn1P2rjkkRBUASa4Xu kvNNmEeZe42U2+tAMD1abtZIU/oubzzZJWIknG/gJJw30EAlmmdUV8Ev3+w8/hNSMMvdpz 6FpiClLAiKysXJW+M9q0lQZs8NOO2M/OekpVytwhY5g6LGAEokh2m8yv2sgK3+t4kikvxs lZWeB4Q3KGq5+bQQV5bqMqEVCcMzHaWR2lp70LbWTHBv1+Q7RSShAYcETgaJ4UfSHBHzNZ wYn8V7ZjaexgP4glMAkWwyIggBHS0e42laCBJVVezhrpe1bhVs3aWpI9XGEOCw== 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 0B54D7901; Sat, 9 Apr 2022 00:27:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2390Rplb056555; Sat, 9 Apr 2022 00:27:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2390RpQc056554; Sat, 9 Apr 2022 00:27:51 GMT (envelope-from git) Date: Sat, 9 Apr 2022 00:27:51 GMT Message-Id: <202204090027.2390RpQc056554@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 2e7838ae84c6 - main - vm_phys_early_alloc: mem_index is only used under #ifdef NUMA. 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: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e7838ae84c668fcfe9a4385c65d06fbfa1214a0 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1649464072; 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=ncY6BDPiFfGjTbdxddXgvYfvoDz0TvTVB0LyUB072lQ=; b=RErcKZD5gw+IMBOTL3Mod41cqKRGWhdhMQrxMWAeX0ysIWxAZ3Zot3VuwAX5mLFROTtEHF PIwO1FqoJSUPt4zNFVebsEUDnTkrnAqdnv6TeRThHY9/WxoXRVG+D/4QwADIcvh5s+SFKR XOvVK5eYKzSntzj+TYjyYzl+s1eUKPEWUZeCFsLa7khuAfThqbZhZpUzCz+DiJm8Qx54d3 LimrkqCmMH6KxOcCFEMW5bDQ0mGPUJPTCG5uwF9ds46uiUYz4Ecet5iU60zVSyAFd48g9u 5SSufbgfrZSYwwd0mMkhTxzGdJxZTZUr7BTIyz+q2kRKppoSf6EeHrspkfpj9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1649464072; a=rsa-sha256; cv=none; b=qbOdB658jo1+bKozs9OpsD3mVJLIutIXhereriTAEcANwer7Cg2Pzzbws1dOzpbbetCZ6j PFG/aIBLQKLCbuubU+WqCDMlgq0Tcr/d3ZyzIOatnQ7D3fztoas6npYxiM1HR1tTSsNSxL KBqMf6ERLLt0p3Mek2dsf1URWrLTxNDDaFD57RVmcRqqawMXlaXRvZrRKiN75qk+i314pc koJoeKfMNyIDyjNpPgq/VYtBufT/0qfHZgpKCSqXBII5Y8kT4g71xIdmLo4Eeb1UgzYFqF gkpuPa1nNSxvVLoFy7xJw3r62veN1kadspm3/wtb/ESBK+lfC1W250Xs3yAF2w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=2e7838ae84c668fcfe9a4385c65d06fbfa1214a0 commit 2e7838ae84c668fcfe9a4385c65d06fbfa1214a0 Author: John Baldwin AuthorDate: 2022-04-09 00:25:13 +0000 Commit: John Baldwin CommitDate: 2022-04-09 00:25:13 +0000 vm_phys_early_alloc: mem_index is only used under #ifdef NUMA. Possibly mem_index should just reuse biggestone since this loop is already reusing biggestsize. --- sys/vm/vm_phys.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 33c46fe7c481..4e87a90fa154 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -1660,7 +1660,10 @@ vm_phys_early_add_seg(vm_paddr_t start, vm_paddr_t end) vm_paddr_t vm_phys_early_alloc(int domain, size_t alloc_size) { - int i, mem_index, biggestone; +#ifdef NUMA + int mem_index; +#endif + int i, biggestone; vm_paddr_t pa, mem_start, mem_end, size, biggestsize, align; KASSERT(domain == -1 || (domain >= 0 && domain < vm_ndomains), @@ -1672,10 +1675,10 @@ vm_phys_early_alloc(int domain, size_t alloc_size) * the phys_avail selection below. */ biggestsize = 0; - mem_index = 0; mem_start = 0; mem_end = -1; #ifdef NUMA + mem_index = 0; if (mem_affinity != NULL) { for (i = 0;; i++) { size = mem_affinity[i].end - mem_affinity[i].start;