System, method, and medium for recovering worker shares from read priorities
The mechanism adjusts worker shares based on read and write command counts to restore balance after read prioritization, ensuring fair access and improved performance in storage devices.
Patent Information
- Application Number
- JP2025514749
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2022-09-21
- Filing Date
- 2023-09-21
- Publication Date
- 2025-09-04
AI Technical Summary
Existing mechanisms fail to maintain worker shares accurately when read accesses are prioritized over write accesses in storage devices, leading to discrepancies between assigned and realized shares.
A mechanism that adjusts worker shares by iteratively updating read and write share percentages based on counts of read and write commands, using control parameters and scale factors to restore balance during and after read priority periods.
The mechanism ensures that worker shares align with their assigned percentages, improving access fairness and performance of storage devices by dynamically adjusting shares in response to read prioritization.
Smart Images

Figure 2025529402000001_ABST
Abstract
Description
[Background technology]
[0001] [CROSS-REFERENCE TO RELATED APPLICATIONS] This application claims the benefit of U.S. Patent Application No. 17 / 949,378, filed September 21, 2022, which is hereby incorporated by reference in its entirety.
[0002] Modern computing devices, which may include general-purpose and special-purpose computers such as desktop computers, laptop computers, tablet computers, servers, mobile phones, Internet of Things (IoT) devices, among many others, frequently implement different processes (which may be referred to herein as “workers”) that read and / or write information (which may include data and / or programs) to and / or from one or more storage devices, such as solid-state drives. To ensure that each worker receives a desired amount of access to the storage device, such modern computing devices may assign each worker a share that defines the amount of access each worker has to the storage device or a portion thereof. For example, the amount of the share may indicate the percentage of time that a worker will have access to the storage device or a portion of the storage device. As a more specific example, in a computing device with three workers, worker 1 may be assigned a 50% share (or any other suitable percentage between 0% and 100%), worker 2 may be assigned a 30% share (or any other suitable percentage between 0% and 100%), and worker 3 may be assigned a 20% share (or any other suitable percentage between 0% and 100%). In this scenario, on average over a long period of time, worker 1 will be able to access the storage device or portions thereof for approximately 50% of the total time that the storage is accessed, and workers 2 and 3 will similarly have access time approximately equal to 30% and 20%, respectively.
[0003] In some instances, to meet quality of service (QoS) requirements, a storage device may prioritize read accesses to the storage device (which tend to be shorter) over write accesses to the storage device (which tend to be longer. While such a preference may improve the performance of the storage device, it may also cause the shares realized by different workers to not match their assigned shares.
[0004] Therefore, a new mechanism for recovering worker shares from read priorities is desirable. Summary of the Invention
[0005] According to some embodiments, a mechanism (which may include a system, a method, and a medium) is provided for recovering worker shares from read priorities.
[0006] In some embodiments, a system for recovering worker shares from read priorities is provided, the system comprising: a memory; and at least one hardware processor that at least: determines that read accesses to a storage device are prioritized over write accesses to the storage device; determines a first count of read accesses to the storage device while read accesses to the storage device are prioritized over write accesses to the storage device; and performs at least one of: (i) a first adjustment of a base read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage for write accesses to the storage device based on the first count of read accesses; controlling read accesses to the storage device based on a first adjustment; determining that read accesses to the storage device have been prioritized over write accesses to the storage device; after read accesses to the storage device have been prioritized over write accesses to the storage device, determining a second count of write accesses to the storage device; performing at least one of: (i) a second adjustment of the first adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; and controlling write accesses to the storage device based on the second adjustment.In some of these embodiments, at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses comprises at least one of: (i) a procedure for adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) a procedure for adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses. In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses includes at least one of: (i) a procedure for adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the power of the product of a scale factor and the second count of write accesses; or (ii) a procedure for adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the power of the product of the scale factor and the second count of write accesses.In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses comprises: (i) the base read share percentage; and adjusting the first adjusted read share percentage by a scale factor and the second count of write accesses. and (ii) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses. In some of these embodiments, the at least one hardware processor is further collectively configured to at least determine that the initial write share percentage is equal to the base write share percentage. In some of these embodiments, the at least one hardware processor is further collectively configured to at least determine that an adjusted worker write share percentage is a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage.In some of these embodiments, the at least one hardware processor is further collectively configured to at least determine an adjusted worker read share percentage as a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage.
[0007] In some embodiments, a method for recovering worker shares from read prioritization is provided, the method comprising: determining, with at least one hardware processor, that read accesses to a storage device are prioritized over write accesses to the storage device; determining a first count of read accesses to the storage device while read accesses to the storage device are prioritized over write accesses to the storage device; performing at least one of: (i) a first adjustment of a base read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage for write accesses to the storage device based on the first count of read accesses; and adjusting the base write share percentage to a first adjusted write share percentage for write accesses to the storage device based on the first adjustment. controlling read accesses to the storage device; determining that read accesses to the storage device have been prioritized over write accesses to the storage device; and after read accesses to the storage device have been prioritized over write accesses to the storage device, determining a second count of write accesses to the storage device; performing at least one of: (i) a second adjustment of the first adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; and controlling write accesses to the storage device based on the second adjustment.In some of these embodiments, at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses comprises at least one of: (i) adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses. In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses includes at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the power of the product of a scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the power of the product of the scale factor and the second count of write accesses.In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses comprises: (i) the base read share percentage; and adjusting the first adjusted read share percentage by a scale factor and the second count of write accesses. and (ii) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses. In some of these embodiments, the method further comprises determining that the initial write share percentage is equal to the base write share percentage. In some of these embodiments, the method further comprises determining that the adjusted worker write share percentage is a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage. In some of these embodiments, the method further comprises determining an adjusted worker read share percentage to be a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage.
[0008] In some embodiments, a non-transitory computer-readable medium is provided comprising computer-executable instructions that, when executed by a processor, cause the processor to perform a method for recovering worker shares from read priorities, the method comprising at least one of: determining that read accesses to a storage device are prioritized over write accesses to the storage device; determining a first count of read accesses to the storage device while read accesses to the storage device are prioritized over write accesses to the storage device; (i) a first adjustment of a base read share percentage to a first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage to a first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses. and controlling read accesses to the storage device based on the first adjustment; determining that read accesses to the storage device have been prioritized over write accesses to the storage device; and after read accesses to the storage device have been prioritized over write accesses to the storage device, performing at least one of: (i) a second adjustment of the first adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; and controlling write accesses to the storage device based on the second adjustment.In some of these embodiments, at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses comprises at least one of: (i) adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses. In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses includes at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the power of the product of a scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the power of the product of the scale factor and the second count of write accesses.In some of these embodiments, at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses comprises: (i) the base read share percentage; and adjusting the first adjusted read share percentage by a scale factor and the second count of write accesses. and (ii) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses. In some of these embodiments, the method further comprises determining that the initial write share percentage is equal to the base write share percentage. In some of these embodiments, the method further comprises determining that the adjusted worker write share percentage is a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage. In some of these embodiments, the method further comprises determining an adjusted worker read share percentage to be a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage. [Brief explanation of the drawings]
[0009] [Figure 1] FIG. 1 is an example block diagram of a solid-state drive coupled to a host device via a bus, according to some embodiments.
[0010] [Figure 2] 1 is an example of a value that may be tracked, according to some embodiments.
[0011] [Figure 3] 1 is an example of a process for recovering worker shares from read preference, according to some embodiments.
[0012] [Figure 4] 1 is an example of a process for selecting and processing commands based on a non-read priority process, according to some embodiments. DETAILED DESCRIPTION OF THE INVENTION
[0013] According to some embodiments, a mechanism (which may include a system, a method, and a medium) is provided for recovering worker shares from read priorities.
[0014] As described herein, in some embodiments, these mechanisms can adjust worker shares for any suitable portion or all of any suitable one or more storage devices (such portion or all may be referred to herein as a "portion"). For example, in a NAND solid state drive (SSD), there may be multiple NAND dies (each of which may be referred to herein as a "NAND"), and in some embodiments, one or more, or all, of these NAND dies may be referred to herein as a portion of the NAND SSD. Similarly, if multiple SSDs are used, a portion of the SSDs may be one, two, any suitable subset, or all of the SSDs.
[0015] In some embodiments, the mechanism may be triggered by a read priority trigger indicating that a read command for portion i of the storage device is being prioritized. In some embodiments, after initializing to zero the count of read commands processed during read priority, during read priority, the mechanism may iteratively: select and process read commands based on the read priority process; increment the count of processed read commands; update adjusted read and write share values for portion i of the storage device based on the product of a base read share value and a control parameter raised to the value of the count of processed read commands; and determine whether the read command is still being prioritized.
[0016] In some embodiments, when the read priority is completed, the mechanism may set the final read share value for portion i of the storage device during the read priority to the most recent adjusted read share value for portion i of the storage device during the read priority, and initialize the count of write commands processed during recovery from the read priority to zero.
[0017] Then, in some embodiments, during recovery from read priority, the mechanism may iterate the following: select a command for processing based on the non-read priority process; determine whether a write command was selected; if a write command was selected: increment the count of write commands; update adjusted read and write share values for portion i of the storage device based on the minimum of the base read share value; and the quotient of the final read share value and a control value raised to the power of the product of the scale factor and the count of write commands; and determine whether the adjusted read share value is equal to the base read share value. If the adjusted read share value is equal to the base read share value, the mechanism may terminate.
[0018] Through this process, as more read commands are processed for portion i of storage device during read priority, the adjusted read share value will progressively decrease and the adjusted write share value will progressively increase. Then, as more write commands are processed for portion i of storage device during read priority recovery, the adjusted read share value will progressively increase and the adjusted write share value will progressively decrease, returning to their base values.
[0019] Referring to FIG. 1, an example block diagram of a solid-state drive 102 coupled to a host device 124 via a bus 132 is shown, according to some embodiments.
[0020] As shown, in some embodiments, solid-state drive 102 may include controller 104, NAND devices 106, 108, and 110, channels 112, 114, and 116, random access memory (RAM) 118, firmware 120, and cache 122. In some embodiments, more or fewer components may be included than those shown in Figure 1. In some embodiments, two or more components shown in Figure 1 may be included in a single component.
[0021] In some embodiments, controller 104 may be any suitable controller for a solid-state drive. In some embodiments, controller 104 may include any suitable hardware processor (such as a microprocessor, digital signal processor, microcontroller, programmable gate array, etc.). In some embodiments, controller 104 may also include any suitable memory (such as RAM, firmware, cache, buffers, latches, etc.), interface controllers, interface logic, drivers, etc.
[0022] In some embodiments, NAND devices 106, 108, and 110 may be any suitable NAND devices for storing information (which may include data, programs, and / or any other suitable information that may be stored in a solid-state drive). In some embodiments, NAND devices may include any suitable memory cells, hardware processors (such as a microprocessor, digital signal processor, microcontroller, programmable gate array, etc.), interface controllers, interface logic, drivers, etc. Although three NAND devices (106, 108, and 110) are shown in FIG. 1 , in some embodiments, any suitable number D of NAND devices (including only one) may be used. In some embodiments, any suitable type of NAND device may be used (such as single-level cell (SLC), multilevel cell (MLC), triple-level cell (TLC), quad-level cell (QLC), 3D NAND, etc.). In some embodiments, each NAND device may have any suitable size. Although devices 106, 108, and 110 are described herein as being NAND devices, the devices may additionally or alternatively use any other suitable storage technology or technologies, such as NOR flash memory or any other suitable flash technology, phase change memory technology, and / or any other suitable non-volatile memory storage technology.
[0023] In some embodiments, channels 112, 114, and 116 may be any suitable mechanism for communicating information between controller 104 and NAND devices 106, 108, and 110. For example, in some embodiments, the channels may be implemented using conductors (lands) on a circuit board. Although three channels (112, 114, and 116) are shown in FIG. 1, in some embodiments, any suitable number C of channels may be used.
[0024] In some embodiments, random access memory (RAM) 118 may include any suitable type of RAM, such as dynamic RAM, static RAM, etc. In some embodiments, any suitable number of RAMs 118 may be included, and each RAM 118 may have any suitable size.
[0025] In some embodiments, firmware 120 may include any suitable combination of software and hardware. For example, in some embodiments, firmware 120 may include software programmed in any suitable programmable read only memory (PROM). In some embodiments, any suitable number of firmware 120 may be used, each having any suitable size.
[0026] In some embodiments, cache 122 may be any suitable device for temporarily storing information (which may include data and programs in some embodiments). In some embodiments, cache 122 may be implemented using any suitable type of device, such as RAM (e.g., static RAM, dynamic RAM, etc.). In some embodiments, any suitable number of caches 122 may be used, each having any suitable size.
[0027] In some embodiments, host device 124 may be any suitable device that accesses stored information. For example, in some embodiments, host device 124 may be a general-purpose computer, a special-purpose computer, a desktop computer, a laptop computer, a tablet computer, a server, a database, a router, a gateway, a switch, a mobile phone, a communications device, an entertainment system (e.g., an automobile entertainment system, a television, a set-top box, a music player, etc.), a navigation system, etc. Although only one host device 124 is shown in FIG. 1 , in some embodiments, any suitable number of host devices may be included.
[0028] In some embodiments, host device 124 may include workers 126, 128, and 130. Although three workers (126, 128, and 130) are shown in FIG. 1 , in some embodiments, any suitable number of workers W may be included. In some embodiments, at least two workers may be included. A worker may be any suitable hardware and / or software that reads data from and / or writes data to solid-state drive 102.
[0029] In some embodiments, bus 132 may be any suitable bus for communicating information (which may include data and / or programs in some embodiments. For example, in some embodiments, bus 132 may be a PCIE bus, a SATA bus, or any other suitable bus.
[0030] 1 shows a NAND solid state drive, it should be understood that the mechanisms described herein may be used with other types of storage and / or other devices. For example, in some embodiments, the mechanisms may be used with network nodes, compute nodes, and / or any suitable device to which multiple workers require access, with their access being controlled by shares determined by a QoS bypass mechanism.
[0031] 2, examples of values 200 that may be tracked are shown, according to some embodiments. As shown, these values include a count of read commands processed during read priority N[0:D-1] 202, 204, and 206, a count of write commands processed during recovery from read priority M[0:D-1] 208, 210, and 212, control parameters α[0:D-1] 214, 216, and 218, scale factors K[0:D-1] 220, 222, and 224, an initial read share value S read,0 [0:D-1] 226, 228, and 230, the final read share value S read,1 [0:D-1] 232, 234, and 236, the adjusted read share value S read [0:D-1] 238, 240, and 242, and the adjusted write share value S write [0:D-1] may include 244, 246, and 248.
[0032] N[0:D-1] 202, 204, and 206, M[0:D-1] 208, 210, and 212, α[0:D-1] 214, 216, and 218, K[0:D-1] 220, 222, and 224, S read,0 [0:D-1] 226, 228, and 230, S read,1 [0:D-1] 232, 234, and 236, S read [0:D-1] 238, 240, and 242, and S writeAlthough three of each of [0:D-1] are shown in Figure 2, in some embodiments, any suitable number of these values (including only one) may be tracked. For example, in some embodiments, one of each of the above-listed values may be tracked for each portion of the storage device (e.g., each NAND in the solid-state drive in Figure 1) as shown.
[0033] 2 may be stored in any suitable location. For example, in some embodiments, these values may be stored in RAM 118 of FIG.
[0034] Referring to FIG. 3, an example process 300 for recovering worker shares from read priorities is shown, according to some embodiments. This process may be performed on any suitable device. For example, in some embodiments, this process may be performed on a controller (e.g., controller 104 of FIG. 1) of a storage device. According to some embodiments, a different instance of this process may be performed for each portion i of the storage device (e.g., each NAND device 106, 108, and 110 on solid-state drive 102).
[0035] As shown, process 300 may begin at 302 in response to receiving a read priority trigger. The trigger may indicate that a read command for portion i of a storage device is being prioritized over a write command for portion i of the storage device. In some embodiments, the trigger may be received from any suitable source and in any suitable manner. For example, in some embodiments, the trigger may be received as a flag (e.g., a bit in a shared register) that is set by a process for monitoring QoS in controller 104 when the QoS for portion i of the storage device falls below a threshold.
[0036] Next, at 304, process 300 may initialize N[i] to zero. In some embodiments, this initialization may be performed in any suitable manner. For example, in some embodiments, this initialization may be performed by setting the memory location corresponding to N[i] to zero.
[0037] In some embodiments, blocks 306, 308, 310, and 312 described below may be performed during read priority.
[0038] Next, at 306, the process may select the read command for processing based on a read priority process. In some embodiments, selecting the read command for processing may be performed in any suitable manner and based on any suitable read priority process. For example, in some embodiments, selecting the read command for processing may be performed by selecting the oldest read command of the next worker whose share of commands for portion i of that storage device has not yet been satisfied, and then processing that command based on the parameters of that command.
[0039] Process 300 may then increment N[i] at 308. In some embodiments, N[i] may be incremented in any suitable manner at 308. For example, in some embodiments, incrementing N[i] may be performed by adding 1 to the value in the memory location corresponding to N[i].
[0040] Next, at 310, the process 300 adjusts the share value S so that the share value for read commands decreases and the share value for write commands increases. read [i] and S write [i]. This updating of these share values may be performed in any suitable manner. For example, in some embodiments, the share values S read [i] and S write [i] can be updated using the following equation: S read[i]=S read,0 [i]*α[i] N[i] and S write [i]=1-S read [i], where S read [i] is the adjusted read share percentage for portion i of the storage device; S write [i] is the adjusted write share percentage for portion i of the storage device; S read,0 [i] is the base read share percentage for portion i of the storage device; α[i] is a control parameter for portion i of the storage device and may have any suitable value, such as a value greater than zero and less than one; and N[i] is the number of read accesses made to portion i of the storage device during read priority.
[0041] Next, at 312, the process may determine whether the read command for portion i of the storage device is still prioritized. In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, this determination may be made by checking that a flag (e.g., a bit in a shared register) has been cleared by a process for monitoring QoS in controller 104 if the QoS for portion i of the storage device is above a threshold.
[0042] If process 300 determines that the read command for portion i of the storage device is still prioritized, the process may loop back to 306 .
[0043] Otherwise, if the process 300 determines that the read command for the portion i of the storage device is still not prioritized, the process may branch to 314, where the process calculates the final read share value (Sread,1 [i]) is the adjusted read share value (S read In some embodiments, the final read share value (S[i]) from the read priority for portion i of the storage device may be set equal to the most recent value of read,1 [i]) is the adjusted read share value (S read Setting the last read share value (S[i]) equal to the most recent value of the last read share value (S[i]) from the read priority for the storage device portion i may be performed in any suitable manner. For example, in some embodiments, read,1 [i]) is the adjusted read share value (S read Setting it equal to the most recent value of S read,1 The memory location corresponding to [i] is S read This can be done by setting N[i] equal to the value in the memory location corresponding to N[i].
[0044] In some embodiments, process 300 may also initialize M[i] to zero at 314. In some embodiments, this initialization may be performed in any suitable manner. For example, in some embodiments, this initialization may be performed by setting the memory location corresponding to M[i] to zero.
[0045] In some embodiments, blocks 316, 318, 320, 322, and 324 described below may be performed while recovering from read priority.
[0046] At 316, process 300 may select a read or write command for processing based on a non-read priority process. In some embodiments, selecting a read or write command for processing may be performed in any suitable manner and based on any suitable non-read priority process. For example, 316 of process 300 may be performed as described below in connection with FIG. 4.
[0047] Next, at 318, process 300 may determine whether a write command was selected at 316. In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, determining whether a write command was selected may be performed by examining the type of command indicated in the command field.
[0048] If the process 300 determines at 318 that a write command was not selected at 316, the process 300 may loop back to 316.
[0049] Otherwise, if process 300 determines at 318 that a write command was selected at 316, process 300 may branch to 320, where the process may increment M[i]. In some embodiments, process 300 may increment M[i] in any suitable manner. For example, in some embodiments, incrementing N[i] may be performed by adding 1 to the value at the memory location corresponding to N[i].
[0050] Next, at 322, the process 300 adjusts the share value S so that the share value for read commands increases and the share value for write commands decreases. read [i] and S write [i]. This updating of these share values may be performed in any suitable manner. For example, in some embodiments, the share values S read [i] and S write [i] can be updated using the following equation: S read [i]=min(S read,0 [i],S read,1 [i] / α[i] K[i]*M[i] ); and S write [i]=1-S read [i], where S read[i] is the adjusted read share percentage for portion i of the storage device; S write [i] is the adjusted write share percentage for portion i of the storage device; S read,0 [i] is the base read share percentage for portion i of the storage device; S read,1 [i] is the final read share percentage for storage device portion i during the read priority of storage device portion i; α[i] is a control parameter for portion i of the storage device, which may have any suitable value, such as a value greater than zero and less than one; K[i] is a scale value for portion i of the storage device, which may have a value greater than 1; and M[i] is the number of write accesses made to part i of the storage device while recovering from read priority.
[0051] Next, at 324, the process 300 calculates the adjusted read share percentage (S read [i]) is the base read share percentage (S read,0 [i]). In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, this determination may be made by read Compare the value at the memory location corresponding to [i] and see if it is S read,0 This may be done by determining whether [i] is equal to the value in the memory location corresponding to [i]. If not, process 300 may loop back to 316. Otherwise, process 300 may end at 326.
[0052] 4, an example process 400 for determining which command to forward to portion i (shown here as NAND[i]) of a storage device that may be used in 316 of FIG. 3 is shown, according to some embodiments. This process may be performed on any suitable device. For example, in some embodiments, this process may be performed on a controller (such as, for example, controller 104 of FIG. 1) of the storage device.
[0053] As shown, after process 400 begins at 402, the process may select a first worker. In some embodiments, any suitable worker may be selected as the first worker, and the worker may be selected in any suitable manner. For example, in some embodiments, the worker with the oldest uncompleted command may be selected as the first worker. As another example, in some embodiments, the first instantiated worker may be selected as the first worker.
[0054] Next, at 406, process 400 may determine that NAND[i] is ready to receive a command. In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, this determination may be made by checking the command queue of NAND[i] to see if it is empty (which may indicate that NAND[i] is ready to receive a command).
[0055] Next, at 408, process 400 may determine the actual used share of the selected worker. In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, process 400 may determine the actual used share of the selected worker by dividing the total time of the worker on NAND[i] by the total time of all workers on NAND[i].
[0056] At 410, process 400 may then determine whether the selected worker's actual used share meets (e.g., is greater than, or is greater than or equal to) the selected worker's allocated share for the corresponding NAND[i]. In some embodiments, this determination may be made in any suitable manner. For example, in some embodiments, process 400 may make this determination by comparing a first value in a memory location corresponding to the selected worker's actual used share with a second value in a memory location corresponding to the selected worker's allocated share for the corresponding NAND[i], and determining whether the first value is greater than, or is greater than or equal to the second value.
[0057] If it is determined at 410 that the selected worker's actual used share meets (e.g., is greater than, or is greater than or equal to) the selected worker's allocated share for the corresponding NAND[i], process 400 may select the next worker at 412. The next worker may be selected in any suitable manner. For example, in some embodiments, the worker with the next oldest outstanding command compared to the currently selected worker may be selected as the next worker. As another example, in some embodiments, the next worker instantiated after the currently selected worker may be selected as the first worker. After selecting the next worker at 412, process 400 may loop back to 408.
[0058] Otherwise, if it is determined at 410 that the selected worker's actual used share does not meet (e.g., is less than, or is less than or equal to) the selected worker's allocated share for the corresponding NAND[i], process 400 may process the selected worker's next command at 414 and then loop back to 406. In some embodiments, process 400 may process the selected worker's next command in any suitable manner. For example, in some embodiments, the process may process the selected worker's command that is next in the command queue based on the command's parameters.
[0059] In some embodiments, at least some of the above-described blocks of the processes of Figures 3 and 4 may be performed or executed in any order or sequence, including but not limited to the order and sequence shown in and described with respect to the figures. Also, in some embodiments, some of the above-described blocks of the processes of Figures 3 and 4 may be performed or executed substantially simultaneously or in parallel, where appropriate, to reduce latency and processing time. Additionally or alternatively, in some embodiments, some of the above-described blocks of the processes of Figures 3 and 4 may be omitted.
[0060] In some embodiments, any suitable computer-readable medium may be used to store instructions for performing the functions and / or processes described herein. For example, in some embodiments, the computer-readable medium may be transitory or non-transitory. For example, a non-transitory computer-readable storage medium may include media such as magnetic media in a non-transitory form (such as hard disks, floppy disks, and / or any other suitable magnetic medium), optical media in a non-transitory form (such as compact discs, digital video discs, Blu-ray discs, and / or any other suitable optical medium), semiconductor media in a non-transitory form (such as flash memory, electrically programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), and / or any other suitable semiconductor medium), any suitable medium that is not transitory or does not lose any appearance of permanence during transmission, and / or any suitable tangible medium. As another example, a transitory computer-readable medium may include signals on a network, in wires, in conductors, in optical fibers, in circuits, in any suitable medium that is transient in transmission and lacks any appearance of permanence, and / or in any suitable intangible medium.
[0061] As can be seen from the above description, new mechanisms (which may include systems, methods, and media) are provided for recovering worker shares from read priorities. By recovering worker shares from read priorities when necessary, these mechanisms can improve fulfillment of worker shares allocated for access to a storage device, thereby improving performance of host devices connected to the storage device.
[0062] While the present invention has been described and illustrated in the exemplary embodiments set forth above, it will be understood that the present disclosure is made by way of example only, and that numerous changes in the details of the implementation of the invention may be made without departing from the spirit and scope of the invention, which is limited only by the claims that follow. Features of the disclosed embodiments may be combined and rearranged in various ways.
Claims
1. 1. A system for recovering worker shares from read priorities, comprising: memory; and At least one hardware processor wherein the at least one hardware processor comprises at least: determining that read access to a storage device is prioritized over write access to said storage device; While read access to the storage device is prioritized over write access to the storage device: determining a first count of read accesses to the storage device; (i) a first adjustment of a base read share percentage to a first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage to a first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses; controlling read access to the storage device based on the first adjustment; determining that read access to the storage device has priority over write access to the storage device; After read access to the storage device has been prioritized over write access to the storage device: determining a second count of write accesses to the storage device; (i) a second adjustment of the first adjusted read share percentage to a second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage to a second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; Controlling write access to the storage device based on the second adjustment. A system for recovering worker shares from read priorities, collectively comprising:
2. 2. The system of claim 1, wherein at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses comprises at least one of: (i) a procedure for adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) a procedure for adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses.
3. 2. The system of claim 1, wherein at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, comprises at least one of: (i) a procedure for adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the power of a product of a scale factor and the second count of write accesses; or (ii) a procedure for adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the power of the product of the scale factor and the second count of write accesses.
4. At least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, is determined by: (i) the base read share percentage; and dividing the first adjusted read share percentage by a control parameter raised to the product of a scale factor and the second count of write accesses. or (ii) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on the minimum of the base read share percentage and the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses.
5. The system of claim 1 , wherein the at least one hardware processor is further collectively configured to at least determine that an initial write share percentage is equal to the base write share percentage.
6. 6. The system of claim 1, wherein the at least one hardware processor is further collectively configured to determine at least an adjusted worker write share percentage as a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage.
7. 6. The system of claim 1, wherein the at least one hardware processor is further collectively configured to: determine at least an adjusted worker read share percentage that is a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage.
8. 1. A method for recovering worker shares from read priorities, comprising: determining, with at least one hardware processor, that read access to a storage device is prioritized over write access to said storage device; While read access to the storage device is prioritized over write access to the storage device: determining a first count of read accesses to the storage device; performing at least one of: (i) a first adjustment of a base read share percentage to a first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage to a first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses; and controlling read access to the storage device based on the first adjustment; determining that read access to the storage device has priority over write access to the storage device; and After read access to the storage device has been prioritized over write access to the storage device: determining a second count of write accesses to the storage device; performing at least one of: (i) a second adjustment of the first adjusted read share percentage to a second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage to a second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; and controlling write access to the storage device based on the second adjustment.
10. A method for recovering worker shares from read priorities, comprising:
9. 9. The method of claim 8, wherein at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses comprises at least one of: (i) adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses.
10. 9. The method of claim 8, wherein at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, comprises at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the power of a product of a scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the power of the product of the scale factor and the second count of write accesses.
11. At least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, is adjusted by: (i) the base read share percentage; and a control parameter obtained by raising the first adjusted read share percentage to the power of the product of a scale factor and the second count of write accesses.
9. The method of claim 8, comprising at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses.
12. The method of claim 8 , further comprising determining that an initial write share percentage is equal to the base write share percentage.
13. 13. The method of claim 8, further comprising determining an adjusted worker write share percentage to be a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage.
14. 13. The method of claim 8, further comprising determining an adjusted worker read share percentage to be a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage.
15. 1. A computer program comprising computer-executable instructions that, when executed by a processor, cause the processor to perform a method for recovering worker shares from read priorities, the method comprising: determining that read access to a storage device is prioritized over write access to said storage device; While read access to the storage device is prioritized over write access to the storage device: determining a first count of read accesses to the storage device; performing at least one of: (i) a first adjustment of a base read share percentage to a first adjusted read share percentage for read accesses to the storage device based on the first count of read accesses; or (ii) a first adjustment of a base write share percentage to a first adjusted write share percentage for write accesses to the storage device based on the first count of read accesses; and controlling read access to the storage device based on the first adjustment; determining that read access to the storage device has priority over write access to the storage device; and After read access to the storage device has been prioritized over write access to the storage device: determining a second count of write accesses to the storage device; performing at least one of: (i) a second adjustment of the first adjusted read share percentage to a second adjusted read share percentage for read accesses to the storage device based on the second count of write accesses; or (ii) a second adjustment of the first adjusted write share percentage to a second adjusted write share percentage for write accesses to the storage device based on the second count of write accesses; and controlling write access to the storage device based on the second adjustment.
1. A computer program comprising:
16. 16. The computer program product of claim 15, wherein at least one of (i) the first adjustment of the base read share percentage to the first adjusted read share percentage for read accesses to the storage device, based on the first count of read accesses; or (ii) the first adjustment of the base write share percentage to the first adjusted write share percentage for write accesses to the storage device, based on the first count of read accesses, comprises at least one of: (i) adjusting the base read share percentage to the first adjusted read share percentage for read accesses to the storage device based on a control parameter raised to the first count of read accesses; or (ii) adjusting the base write share percentage to the first adjusted write share percentage for write accesses to the storage device based on the control parameter raised to the first count of read accesses.
17. 16. The computer program product of claim 15, wherein at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, comprises at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a control parameter raised to a power of the product of a scale factor and the second count of write accesses; or (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on the control parameter raised to a power of the product of the scale factor and the second count of write accesses.
18. at least one of (i) the second adjustment of the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device, based on the second count of write accesses; or (ii) the second adjustment of the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device, based on the second count of write accesses, is: (i) the base read share percentage; and the first adjusted read share percentage divided by a control parameter equal to the product of a scale factor and the second count of write accesses raised to the power 16. The computer program product of claim 15, comprising at least one of: (i) adjusting the first adjusted read share percentage to the second adjusted read share percentage for read accesses to the storage device based on a minimum of: (i) the base read share percentage; and (ii) adjusting the first adjusted write share percentage to the second adjusted write share percentage for write accesses to the storage device based on a minimum of: (i) the base read share percentage; and (ii) the first adjusted read share percentage divided by the control parameter raised to the power of the product of the scale factor and the second count of write accesses.
19. 16. The computer program product of claim 15, the method further comprising determining that an initial write share percentage is equal to the base write share percentage.
20. 20. The computer program product of claim 15, wherein the method further comprises determining an adjusted worker write share percentage to be a base worker write share percentage multiplied by the adjusted write share percentage divided by the base write share percentage.
21. 20. The computer program product of claim 15, wherein the method further comprises determining an adjusted worker read share percentage to be a base worker read share percentage multiplied by the adjusted read share percentage divided by the base read share percentage.