The present application is related to and claims priority under 35 U.S.C. §119(a) to a Indian Patent Application filed in the Indian Patent Office on Sep. 30, 2011 and assigned Serial No. 3398/CHE/2011, the content of which is incorporated herein by reference.
The present disclosure generally relates to data storage devices, and more particularly relates to configuring resources in storage devices.
Storage device such as flash memory is a non-volatile memory that can be electrically erased and re-programmed. Flash memory is typically used in Universal Flash Storage (UFS), Solid State Drive (SSD) cards, memory cards and Universal Serial Bus (USB) flash drives and so on for storage of data. Flash memory devices are one of the most adaptable portable electronic products due to its data non-volatility, low power consumption, small-volume, and non-mechanical structure.
Typically, a storage device comprises a controller and a physical memory for storing data files. The controller comprises firmware, a device manager, a task router, a target port, a plurality of resources (both hardware and software) and a plurality of logical units (also known as partitions). When a storage device is connected to a host device (e.g., mobile phone, smart phone, tablet computer, etc), logical units in the storage device are accessed by different applications running on the host system. Therefore, each logical unit in the storage device needs to process storage specific commands (e.g., inquiry command, report command, read command, write command, etc.) that are issued by the host device. Each logical unit is allocated a set of resources from a common pool of resources for processing the storage specific commands.
Currently, the host device configures fixed set of resources from the common pool of resources to each of the logical units in the storage device. While the resources allocated to the logical units are fixed, load on each of the logical units keeps varying depending on the kind of application accessing each of the logical units. For example, a video player on the host device may be attempting to read a huge amount of data from a particular logical unit while a file downloader on the host device may be attempting to write data to another logical unit simultaneously with the reading process at a slow data rate. The logical unit processing the read commands from the video player may require large number of resources while the logical unit processing write commands from the file downloader may require less number of resources. Thus, the load on both logical units is different and may dynamically vary based on type of application accessing the logical units. This may significantly affect the performance of the storage device and eventually affect the applications running on the host device.
The present disclosure provides a method for dynamically configuring resources in a storage device. In one embodiment, a method includes predicting a load on a logical unit based on a set of parameters and determining a requirement for supplementary resources for processing upcoming storage specific commands associated with the logical unit based on the predicted load. The method also includes identifying type of supplementary resources required for the logical unit. Furthermore, the method includes determining whether there are any unused resources of the identified resource type in a common pool of resources shared between a plurality of logical units, and dynamically configuring the common pool of resources among the plurality of logical units such that the identified unused resources are allocated to the logical unit as supplementary resources for processing the upcoming storage specific commands.
Before undertaking the DETAILED DESCRIPTION OF THE INVENTION below, it may be advantageous to set forth definitions of certain words and phrases used throughout this patent document: the terms “include” and “comprise,” as well as derivatives thereof, mean inclusion without limitation; the term “or,” is inclusive, meaning and/or; the phrases “associated with” and “associated therewith,” as well as derivatives thereof, may mean to include, be included within, interconnect with, contain, be contained within, connect to or with, couple to or with, be communicable with, cooperate with, interleave, juxtapose, be proximate to, be bound to or with, have, have a property of, or the like; and the term “controller” means any device, system or part thereof that controls at least one operation, such a device maybe implemented in hardware, firmware or software, or some combination of at least two of the same. It should be noted that the functionality associated with any particular controller may be centralized or distributed, whether locally or remotely. Definitions for certain words and phrases are provided throughout this patent document, those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior, as well as future uses of such defined words and phrases.
For a more complete understanding of the present disclosure and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings, in which like reference numerals represent like parts:
The drawings described herein are for illustration purposes only and are not intended to limit the scope of the present disclosure in any way.
The present disclosure provides a method for dynamically configuring a storage device. In the following detailed description of the embodiments of the invention, reference is made to the accompanying drawings that form a part hereof, and in which are shown by way of illustration specific embodiments in which the invention may be practiced. These embodiments are described in sufficient detail to enable those skilled in the art to practice the invention, and it is to be understood that other embodiments maybe utilized and that changes maybe made without departing from the scope of the present disclosure. The following detailed description is, therefore, not to be taken in a limiting sense, and the scope of the present disclosure is defined only by the appended claims.
In an exemplary operation, each of the logical units 110A-N is configured for predicting a future load using a set of associated parameters. In some embodiments, each of the logical units 110A-N is configured for predicting the future load based on the principle of spatial locality. The principle of spatial locality is a technique through which type and number of upcoming storage specific commands can be predicted based on the received storage specific commands. For example, a logical unit determines that there are more incoming read commands and predicts that next command that can be received from the host device 102 would be a read command.
If the predicted load is greater than the threshold load, each of logical units 110A-N is configured for sending a request to the device manager 114 for allocating supplementary resources of a specific type (e.g., unified queue, return channel queue, etc.) for processing upcoming storage specific commands. The device manager 114 determines availability of unused resources in the common pool 116 of resources. For example, the logical unit 110A may request the device manager 114 for allocating return channel queue slots based on the predicted load. Accordingly, the device manager 114 checks availability of unused return channel queue slots with the logical units 110B-N. Each of the logical units 110B-N may predict future load based on set of parameters (e.g., commands being processed, number of used return channel queue slots, total number of allocated return channel queue slots) based on the principle of spatial locality and send a response indicating availability/non-availability of unused return channel queue slots to the device manager 114.
If the unused resources of a specific type are available, the device manager 114 re-allocates the unused resources of the specific type to the one or more of the logical units 110A-N and notifies change in configuration of the common pool 116 of resources to the logical units 110A-N. In some embodiments, the device manager 114 notifies the host device 102 regarding request for allocating supplementary resources from one or more of the logical units 110A-N using events. The host device 102 may grant or deny the allocation of supplementary resources to the one or more of the logical units 110A-N. If the host device 102 grants allocation of supplementary resources, the device manager 114 re-allocates the unused resources of the specific type to the one or more of the logical units 110A-N. Accordingly, the host device 102 and the logical units 110A-N can utilize the re-allocated resources for processing storage specific commands.
In an alternate embodiment, the device manager 114 may be configured for dynamically determining unused resources of the specific type in the common pool 116 of resources and allocating the unused resources of the specific type to the one or more of the logical units 110A-N. In this example, the device manager 114 need not check with the logical units 110A-N regarding the availability of unused resources rather keep track of the unused resources available in the common pool 116 of resources so that unused resources of the specific type can be dynamically allocated when needed.
At step 210, a type of supplementary resources required for processing the upcoming storage specific commands by the logical unit 110A is identified. At step 212, it is determined whether there are any unused resources of the identified resources type in a common pool 116 of resources currently shared between the logical units 110A-N. If there are unused resources in the common pool 116 of resources, then at step 214, one or more of the unused resources of the identified resource type that are currently allocated to other logical units 110B-N are re-allocated to the logical unit 110A so that the logical unit 110A processes the upcoming storage specific commands using the re-allocated resources. If there are no unused resources in the common pool 116 of resources, the process 200 is terminated. Upon re-allocating the unused resources to the logical unit 110A, the host device 102 may be notified regarding change in allocation of resources. For example, the host device 102 may be notified when allocation of resources such command queue slots is altered. The host device 102 may accept or reject the re-allocation of unused resources to the logical unit 110A.
At step 216, configuration parameters indicating allocation of resources to the logical units 110A-N are modified. In one exemplary implementation, the configuration parameters stored in a configuration file (e.g., descriptor file or register file) of the storage device 104 is modified. At step 218, change in allocation of common pool 116 of resources is notified to the logical units 110A-N. Accordingly, the logical units 110A-N read the modified configuration parameters from the configuration file and processes current and upcoming storage specific commands using resources as per the modified configuration parameters.
For example, the task router 304 is configured for routing storage specific commands received from the host device 102 via the target port 302 to respective logical units 110A-N. The device servers 310A-N in the logical units 110A-N process the respective storage specific commands and generates a response for the host device 102. The task managers 308A-N and/or the device servers 310A-N in the logical units 110A-N are configured for predicting future load using a set of parameters (e.g., resources being utilized, total number of allocated resources, and storage specific command being processed) based on principle of spatial locality. The task managers 308A-N are configured for dynamically determining whether there is a need for supplementary resources of a specific type for processing upcoming storage specific commands.
If there is a need for supplementary resources, then each of the task managers 308A-N is configured for sending a request for supplementary resources to the device manager 114. The device manager 114 is configured for determining availability of unused resources of the specific type with one or more of the logical units 110A-N. The device manager 114 is also configured for allocating one or more of the unused resources of the specific type from the common pool 116 of resources as supplementary resources to requested logical units 110A-N for processing the upcoming storage specific commands.
The device manager 114 is further configured for updating configuration file 306 indicating allocation of resources to the logical units 110A-N with new configuration parameters. Furthermore, the device manager 114 is configured for notifying the change in the configuration of the common pool 116 of resources to the host device 102 and the logical units 110A-N. Accordingly, the task managers 308A-N in the respective logical units 110A-N are configured for processing upcoming storage specific commands as per the updated configuration of the common pool 116 of resources in the configuration file 306.
It can be noted that, in some embodiments, the task router 304 can also be configured for determining availability of unused resources of the specific type with one or more of the logical units 110A-N upon receiving the request for supplementary from the one or more logical units 110A-N and allocating one or more of the unused resources of the specific type from the common pool 116 of resources to the requested logical units 110A-N.
The present embodiments have been described with reference to specific example embodiments, it will be evident that various modifications and changes may be made to these embodiments without departing from the broader spirit and scope of the various embodiments. Furthermore, the various devices, modules, and the like described herein may be enabled and operated using hardware circuitry, for example, complementary metal oxide semiconductor based logic circuitry, firmware, software and/or any combination of hardware, firmware, and/or software embodied in a machine readable medium. For example, the various electrical structure and methods may be embodied using transistors, logic gates, and electrical circuits, such as application specific integrated circuit.
Although the present disclosure has been described with an exemplary embodiment, various changes and modifications may be suggested to one skilled in the art. It is intended that the present disclosure encompass such changes and modifications as fall within the scope of the appended claims.
Number | Date | Country | Kind |
---|---|---|---|
3398/CHE/2011 | Sep 2011 | IN | national |