1. Field
The disclosure relates generally to the data processing field and more specifically to migrating a source page containing a plurality of contiguous sub-pages that are subject to access by input/output devices, by means of a splitter, a selector, and an enhanced migration descriptor.
2. Description of the Related Art
Reconfiguration of a computer system may be performed while the computer system is running. Doing so, however, frequently necessitates that data processing operations be disrupted. For example, if multiple operating systems are running on a computer, there may be a need to reallocate a block of memory being used by a first operating system so that it may be used by a second operating system. Traditionally, this situation has required that the first operating system stop using the block of physical memory before it is reallocated. As another example, when a problem is detected in a block of physical memory, it may be desirable to remove the memory from operation so it can be replaced. Again, the operating system that was using the block of memory must stop using it during the replacement process.
A computer system may often be reconfigured without disrupting data processing operations by using virtual memory management mechanisms that are available in current operating systems. These mechanisms, however, are not satisfactory when the block of memory to be moved is subject to access by input/output (I/O) devices, commonly referred to as direct memory access (DMA). In particular, blocks of memory that are subject to access by I/O devices are conventionally “pinned,” that is, exempted from being moved, because access to them is maintained by essentially endless I/O programs that run as long as the operating system runs; and it would be disruptive to the system to stop such an I/O program.
It is possible to invalidate an I/O address translation entry for a block of memory (also referred to as a “page”) that is to be migrated. Then, if an I/O device were to attempt to access the page, the invalid translation entry would cause an I/O page fault to be reported and the I/O device driver would have to respond. That is, the driver would restart the I/O operation after the page again becomes available. In order for this procedure to work, however, the device drivers of all I/O devices that could possibly have access to the page would have to implement I/O page fault recovery code, which is not a practical solution.
Prior mechanisms for migrating data subject to access by I/O devices have the problems discussed above. One solution involves a mechanism for migrating data in which DMA operations for I/O adapters that access the data being migrated are disabled for a short period of time. While this mechanism is effective in many applications, the industry standard PCI-E bus does not contain a mechanism for temporarily disabling DMA operations without adversely affecting other transfers to/from an I/O adapter.
Another solution, that allows migration of data without temporarily disabling DMA operations, is to use multiple migration descriptors. Methods to implement multiple descriptor functionality were originally disclosed in U.S. patent application Ser. No. 11/380,052. As will be explained further below, the method of U.S. patent application Ser. No. 11/380,052 requires the creation of a migration descriptor for each I/O mapped logical page that covers a real address range to be migrated.
Thus, when a block of data covers multiple real address ranges, a migration descriptor is required for each I/O mapped logical page covering a real address range to be migrated. In other words, a large page can have a number of sub-pages, each of the sub-pages having a different real address range. Presently, each of these source sub-pages requires its own migration descriptor in order to be migrated to a corresponding destination sub-page in a destination page. The allocation and management of multiple migration descriptors, where a migration descriptor is required for each I/O mapped logical page, introduces a significant overhead into the memory migration process. Therefore, a need exists for a way to migrate data without the memory load caused by multiple migration descriptors.