Waits for the completion of all page-out operations for pages in the virtual memory object.
Item | Description |
---|---|
vmid | Identifies the virtual memory object for which to wait. |
flags | Optional flags passed in by the user. |
The vms_iowait kernel service performs two tasks. First, it determines the I/O level at which all currently scheduled page-outs are complete for the virtual memory object specified by the vmid parameter. Then, the vms_iowait service places the current process in a wait state until this I/O level has been reached.
The I/O level value is a count of page-out operations kept for each virtual memory object.
The I/O level accounts for out-of-order processing by not incrementing the I/O level for new page-out requests until all previous requests are complete. Because of this, processes waiting on different I/O levels can be awakened after a single page-out operation completes.
If the caller holds the kernel lock, the vms_ iowait service releases the kernel lock before waiting and reacquires it afterwards.
The vms_iowait function is a special case of the vms_iowaitf function with the V_WAITERR flag set.
Name | Purpose |
---|---|
V_WAITERR | Waits until the completion of all I/O unless an error occurs. |
V_WAITALL | Waits until the completion of all I/O regardless of any occurrence of I/O errors. |
The vms_iowait and vms_iowaitf kernel services can be called from the process environment only.
They can only be used by file segments.
Item | Description |
---|---|
0 | Indicates that the page-out operations completed. |
EIO | Indicates that an error occurred while performing I/O. |