Page MenuHomeFreeBSD

Micro-optimize pmap_protect_pde()
ClosedPublic

Authored by alc on Jun 28 2019, 4:04 PM.
Tags
None
Referenced Files
F158784755: D20793.id59176.diff
Fri, Jun 5, 10:09 PM
F158784575: D20793.id59176.diff
Fri, Jun 5, 10:06 PM
Unknown Object (File)
Thu, Jun 4, 3:36 PM
Unknown Object (File)
Thu, Jun 4, 3:29 PM
Unknown Object (File)
Sun, May 24, 9:02 PM
Unknown Object (File)
Thu, May 21, 4:03 PM
Unknown Object (File)
Thu, May 14, 11:02 AM
Unknown Object (File)
Fri, May 8, 9:05 PM
Subscribers

Details

Summary

When we protect PTEs (as opposed to PDEs), we only call vm_page_dirty() when, in fact, we are write protecting the page and the PTE has PG_M set. However, pmap_protect_pde() was always calling vm_page_dirty() when the PDE has PG_M set. So, adding PG_NX to a writeable PDE could result in unnecessary (but harmless) calls to vm_page_dirty().

Simplify the loop calling vm_page_dirty() in pmap_protect_pde().

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable