git: 8ecf9a8bab60 - main - powerpc64: make radix with superpages default
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 14 Oct 2021 16:17:22 UTC
The branch main has been updated by luporl: URL: https://cgit.FreeBSD.org/src/commit/?id=8ecf9a8bab608c26cb100f393b24e883a706ff03 commit 8ecf9a8bab608c26cb100f393b24e883a706ff03 Author: Leandro Lupori <luporl@FreeBSD.org> AuthorDate: 2021-10-14 16:13:27 +0000 Commit: Leandro Lupori <luporl@FreeBSD.org> CommitDate: 2021-10-14 16:13:27 +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 --- 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 4f36a147f36d..6292e04794a8 100644 --- a/stand/powerpc/ofw/cas.c +++ b/stand/powerpc/ofw/cas.c @@ -232,10 +232,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 914296440104..c5f84675ebd3 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 5a47b6d8bf31..8aa09811c95b 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");