From nobody Tue Oct 4 16:29:41 2022 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 4MhjpZ05Pwz4fCPQ; Tue, 4 Oct 2022 16:29:42 +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 4MhjpY6X3vz457j; Tue, 4 Oct 2022 16:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900981; 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=8Uzm46XCxe747kAcmEwrqYbTASdPcCx+bCCA5HDGxHw=; b=gfnLGF8C0zxexB713+fp8jXawmRt8QQmXd3SL7d3I0xCLAvE1xR3eKW9Dzvn9mUPJbIwf9 CXQhrgPX7qZkh0PhzBA/7Mt1p9Q54BFTjV+y0HWx/1nOPuZvHeotLoxhf7OFuPu2+EIl0A pwZQD3ER1oxP0e2iB5i0VcYBWwoJ/+lXlMRK6iJeVoYjvKFmvdxQUgGubD10bk8DiPESzC 5uGc7qmyN/44cFBNa5LoiJFefbJAwpt/NsQFHDprE0B1NgHXWzoW1qJ2VCo/nmsnpOvB6y yHt2lOcXcKRKMb35WWU5BshAPbcoUPoyH9iBQGvpW3C8uff8ylsGJHvR7l7e8g== 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 4MhjpY5XXrzcbG; Tue, 4 Oct 2022 16:29:41 +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 294GTf7O049898; Tue, 4 Oct 2022 16:29:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 294GTfGq049897; Tue, 4 Oct 2022 16:29:41 GMT (envelope-from git) Date: Tue, 4 Oct 2022 16:29:41 GMT Message-Id: <202210041629.294GTfGq049897@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Leandro Lupori Subject: git: a312b0f77cee - stable/13 - powerpc64: make radix with superpages default 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: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: luporl X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a312b0f77cee6ce382c743ca99d6264f1f828b40 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664900981; 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=8Uzm46XCxe747kAcmEwrqYbTASdPcCx+bCCA5HDGxHw=; b=Iy6St2ETVzaW93rHNvr66gcgvgYh3gH9fpOnS5fyH6rAig4Gp3VwfBV6jZK0o2b+l9MMnc T6RCa5VgG5KmEL9vJ38sVg0uBz/MdSX2ftQZUCcNBVS/TSeUE4YU0ey9JA74hYfcuUd584 F65Bqw0e3Xfnz/i0lIR48XyQ8WLJS1kkSy9RIrzwaYL0U3mEMab5JM1brcNbI/Fj1Qkfli QJT0IJwfXpF7xzl/ZoTXqaeMtYVYs/nUaFUckDv2fLBdf1M47XrMnGPX4yvbjgiewl/erk IRs3oi2M1b9F+dm3XyL3wm7yBdlOUruG3gfVBS7cNQE9XRulpLuJAIMPXCOd6g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664900981; a=rsa-sha256; cv=none; b=qc32UwiCfSdKbgzaxg+bK8wCebqClSl+xnNuXGl03btxOFy+DEzuehEPqmYb+IytYA5yu8 fogaHgIdEcXGW2ASKBs+5LVvlKA1RQhBv0BHhYThCDwruQoQM417a+hR+Ko3UAdjxaNPIX Eh+T/uF1+mkRK/T9U9qmzcm/NY6NjErjI/Ls1Fs3tLThu01PN5O1bqcZNtQoV9U9yXR5r7 lT8YD/L5vliNZHp9/LWPnBgqoqAsE4qc9IPI78/c0neQnNnFInXlffdgnNFcGPQ0vv7DiM x89WzrCkV8MloAQh7leIcJej/vnEFsr70BJP5I2EerZHYD7uYrbXEQcpc9tBiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=a312b0f77cee6ce382c743ca99d6264f1f828b40 commit a312b0f77cee6ce382c743ca99d6264f1f828b40 Author: Leandro Lupori AuthorDate: 2021-10-14 16:13:27 +0000 Commit: Leandro Lupori CommitDate: 2022-10-04 16:24:15 +0000 powerpc64: make radix with superpages default As Radix MMU with superpages enabled is now stable, make it the default choice on supported hardware (POWER9 and above), since its performance is greater than that of HPT MMU. Reviewed by: alfredo, jhibbits Sponsored by: Instituto de Pesquisas Eldorado (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D30797 (cherry picked from commit 8ecf9a8bab608c26cb100f393b24e883a706ff03) --- stand/powerpc/ofw/cas.c | 6 +++--- sys/powerpc/aim/aim_machdep.c | 4 +++- sys/powerpc/powerpc/pmap_dispatch.c | 2 +- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/stand/powerpc/ofw/cas.c b/stand/powerpc/ofw/cas.c index eaf69566fca7..0a12f31d1a1a 100644 --- a/stand/powerpc/ofw/cas.c +++ b/stand/powerpc/ofw/cas.c @@ -234,10 +234,10 @@ ppc64_cas(void) } } - if (radix_mmu && (var = getenv("radix_mmu")) != NULL && var[0] != '0') - ov5[OV5_MMU_INDEX] = OV5_MMU_RADIX; - else + if ((var = getenv("radix_mmu")) != NULL && var[0] == '0') radix_mmu = 0; + if (radix_mmu) + ov5[OV5_MMU_INDEX] = OV5_MMU_RADIX; inst = OF_open("/"); if (inst == -1) { diff --git a/sys/powerpc/aim/aim_machdep.c b/sys/powerpc/aim/aim_machdep.c index 8600c1387e16..b8e797913408 100644 --- a/sys/powerpc/aim/aim_machdep.c +++ b/sys/powerpc/aim/aim_machdep.c @@ -586,8 +586,10 @@ pmap_early_io_map_init(void) { if ((cpu_features2 & PPC_FEATURE2_ARCH_3_00) == 0) radix_mmu = 0; - else + else { + radix_mmu = 1; TUNABLE_INT_FETCH("radix_mmu", &radix_mmu); + } /* * When using Radix, set the start and end of kva early, to be able to diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c index a3c227bbde7d..00d4a2074327 100644 --- a/sys/powerpc/powerpc/pmap_dispatch.c +++ b/sys/powerpc/powerpc/pmap_dispatch.c @@ -83,7 +83,7 @@ int vm_level_0_order = 9; SYSCTL_NODE(_vm, OID_AUTO, pmap, CTLFLAG_RD, 0, "VM/pmap parameters"); -int superpages_enabled = 0; +int superpages_enabled = 1; SYSCTL_INT(_vm_pmap, OID_AUTO, superpages_enabled, CTLFLAG_RDTUN, &superpages_enabled, 0, "Enable support for transparent superpages");