Embodiments of the present invention generally relate to the field of data transfers, and, more particularly to minimizing memory bandwidth usage in optimal disk transfers.
Modern processors, such as computer microprocessors, can process data much faster than previously possible, however the inefficient transfer of data between storage devices, memory devices and processors can slow down the performance of an electronic appliance, such as a computer.
The present invention is illustrated by way of example and not limitation in the figures of the accompanying drawings in which like references indicate similar elements, and in which:
Processor(s) 102 may represent any of a wide variety of control logic including, but not limited to one or more of a microprocessor, a programmable logic device (PLD), programmable logic array (PLA), application specific integrated circuit (ASIC), a microcontroller, and the like, although the present invention is not limited in this respect.
Memory controller 104 may represent any type of chipset or control logic that interfaces system memory 108 with the other components of electronic appliance 100. In one embodiment, the connection between processor(s) 102 and memory controller 104 may be referred to as a front-side bus. In another embodiment, memory controller 104 may be referred to as a north bridge.
Transfer agent 106 may have an architecture as described in greater detail with reference to
System memory 108 may represent any type of memory device(s) used to store data and instructions that may have been or will be used by processor(s) 102. Typically, though the invention is not limited in this respect, system memory 108 will consist of dynamic random access memory (DRAM). In one embodiment, system memory 108 may consist of Rambus DRAM (RDRAM). In another embodiment, system memory 108 may consist of double data rate synchronous DRAM (DDRSDRAM).
Expansion controller 110 may represent any type of chipset or control logic that interfaces expansion devices with the other components of electronic appliance 100. In one embodiment, expansion controller 110 may be referred to as a south bridge. In one embodiment, expansion controller 110 complies with Peripheral Component Interconnect (PCI) Express Base Specification, Revision 1.0, PCI Special Interest Group, released Apr. 29, 2002.
Storage device 112 may represent any storage device used for the long term storage of data. In one embodiment, storage device 112 may be a hard disk drive comprising a plurality of sectors. In a hard disk drive with a spinning disk, there may be a delay associated with commencing each read or write operation. Storage device 112 may contain operating systems and applications, which may comprise various executable, data and library files.
Input/output (I/O) device(s) 114 may represent any type of device, peripheral or component that provides input to or processes output from electronic appliance 100. In one embodiment, though the present invention is not so limited, an I/O device 114 may be a network interface controller.
Transfer agent 106 may have the ability to minimize memory bandwidth usage in optimal disk transfers. In one embodiment, transfer agent 106 may read a plurality of contiguous sections of a mass storage device in a single operation, and transfer data from fewer than all the sections read. In another embodiment, transfer agent 106 may receive data from a memory, and write the data to noncontiguous sections of a mass storage device in a single write operation. One skilled in the art would recognize that through this method efficiencies can be gained in data transmission and write latency where some portions of data needed are resident in memory and others need to be retrieved.
As used herein control logic 202 provides the logical interface between transfer agent 106 and its host electronic appliance 100. In this regard, control logic 202 may manage one or more aspects of transfer agent 106 to provide a communication interface from electronic appliance 100 to software, firmware and the like, e.g., instructions being executed by processor(s) 102.
According to one aspect of the present invention, though the claims are not so limited, control logic 202 may receive event indications such as, e.g., a data transfer request. Upon receiving such an indication, control logic 202 may selectively invoke the resource(s) of transfer engine 208. As part of an example method to minimize memory bandwidth usage in optimal disk transfers, as explained in greater detail with reference to
Memory 204 is intended to represent any of a wide variety of memory devices and/or systems known in the art. In one embodiment, memory 204 may be a dedicated portion of system memory 108. In another embodiment, memory 204 may be part of a processor, system disk, or network cache. Memory 204 may also be used to store data or instructions for effectuating a data transfer, for example.
Bus interface 206 provides a path through which transfer agent 106 can communicate with other components of electronic appliance 100, for example storage device 112 or system memory 108. In one embodiment, bus interface 206 may represent a PCI Express interface.
Read services 210, as introduced above, may provide transfer agent 106 with the ability to read data from a source device such as storage device 112. In one example embodiment, read services 210 may translate a scatter/gather list requesting noncontiguous data from storage device 112, into a single read operation whereby more data is read than requested. The single read operation can be composed of ranges of desired data and ranges that of data that is not desired. Each range can be identified as representing desired data or not. This identification can be accomplished with a bit per range. The desired data ranges will be transferred from the storage device 112 to system memory 108. The undesired data ranges will not be transferred. The single read operation advances through locations on the storage device 112 whether the data is desired or not. In this way, read services 210 may optimize the access time of data from storage device 112 by combining the reading of noncontiguous data into a single read operation that spans the range of multiple requested data sets.
Write services 212, as introduced above, may provide transfer agent 106 with the ability to write transmitted data. In one embodiment, write services 212 may translate a scatter/gather list requesting noncontiguous data transferred to storage device 112 into a single write operation whereby less data is written than requested. In another embodiment, when writing to storage device 112, write services 212 may identify for each range whether the data located at corresponding locations on the storage device 112 is perturbed or not. This identification can utilize an additional bit of information in the request. Ranges, possibly sectors, identified as unperturbed will not be modified. Range identified as perturbed will be written. This allows writing data to noncontiguous portions on either side of an unperturbed portion, so as to write the overall data in a single operation.
According to but one example implementation, the method of
In the case of a read request, control logic 202 may then selectively invoke read services 210 to read (304) noncontiguous data. In one example embodiment, read services 210 reads a range of data on storage device 112 that spans the locations of the data requested and also includes the data between the noncontiguous data locations. In one embodiment, the data that is transferred to system memory 108 only includes the data that is requested and not already resident in memory, namely the data between the noncontiguous requested data locations.
In the case of a write request, write services 212 may write (306) noncontiguous data. In one embodiment, write services 212 writes data intended for noncontiguous portions of storage device 112 by addressing a range of data that spans the locations of the target addresses and includes the locations between the noncontiguous destinations. In another embodiment, write services 212 utilizes of bit of information to leave unperturbed those locations in the address range to which no data is to be written.
The machine-readable (storage) medium 400 may include, but is not limited to, floppy diskettes, optical disks, CD-ROMs, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, magnet or optical cards, flash memory, or other type of media/machine-readable medium suitable for storing electronic instructions. Moreover, the present invention may also be downloaded as a computer program product, wherein the program may be transferred from a remote computer to a requesting computer by way of data signals embodied in a carrier wave or other propagation medium via a communication link (e.g., a modem, radio or network connection).
In the description above, for the purposes of explanation, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent, however, to one skilled in the art that the present invention may be practiced without some of these specific details. In other instances, well-known structures and devices are shown in block diagram form.
Embodiments of the present invention may be used in a variety of applications. Although the present invention is not limited in this respect, the invention disclosed herein may be used in microcontrollers, general-purpose microprocessors, Digital Signal Processors (DSPs), Reduced Instruction-Set Computing (RISC), Complex Instruction-Set Computing (CISC), disk drives, computers, among other electronic components. However, it should be understood that the scope of the present invention is not limited to these examples.
Many of the methods are described in their most basic form but operations can be added to or deleted from any of the methods and information can be added or subtracted from any of the described messages without departing from the basic scope of the present invention. Any number of variations of the inventive concept is anticipated within the scope and spirit of the present invention. In this regard, the particular illustrated example embodiments are not provided to limit the invention but merely to illustrate it. Thus, the scope of the present invention is not to be determined by the specific examples provided above but only by the plain language of the following claims.