Date: Sat, 21 Dec 2019 22:32:25 +0000 (UTC) From: Alan Cox <alc@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r355991 - head/sys/amd64/amd64 Message-ID: <201912212232.xBLMWPe4090570@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912212232.xBLMWPe4090570>