2011/10/7 Samuel Thibault <samuel.thiba...@gnu.org>: > Perhaps vm_object_deactivate_pages should at least keep the > vm_page_queue_lock for more than just one iteration. XNU does it for 64 > pages. > > Otherwise, it looks to me like a simple and sensible optimization.
Reducing lock contention would surely help. I'm also considering if the additional work of maintaining secondary queue_chain_t for active pages in every object could be compensated by the reduction of loops in vm_object_deactivate_pages.