K 10 svn:author V 7 attilio K 8 svn:date V 27 2013-03-14T01:53:32.428349Z K 7 svn:log V 1536 Move the page handling of sleeping on a page for a specific condition under the protection of the page lock. In detail: 1) VPO_WANTED is moved to be a per-page flag, removing it and introducing PG_WANTED. 2) The function vm_page_sleep_onpage() is introduced to work as an underlying version of vm_page_sleep() / vm_page_sleep_if_busy() to specify priority and timo of the sleeping operation. 3) Convert all the current sleepers on the page to not use anymore VM_OBJECT_SLEEP() but use vm_page_sleep(). In one case, where special timo, priority and return value are needed, vm_page_sleep_onpage() is used directly. 4) The operation results without races because the object lock is now dropped after the page-lock is held. This creates a chain of trust. Further notes: - vm_page_sleep() and neighboor functions now always want the page-lock held. The semantic of the unlocking is left unchanged. - The burden to deal with page-locking is on the callers of the function. This is because soon more per-page attributes will be moved under the per-page lock, making the protection path a single critical section. - The vm_page_sleep_if_busy() is temporary made an hard function. This is to avoid namespace pollution by the object locking. With more changes the object locking won't be necessary anymore there and it will be made inline again as it should be. - vm_page_flash() and vm_page_sleep() lost the necessity to be called with the object lock held. Sponsored by: EMC / Isilon storage division END