This change allows collapse to run concurrently with fault in all cases. This was necessary so that I can drop the object lock in more cases in fault. I also believe the resulting behavior is easier to understand. It provides the following benefits:
1) There are no objects eligible for collapse lingering because paging_in_progress was set.
2) We do not have to delay collapse for normal paging operations. Only when they intersect the pages we are working on will we wait for xbusy.
3) The complicated and direct reference count manipulation in vm_object_deallocate() goes away leaving us only atomic ref count manipulation.
4) coalesce and split won't abandon operations due to paging in progress or an in-progress collapse.
5) It is now safe to pip_add without the object lock so long as you have some other valid reference to the object.
The primary operations which have to be synchronized with respect to collapse are split, getpages, and other collapse calls. We need only worry about getpages on swap objects which can not create pages outside of the requested range if either split or collapse is in progress. Otherwise the busy lock protects against parallel operations.
split and collapse can not run concurrently on orig_object because it has multiple references. split may discover that the backing object is collapsing and will now do an interlocked sleep waiting for that condition to clear. Before we aborted the split operation in this case.
This could increase the frequency with which we call vm_object_scan_all_shadowed() because we no longer avoid it while pip != 0. It also does less efficient swap I/O if we page in while running split or collapse.