Author: alc
Date: Sat Dec 21 22:32:24 2019
New Revision: 355991
URL: https://svnweb.freebsd.org/changeset/base/355991

Log:
  Micro-optimize the control flow in _pmap_unwire_ptp(), and eliminate
  unnecessary parentheses.
  
  Reviewed by:  kib, markj
  MFC after:    1 week
  Differential Revision:        https://reviews.freebsd.org/D22893

Modified:
  head/sys/amd64/amd64/pmap.c

Modified: head/sys/amd64/amd64/pmap.c
==============================================================================
--- head/sys/amd64/amd64/pmap.c Sat Dec 21 21:05:53 2019        (r355990)
+++ head/sys/amd64/amd64/pmap.c Sat Dec 21 22:32:24 2019        (r355991)
@@ -3542,7 +3542,7 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_
        /*
         * unmap the page table page
         */
-       if (m->pindex >= (NUPDE + NUPDPE)) {
+       if (m->pindex >= NUPDE + NUPDPE) {
                /* PDP page */
                pml4_entry_t *pml4;
                pml4 = pmap_pml4e(pmap, va);
@@ -3569,8 +3569,7 @@ _pmap_unwire_ptp(pmap_t pmap, vm_offset_t va, vm_page_
 
                pdpg = PHYS_TO_VM_PAGE(*pmap_pdpe(pmap, va) & PG_FRAME);
                pmap_unwire_ptp(pmap, va, pdpg, free);
-       }
-       if (m->pindex >= NUPDE && m->pindex < (NUPDE + NUPDPE)) {
+       } else if (m->pindex < NUPDE + NUPDPE) {
                /* We just released a PD, unhold the matching PDP */
                vm_page_t pdppg;
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to