K 10 svn:author V 3 alc K 8 svn:date V 27 2012-06-14T16:53:08.879729Z K 7 svn:log V 962 Speed up the destruction of superpage mappings on amd64 by eliminating the frequent need for pmap_remove_pages() and pmap_remove_pde() to access each struct vm_page that makes up a superpage. This is accomplished through a combination of two changes: 1) Replace PGA_WRITEABLE with an exact count of write mappings at both the 4KB and 2MB granularity so that pmap_remove_pages() and pmap_remove_pde() must no longer access each struct vm_page in order to clear PGA_WRITEABLE. (These counts are stored in space that was previously lost to alignment in struct md_page, so struct vm_page is no larger.) 2) Call vm_page_dirty() during promotion of write mappings rather than pmap_remove_pages() and pmap_remove_pde(). Each struct vm_page is already accessed on promotion, so adding a call to vm_page_dirty() shouldn't result in additional cache misses. For "buildworld", this reduces the average running time of pmap_remove_pages() by 23%. END