U.S. patent application number 12/497327 was filed with the patent office on 2011-01-06 for system, method, and computer program product for ordering a plurality of write commands associated with a storage device.
Invention is credited to Ross John Stenfort.
Application Number | 20110004718 12/497327 |
Document ID | / |
Family ID | 43411771 |
Filed Date | 2011-01-06 |
United States Patent
Application |
20110004718 |
Kind Code |
A1 |
Stenfort; Ross John |
January 6, 2011 |
SYSTEM, METHOD, AND COMPUTER PROGRAM PRODUCT FOR ORDERING A
PLURALITY OF WRITE COMMANDS ASSOCIATED WITH A STORAGE DEVICE
Abstract
A system, method, and computer program product are provided for
ordering a plurality of write commands associated with a storage
device. In operation, a plurality of write commands associated with
a storage device to be sent to a device are identified.
Additionally, an order of the plurality of write commands is
determined, the determined order being known by the device.
Further, the plurality of write commands are ordered in the
determined order.
Inventors: |
Stenfort; Ross John; (Los
Altos, CA) |
Correspondence
Address: |
SANDFORCE, INC.;Attention: Earl Cohen
12950 Saratoga Ave
Saratoga
CA
95070-4658
US
|
Family ID: |
43411771 |
Appl. No.: |
12/497327 |
Filed: |
July 2, 2009 |
Current U.S.
Class: |
710/313 |
Current CPC
Class: |
G06F 3/0638 20130101;
G06F 3/0679 20130101; G06F 3/0673 20130101; G06F 3/061 20130101;
G06F 13/1626 20130101; H04L 67/1097 20130101; G06F 13/4282
20130101; G06F 3/0659 20130101; G06F 3/0689 20130101 |
Class at
Publication: |
710/313 |
International
Class: |
G06F 13/20 20060101
G06F013/20 |
Claims
1. A method, comprising: identifying a plurality of write commands
associated with a storage device to be sent to a device;
determining an order of the plurality of write commands, the
determined order being known by the device; and ordering the
plurality of write commands in the determined order.
2. The method of claim 1, wherein the determined order is a
predetermined order known by the device.
3. The method of claim 1, wherein the order is determined based on
an order in which the plurality of write commands are
identified.
4. The method of claim 1, further comprising permitting the device
to pre-fetch data associated with the plurality of write
commands.
5. The method of claim 4, wherein the device is permitted to
pre-fetch the data before an associated write command is
executed.
6. The method of claim 1, wherein the identifying, determining, and
ordering are performed based on a mode of the storage device.
7. The method of claim 1, wherein the storage device orders the
plurality of write commands in the determined order.
8. The method of claim 1, wherein the device includes a host
system.
9. The method of claim 1, wherein the device includes an SAS/SATA
bridge.
10. The method of claim 1, wherein the device includes a USB/SATA
bridge.
11. The method of claim 1, wherein the device includes an FC/SATA
bridge.
12. The method of claim 1, wherein the device includes one of a PCI
or PCI Express based plug in card.
13. The method of claim 1, wherein the device includes one of a PCI
or PCI Express interface.
14. The method of claim 1, wherein the device includes an interface
used to access at least one storage device or system.
15. The method of claim 1, wherein the device includes a device
capable of having a plurality of commands outstanding at one
time.
16. The method of claim 1, further comprising identifying a
plurality of read commands associated with the storage device.
17. The method of claim 16, wherein the plurality of read commands
associated with the storage device are ordered randomly.
18. The method of claim 17, wherein the plurality of read commands
ordered randomly are intermixed with the plurality of write
commands in the determined order.
19. The method of claim 1, wherein the storage device includes one
of a Serial ATA (SATA) drive, a Serial Attached SCSI (SAS) drive, a
Fibre Channel (FC) drive, or a Universal Serial Bus (USB)
drive.
20. The method of claim 1, wherein the storage device includes one
of a PCI or PCI Express based plug in card configured to appear as
a storage device.
21. The method of claim 1, wherein the storage device includes one
of a PCI or PCI Express interface configured to appear as a storage
device.
22. The method of claim 1, wherein a PCI or PCI Express interface
is used to access the storage device.
23. A computer program product embodied on a computer readable
medium, comprising: computer code for identifying a plurality of
write commands associated with a storage device to be sent to a
device; computer code for determining an order of the plurality of
write commands, the determined order being known by the device; and
computer code for ordering the plurality of write commands in the
determined order.
24. An apparatus, comprising: a storage device for identifying a
plurality of write commands associated with the storage device to
be sent to a device, and for ordering the plurality of write
commands in a determined order, the determined order being known by
the device.
Description
FIELD OF THE INVENTION
[0001] The present invention relates to storage devices, and more
particularly to ordering write commands associated with such
storage devices.
BACKGROUND
[0002] Storage systems may include many devices including storage
device and other devices connected to and/or in communication with
the storage devices. These devices in communication with the
storage devices often need to access commands and/or data
associated with the storage devices. In many different types of
storage systems, commands are queued and the commands are executed
in a random order.
[0003] The Serial ATA (SATA) computer bus is one storage-interface
for connecting host bus adapters to storage devices such as hard
disk drives and optical drives, etc. Currently, in SATA systems and
other comparable systems, commands are queued and the order that
the commands are executed is random. A device connected to a SATA
drive does not have any knowledge as to the order the write
commands will be executed.
[0004] Thus, the device attached to a SATA drive may not pre-fetch
write data unless it has enough resources to pre-fetch write data
for all of the commands. Pre-fetching for all commands is very
costly because pre-fetching all commands requires the use of a
large portion of memory. Additionally, this pre-fetching may not
add performance because the command being executed may not
necessarily be the command for which data has been pre-fetched.
There is thus a need for addressing these and/or other issues
associated with the prior art.
SUMMARY
[0005] A system, method, and computer program product are provided
for ordering a plurality of write commands associated with a
storage device. In operation, a plurality of write commands
associated with a storage device to be sent to a device are
identified. Additionally, an order of the plurality of write
commands is determined, the determined order being known by the
device. Further, the plurality of write commands are ordered in the
determined order.
BRIEF DESCRIPTION OF THE DRAWINGS
[0006] FIG. 1 shows a method for ordering a plurality of write
commands associated with a storage device, in accordance with one
embodiment.
[0007] FIG. 2 shows a system for ordering a plurality of write
commands associated with a storage device, in accordance with one
embodiment.
[0008] FIG. 3 shows a method for ordering a plurality of write
commands associated with a storage device, in accordance with
another embodiment.
[0009] FIG. 4 illustrates an exemplary system in which the various
architecture and/or functionality of the various previous
embodiments may be implemented.
DETAILED DESCRIPTION
[0010] FIG. 1 shows a method 100 for ordering a plurality of write
commands associated with a storage device, in accordance with one
embodiment. As shown, a plurality of write commands associated with
a storage device to be sent to a device are identified. See
operation 102.
[0011] In the context of the present description, a storage device
refers to any device capable of storing data. For example, in
various embodiments, the storage device may include, but is not
limited to, a Serial ATA (SATA) drive, a Serial Attached SCSI (SAS)
drive, a Fibre Channel (FC) drive, or a Universal Serial Bus (USB)
drive, and/or any other storage device. Additionally, in various
embodiments, the storage device may include a Peripheral Component
Interconnect (PCI) or PCI Express based plug in card configured to
appear as a storage device, or a PCI or PCI Express interface
configured to appear as a storage device. In one embodiment, a PCI
or PCI Express interface may be used to access the storage
device.
[0012] Further, the write commands may be sent to any type of
device capable of receiving commands. For example, in various
embodiments, the device may include a host system, an SAS/SATA
bridge (e.g. an SAS to SATA bridge, etc.), a USB/SATA bridge (e.g.
a USB to SATA bridge, etc.), an FC/SATA bridge (e.g. an FC to SATA
bridge, etc.), a PCI or PCI Express based plug in card (e.g.
configured to appear as a storage device, etc.), a PCI or PCI
Express interface, an interface used to access at least one storage
device or system, or any device capable of having a plurality of
commands outstanding at one time.
[0013] In addition to identifying the write commands associated
with the storage device, an order of the plurality of write
commands is determined, the determined order being known by the
device. See operation 104. In one embodiment, the determined order
may be a predetermined order known by the device.
[0014] As an option, the order may be determined based on an order
in which the write commands are identified (e.g. a first come first
served based approach, etc.). For example, as commands are
generated and/or received, the commands may be queued. As another
option, the order may include a predetermined order known by the
device.
[0015] Of course, the order may include any order known by the
device. In one embodiment, a controller may inform the device of
the order. In this case, the order may be determined by the storage
device in real time or near real time.
[0016] Further, the plurality of write commands are ordered in the
determined order. See operation 106. In this case, the storage
device may order the plurality of write commands in the determined
order.
[0017] In this way, the device may be permitted to pre-fetch data
associated with the plurality of write commands. In this case, the
device may be permitted to pre-fetch the data before an associated
write command is executed. This may be accomplished because the
device knows the order of the write commands.
[0018] In one embodiment, read commands associated with the storage
device may also be identified. In this case, the plurality of read
commands associated with the storage device may be ordered randomly
or in a determined order. In either case, the read commands may be
intermixed with the write commands, where the write commands
maintain their determined order relative to one another.
[0019] More illustrative information will now be set forth
regarding various optional architectures and features with which
the foregoing framework may or may not be implemented, per the
desires of the user. It should be strongly noted that the following
information is set forth for illustrative purposes and should not
be construed as limiting in any manner. Any of the following
features may be optionally incorporated with or without the
exclusion of other features described.
[0020] FIG. 2 shows a system 200 for ordering a plurality of write
commands associated with a storage device, in accordance with one
embodiment. As an option, the present system 200 may be implemented
to carry out the method 100 of FIG. 2. Of course, however, the
system 200 may be implemented in any desired environment. It should
also be noted that the aforementioned definitions may apply during
the present description.
[0021] As shown, the system 200 includes a storage device 202. As
shown further, one or more devices 204 are in communication with
and/or connected to the storage device 202. This communication
and/or connection may be accomplished utilizing any type of bus,
etc.
[0022] In this case, the storage device 202 may represent any
number of storage devices. For example, in various embodiments, the
storage device 202 may represent a SATA drive, an SAS drive, an FC
drive, a USB drive, a PCI or PCI Express based plug in card
configured to appear as a storage device, and/or any other storage
device.
[0023] Furthermore, the one or more devices 204 may include any
device capable of receiving commands. For example, in various
embodiments, the devices 204 may include an SAS/SATA bridge, a
USB/SATA bridge, an FC/SATA bridge, a PCI or PCI Express based plug
in card, an expander, and initiator, and/or any other device.
[0024] In operation, the storage device 202 may identify write
commands associated with the storage device 202 to be sent to one
or more of the devices 204. The storage device 202 may then
determine an order. In various embodiments, this determination may
be made in real time or near real time, or may be a predetermined
order.
[0025] The storage device 202 may then order the write commands in
a determined order, where the determined order is known by the
devices 204. In one embodiment, the storage device 202 may order
the write commands by placing the write commands in a queue in the
order. In another embodiment, the storage device 202 may order the
write commands by assigning an order to the write commands.
[0026] In one embodiment, the identifying, determining, and
ordering may be performed based on a mode of the storage device
202. For example, a mode may indicate that a particular ordering is
to be performed and/or utilized. In another embodiment, the
identifying, determining, and ordering may be performed as a
standard function.
[0027] In one embodiment, a plurality of read commands associated
with the storage device 202 may also be identified. In this case,
the plurality of read commands associated with the storage device
202 may be ordered randomly. Further, the plurality of read
commands ordered randomly may be intermixed with the plurality of
write commands in the determined order.
[0028] In this way, the devices 204 may be permitted to pre-fetch
data associated with the write commands. In this case, the devices
204 may be permitted to pre-fetch the data before an associated
write command is executed. This may be accomplished because the
devices 204 know the order of the write commands.
[0029] For example, in some systems, a device (e.g. a host/bridge,
etc.) attached to a SATA drive may not know the order of the write
commands. Thus, the drive can not pre-fetch write data unless it
has enough resources to pre-fetch write data for all the commands.
However, pre-fetching for all commands may be very costly since
this costs a large portion of memory.
[0030] As an option, a hard disk drive (HDD) may reorder the
commands to reduce the number of rotations of the media needed to
fetch all the data. Additionally, a solid-state drive (SSD) may
reorder the commands based on the internal architectures to
optimize for the drive. However, in some cases, the host/bridge
attached to the drive that needs to fetch write data may be a
bottle neck.
[0031] Thus, the drive may order the commands in a deterministic
fashion which is known by the host and/or bridge. In one
embodiment, this may be implemented as a first come first served
approach. Thus, the host will know the order of the write commands
and it may pre-fetch write data before the command is executed. In
various embodiments, the drive may always perform this ordering, or
the ordering may be based on a mode. As an option, there may be
more than one mode.
[0032] Additionally, the ordering may be implemented for any
protocol or mode within a protocol that does not have a
deterministic technique of ordering the commands relative to one
another. It should be noted that the order of the read commands may
or may not be deterministic relative to the order of the write
commands.
[0033] For example, many read and write commands may be received.
The read commands may be ordered randomly and the write commands
may be ordered deterministically. The read and write commands may
be intermixed, where the relative order of the write commands to
one another is maintained. It should also be noted that, in one
embodiment, a memory controller (e.g. an SSD controller, etc.) may
pass information about the order of write commands to the device
attached to the drive to allow for efficient pre-fetching.
[0034] FIG. 3 shows a method 300 for ordering a plurality of write
commands associated with a storage device, in accordance with
another embodiment. As an option, the present method 300 may be
implemented in the context of the functionality and architecture of
FIGS. 1-2. Of course, however, the method 300 may be carried out in
any desired environment. Again, the aforementioned definitions may
apply during the present description.
[0035] As shown, it is determined whether a command is identified.
See operation 302. If a command is identified, it is determined
whether the command is a read command. See operation 304.
[0036] If the command is a read command, the read command is queued
in a random order. See operation 306. If the command is not a read
command, it is determined if the command is a write command. See
operation 308.
[0037] If the command is a write command, the command is queued in
an order known to a receiving device. See operation 310. For
example, in one embodiment, the write command may be queued in an
order and then the receiving device may be informed as to the
order. In another embodiment, the write command may be queued in a
predetermined order already known by the receiving device.
[0038] It is then determined whether a command to pre-fetch data is
received from a receiving device. See operation 312. If a command
to pre-fetch data is received, the data is sent. See operation
314.
[0039] In one embodiment, a SATA drive may execute write commands
in the same order that a host, bridge, or attached device sends the
commands. The host, bridge, or attached device may then pre-fetch
data based on knowing the order the write commands will be
executed. Thus, all available write data storage may be used for
the next data.
[0040] In this way, performance may be greatly increased since the
write data may be pre-fetched before the device is ready for the
write data. In one embodiment, an SSD controller may pass
information about the order of write commands to the device
attached to allow for efficient pre-fetching.
[0041] FIG. 4 illustrates an exemplary system 400 in which the
various architecture and/or functionality of the various previous
embodiments may be implemented. As shown, a system 400 is provided
including at least one host processor 401 which is connected to a
communication bus 402. The system 400 also includes a main memory
404. Control logic (software) and data are stored in the main
memory 404 which may take the form of random access memory
(RAM).
[0042] The system 400 also includes a graphics processor 406 and a
display 408, i.e. a computer monitor. In one embodiment, the
graphics processor 406 may include a plurality of shader modules, a
rasterization module, etc. Each of the foregoing modules may even
be situated on a single semiconductor platform to form a graphics
processing unit (GPU).
[0043] In the present description, a single semiconductor platform
may refer to a sole unitary semiconductor-based integrated circuit
or chip. It should be noted that the term single semiconductor
platform may also refer to multi-chip modules with increased
connectivity which simulate on-chip operation, and make substantial
improvements over utilizing a conventional central processing unit
(CPU) and bus implementation. Of course, the various modules may
also be situated separately or in various combinations of
semiconductor platforms per the desires of the user.
[0044] The system 400 may also include a secondary storage 410. The
secondary storage 410 includes, for example, a hard disk drive
and/or a removable storage drive, representing a floppy disk drive,
a magnetic tape drive, a compact disk drive, etc. The removable
storage drive reads from and/or writes to a removable storage unit
in a well known manner.
[0045] Computer programs, or computer control logic algorithms, may
be stored in the main memory 404 and/or the secondary storage 410.
Such computer programs, when executed, enable the system 400 to
perform various functions. Memory 404, storage 410 and/or any other
storage are possible examples of computer-readable media.
[0046] In one embodiment, the architecture and/or functionality of
the various previous figures may be implemented in the context of
the host processor graphics processor 406, an integrated circuit
(not shown) that is capable of at least a portion of the
capabilities of both the host processor 401 and the graphics
processor 406, a chipset (i.e. a group of integrated circuits
designed to work and sold as a unit for performing related
functions, etc.), and/or any other integrated circuit for that
matter.
[0047] Still yet, the architecture and/or functionality of the
various previous figures may be implemented in the context of a
general computer system, a circuit board system, a game console
system dedicated for entertainment purposes, an
application-specific system, and/or any other desired system. For
example, the system 400 may take the form of a desktop computer,
lap-top computer, and/or any other type of logic. Still yet, the
system 400 may take the form of various other devices including,
but not limited to, a personal digital assistant (PDA) device, a
mobile phone device, a television, etc.
[0048] Further, while not shown, the system 400 may be coupled to a
network [e.g. a telecommunications network, local area network
(LAN), wireless network, wide area network (WAN) such as the
Internet, peer-to-peer network, cable network, etc.] for
communication purposes.
[0049] While various embodiments have been described above, it
should be understood that they have been presented by way of
example only, and not limitation. Thus, the breadth and scope of a
preferred embodiment should not be limited by any of the
above-described exemplary embodiments, but should be defined only
in accordance with the following claims and their equivalents.
* * * * *