aboutsummaryrefslogtreecommitdiff
path: root/sys/vm
diff options
context:
space:
mode:
authorLeandro Lupori <luporl@FreeBSD.org>2020-11-06 14:12:45 +0000
committerLeandro Lupori <luporl@FreeBSD.org>2020-11-06 14:12:45 +0000
commite2d6c417e3030c814e048ec2cda803cb7971bd75 (patch)
tree41b1c511a9ead5d7bd50a96f4ad93ddb7026caec /sys/vm
parent5d0e861910978450c46d2a65385aeb3286a17fa4 (diff)
downloadsrc-e2d6c417e3030c814e048ec2cda803cb7971bd75.tar.gz
src-e2d6c417e3030c814e048ec2cda803cb7971bd75.zip
Implement superpages for PowerPC64 (HPT)
This change adds support for transparent superpages for PowerPC64 systems using Hashed Page Tables (HPT). All pmap operations are supported. The changes were inspired by RISC-V implementation of superpages, by @markj (r344106), but heavily adapted to fit PPC64 HPT architecture and existing MMU OEA64 code. While these changes are not better tested, superpages support is disabled by default. To enable it, use vm.pmap.superpages_enabled=1. In this initial implementation, when superpages are disabled, system performance stays at the same level as without these changes. When superpages are enabled, buildworld time increases a bit (~2%). However, for workloads that put a heavy pressure on the TLB the performance boost is much bigger (see HPC Challenge and pgbench on D25237). Reviewed by: jhibbits Sponsored by: Eldorado Research Institute (eldorado.org.br) Differential Revision: https://reviews.freebsd.org/D25237
Notes
Notes: svn path=/head/; revision=367417
Diffstat (limited to 'sys/vm')
-rw-r--r--sys/vm/vm_fault.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/vm/vm_fault.c b/sys/vm/vm_fault.c
index 5a4d392b5e69..81bcfb6b58b2 100644
--- a/sys/vm/vm_fault.c
+++ b/sys/vm/vm_fault.c
@@ -542,7 +542,8 @@ vm_fault_populate(struct faultstate *fs)
pidx += npages, m = vm_page_next(&m[npages - 1])) {
vaddr = fs->entry->start + IDX_TO_OFF(pidx) - fs->entry->offset;
#if defined(__aarch64__) || defined(__amd64__) || (defined(__arm__) && \
- __ARM_ARCH >= 6) || defined(__i386__) || defined(__riscv)
+ __ARM_ARCH >= 6) || defined(__i386__) || defined(__riscv) || \
+ defined(__powerpc64__)
psind = m->psind;
if (psind > 0 && ((vaddr & (pagesizes[psind] - 1)) != 0 ||
pidx + OFF_TO_IDX(pagesizes[psind]) - 1 > pager_last ||