svn commit: r361563 - head/sys/vm

Konstantin Belousov kib at FreeBSD.org
Wed May 27 21:44:27 UTC 2020


Author: kib
Date: Wed May 27 21:44:26 2020
New Revision: 361563
URL: https://svnweb.freebsd.org/changeset/base/361563

Log:
  Simplify the condition to enable superpage mappings in vm_fault_soft_fast().
  
  The list of arches list there matches the list of arches where
  default VM_NRESERVLEVEL > 0.  Before sparc64 removal, that was the
  only arch that defined VM_NRESERVLEVEL > 0 to help with cache coloring,
  but did not implemented superpages.  Now it can be simplified.
  
  Submitted by:	alc
  Reviewed by:	markj

Modified:
  head/sys/vm/vm_fault.c

Modified: head/sys/vm/vm_fault.c
==============================================================================
--- head/sys/vm/vm_fault.c	Wed May 27 19:13:26 2020	(r361562)
+++ head/sys/vm/vm_fault.c	Wed May 27 21:44:26 2020	(r361563)
@@ -299,9 +299,7 @@ static int
 vm_fault_soft_fast(struct faultstate *fs)
 {
 	vm_page_t m, m_map;
-#if (defined(__aarch64__) || defined(__amd64__) || (defined(__arm__) && \
-    __ARM_ARCH >= 6) || defined(__i386__) || defined(__powerpc64__) || \
-    defined(__riscv)) && VM_NRESERVLEVEL > 0
+#if VM_NRESERVLEVEL > 0
 	vm_page_t m_super;
 	int flags;
 #endif
@@ -320,9 +318,7 @@ vm_fault_soft_fast(struct faultstate *fs)
 	}
 	m_map = m;
 	psind = 0;
-#if (defined(__aarch64__) || defined(__amd64__) || (defined(__arm__) && \
-    __ARM_ARCH >= 6) || defined(__i386__) || defined(__powerpc64__) || \
-    defined(__riscv)) && VM_NRESERVLEVEL > 0
+#if VM_NRESERVLEVEL > 0
 	if ((m->flags & PG_FICTITIOUS) == 0 &&
 	    (m_super = vm_reserv_to_superpage(m)) != NULL &&
 	    rounddown2(vaddr, pagesizes[m_super->psind]) >= fs->entry->start &&


More information about the svn-src-head mailing list