Date: Wed, 2 Jan 2019 16:34:37 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-12@freebsd.org Subject: svn commit: r342694 - stable/12/sys/riscv/riscv Message-ID: <201901021634.x02GYbhY087534@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Wed Jan 2 16:34:36 2019 New Revision: 342694 URL: https://svnweb.freebsd.org/changeset/base/342694 Log: MFC r342099: Avoid needless TLB invalidations in pmap_remove_pages(). Modified: stable/12/sys/riscv/riscv/pmap.c Directory Properties: stable/12/ (props changed) Modified: stable/12/sys/riscv/riscv/pmap.c ============================================================================== --- stable/12/sys/riscv/riscv/pmap.c Wed Jan 2 16:33:49 2019 (r342693) +++ stable/12/sys/riscv/riscv/pmap.c Wed Jan 2 16:34:36 2019 (r342694) @@ -2754,9 +2754,10 @@ pmap_remove_pages(pmap_t pmap) l3 = pmap_l2_to_l3(l2, pv->pv_va); tl3 = pmap_load(l3); -/* - * We cannot remove wired pages from a process' mapping at this time - */ + /* + * We cannot remove wired pages from a + * process' mapping at this time. + */ if (tl3 & PTE_SW_WIRED) { allfree = 0; continue; @@ -2775,7 +2776,6 @@ pmap_remove_pages(pmap_t pmap) (uintmax_t)tl3)); pmap_load_clear(l3); - pmap_invalidate_page(pmap, pv->pv_va); /* * Update the vm_page_t clean/reference bits. @@ -2804,9 +2804,9 @@ pmap_remove_pages(pmap_t pmap) free_pv_chunk(pc); } } - pmap_invalidate_all(pmap); if (lock != NULL) rw_wunlock(lock); + pmap_invalidate_all(pmap); rw_runlock(&pvh_global_lock); PMAP_UNLOCK(pmap); vm_page_free_pages_toq(&free, false);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201901021634.x02GYbhY087534>