Hi, Every time a persistent object is deallocated (this happens for every vm_map->memcpy->vm_deallocate operation), vm_object_deactivate_pages is called, which iterates over all pages in the object deactivating all active pages. The impact of this operation is really high when dealing with large objects, and can easily reduce read/write operations from 50 MB/s to 10 MB/s.
Perhaps a simple flag in the object indicating if some of its pages have been activated, and a change in vm_page_activate to turn on that flag, would be enough to save a significant number of cycles. Better ideas?