STORAGE DEVICE FOR MANAGING COMMANDS HAVING OVERLAP RANGE AND METHOD FOR CHECKING OVERLAP - Patent application
The LOC circuit in storage devices addresses performance issues by checking for overlapping LBAs or LBA ranges and blocking overlapping commands, enabling efficient execution of non-overlapping commands, thus improving latency and throughput.
Patent Information
- Application Number
- JP2021050326
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Priority Date
- 2020-04-03
- Filing Date
- 2021-03-24
- Publication Date
- 2024-10-23
- Estimated Expiration
- 2041-03-24
AI Technical Summary
Existing storage systems face performance issues due to the need to maintain atomicity within logical block addresses (LBAs) or LBA ranges, leading to blocked commands when overlapping ranges are detected, which can cause latency and reduced throughput.
A storage device equipped with a hardware module, the LOC (LBA overlap check) circuit, checks for overlapping LBAs or LBA ranges and blocks execution of commands with overlaps, allowing immediate execution of non-overlapping commands, thereby offloading the overlap checking from firmware or software.
This approach improves storage device performance by reducing latency and enhancing throughput by allowing concurrent execution of commands with non-overlapping LBAs or LBA ranges while blocking those with overlaps.
Smart Images

Figure 0007572279000001 
Figure 0007572279000002 
Figure 0007572279000003
Abstract
Description
[Technical field]
[0001] The present invention relates to a storage device, and more particularly to a storage device that manages parallel overlap for commands having overlapping ranges and a method for checking overlap. [Background technology]
[0002] A storage system generally includes a host device and one or more storage devices. The host device manages data stored in the storage device by sending various commands to the storage device to update one or more logical blocks of the storage device. For example, the host device sends an UNMAP command or a REASSIGN BLOCKS command to the storage device along with one or more logical block addresses (LBAs) or LBA ranges so that the storage device reclaims (e.g., UNMAP) or changes the physical location (e.g., REASSIGN BLOCKS) of logical blocks associated with one or more LBAs or LBA ranges. In this case, the storage device blocks other commands, such as READ and WRITE commands with one or more overlapping LBAs or LBA ranges, along with either the UNMAP command or the REASSIGN BLOCKS command (or similarly blocks REASSIGN BLOCKS or UNMAP commands with overlapping LBAs or LBA ranges) to maintain atomicity within the affected LBAs or LBA ranges.
[0003] The above information disclosed in this Background section is intended to improve understanding of the background of the present invention and, therefore, it may include information that does not constitute prior art. [Prior art documents] [Patent documents]
[0004] [Patent Document 1] US Patent Application Publication No. 2011 / 0208915 [Patent Document 2] US Patent Application Publication No. 2013 / 0166855 [Patent Document 3] US Patent Application Publication No. 2014 / 0136799 [Patent Document 4] US Patent Application Publication No. 2015 / 0113224 [Patent Document 5] US Patent Application Publication No. 2016 / 0342545 [Patent Document 6] US Patent Application Publication No. 2017 / 0083314 [Patent Document 7] US Patent Application Publication No. 2017 / 0123995 Summary of the Invention [Problem to be solved by the invention]
[0005] The present invention has been made in consideration of the above-mentioned conventional technology, and an object of the present invention is to provide a storage device equipped with a hardware module (e.g., a LOC (LBA overlap check) circuit) for checking overlap of commands having multiple disjoint LBAs or LBA ranges.
[0006] It is also an object of the present invention to provide a method for checking overlap in a storage device that includes a hardware module (e.g., a LOC circuit) for allowing execution of commands that have non-overlapping LBAs or LBA ranges. [Means for solving the problem]
[0007] According to one aspect of the present invention, a storage device is provided that includes: an LBA range table configured to store one or more logical blocks having a logical block address (LBA) configured to store host data received from a host device; and one or more LBA ranges associated with one or more commands received from the host device through a storage interface; and a comparison table that compares an LBA range associated with an active request with the one or more LBA ranges associated with the one or more commands. and an overlap check circuit for determining an overlap between an LBA range associated with the active request and any of the one or more LBA ranges associated with the one or more commands, and blocking execution of the command associated with the active request in response to determining that the LBA range associated with the active request overlaps at least one of the one or more LBA ranges associated with the one or more commands, wherein the overlap check circuit is configured to generate an overlap bitmap according to a comparison result between the LBA range associated with the active request and the one or more LBA ranges stored in the LBA range table, and set an overlap count value of the LBA range associated with the active request corresponding to a number of overlaps between the LBA range associated with the active request and the one or more LBA ranges associated with the one or more commands, the overlap count value being determined according to a logical operation result between at least two bits of the overlap bitmap. It is characterized by:
[0008] The overlap check circuit includes: Preferably, the method is configured to permit execution of a command associated with the active request in response to determining that an LBA range associated with the active request does not overlap any of one or more LBA ranges associated with the one or more commands. .
[0009] The one or more commands specify overlapping LBA ranges. Check The overlap check circuitry may handle pending commands that are being blocked or executed.
[0010] The active request may correspond to an incoming command received from the host device through the storage interface, and an LBA range associated with the active request may include a disjoint LBA range of the incoming command.
[0011] The overlap check circuit blocks execution of an incoming command for at least one first LBA range of the disjoint LBA ranges and blocks execution of an incoming command for at least one second LBA range of the disjoint LBA ranges for the same incoming command. permission configured to It is preferred .
[0012] The overlap check circuitry determines the LBA range associated with the active request. and, One or more LBA ranges associated with said one or more commands And,one or more comparators configured to compare, each of the comparators configured to compare an LBA range associated with the active request to a different one of the one or more LBA ranges associated with the one or more commands. It is preferred .
[0013] The overlap checking circuitry may be configured to maintain a sequence of execution order for commands that have overlapping LBA ranges.
[0015] The overlap check circuit decrements the overlap count value in response to completion of execution of one of the one or more commands having an LBA range that overlaps an LBA range associated with the active request, and decrements the overlap count value in response to completion of execution of the LBA range associated with the active request when the overlap count value is decremented to a threshold value. permission configured to It is preferred .
[0016] The LBA range associated with the active request may be registered in the LBA range table, and the overlap check circuit may be configured to obtain the LBA range associated with the active request from the LBA range table.
[0017] According to one aspect of the present invention, a method for checking overlaps in a logical block address (LBA) associated with a command provided from a host device to a storage device includes the steps of: storing one or more LBA ranges associated with one or more commands received from the host device through a storage interface in an LBA range table; and detecting an LBA range associated with an active request by an overlap check circuit of the storage device. and, One or more LBA ranges associated with said one or more commands And,and detecting an overlap between the LBA range associated with the active request and any of the one or more LBA ranges associated with the one or more commands by the overlap check circuit. and blocking execution of a command associated with the active request in response to determining by the overlap check circuit that an LBA range associated with the active request overlaps at least one of the one or more LBA ranges associated with the one or more commands, wherein the determining step includes generating an overlap bitmap according to a comparison result between the LBA range associated with the active request and the one or more LBA ranges stored in the LBA range table, and setting an overlap count value of the LBA range associated with the active request corresponding to a number of overlaps between the LBA range associated with the active request and the one or more LBA ranges associated with the one or more commands, wherein the overlap count value is determined according to a result of a logical operation between at least two bits of the overlap bitmap. .
[0018] before The overlap check circuitry checks whether the LBA range associated with the active request overlaps any of the one or more LBA ranges associated with the one or more commands. judgement In response to the request, executing a command associated with the active request. permission and It is preferred .
[0019] The one or more commands specify overlapping LBA ranges. Check The overlap check circuitry for this purpose allows for handling of pending commands that are either blocked or in progress.
[0020] The active request may correspond to an incoming command received from the host device through the storage interface, and an LBA range associated with the active request may include a disjoint LBA range of the incoming command.
[0021] before blocking execution of an incoming command for at least one first LBA range of the disjoint LBA ranges by the overlap check circuit; and blocking execution of an incoming command for at least one second LBA range of the disjoint LBA ranges for the same incoming command by the overlap check circuit. permission and It is preferred .
[0022] The overlap check circuit includes one or more comparators, and the method further includes: determining, by the comparators, an LBA range associated with the active request; and,One or more LBA ranges associated with said one or more commands And, and comparing, wherein each of the comparators compares the LBA range associated with the active request to a different one of the one or more LBA ranges associated with the one or more commands. It is preferred .
[0023] After the step of determining the overlap, maintaining a sequence of execution order of commands having overlapping LBA ranges with said overlap check circuitry; It is preferable that the compound further comprises .
[0025] before and decrementing the overlap count value by the overlap check circuit in response to completion of execution of one of the one or more commands having an LBA range that overlaps an LBA range associated with the active request; and decrementing the overlap count value by the overlap check circuit in response to completion of execution of the LBA range associated with the active request by the overlap check circuit being decremented to a threshold value. permission and It is preferred .
[0026] The LBA range associated with the active request may be registered in the LBA range table, and the method may further include obtaining, by the overlap check circuitry, the LBA range associated with the active request from the LBA range table.
[0027] The above-mentioned and other aspects and features of the present invention will become more apparent to those skilled in the art from the following detailed description of the embodiments of the present invention when taken in conjunction with the drawings. Effect of the Invention
[0028] According to the storage device of the present invention, even if one or more LBAs or LBA ranges for the same command are blocked due to overlap, it is possible to allow execution of commands that have non-overlapping LBAs or LBA ranges. [Brief description of the drawings]
[0029] [Figure 1] 1 is a system diagram of a storage system according to an embodiment of the present invention. [Diagram 2] 2 is a block diagram showing a LOC circuit of a storage device according to an embodiment of the present invention. [Diagram 3] 4 is a format diagram illustrating an example of an LBA range table according to an embodiment of the present invention. [Figure 4] FIG. 2 is a block diagram of a check circuit for the LOC circuit according to one embodiment of the present invention. [Diagram 5] FIG. 4 is a schematic circuit diagram illustrating a detection circuit of a check circuit according to an embodiment of the present invention. [Figure 6] FIG. 2 is a schematic circuit diagram showing a count circuit of a check circuit according to an embodiment of the present invention. [Figure 7] 11 is a flow chart illustrating an example of blocking commands with overlapping ranges according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0030] Hereinafter, specific examples of the embodiment for carrying out the present invention will be described in detail with reference to the drawings. Hereinafter, similar reference symbols indicate similar components throughout the contents of this specification. However, the present invention may be embodied in many different forms and should not be construed as being limited to the embodiments shown in this specification. Rather, these embodiments are provided as examples so that this invention is complete and complete, and fully conveys the aspects and features of the present invention to those skilled in the art. Therefore, steps, components, and techniques that are not necessary for those skilled in the art to fully understand the aspects and features of the present invention will not be described. Unless otherwise stated, similar reference symbols indicate similar components throughout the drawings and description, and therefore the description may not be repeated.
[0031] According to one embodiment of the present invention, a host device (e.g., a host computer) provides a command to the storage device to request updates to one or more logical blocks of the storage device that store host data. In this case, each command provides the storage device with a list of one or more logical block addresses (LBAs) or LBA ranges associated with the command. For example, an UNMAP command (e.g., a SCSI UNMAP command) provides a list of LBAs to the storage device, and a REASSIGN BLOCKS command (e.g., a SCSI REASSIGN BLOCKS command) provides a list of LBA ranges to the storage device. To maintain atomicity within the affected LBAs or LBA ranges, the storage device blocks other commands, such as READ and WRITE commands, that have LBA overlaps with either the REASSIGN BLOCKS command or the UNMAP command (and / or blocks REASSIGN BLOCKS or UNMAP commands that similarly have overlapping LBAs or LBA ranges). However, this may cause performance issues.
[0032] For example, the comparison storage device may check for LBA or LBA range overlaps sequentially, such that one LBA or LBA range is handled at a time, in which case the comparison storage device blocks all subsequent commands until the command with the overlapping range is resolved (e.g., processed and / or executed), even if the subsequent command does not have an overlapping LBA or LBA range. Rather than allowing commands with non-overlapping LBAs or LBA ranges to be executed (e.g., executed immediately), this may degrade storage performance because these commands are blocked until some previous command with an overlapping LBA or LBA range is resolved and executed. Similarly, for commands (e.g., a single command) with multiple disjoint LBAs or LBA ranges, the comparison storage device may check for LBA or LBA range overlaps sequentially, such that an overlap with a first LBA or LBA range of multiple disjoint LBAs or LBA ranges prevents the comparison storage device from processing a second LBA or LBA range of multiple disjoint LBAs or LBA ranges, even if there is no overlap affecting the second LBA or LBA range.
[0033] According to one embodiment of the present invention, the storage device includes a hardware module (e.g., LOC (LBA overlap check) circuit) to support overlap checking of multiple LBAs or LBA ranges concurrently (e.g., simultaneously or simultaneously). In this case, the hardware module blocks execution of a command with an overlapping LBA or LBA range while allowing execution of a command (e.g., the next command) that does not have an overlapping LBA or LBA range even if one or more previous commands are blocked because they have overlapping LBAs or LBA ranges. Thus, the performance of the storage device is improved.
[0034] According to one embodiment of the present invention, a hardware module (e.g., a LOC circuit) checks for overlap of multiple disjoint LBAs or LBA ranges occurring simultaneously with a single command. For example, the LBAs or LBA ranges of a single command are split into multiple entries in an LBA range table that is used by the hardware module to check for overlap with pending commands (e.g., commands that are executing or waiting to be executed). In one embodiment, some LBAs or LBA ranges of a command that overlap with any one of the pending commands are blocked, while the same command that does not overlap with the pending commands is allowed to execute (e.g., is executed immediately or proceeds to be executed). In some embodiments, some received commands that overlap with the LBAs or LBA ranges of an ongoing command are automatically blocked until this range is completely processed. Thus, performance is improved.
[0035] According to one embodiment of the present invention, a hardware module (e.g., a LOC circuit) offloads overlap checking from firmware or software. For example, checking overlap of multiple disjoint LBAs or LBA ranges using firmware or software (e.g., a processor executing commands) can introduce latency (e.g., due to processing time) and / or reduce the throughput (e.g., overall throughput) of the storage device (e.g., by utilizing limited processing resources of the storage device). Thus, by offloading overlap checking to a hardware module, latency is reduced and / or throughput of the storage device 104 is improved.
[0036] FIG. 1 is a system diagram of a storage system according to an embodiment of the present invention.
[0037] Briefly, in overview, a storage system 100 according to an embodiment of the present invention includes a host device (e.g., a host computer) 102 and a storage device 104. The host device 102 provides commands to the storage device 104 such that the storage device 104 manages the host data stored therein in response to the commands. For example, the host device 102 is communicatively coupled to the storage device 104 (e.g., through a storage interface 110) and provides various commands (e.g., READ, WRITE, UNMAP, REASSIGN BLOCKS, TRIM, and / or the like) to the storage device 104 along with one or more LBAs or LBA ranges associated with the commands. The storage device 104 stores, updates, and / or otherwise manages the host data of one or more logical blocks associated with the one or more LBAs or LBA ranges. Once a command is executed, the storage device 104 sends a response to the host device 102 indicating that the command was successfully completed.
[0038] In one embodiment, the storage device 104 does not utilize firmware or software (e.g., a processor executing commands such as the storage controller 114) to perform the overlap check, but rather includes a hardware module (e.g., LOC (LBA overlap check) circuit 122) to check for overlap between one or more LBAs or LBA ranges associated with an incoming command and a pending command. For example, in one embodiment, the LBAs or LBA ranges associated with one or more pending commands (e.g., one or more commands that are being executed or awaiting execution) are separated into separate entries in a table (e.g., LBA range table 120). In this case, the hardware module compares one or more LBAs or LBA ranges associated with the incoming command with those in the table to determine whether the one or more LBAs or LBA ranges associated with the incoming command overlap with those from the table. If one or more LBAs or LBA ranges associated with the incoming command overlap with those from the table, the incoming command is blocked. On the other hand, if one or more LBAs or LBA ranges associated with the incoming command do not overlap with any from the table, the incoming command is executed (e.g., executed immediately or progressed to be executed).
[0039] In one embodiment, a hardware module (e.g., LOC circuitry 122) concurrently (e.g., simultaneously or simultaneously) checks multiple disjoint LBAs or LBA ranges associated with a command (e.g., a single command) and allows execution of the command on non-overlapping LBAs or LBA ranges while blocking execution of the command on overlapping ones of the LBAs or LBA ranges. Thus, command execution time is reduced or minimized by allowing execution of commands on non-overlapping LBAs or LBA ranges while concurrently blocking execution of the same command on overlapping LBAs or LBA ranges.
[0040] More specifically, and with reference to FIG. 1, the host device 102 includes a processor 106 and a host memory 108. The host processor 106 is a general-purpose processor, such as a central processing unit (CPU) core of the host device 102. The host memory 108 is considered to be a high-performance main memory (e.g., primary memory) of the host device 102. For example, in one embodiment, the host memory 108 includes (may be) a volatile memory, such as a dynamic random access memory (DRAM). However, the invention is not so limited, and the host memory 108 can include (may be) any suitable high-performance main memory (e.g., primary memory) alternative for the host device 102 as known to those skilled in the art. For example, in other embodiments, the host memory 108 is a relatively high performance non-volatile memory, such as NAND flash memory, Phase Change Memory (PCM), Resistive RAM, Spin-transfer Torque RAM (STTRAM), any suitable memory based on PCM technology, memristor technology, and / or Resistive Random Access Memory (ReRAM), including, for example, chalcogenides and / or the like.
[0041] Storage device 104 may be considered a secondary memory capable of persistently storing data accessible by host device 102. In this embodiment, storage device 104 comprises (or is) a relatively slow memory compared to the high performance memory of host memory 108. In some embodiments, storage device 104 is a secondary memory for host device 102, such as a solid-state drive (SSD). However, the invention is not so limited, and in other embodiments, storage device 104 may include (or be) any suitable storage device, such as, for example, a magnetic storage device (e.g., a hard disk drive (HDD), an optical storage device (e.g., a Blu-ray disc drive, a compact disc (CD) drive, a digital versatile disc (DVD) drive, etc.), other types of flash memory devices (e.g., a USB flash drive, etc.), and / or the like. In various embodiments, storage device 104 may conform to a large form factor standard (e.g., a 3.5 inch hard disk form factor), a small form factor standard (e.g., a 2.5 inch hard disk drive form factor), an M.2 form factor, an E1.S form factor, and / or the like. In other embodiments, storage device 104 may conform to any suitable or desired derivative of such form factors. For convenience, storage device 104 is described hereinafter in the context of an SSD, although the invention is not so limited.
[0042] The storage device 104 is communicatively coupled to the host device 102 through a storage interface 110. The storage interface 110 facilitates communication (e.g., utilizing a connector or a protocol) between the host device 102 and the storage device 104. In some embodiments, the storage interface 110 facilitates the exchange of storage requests and responses between the host device 102 and the storage device 104. For example, in one embodiment, the storage interface 110 (e.g., a connector and its protocol) comprises (or conforms to, etc.) a Small Computer System Interface (SCSI), Non Volatile Memory Express (NVMe), and / or the like. However, the invention is not so limited, and in other embodiments, storage interface 110 (e.g., connectors and protocols therefor) may follow, for example, Peripheral Component Interconnect Express (PCIe), Remote Direct Memory Access over Ethernet (RDMA), Serial Advanced Technology Attachment (SATA), Fiber Channel, Serial Attached SCSI (SAS), NVMe over Fabric (NVME-oF), and / or any other suitable storage interface. In other embodiments, storage interface 110 (e.g., connectors and protocols therefor) may follow, for example, Ethernet, Universal Serial Bus (USB), and / or any other suitable interface. For convenience, storage interface 110 is described hereinafter in the context of a SCSI interface, but the invention is not so limited.
[0043] In this embodiment, the storage device 104 includes a storage controller 114 and a storage device 116. The storage controller 114 is coupled to the storage interface 110 (e.g., via a command pipeline circuit 112) and responds to input / output (I / O) requests received from the host device 102 through the storage interface 110. The storage controller 114 provides an interface to control the storage device 116 and provide access to or from it. For example, the storage controller 114 includes at least one processing circuit embedded thereon to interface with the host device 102 and the storage device 116. The processing circuit includes digital circuitry (e.g., a microcontroller, a microprocessor, a digital signal processor, or a logic device (e.g., a field programmable gate array (FPGA), application-specific integrated circuit (ASIC), and / or the like)) that executes data access commands to provide access to and from data stored in the storage device 116 in response to the data access commands (e.g., via firmware and / or software). For example, data access commands may include any suitable data storage and retrieval algorithms (e.g., READ / WRITE) commands, data management and update algorithms (e.g., UNMAP, REASSIGN BLOCKS, TRIM, and / or the like), and / or the like.
[0044] The storage device 116 persistently stores data received from the host device 102. For example, the storage device 116 comprises a number of logical blocks 118 for storing host data received from the host device 102. In one embodiment, the storage device 116 comprises non-volatile memory, such as, for example, a NAND flash memory. However, the invention is not so limited and the storage device 116 may comprise any suitable memory depending on the type of storage device 104.
[0045] In this embodiment, storage device 104 includes an LBA range table 120. LBA range table 120 includes a number of individual slots that store LBAs or LBA ranges associated with one or more commands that are executing or awaiting execution, such that the LBAs or LBA ranges in LBA range table 120 can be compared to those of incoming commands. For example, in some embodiments, LBA range table 120 is stored in a buffer or in a volatile memory of storage device 104, such as DRAM. However, the invention is not limited in this respect, and LBA range table 120 may be stored in any suitable memory, such that the LBAs or LBA ranges in LBA range table 120 can be retrieved and compared to those of incoming commands. For example, in other embodiments, LBA range table 120 is stored in storage device 116.
[0046] In this embodiment, the storage device 104 further includes a command pipeline circuit 112 and an LBA overlap check (LOC) circuit 122. In some embodiments, the command pipeline circuit 112 receives commands (e.g., command frames, submission queue entries, and / or the like) from the host device 102 through the storage interface 110 and sends (e.g., transmits) the commands (e.g., via notification) to the storage controller 114 (or other processor using firmware or software). In this case, the storage controller 114 (or other processor using firmware or software) submits one or more LBA ranges associated with each of the commands to the LOC circuit 122 for overlap checking. In some embodiments, the command pipeline circuit 112 receives commands (e.g., command frames, submission queue entries, and / or the like) from the host device 102 and parses the commands (e.g., to determine the command type of each of the commands and one or more LBAs or LBA ranges associated with each of the commands). In this case, in some embodiments, the command pipeline circuit 112 submits one or more LBA ranges associated with each of the commands to the LOC circuit 122 for overlap checking. In some embodiments, the command pipeline circuit 112 and the storage controller 114 (or other processor using firmware or software) each submit an LBA or LBA range to the LOC circuit 122 for overlap checking. In other embodiments, the appropriate one of the command pipeline circuit 112 and the storage controller 114 (or other processor using firmware or software) submits an LBA or LBA range to the LOC circuit 122 for overlap checking depending on the implementation and type of the storage device 104. However, the invention is not so limited and one of the command pipeline circuit 112 and the storage controller 114 may be omitted depending on the implementation or type of the storage device 104.
[0047] In some embodiments, the LOC circuitry 122 is implemented as a hardware module (e.g., electronic circuitry) communicatively coupled to the storage controller 114 and / or the command pipeline circuitry 112, and receives overlap check requests from the storage controller 114 and / or the command pipeline circuitry 112. The LOC circuitry 122 checks for overlap between one or more LBAs or LBA ranges associated with the overlap check request and one or more LBAs or LBA ranges from the LBA range table 120. For example, in one embodiment, the LOC circuitry 122 is implemented as an integrated circuit (IC) mounted (or attached) to the storage device 104 (e.g., embedded on the same substrate or the same circuitry as that of the storage device 104). For example, the LOC circuitry 122 is implemented (e.g., attached or attached) on the storage device 104 as a system on chip (SOC). However, the invention is not limited in this respect. For example, in other embodiments, the LOC circuitry 122 is implemented on a separate circuit board (e.g., a printed circuit board (PCB)) separate from the storage device 104 and coupled to the storage controller 114 and / or the command pipeline circuitry 112.
[0048] In one embodiment, as described in more detail below with reference to Figures 2-7, LOC circuitry 122 concurrently (e.g., simultaneously or simultaneously) receives requests from storage controller 114 and / or command pipeline circuitry 112 to check for overlaps in one or more LBAs or LBA ranges. For example, storage controller 114 and / or command pipeline circuitry 112 register LBAs or LBA ranges (which may be referred to consistently hereinafter as LBA ranges) for incoming commands in separate slots in LBA range table 120, and LOC circuitry 112 utilizes LBA range table 120 to concurrently check for overlaps between one or more LBA ranges of the request and those in LBA range table 120. In one embodiment, LOC circuitry 122 blocks execution of any command having an LBA range that overlaps one or more of the entries in LBA range table 120, and allows execution of commands having LBA ranges that do not overlap those in LBA range table 120. In some embodiments, LOC circuitry 122 allows execution of a command on non-overlapping LBA ranges while blocking execution of the same command on non-overlapping LBA ranges, thus reducing or minimizing command execution time, reducing latency, and / or improving throughput.
[0049] FIG. 2 is a block diagram showing the LOC circuit of a storage device according to an embodiment of the present invention.
[0050] In brief overview, the LOC circuit 122 is a hardware module (e.g., electronic circuitry) coupled to the storage controller 114 (e.g., as indicated by solid arrows) and / or the command pipeline circuit 112 (e.g., as indicated by dashed arrows) such that the LOC circuit 122 receives overlap check requests from the storage controller 114 and / or the command pipeline circuit 112. In some embodiments, the LOC circuit 122 selects an overlap check request from the overlap check as an active request and fetches (e.g., retrieves or reads) one or more LBA ranges associated with the active request from the LBA range table 120 into an internal table (e.g., an internal register of a flip-flop). The LOC circuit 122 compares the one or more LBA ranges associated with the active request with other LBA ranges in the internal table associated with other pending commands (e.g., commands in progress or commands awaiting execution). The LOC circuit 122 determines an overlap between the LBA ranges based on the comparison results. In some embodiments, LOC circuitry 122 generates an overlap count that is used to maintain the sequence of execution order of commands that have overlapping LBA ranges. For example, in this embodiment, LOC circuitry 122 includes select circuitry 202, fetch circuitry 204, and check circuitry 206.
[0051] More specifically, and referring to FIG. 2, in some embodiments, the command pipeline circuit 112 receives an incoming command (e.g., a command frame, a submission queue entry, and / or the like) from the host device 102 through the storage interface 110, such as an UNMAP command (e.g., a SCSI UNMAP command) or a REASSIGN BLOCKS command (e.g., a SCSI REASSIGN BLOCKS command). The incoming command includes one or more LBA ranges associated with the command, such that the storage 104 performs an operation associated with the command on one or more logical blocks 118 corresponding to the one or more LBA ranges. In some embodiments, the command pipeline circuit 112 sends (e.g., sends) the command to the storage controller 114 (e.g., via a notification) so that the storage controller 114 can process the command using, for example, firmware or software. In this case, the storage controller 114 updates an LBA range table 120 of the storage device 116 according to the command and the one or more LBA ranges associated with the command. In another embodiment, the command pipeline circuit 112 includes a parsing circuit to parse the command (e.g., to determine the type of command and one or more LBA ranges associated with the command). In this case, the command pipeline circuit 112 updates the LBA range table 120 of the storage device 116 according to the command and the one or more LBA ranges associated with the command. In another embodiment, the command pipeline circuit 112 and the storage controller 114 each update the LBA range table 120 of the storage device 116 with the LBA range associated with the incoming command. In some embodiments, the command pipeline circuit 112 and / or the storage controller 114 split a single command having multiple disjoint LBA ranges into separate entries in the LBA range table 120.
[0052] FIG. 3 is a format diagram illustrating an example of an LBA range table according to an embodiment of the present invention. As shown in FIG. 3, the LBA range table 120 includes multiple entries (e.g., one or more individual slots), each of which corresponds to a command and an LBA range associated with the command. The LBA range table 120 is updated by the command pipeline circuit 112 and / or the storage controller 114, providing the LBA range 302 for an incoming command to the LBA range table 120. For example, the LBA range 302 for an incoming command defines a start LBA and an end LBA of the LBA range. In another example, the LBA range 302 for an incoming command defines a start LBA and an LBA count. However, the present invention is not so limited. For example, if the LBA range includes a single LBA, the LBA range 302 includes a single LBA (e.g., instead of a start LBA and an end LBA), or the start LBA and end LBA include the same LBA corresponding to the single LBA. Note that, as shown in FIG. 3, a single command (e.g., command 2) with multiple disjoint LBA ranges is split into multiple entries in LBA range table 120, such that each disjoint LBA range for the same command has its own entry in LBA range table 120.
[0053] 2, in some embodiments, the command pipeline circuit 112 and / or the storage controller 114 send overlap check requests to the LOC circuit 122. For example, the select circuit 202 receives overlap check requests from the command pipeline circuit 111 and / or the storage controller 114. The select circuit 202 selects an appropriate one of the overlap check requests as an active request such that the LOC circuit checks whether one or more LBA ranges associated with the active request overlap with one or more LBA ranges loaded from the LBA range table 120. For example, in some embodiments, the select circuit 202 pools one or more overlap check requests received from the command pipeline circuit 112 and / or the storage controller 114 and selects an appropriate or preferred overlap check request from the pool according to appropriate selection logic. For example, the select circuit 202 selects an active request from the overlap check requests received from the command pipeline circuit 112 and the storage controller 114 by a first-in-first-out (FIFO) algorithm, a last-in-last-out (LILO) algorithm, a weighted round robin algorithm, a type of command associated with the request, a priority of the command associated with the request, a priority associated with the resource of the request (e.g., giving higher priority to the storage controller 114), a special LBA range associated with the request, and / or the like. However, the invention is not limited in this respect, and in some embodiments, the select circuit 202 is omitted. For example, in some embodiments, the LOC circuit 122 handles the overlap check requests in the order in which they are received, in which case the select circuit 202 is omitted.
[0054] In some embodiments, different types of commands with overlapping ranges are treated differently, for example, depending on atomicity requirements. For example, a READ command that overlaps another READ command is treated differently than a READ command that overlaps a WRITE command, since commands that modify the state of a logical block may affect atomicity. In this case, for example, the command pipeline circuitry 112 and / or the storage controller 114 send an overlap check request to the LOC circuitry 122 depending (e.g., depending) on the type of command, and / or the select circuitry 202 selects an active request depending (e.g., depending) on the type of command. However, the present invention is not limited in this respect.
[0055] In some embodiments, the LOC circuit 122 fetches (e.g., reads or retrieves) an LBA range associated with the active request from the LBA range table 120 and loads the LBA range into an internal table (e.g., internal registers of flip-flops and / or the like) of the LOC circuit 122 to be compared with one or more LBA ranges of one or more pending commands. For example, in some embodiments, the active request includes an index, pointer, and / or the like into the LBA range table 120 of the storage device 116 defining the LBA range associated with the active request to be fetched. In some embodiments, the fetch circuit 204 includes an internal table to store one or more LBA ranges of one or more pending commands to compare with the LBA range associated with the active request.
[0056] In some embodiments, the LBA range of the pending command corresponds to a previous active request that has been checked for overlap, and is therefore preloaded into an internal table of the fetch circuitry 204. In this case, when execution of one of the pending commands is completed, the LBA range of the pending command is cleared (e.g., removed or deleted) from the internal table so that it is not compared to the next active request and is used to block. However, the invention is not limited in this respect, and in other embodiments, the fetch circuitry 204 fetches (e.g., reads or searches) the LBA range associated with the active request from the LBA range table 120, as well as the LBA range of the pending command for comparison, each time a new active request is received. In this case, the storage controller 114 and / or the command pipeline circuitry 112 clears (e.g., removes or deletes) the pending commands from the LBA range table 120 so that when execution of any one of the pending commands is completed, the LBA range of the pending command is not fetched and compared with the LBA range of the active request under consideration.
[0057] In some embodiments, as described in more detail below with reference to FIG. 4, the LOC circuit 122 compares the LBA range associated with the active request to one or more of the LBA ranges of the pending commands to determine whether there is an overlap therebetween. For example, the check circuit 206 compares the LBA range of the active request to each of the LBA ranges of the pending commands (e.g., fetched from the LBA range table 120) to determine whether the LBA range of the active request overlaps with any of those of the pending commands. In some embodiments, if the LBA range of the active request does not overlap with any of those of the pending commands, a notification is provided to the originator of the overlap check request associated with the active request (e.g., to the storage controller 114 and / or the command pipeline circuit 112) so that the command associated with the active request is executed (e.g., executed immediately or proceeds to execution). In this case, in some embodiments, the originator (e.g., the storage controller 114 and / or the command pipeline circuit 112) provides a response to the host device 102 indicating that the command was executed successfully. On the other hand, if the LBA range of the active request overlaps with any of the LBA ranges of the pending commands, no notification is provided to the originator so that the command associated with the active request is blocked. In this case, in some embodiments, the check circuit 206 generates an overlap count to determine the sequence of execution order of the commands associated with the active request.
[0058] FIG. 4 is a block diagram of a check circuit of the LOC circuit according to one embodiment of the present invention.
[0059] In brief overview, the fetch circuit 204 receives an active request corresponding to an overlap check request received from the storage controller 114 or the command pipeline circuit 112 (e.g., via the select circuit 202). In some embodiments, the active request includes an index, pointer, and / or the like that specifies the location of one or more LBA ranges associated with the active request in the LBA range table 120. In some embodiments, the fetch circuit 204 fetches (e.g., reads or searches) one or more LBA ranges associated with the active request (e.g., active ranges) from the LBA range table 120 and loads one or more of the active ranges associated with the active request in an internal table (e.g., internal registers of flip-flops and / or the like). The fetch circuit 204 provides the check circuit 206 with one or more active ranges associated with the active request as well as LBA ranges (range 1 to range N) (N is a natural number) associated with one or more pending commands (e.g., associated with a command in progress of execution or blocked and awaiting execution), which check circuit 206 checks for overlap therebetween. For example, in this embodiment, the check circuit 206 includes a comparison circuit 402, an overlap bitmap 404, a detection circuit 406, and a counting circuit 408.
[0060] 4, in some embodiments, the comparison circuit 402 includes multiple comparators (Comparator 1 through Comparator N), each of which receives an active range (e.g., an LBA range associated with an active request) for comparison with a corresponding one of the LBA ranges (Range 1 through Range N) associated with one or more pending commands. For example, a first comparator (Comparator 1) compares the active range with a first LBA range (Range 1) from one or more pending commands, a second comparator (Comparator 2) compares a second LBA range (Range 2) from one or more pending commands of the active range, etc., such that the Nth comparator (Comparator N) compares the active range with the Nth (e.g., last) LBA range (Range N) of the one or more pending commands. In some embodiments, the comparators (Comparator 1 through Comparator N) perform comparisons contemporaneously (eg, simultaneously or at the same time) with one another, although the invention is not limited in this respect.
[0061] In some embodiments, each of the comparators (Comparator 1 through Comparator N) outputs a comparison result indicating whether the active range (e.g., the LBA range of the active request) overlaps with the corresponding LBA ranges (Range 1 through Range N) of one or more pending commands. In some embodiments, the comparison results of the comparators (Comparator 1 through Comparator N) are used to generate an overlap bitmap 404. For example, in one embodiment, if the active range overlaps with the corresponding LBA ranges (Range 1 through Range N) of one or more pending commands, the corresponding comparator (Comparator 1 through Comparator N) sets the corresponding bit (0 / 1) of the overlap bitmap 404 to an overlap level (e.g., high level). On the other hand, if the active range does not overlap the corresponding LBA range (range 1 to range N) of one or more pending commands, the corresponding comparator (comparator 1 to comparator N) sets the corresponding bit (0 / 1) of overlap bitmap 404 to a non-overlapping level (e.g., low level).
[0062] In some embodiments, the detection circuit 406 detects the overlap based on the comparison result of the comparison circuit 402. For example, in some embodiments, the detection circuit 406 outputs the overlap detection signal based on the overlap bitmap 404. In this case, when any of the bits (0 / 1) of the overlap bitmap 404 is set to an overlap level (e.g., high level), the overlap signal (e.g., high level signal) is output as the overlap detection signal while indicating that the active range of the active request overlaps at least one of the LBA ranges (range 1 to range N) of the pending command. On the other hand, when each of the bits (0 / 1) of the overlap bitmap 404 is set to a non-overlap level (e.g., low level), a valid signal (e.g., low level signal) is output as the overlap detection signal while indicating that the active range of the active request does not overlap any of the LBA ranges (range 1 to range N) of the pending command.
[0063] FIG. 5 is a schematic circuit diagram illustrating a detection circuit 406 of a check circuit according to an embodiment of the present invention. As shown in FIG. 5, in some embodiments, the detection circuit 406 includes one or more logic gates. For example, the detection circuit 406 includes an OR logic gate 502. In this case, when at least one of the bits (0 / 1) of the overlap bitmap 404 is set to an overlap level (e.g., a high level), the OR logic gate 502 outputs an overlap signal (e.g., a high level signal) as the overlap detection signal if at least one of the bits (0 / 1) is set to an overlap level (e.g., a high level). On the other hand, when each of the bits (0 / 1) of the overlap bitmap 404 is set to a non-overlap level (e.g., a low level), the OR logic gate 502 outputs a valid signal (e.g., a low level signal) as the overlap detection signal. However, the present invention is not limited thereto, and the detection circuit 406 may be modified in various ways according to the spirit and scope of the present invention. For example, the detection circuit 406 may comprise (e.g., be implemented with) a variety of suitable hardware structures, electronic components, and / or parts, such as a variety of other suitable logic gates (e.g., NAND gates, NOR gates, XOR gates, NOT gates, EXOR gates, EXNOR gates, and / or the like), a variety of suitable switches, a variety of suitable transistors, a variety of suitable resistors, a variety of suitable capacitors, and / or the like, as known to those of ordinary skill in the art based on the teachings of the present invention and / or as taught in practicing one embodiment of the present invention.
[0064] In some embodiments, the comparison circuit 402 allows execution of a command having one or more disjoint LBA ranges even if one or more of the multiple disjoint LBA ranges are blocked. For the purposes of the illustrated example, consider a command having two disjoint LBA ranges such that the two disjoint LBA ranges do not overlap each other, and assume that a first of the two disjoint LBA ranges overlaps one or more of the pending commands, and a second of the two disjoint LBA ranges does not overlap any one or more of the pending commands. In this case, if the first LBA range is checked first, it will be blocked because it overlaps one or more of the pending commands' LBA ranges. However, if a second LBA range for the same command is subsequently checked for overlap, the second LBA range for the command will proceed to execution even though the first LBA range for the same command is blocked, since the second LBA range does not overlap either the first LBA range or the pending commands. Thus, performance is improved.
[0065] Referring again to FIG. 4, in some embodiments, the counting circuit 408 tracks the overlap to maintain the sequence of execution order of commands having overlapping LBA ranges. For example, as described more particularly below with reference to FIG. 6, in some embodiments, the counting circuit 408 tracks the number of overlapping ranges between an active range that is the active request under consideration and the LBA range of a pending command, and generates an overlap count corresponding to the number of overlapping ranges. In this case, the overlap count is used to determine the order in which commands corresponding to the active requests are executed. After execution of one of the pending commands having overlapping ranges is completed, the overlap count of the corresponding request is decremented such that the sequence of execution order of the corresponding requests is maintained. In this case, when the corresponding overlap count is decremented to zero, the command associated with the corresponding request is executed next among the pending commands having the same overlapping range.
[0066] 6 is a schematic circuit diagram showing a counting circuit of a check circuit according to one embodiment of the present invention. For convenience, the counting circuit 408 is shown for a 3-bit overlapping bitmap 404 in FIG. 6, but the present invention is not limited thereto.
[0067] 6, in some embodiments, the count circuit 408 of a three-bit bitmap 404 generates an overlap count based on a binary count of one or more count bits. For example, for the illustrated three-bit overlap bitmap 404, the count circuit 408 generates an overlap count based on a first count bit (e.g., the least significant bit) (S0) and a second count bit (e.g., the most significant bit or most significant bit in the illustrated three-bit example) (S1). However, the invention is not so limited, and one skilled in the art will appreciate that the count circuit 408 can generate an overlap count according to more or fewer count bits depending on the number of bits in the bitmap 404. In some embodiments, the count circuit 408 includes one or more logic circuits having different circuit structures to generate an overlap count based on multiple bits (S0 and S1). For example, the count circuit 408 includes a first logic circuit 602 for generating a bit value for the first count bit (S0) and a second logic circuit 604 for generating a bit value for the second count bit (S1).
[0068] In this example, the first logic circuit 602 outputs a first count bit (S0) depending on whether one of the bits (B0, B1, B2) or all of the bits (B0, B1, B2) are set to have an overlapping level (e.g., a high level). The second logic circuit 604 outputs a second count bit (S1) depending on whether at least two of the bits (B0, B1, B2) are set to have an overlapping level (e.g., a high level). Thus, in some embodiments, the first logic circuit 602 has a different circuit structure than that of the second logic circuit 604. For example, in one embodiment, the first logic circuit 602 comprises (e.g., embodies) a first logic gate and the second logic circuit 604 comprises (e.g., embodies) a plurality of second logic gates (606, 608, 610) and a third logic gate 612.
[0069] The first logic gate of the first logic circuit 602 outputs a first count bit (S0) to have a bit value depending on whether any or all of the bits (B0, B1, B2) of the overlap bitmap 404 are at an overlap level (e.g., a high level). For example, in one embodiment, the first logic gate of the first logic circuit 602 is embodied as an XOR gate such that if any or all of the bits (B0, B1, B2) of the overlap bitmap 404 have an overlap level (e.g., a high level), the first logic circuit 602 outputs the first count bit (S0) to have a high level (e.g., a 1). Otherwise, the first logic circuit 602 outputs the first count bit (S0) to have a low level (e.g., a 0).
[0070] The second logic circuit 604 includes (e.g., embodies) a plurality of second logic gates (606, 608, 610) and a third logic gate 612. Each of the plurality of second logic gates (606, 608, 610) determines whether two corresponding ones of the bits from the bits (B0, B1, B2) of the overlap bitmap 404 have an overlap level (e.g., a high level), and the third logic gate 612 outputs a second count bit (S1) based on the output of the second logic gates (606, 608, 610). For example, in one embodiment, each of the second logic gates (606, 608, 610) is embodied as an AND gate, and the third logic gate 612 is embodied as an OR gate. In this case, each of the second logic gates (606, 608, 610) performs an AND operation on a different set of bits (B0, B1, B2) of the overlap bitmap 404. For example, the first-second logic gate 606 performs an AND operation between a first bit (B0) and a second bit (B1) from the bits (B0, B1, B2) of the overlap bitmap 404, the second-second logic gate 608 performs an AND operation between a second bit (B1) and a third bit (B2) from the bits (B0, B1, B2) of the overlap bitmap 404, and the third-second logic gate 610 performs an AND operation between a first bit (B0) and a third bit (B2) from the bits (B0, B1, B2) of the overlap bitmap 404. If one or more of the second logic gates (606, 608, 610) determine that two corresponding bits among the bits (B0, B1, B2) of the overlap bits 404 have an overlap level (e.g., a high level), the third logic gate 612 outputs the second count bit (S1) to have a high level value. Otherwise, the third logic circuit 612 outputs the second count bit (S1) to have a low level (e.g., 0).
[0071] For the illustrated example, consider four overlapping LBA ranges submitted sequentially for overlap checking, and assume that a first LBA range of the four overlapping LBA ranges does not overlap any of the currently pending commands. In this case, the counting circuit 408 outputs an overlap count of 0 (e.g., S0=0, S1=0, etc.) indicating no overlap, so that when the first LBA range is checked, the first LBA range proceeds toward execution. The first LBA range (e.g., being executed) is immediately loaded by the fetch circuit 204 as one of the LBA ranges of the pending command, so that when the second LBA range of the four overlapping LBA ranges is checked, the second LBA range overlaps the first LBA range. In this case, the counting circuit 408 outputs an overlap count to have a value of 1 (e.g., S0=1 and S1=0), indicating that the second LBA range overlaps one of the LBA ranges of the pending command (e.g., the first LBA range).
[0072] Similarly, the second LBA range (e.g., blocked and waiting to be executed) is loaded by the fetch circuit 204 as one of the LBA ranges of the pending command, such that when the third LBA range of the four overlapping LBA ranges is checked, the third LBA range overlaps the first LBA range and the second LBA range. In this case, the count circuit 408 outputs the overlap count to have a value of 2 (e.g., S0=0 and S1=1), indicating that the third LBA range overlaps one of the LBA ranges of the pending command (e.g., the first LBA range and the second LBA range). Note that the third LBA range (e.g., blocked and waiting to be executed) is loaded by the fetch circuit 204 as one of the LBA ranges of the pending command, such that when the fourth LBA range of the four overlapping LBA ranges is checked, the fourth LBA range overlaps the first LBA range, the second LBA range, and the third LBA range. In this case, the count circuit 408 outputs the overlap count to have a value of 3 (e.g., S0=1 and S1=1), indicating that the fourth LBA range overlaps one of the LBA ranges of the pending commands (e.g., the first LBA range, the second LBA range, and the third LBA range).
[0073] In the illustrated example, as commands for each of the first, second, third, and fourth LBA ranges are completed (e.g., successfully executed and / or provided in response to the host device 102), the overlap counts for each of the overlapping ranges and the remaining ones are decremented. Once the overlap counts are decremented to zero, the corresponding commands are unblocked so that they may proceed to execution. For example, if the command for the first LBA range is successfully executed, the overlap count for the second LBA range is decremented from 1 to 0, the overlap count for the third LBA range is decremented from 2 to 1, and the overlap count for the third LBA range is decremented from 3 to 2. In this case, the command for the second LBA range is decremented so that it may proceed to execution, and in the case of successful execution, the overlap counts for each of the remaining third and fourth overlapping LBA ranges are decremented. When the overlap count for the third LBA range is decremented to zero, the command for the third LBA range is unblocked to proceed to execution, and in the event of successful execution, the overlap count for the fourth LBA range is decremented to zero, the fourth LBA range is unblocked in response, and the command associated with the fourth LBA range proceeds to execution.
[0074] FIG. 7 is a flow chart illustrating an example of blocking commands with overlapping scopes according to one embodiment of the present invention.
[0075] 7, a first active request 702 corresponding to a first command (e.g., a READ command) is received by fetch circuit 204 of LOC circuit 122. For example, the first active request corresponds to a first LBA range (range 1). Fetch circuit 204 fetches (e.g., reads or retrieves) the first LBA range (range 1) from storage device 116 (e.g., from LBA range table 120) and loads the first LBA range into an internal table (e.g., an internal register of a flip-flop) of fetch circuit 204 for comparison. In the illustrated example, the first LBA range does not overlap with any other ranges, so the first LBA range proceeds to execution.
[0076] When a first command for the first LBA range is pending (e.g., running), the fetch circuit 204 receives a second active request 704 corresponding to a second command (e.g., an UNMAP command). The second active request 704 corresponds to a second LBA range (range 2) and a third LBA range (range 3). For example, the second LBA range (range 2) and the third LBA range (range 3) are disjoint LBA ranges of the same second command that do not overlap each other. In this case, the fetch circuit 204 fetches (e.g., reads or searches) each of the first and second LBA ranges (range 2 and range 3) from the storage device 116 (e.g., from the LBA range table 120) and concurrently (e.g., simultaneously or simultaneously) loads the first and second LBA ranges (range 2 and range 3) into the internal table.
[0077] In the illustrated example, the second LBA range (Range 2) overlaps the first LBA range (Range 1), and therefore the second LBA range (Range 2) is blocked for the second command. For example, the overlap count associated with the second LBA range (Range 2) is set (e.g., by counting circuit 408) such that the second LBA range (Range 2) is blocked. Meanwhile, the third LBA range (Range 3) does not overlap any other range, and therefore proceeds to execution even though the second LBA range (Range 2) for the same command is blocked. When the first command associated with the first LBA range (Range 1) is completed, the overlap count for the second LBA range (Range 2) is decremented, and once the overlap count for the second LBA range (Range 2) is decremented to 0, the second LBA range (Range 2) is unblocked to proceed to execution.
[0078] Referring again to FIG. 7, if a second command for the third LBA range (range 3) is pending (e.g., executing), the fetch circuit 204 receives a third active request 706 corresponding to the third command (e.g., a READ command). The third active request 706 corresponds to the fourth LBA range (range 4). In this case, the fetch circuit 204 fetches (e.g., reads or searches) the fourth LBA range (range 4) from the storage device 116 (e.g., from the LBA range table 120) and loads the fourth LBA range (range 4) into the internal table. The fourth LBA range (range 4) overlaps the third LBA range (range 3) and is therefore blocked. For example, an overlap count associated with the fourth LBA range (range 4) is set (e.g., by the count circuit 408) such that the fourth LBA range (range 4) is blocked. When the second command associated with the third LBA range (Range 3) is completed, the overlap count for the fourth LBA range (Range 4) is decremented, and the fourth LBA range (Range 4) is unblocked to proceed to execution once the overlap count for the fourth LBA range (Range 4) has been decremented to 0. In this case, the fourth LBA range (Range 4) is unblocked to proceed to execution if the portion of the second command corresponding to the third LBA range (Range 3) is completed, even if the second command itself (e.g., second command 704 for the second range (Range 2) and third range (Range 3)) has not been completed.
[0079] As described above, according to one embodiment of the present invention, the storage device includes LOC circuitry 122 to allow concurrent (e.g., simultaneous or concurrent) overlap checking of one or more LBAs or LBA ranges. In some embodiments, LOC circuitry 122 blocks execution of commands that have overlapping LBAs or LBA ranges while allowing execution of commands (e.g., the same command and / or the next command) that do not have overlapping LBAs or LBA ranges. Thus, performance of the storage device is improved.
[0080] In the drawings, the relative sizes of components, layers, and regions are exaggerated and / or simplified for clarity. Although first, second, third, etc. may be used herein to describe various elements, parts, regions, layers, and / or sections, it should be understood that these elements, parts, regions, layers, and / or sections should not be limited by these terms. These terms are used to distinguish one element, part, region, layer, or section from another region, layer, or section. Thus, a first element, part, region, layer, or section described below may be referred to as a second element, part, region, layer, or section without departing from the spirit and scope of the present invention.
[0081] When an element or layer is referred to as being "on," "connected," or "coupled" to another element or layer, this means that it is directly on, connected, coupled, or interposed between the other element or layer. Additionally, when a component or layer is referred to as being "between" two components or layers, it should be understood that there can be one or more intervening components or layers between the two components or layers, and not just one component or layer.
[0082] The terms used herein are merely for the purpose of describing particular embodiments and are not intended to limit the invention. As used herein, the singular form "a" or "an" also includes the plural, unless the context clearly indicates otherwise. As used herein, the terms "comprises," "comprising," "comprising," "has," "have," and "having" specify the presence of the referenced features, integers, steps, operations, elements, and / or components and do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items. A phrase such as "at least one of," when preceding a list of components, modifies the entire list of components and not the individual components of the list.
[0083] As used herein, the terms "substantially," "about," and similar terms are used as terms of approximation and not of degree, and are intended to account for substantial variations in measurements or calculations that would be recognized by one of ordinary skill in the art. In addition, the use of "may" in describing embodiments of the invention refers to "one or more embodiments of the invention." As used herein, the terms "use," "using," and "used" are considered synonymous with the terms "utilize," "utilizing," and "utilized," respectively.
[0084] Unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by those skilled in the art to which this invention belongs. It should also be understood that terms as defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the relevant field and / or in the context of this specification, and should not be interpreted as overly idealized and formal meanings unless expressly defined in this specification.
[0085] Although the embodiments of the present invention have been described in detail above with reference to the drawings, the present invention is not limited to the above-described embodiments and can be modified in various ways without departing from the technical spirit of the present invention. [Explanation of symbols]
[0086] 100 Storage Systems 102 Host device 104 Storage device 106 Host Processor 108 Host Memory 110 Storage Interface 112 Command Pipeline Circuit 114 Storage Controller 116 Storage devices (storage memory) 118 Logical Blocks 120 LBA (Logical Block Address) Range Table 122 LOC (LBA overlap check) circuit 202 Select circuit 204 Fetch Circuit 206 Check Circuit 302 LBA range 402 Comparison circuit 404 overlap bitmap 406 Detection Circuit 408 Counting Circuit 502 OR Logic Gate 602, 604 First and second logic circuits 606, 608, 610 Second logic gate 612 Third Logic 702, 704, 706 1st, 2nd, 3rd active requests
Claims
1. A storage device, comprising: one or more logical blocks configured to store host data received from a host device and having logical block addresses (LBAs); an LBA range table configured to store one or more LBA ranges associated with one or more commands received from the host device through a storage interface; an overlap check circuit for comparing an LBA range associated with an active request to one or more LBA ranges associated with the one or more commands to determine an overlap between the LBA range associated with the active request and any of the one or more LBA ranges associated with the one or more commands, and blocking execution of the command associated with the active request in response to determining that the LBA range associated with the active request overlaps with at least one of the one or more LBA ranges associated with the one or more commands; The overlap check circuit includes: configured to generate an overlap bitmap according to a comparison result between an LBA range associated with the active request and the one or more LBA ranges stored in the LBA range table; setting an overlap count value of the LBA range associated with the active request corresponding to a number of overlaps between the LBA range associated with the active request and one or more LBA ranges associated with the one or more commands; The storage device according to claim 1, wherein the overlap count value is determined according to a result of a logical operation between at least two bits of the overlap bitmap.
2. 2. The storage device of claim 1, wherein the overlap check circuitry is configured to allow execution of a command associated with the active request in response to determining that an LBA range associated with the active request does not overlap any of one or more LBA ranges associated with the one or more commands.
3. 3. The storage apparatus of claim 2, wherein the one or more commands correspond to pending commands that are blocked or being executed by the overlap check circuitry to check for overlapping LBA ranges.
4. the active request corresponds to an incoming command received from the host device through the storage interface; 2. The storage device of claim 1, wherein the LBA range associated with the active request includes a disjoint LBA range of the incoming command.
5. 5. The storage device of claim 4, wherein the overlap check circuitry is configured to block execution of an incoming command for at least one first LBA range of the disjoint LBA ranges and to allow execution of an incoming command for at least one second LBA range of the disjoint LBA ranges for the same incoming command.
6. the overlap check circuitry includes one or more comparators configured to compare an LBA range associated with the active request with one or more LBA ranges associated with the one or more commands; 2. The storage device of claim 1, wherein each of the comparators is configured to compare an LBA range associated with the active request to a different one of one or more LBA ranges associated with the one or more commands.
7. 2. The storage device of claim 1, wherein the overlap check circuitry is configured to maintain a sequence of execution order of commands having overlapping LBA ranges.
8. 2. The storage device of claim 1, wherein the overlap check circuit is configured to decrement the overlap count value in response to completion of execution of one of the one or more commands having an LBA range that overlaps with an LBA range associated with the active request, and to allow execution of the LBA range associated with the active request in response to the overlap count value being decremented to a threshold value.
9. The LBA range associated with the active request is registered in the LBA range table; 2. The storage device of claim 1, wherein the overlap check circuit is configured to obtain the LBA range associated with the active request from the LBA range table.
10. 1. A method for checking overlaps in logical block addresses (LBAs) associated with commands provided from a host device to a storage device, comprising: The method comprises: storing, via an LBA range table, one or more LBA ranges associated with one or more commands received from the host device via a storage interface; comparing, by an overlap check circuitry of the storage device, an LBA range associated with an active request with one or more LBA ranges associated with the one or more commands; determining, with the overlap check circuitry, an overlap between an LBA range associated with the active request and any of one or more LBA ranges associated with the one or more commands; and blocking execution of a command associated with the active request in response to determining, by the overlap check circuitry, that an LBA range associated with the active request overlaps at least one of the one or more LBA ranges associated with the one or more commands; The determining step includes: generating an overlap bitmap according to a comparison between an LBA range associated with the active request and the one or more LBA ranges stored in the LBA range table; setting an overlap count value for an LBA range associated with the active request corresponding to a number of overlaps between an LBA range associated with the active request and one or more LBA ranges associated with the one or more commands; The method of claim 1, wherein the overlap count value is determined according to a result of a logical operation between at least two bits of the overlap bitmap.
11. 11. The method of claim 10, further comprising: in response to the overlap check circuit determining that an LBA range associated with the active request does not overlap any of one or more LBA ranges associated with the one or more commands, allowing execution of a command associated with the active request.
12. 12. The method of claim 11, wherein the one or more commands correspond to pending commands that are being blocked or executed by the overlap checking circuitry to check for overlapping LBA ranges.
13. the active request corresponds to an incoming command received from the host device through the storage interface; 11. The method of claim 10, wherein the LBA range associated with the active request includes a disjoint LBA range of the incoming command.
14. blocking execution of an incoming command for at least a first LBA range of the disjoint LBA ranges by the overlap check circuit; 14. The method of claim 13, further comprising: allowing execution of an incoming command to at least a second one of the disjoint LBA ranges for the same incoming command by the overlap check circuitry.
15. the overlap check circuit includes one or more comparators; The method further includes comparing, by the comparator, an LBA range associated with the active request to one or more LBA ranges associated with the one or more commands; 11. The method of claim 10, wherein each of the comparators compares an LBA range associated with the active request to a different one of one or more LBA ranges associated with the one or more commands.
16. The method of claim 10, further comprising, after the step of determining the overlap, maintaining a sequence of execution order of commands having overlapping LBA ranges by the overlap check circuitry.
17. decrementing the overlap count value by the overlap check circuit in response to completion of execution of one of the one or more commands having an LBA range that overlaps an LBA range associated with the active request; 11. The method of claim 10, further comprising: allowing execution of an LBA range associated with the active request by the overlap check circuit in response to the overlap count value being reduced to a threshold value.
18. The LBA range associated with the active request is registered in the LBA range table; 11. The method of claim 10, further comprising obtaining, by the overlap check circuitry, an LBA range associated with the active request from the LBA range table.
Citation Information
Patent Citations
Data storage device, command control device, electronic apparatus
JP2012063875A
Fused Store Exclusive / Memory Barrier Operation
US20110208915A1
Systems, methods, and interfaces for vector input / output operations
US20130166855A1
Memory array with atomic test and set
US20140136799A1
Atomic write operations for storage devices
US20150113224A1
