Flash storage controller execute loop
First Claim
1. A method including performing the following steps by a storage controller in a system wherein the storage controller is operatively coupled to a flash memory module:
- for each flash port of a plurality of flash ports, each flash port corresponding to a flash group of the flash memory module, each flash port comprising an associated processor, setting a repeat count register to a predetermined value if the flash port is in sleep mode such that the processor associated with the flash port wakes up before a transfer operation associated with the flash port is complete;
upon wake up of a first processor of a first flash port of the plurality of flash ports, prior to the transfer operation completing, in accordance with the predetermined value set in the repeat count register;
reading a first identifier of a first data structure from a first queue corresponding to a first bank of a first flash group;
reading a first state information from the first data structure, the first state information identifying a first stage of a first flash read or write command;
based on the identified first stage, identifying a first task to be accomplished or a first resource required by the first data structure, wherein the first task is related to reading data from or writing data to the first bank of the first flash group;
if the first resource is required by the first stage, checking to determine if it is available;
if the first resource is available, or if the first stage does not require resource availability, performing the first task;
modifying the first state information in the first data structure to reflect performance of the first task;
reading a second identifier of a second data structure from a second queue corresponding to a second bank of the first flash group;
reading a second state information from the second data structure, the second state information identifying a second stage of a second flash read or write command;
based on the identified second stage, identifying a second task to be accomplished or a second resource required by the second data structure, wherein the second task is related to reading data from or writing data to the second bank of the first flash group;
if the second resource is required by the second stage, checking to determine if it is available;
if the second resource is available, or if the second stage does not require resource availability, performing the second task; and
modifying the second state information in the second data structure to reflect performance of the second task; and
repeating the above steps until the first state information or the second state information indicates that the operations required by the corresponding data structure is are completed, at which point a pointer to that data structure is removed from the corresponding queue and the method continues for the other data structure until its state information indicates that the operations required by it are completed, at which point a pointer to that data structure is removed from the corresponding queue.
11 Assignments
0 Petitions
Accused Products
Abstract
In a storage controller connected to a flash memory module, an execute loop used to carry out tasks related to reading or writing data from the module. The loop includes reading a data structure from a queue and carrying out a task specified by the data structure, unless resources required by the task are not available, in which event the loop moves on to another data structure stored in another queue. Data structures bypassed by the loop are periodically revisited, until all tasks required are completed. Data structures store state information that is updated when tasks are completed.
171 Citations
23 Claims
-
1. A method including performing the following steps by a storage controller in a system wherein the storage controller is operatively coupled to a flash memory module:
-
for each flash port of a plurality of flash ports, each flash port corresponding to a flash group of the flash memory module, each flash port comprising an associated processor, setting a repeat count register to a predetermined value if the flash port is in sleep mode such that the processor associated with the flash port wakes up before a transfer operation associated with the flash port is complete; upon wake up of a first processor of a first flash port of the plurality of flash ports, prior to the transfer operation completing, in accordance with the predetermined value set in the repeat count register; reading a first identifier of a first data structure from a first queue corresponding to a first bank of a first flash group; reading a first state information from the first data structure, the first state information identifying a first stage of a first flash read or write command; based on the identified first stage, identifying a first task to be accomplished or a first resource required by the first data structure, wherein the first task is related to reading data from or writing data to the first bank of the first flash group; if the first resource is required by the first stage, checking to determine if it is available; if the first resource is available, or if the first stage does not require resource availability, performing the first task; modifying the first state information in the first data structure to reflect performance of the first task; reading a second identifier of a second data structure from a second queue corresponding to a second bank of the first flash group; reading a second state information from the second data structure, the second state information identifying a second stage of a second flash read or write command; based on the identified second stage, identifying a second task to be accomplished or a second resource required by the second data structure, wherein the second task is related to reading data from or writing data to the second bank of the first flash group; if the second resource is required by the second stage, checking to determine if it is available; if the second resource is available, or if the second stage does not require resource availability, performing the second task; and modifying the second state information in the second data structure to reflect performance of the second task; and repeating the above steps until the first state information or the second state information indicates that the operations required by the corresponding data structure is are completed, at which point a pointer to that data structure is removed from the corresponding queue and the method continues for the other data structure until its state information indicates that the operations required by it are completed, at which point a pointer to that data structure is removed from the corresponding queue. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A system, comprising:
-
a storage controller configured to be coupled to a flash memory module; a host interface configured to receive a plurality of host commands; a plurality of processors; memory storing one or more programs, which when executed by respective processors of the plurality of processors cause the storage controller to perform a method comprising; for each flash port of a plurality of flash ports, each flash port corresponding to a flash group of the flash memory module, each flash port comprising an associated processor, setting a repeat count register to a predetermined value if the flash port is in sleep mode such that the processor associated with the flash port wakes up before a transfer operation associated with the flash port is complete; upon wake up of a first processor of a first flash port of the plurality of flash ports, prior to the transfer operation completing, in accordance with the predetermined value set in the repeat count register; reading a first identifier of a first data structure from a first queue corresponding to a first bank of a first flash group; reading a first state information from the first data structure, the first state information identifying a first stage of a first flash read or write command; based on the identified first stage, identifying a first task to be accomplished or a first resource required by the first data structure, wherein the first task is related to reading data from or writing data to the first bank of the first flash group; if the first resource is required by the first stage, checking to determine if it is available; if the first resource is available, or if the first stage does not require resource availability, performing the first task; modifying the first state information in the first data structure to reflect performance of the first task; reading a second identifier of a second data structure from a second queue corresponding to a second bank of the first flash group; reading a second state information from the second data structure, the second state information identifying a second stage of a second flash read or write command; based on the identified second stage, identifying a second task to be accomplished or a second resource required by the second data structure, wherein the second task is related to reading data from or writing data to the second bank of the first flash group; if the second resource is required by the second stage, checking to determine if it is available; if the second resource is available, or if the second stage does not require resource availability, performing the second task; and modifying the second state information in the second data structure to reflect performance of the second task; and repeating the above steps until the first state information or the second state information indicates that the operations required by the corresponding data structure is are completed, at which point a pointer to that data structure is removed from the corresponding queue and the method continues for the other data structure until its state information indicates that the operations required by it are completed at which point a pointer to that data structure is removed from the corresponding queue. - View Dependent Claims (13, 14, 15, 16, 17, 18, 19, 20, 21, 22)
-
-
23. A method including performing the following steps by a storage controller in a system wherein the storage controller is operatively coupled to a flash memory module:
-
for each flash port of a plurality of flash ports, each flash port corresponding to a flash group of the flash memory module, each flash port comprising an associated processor, setting a repeat count register to a predetermined value if the flash port is in sleep mode such that the processor associated with the flash port wakes up before a transfer operation associated with the flash port is complete; upon wake up of a first processor of a first flash port of the plurality of flash ports, prior to the transfer operation completing, in accordance with the predetermined value set in the repeat count register; determining, in succession, among each of a plurality of distinct queues, each queue corresponding to a distinct bank of a first flash group of the flash memory module, whether a respective queue includes a respective data structure; in accordance with a determination that the respective queue includes the respective data structure, advancing the respective data structure by; reading a respective identifier of the respective data structure from the respective queue corresponding to a respective bank of the first flash group; reading a respective state information from the respective data structure, the respective state information identifying a respective stage of a corresponding flash read or write command; based on the identified respective stage, identifying a respective task to be accomplished or a respective resource required by the data structure, wherein the respective task is related to reading data from or writing data to the respective bank of the first flash group; if the respective resource is required by the respective stage, checking to determine if it is available; if the respective resource is available, or if the respective stage does not require resource availability, performing the respective task; and modifying the respective state information in the respective data structure to reflect performance of the respective task; and repeating the above steps until the respective state information in the respective data structures in the plurality of distinct queues indicates that operations required by the respective data structures are completed; and for each respective data structure, removing a pointer to the respective data structure from the corresponding queue when the corresponding state information indicates that the operations required by the respective data structure are completed.
-
Specification