Adjustable resource management system
By adjusting the dynamic allocation and release mechanism of resource management modules, the problem of low resource allocation efficiency in the existing technology is solved, and more efficient system performance and resource utilization are achieved, adapting to the complexity and capacity growth of the storage system.
Patent Information
- Application Number
- CN202210734598.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-07-27
- Filing Date
- 2022-06-27
- Publication Date
- 2024-11-26
- Estimated Expiration
- 2042-06-27
AI Technical Summary
The existing system resource allocation method depends on the requester's needs between multiple processes and devices, resulting in low resource allocation and de-allocation efficiency and affecting system performance.
The adjustable resource management module is adopted to determine whether to allow resource allocation requests through resource configuration information and status information, dynamically adjust resource groups and restrictions, and realize intelligent allocation and release of resources.
It improves the efficiency of resource allocation and system performance, reduces the complexity of handshake logic between CPUs, frees up processing resources, supports the use of smaller CPUs, and adapts to the complexity and capacity growth of storage systems.
Smart Images

Figure CN115686820B_ABST
Abstract
Description
Background Art
[0001] System resources (such as buffers or other memory) shared between multiple processes and / or devices are typically allocated and deallocated depending on the needs of the requester. For example, the commands malloc() and free() are used to request memory allocation and release allocated memory, respectively. New resource allocation systems and / or techniques that improve system performance would be desirable. BRIEF DESCRIPTION OF THE DRAWINGS
[0002] Various embodiments of the invention are disclosed in the following detailed description and accompanying drawings.
[0003] Figure 1 is a flow chart illustrating an embodiment of a process for allocating resources in an adjustable manner.
[0004] Figure 2 is a block diagram of an embodiment of a storage system with an adjustable resource management module.
[0005] Figure 3 is a block diagram illustrating an embodiment of an adjustable resource management module.
[0006] Figure 4A Two tables are shown that illustrate embodiments of adjustable resource configuration information for hardware resources and firmware resources, respectively.
[0007] Figure 4B is a diagram illustrating an embodiment of changes in usage type and number of groups.
[0008] Figure 5 is a diagram illustrating an embodiment of resource status information and associated allocation communications.
[0009] Figure 6 is a diagram illustrating an embodiment of a deallocation message originating from a resource.
[0010] Figure 7 is a graph illustrating an embodiment of maximum values associated with adjusted host write usage types.
[0011] Figure 8 is a flow chart illustrating an embodiment of a process for adjusting resource configuration information in response to real-time usage. DETAILED DESCRIPTION
[0012] The present invention may be implemented in a variety of ways, including as a process; an apparatus; a system; a composition of matter; a computer program product embodied on a computer-readable storage medium; and / or a processor, such as a processor configured to execute instructions stored on and / or provided by a memory coupled to the processor. In this specification, these implementations or any other form that the present invention may take may be referred to as techniques. In general, the order of steps of the disclosed processes may be changed within the scope of the present invention. Unless otherwise stated, a component such as a processor or memory described as being configured to perform a task may be implemented as a general component that is temporarily configured to perform a task at a given time, or as a specific component manufactured to perform the task. As used herein, the term "processor" refers to one or more devices, circuits, and / or processing cores that are configured to process data such as computer program instructions.
[0013] A detailed description of one or more embodiments of the present invention is provided below, together with the accompanying drawings that illustrate the principles of the present invention. The present invention is described in conjunction with such embodiments, but the present invention is not limited to any embodiment. The scope of the present invention is limited only by the claims, and the present invention includes many alternatives, modifications and equivalents. In order to provide a thorough understanding of the present invention, many specific details are set forth in the following description. These details are provided for illustrative purposes, and the present invention can be practiced according to the claims without some or all of these specific details. For the purpose of clarity, technical materials known in the technical field related to the present invention are not described in detail to avoid unnecessarily obscuring the present invention.
[0014] Various embodiments of an adjustable resource management system are described herein. In some embodiments, one or more resource requesters (e.g., identified by a type identifier) are grouped, and those grouped resource requesters share a resource pool (e.g., a hardware resource or a firmware resource). In one example, a resource may be a buffer in hardware, and resource requesters that want to use that buffer are grouped together. Groups and associated limits (e.g., maximum or minimum values) may be stored in adjustable resource configuration information. For example, limits may be adjusted on-the-fly (e.g., if some resource requesters are more active than other resource requesters), new groups may be created, resource requesters may be moved to different groups, and so on. The following figure describes one embodiment of an adjustable resource management process performed by a resource management module.
[0015] Figure 11 is a flow chart illustrating an embodiment of a process for allocating resources in an adjustable manner. In some embodiments, the process is performed by a resource management module or a controller therein. In some embodiments, the resource management module is separate from and / or external to a plurality of central processing units (CPUs). In contrast, some other systems may have one or more CPUs responsible for resource management and / or allocation.
[0016] At 100, a resource allocation request is received that includes a usage type identifier and a requested resource amount, wherein the usage type identifier is associated with a group identifier. For example, the requested amount may specify a quantity or amount of desired resources being requested. The type identifier identifies (e.g., uniquely) which process or device (sometimes referred to herein as a (resource) requestor) sent the resource request. In some embodiments, the requested resource is a hardware resource (e.g., a resource in or associated with hardware) or a firmware resource (e.g., a resource in or associated with firmware).
[0017] In this example, resource requesters are grouped into groups of one or more resource requesters, where resource requesters in the same group share a specified amount of a given resource. As will be described in more detail below, in some embodiments, some groups may have only a single resource requester (and therefore do not need to share a resource pool associated with the group), while other groups have multiple resource requesters. Each group is identified (e.g., uniquely) by a group identifier.
[0018] At 102, adjustable resource configuration information is accessed to obtain: (1) a maximum value associated with the usage type identifier, (2) a minimum value associated with the usage type identifier, and (3) a group limit associated with the group identifier. For example, the adjustable resource configuration information may store which resource requesters (e.g., identified by the usage type identifier) are part of which group, the maximum and minimum values for each resource requester, and the group limit for each group.
[0019] At 104, resource status information is accessed. For example, the resource status information may record what resources are currently allocated or not allocated. In some embodiments, the resource status information also records a usage type identifier for each allocated resource.
[0020] At 106, a determination is made whether to grant the resource allocation request based at least in part on the (e.g., usage type) maximum, the (e.g., usage type) minimum, the group limit, and the resource state information. In one example, in order to grant the resource allocation request, the requested amount must neither exceed the (e.g., usage type) maximum nor the group limit, nor violate the minimum for other usage types in the same group. Naturally, there needs to be a sufficient amount of free resources available for allocation. In some embodiments, other factors or considerations are also taken into account (i.e., not exceeding the maximum or group limit is a necessary but not sufficient condition for the request to be granted).
[0021] If the decision is to grant (108), then the resource allocation request is granted at 112. For example, the resource state information is updated to reflect the allocation of the requested resource, and applicable and / or relevant information (e.g., in some embodiments, a type identifier) is stored. A grant communication is sent from the adjustable resource management module to the resource requestor. If not, then the resource allocation request is denied at 110. For example, a denial communication is sent from the adjustable resource management module to the resource requestor.
[0022] Given the implementation in a specific application Figure 1 An example of an adjustable resource management system for a process may be helpful. The following figure depicts one such example system in a storage application.
[0023] Figure 2 is a block diagram illustrating an embodiment of a storage system having an adjustable resource management module. In some embodiments, the adjustable resource management module (200) shown here performs Figure 1 In some embodiments, the adjustable resource management module (200) is implemented at least in part on hardware (e.g., an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a general purpose integrated circuit (e.g., a microcontroller)). In some other embodiments, the adjustable resource management module (200) is implemented at least in part using computer instructions (e.g., a computer program product embodied in a non-transitory computer readable medium, firmware (computer) instructions, etc.).
[0024] In this example, the adjustable resource management module (200) is part of a storage controller (202). The storage controller (202) receives instructions (e.g., read instructions, write instructions, erase instructions, etc.) directed to and / or associated with a storage device (206) from a host (204). In some embodiments, the storage device includes a solid-state storage device (e.g., flash memory).
[0025] The storage controller (202) in this example has firmware resources (208) and hardware resources (210) managed by the adjustable resource management module (200). For example, the adjustable resource management module (200) can receive a resource allocation request for the firmware resources (208) or the hardware resources (210) from any CPU (212a-212b). The adjustable resource management module (200) then executes Figure 1 process to determine whether to grant or deny the request.
[0026] Storage systems tend to grow in storage capacity and complexity. For example, one way to increase the storage capacity of a solid-state storage system is to increase the number of bits stored per cell. Single-level cell (SLC), multi-level cell (MLC), triple-level cell (TLC), and quad-level cell (QLC) configurations store from one (1) bit to four (4) bits per memory cell, respectively. As the number of bits per cell increases, more complex error correction decoders (e.g., low-density parity check (LDPC) decoders) and generally more processing resources are required. This, in turn, may require the storage controller to have multiple CPUs.
[0027] Some previous storage controllers with multiple CPUs perform resource allocation management (e.g., of firmware resources (208) and hardware resources (210)) between the CPUs. To support this, these other storage controllers must perform handshakes between the CPUs to manage resource management. In contrast, the exemplary storage controller (202) shown here offloads resource management from the CPUs (212a-212b) to a centralized location (i.e., an adjustable resource management module (200)), which is smaller and less complex than the handshake logic required when resource management is handled by multiple entities (e.g., multiple CPUs). In addition, some lower-level resource management tasks (e.g., releasing resources, pushing or pulling resources as part of the allocation process, etc.) are offloaded to the adjustable resource management module (200), thereby freeing up processing resources at the CPU and, if desired, allowing less powerful and / or smaller CPUs to be used in the system.
[0028] Briefly return to Figure 1 It should be noted that the adjustable resource management module uses the adjustable resource configuration information (see, for example, Figure 1 102 in step 102) and resource status information (e.g., see Figure 1 The following diagrams describe more detailed examples of these information fragments and illustrate additional benefits associated with the adjustable resource management module (200).
[0029] Figure 3 is a block diagram illustrating an embodiment of an adjustable resource management module. In some embodiments, Figure 2 The adjustable resource management module (200) in is implemented as shown. In this example, the adjustable resource management module (300) includes adjustable resource configuration information (302), resource status information (304) and a controller (306). In some embodiments, the adjustable resource configuration information (302) and / or the resource status information (304) are stored on some memory in the adjustable resource management module (300).
[0030] The adjustable resource configuration information (302) describes any restrictions, such as minimum values (e.g., a guaranteed amount of resources available to a given resource requestor, regardless of what other resource requestors in the group have requested or been granted) or maximum values (e.g., for individual resource requestors or collective groups) of the relevant resources. In some embodiments, one or more resource requestors are grouped together, and any grouped resource requestor must share resources with other resource requestors in the group; this grouping information can be stored in the adjustable resource configuration information (302). As the name implies, any information stored therein is adjustable (e.g., the resource requestors in a given group can change, the number of groups sharing total resources can change, the minimum value can change, the maximum value can change, etc.). In some embodiments, changes to the number of groups can be made (i.e., granted) when the system is in an idle state (i.e., no outstanding resources). In some embodiments, the minimum and maximum values of each type can be changed dynamically (e.g., even if resources have been allocated, but only under some conditions). Some examples of adjustable resource configuration information and changes thereto are described in more detail below.
[0031] The resource status information (304) records or otherwise reflects the current (eg, allocated) status of the resources. In some embodiments, in addition to recording what resources are currently allocated, some additional information associated with the resource requester is stored in the resource status information (eg, a type identifier).
[0032] In order for the adjustable resource management module (300) (or more specifically, the controller (306)) to grant a resource allocation request, a necessary (but not necessarily sufficient) condition is that the resource status information (304) must indicate that there is a sufficient number or amount of available (i.e., unallocated) resources. Furthermore, another necessary (but not necessarily sufficient) condition is that the request will not exceed any individual or group limit (e.g., maximum value) specified in the adjustable resource configuration information (302).
[0033] The following figure describes a more detailed example of the adjustable resource configuration information (302).
[0034] Figure 4ATwo tables are shown that illustrate embodiments of adjustable resource configuration information for hardware resources and firmware resources, respectively. In some embodiments, the adjustable resource management module manages hardware and / or firmware resources, and these tables show two examples of what the adjustable resource configuration information may include.
[0035] The top table (400) shows an example of adjustable resource configuration information for hardware resources. In this example, the managed hardware resources include buffers (in this example, there are 1024 buffer slots, which can be allocated in units of one or more upon request and grant) and RAID bins (in this example, there are 64 RAID bins, which can be allocated in units of one or more upon request and grant).
[0036] In this example, requests for buffer slots come from three resource requestors: Flash Translation Layer (FTL) (see first row (420)), Host Write (see second row (422)), and Host Read (see third row 424). For convenience, the type names (i.e., the names of the resource requestors) are shown in the second column (404) from the left, and their corresponding usage type identifiers (of type_0, type_1, and type_2, respectively) are shown in the leftmost column (402). The terms usage type identifier, type identifier, and resource requestor are used interchangeably herein.
[0037] As shown in the group identifier column (406), all three resource requestors (see rows 420, 422, and 424) are grouped together and have the same group ID of group_0 associated with the buffer. For convenience, the group name is included in the center column (408). The third column from the right (410) shows that there is a limit of 1024 buffer slots available for the buffer group.
[0038] For context, the FTL table stores the mapping of physical to logical addresses, which is stored in a shared buffer and therefore requires allocation of buffer slots. For example, in Figure 2 In , the host (204) uses logical addresses, but the storage device (206) uses physical addresses, and a mapping between the two is maintained. This mapping information is very important, and so in this example, the (eg, guaranteed) minimum and maximum values of the FTL table are the same value.
[0039] The host write (see line 422) is the same as the one from the host (e.g., Figure 2 204). When a host (for example, Figure 2 204) to a storage controller (eg, Figure 2 202) will be stored in the storage device (for example, Figure 2When writing data in 206), the write data is temporarily stored in a shared buffer and a buffer slot can be requested for this purpose. To ensure that no traffic reads or writes are starved, the small buffer pool is set to the minimum value of the host write, in this example, the minimum value is 64.
[0040] The host read (see line 424) is the same as the one from the host (e.g., Figure 2 In some embodiments, the system pre-allocates a buffer for the read request. Once the data is received from the (e.g., flash) storage device (e.g., Figure 2 The read-back data can be stored in a buffer and processed by an error correction code (ECC) engine to correct any bit errors in the read-back data. When the corrected data is sent to the host, the buffer is cleared, thereby completing the read request.
[0041] The fourth row (426) in the top table (400) is associated with a RAID bin (e.g., which holds program crash recovery data), and there is only one resource requestor in the group. For example, a minimum resource request can prevent system deadlock by ensuring that no process that needs to access a resource is stalled due to lack of resources.
[0042] As shown in the top table (400) and the bottom table (450), in some embodiments, resources (e.g., Figure 1 The resource allocation request received at step 100 in step 100 may include one or more of the following: hardware resources, buffers in hardware, RAID slots in hardware, firmware resources, front-end commands in firmware, or back-end commands in firmware.
[0043] The Minimum column (412) shows the minimum (ie, guaranteed) amount of resources guaranteed to a given resource requestor of the system (eg, regardless of what other resource requestors in the group have been allocated).
[0044] The Maximum column (414) shows the maximum amount that a given resource requestor will be granted. In some applications, a maximum resource limit may be desirable because it prevents performance degradation caused by resource monopoly.
[0045] In some embodiments, while the minimum value (412) is a guaranteed value that the system will always adhere to, the maximum value (414) is not a guaranteed amount, but depends on the other resource requestors in the group. For example, if the other resource requestors in the group are relatively inactive, the maximum amount may be allocated or otherwise granted to the resource type of the requested resource. However, if the other resource requestors in the group are active, the system may not be able to allocate the maximum amount to the resource type of the requested resource.
[0046] When considering resource allocation requests, neither the group limit (e.g., in the limit column (410)) nor the individual maximum (e.g., in the maximum column (414)) may be exceeded. Likewise, if the requested amount would prevent the (e.g., guaranteed) minimum value of another usage type identifier from being subsequently granted, then the request is not granted.
[0047] The bottom table (450) shows an example of adjustable resource configuration information for a firmware resource. Like the top table (400), the bottom table (450) has a usage type identifier column (452), a type name column (454), a group identifier column (456), a group name column (458), a (group) limit column (460), a (usage type) minimum value column (462), and a (usage type) maximum value column (464).
[0048] Note that in this example, the group identifiers (406 and 456) are globally unique across the two tables (400 and 450), but the usage type identifiers (402 and 452) are not necessarily unique between groups.
[0049] In this example, the firmware has two interfaces or sides: the front end (for example, Figure 2 host (204)) and backends (e.g., Figure 2 470) and ME Host Split (see row 472). The back-end command group (i.e., Group_3) includes only a single resource requester: BCMD (see row 474).
[0050] In one example of how an adjustable resource management module determines whether to grant a resource allocation request (e.g., Figure 1 In step 106 of FIG. 1 ), in order to grant the resource allocation request, all of the following conditions must be met:
[0051] • The amount of resources requested will not exceed the group limit (410 or 460) for the group (eg, taking into account the resources already allocated to the group as recorded in the allocation state information).
[0052] The requested resource quantity will not exceed the maximum value (414 or 464) for the resource requester (ie, usage type) (eg, taking into account the resources already allocated to the resource requester as recorded in the allocation status information).
[0053] Even after the requested amount of resources is allocated, all minimum values (412 or 462) associated with other resource requestors in the same group may still be satisfied or otherwise met (e.g., taking into account resources already allocated to other resource requestors in the group as recorded in the allocation state information).
[0054] As described in the above examples, in some embodiments, the usage type identifier is associated with the first usage type, and a determination is made as to whether to grant the resource allocation request (e.g., Figure 1 ) includes considering whether allocating the requested amount will prevent a second usage type having the same group identifier as the first usage type from being allocated a second minimum value associated with the second usage type.
[0055] As indicated by their names, resource configuration information (e.g., 400 and 450) is adjustable. In some embodiments, it is expected that a new value will be written to the adjustable resource configuration information that will "break" or otherwise be inconsistent with other values in the group. In some embodiments, the new value is verified or otherwise checked before it is actually written to the adjustable resource configuration information. In one example, if the sum of the minimum values of the group (including the expected new minimum value) will exceed the group limit, the new minimum value is not allowed to be written to the adjustable resource configuration information. For example, by preventing updates, this can communicate to the resource requester that the system cannot comply with the expected new minimum value. Similarly, by verifying that the expected new maximum value does not exceed the group limit, the system can communicate to the resource requester when or if the expected new maximum value can never be complied with.
[0056] As described above, in some embodiments, Figure 1 The process further includes receiving a new value of the adjustable resource configuration information; determining whether the new value will violate a related value in the adjustable resource configuration information; and if it is determined that the new value will violate the related value, discarding the new value without writing the new value into the adjustable resource configuration information.
[0057] Although not shown here, in some embodiments, resources (e.g., buffers) are split between multiple groups, each with one or more usage types. In some applications, system components change, and associated resources change. For example, a firmware upgrade may be performed that changes the number and / or type of available firmware resources (e.g., new resources, increased number of resources, etc.). Alternatively, a module or box (e.g., within a storage controller) is updated, and the type and / or number or resources used by the box change, which changes the demand profile. In some cases, the type of traffic moving through the system changes, which places different demands on firmware and / or hardware resources (e.g., reading back severely degraded data from a storage device with many errors places greater demands on an error correction decoder to correct the errors). In some applications, hardware resources are updated (e.g., the buffer is expanded so that there are more slots). Because of the adjustable nature of the resource allocation system described herein, it can be easier to adapt to such changes in the system.
[0058] As described above, in some embodiments, Figure 1 The process further includes updating the adjustable resource configuration information with the new value, wherein the new value is associated with one or more of: a new resource, an updated version of a (eg, existing) resource, a new usage type, or an updated version of an existing usage type.
[0059] Figure 4B is a diagram illustrating an embodiment of a change in the type of use and the number of groups. In this example, Figure 4A Table 450 is updated to the state shown in Table 480 herein. For the sake of brevity, the usage type identifier column is not shown in the example of Table 480. In this example, a new type is added to Group_2: ME Host Split 2 (482), and for the sake of clarity, ME Host Split ( Figure 4A 472 in the group) is now marked as ME Host Split 1 (484). To accommodate the new usage type in the group, an additional 256 units of the resource have been added to Group_2 (see Limit column 486) and Group_3 has been eliminated (e.g., where the additional 256 units of the resource were taken from the now eliminated Group_3 and given to Group_2). In an example application, such a situation may arise when a firmware solution changes but there are no changes to the hardware.
[0060] The following diagram depicts a more detailed example of resource status information (for example, Figure 3 304 in the above example).
[0061] Figure 55 is a diagram illustrating an embodiment of resource status information and associated allocation communications. In the example shown, table 500 shows an example of resource status information that tracks the status of 2048 units of a particular resource. The resource identifier column (502) includes an identifier for each resource. The allocated column (504) tracks whether a particular resource has been allocated. The type identifier column (506) tracks the type identifier of the resource requestor that has been allocated the resource (e.g., assuming the corresponding allocated field is set to true).
[0062] In this example, the type identifier (506) is stored in the resource state information (500) so that a mapping between the resource identifier and the type identifier exists and can be used subsequently. For example, consider how resource 0x000 is allocated (see line 508). A resource allocation request (520) is sent by a resource requestor (having a type identifier of type_1) to an adjustable resource management module (not shown). The resource allocation request (520) includes a header (522) identifying the communication as a resource request, a type identifier (524) of the resource requestor, and a group identifier (526) of the group to which the resource requestor belongs. For simplicity, the amount requested (or in some embodiments, a fixed or predefined amount per request) is not shown.
[0063] In response, the adjustable resource management module returns a resource allocation response (540) to the resource requestor. (Assume in this example that the minimum, maximum, and group limit checks have all passed.) The resource allocation response (540) includes a header (542) identifying the communication as a resource allocation response, a resource identifier (544) of the resource(s) being allocated, and a grant boolean value (546) indicating whether the request was granted or denied. The top row (508) in the resource status information (500) is also updated at this time to reflect the allocation of resource 0x000 (column 502) to type identifier type_1 (column 506), and the assigned value (column 504) is set to true.
[0064] When the resource requester no longer requires the allocated resources, a deallocation message (560) is sent to the adjustable resource management module, the deallocation message (560) including a header (562) identifying the communication as a deallocation message, an identifier of the resource being deallocated (564), and a group identifier (566) of the resource requester.
[0065] Note that the deallocation message (560) does not include the type identifier, so that the adjustable resource management module will not be able to update its allocation count of how many resources are currently allocated to each usage type based solely on the information included in the deallocation message (560). However, because the type identifier (524) included in the request (520) was saved in the resource state information (500) when the resource 0x000 was allocated, the adjustable resource management module knows which usage type to decrement the allocation count for. For example, accurate and timely allocation counts are needed to ensure that minimum and / or maximum values are not violated and requests are not rejected unnecessarily.
[0066] As shown in this example, in some embodiments, granting a resource allocation request (e.g., Figure 1 Step 112 in the example includes storing a mapping between a usage type identifier and a resource identifier in the resource state information.
[0067] In some embodiments, the deallocation message (eg, 560) originates from the resource itself, rather than the resource requester who wants to use it. The following figure shows an example of this.
[0068] Figure 6 is a diagram illustrating an embodiment of a deallocation message originating from a resource. In the example shown, a slot in a buffer (604) is desired by a host write, where the write data will eventually be written to a storage device (606). CPU i (600), acting as an intermediary for a host (610) and being one of a plurality of CPUs in a storage controller (608), sends a resource allocation request to an adjustable resource management module (602). In this example, the adjustable resource management module (602) grants the request and returns a resource allocation response to CPU i (600).
[0069] Once the slots in the buffer (604) are allocated, the host (610) sends the host write data to the buffer (604) to be stored in the allocated slots. The storage controller (608) sends the buffered write data from the buffer (604) to the storage device (606). In some cases, there may be other earlier read or write instructions sent to the storage device (606) that need to be executed before the buffered write data can be written to the storage device, and therefore the write may not be completed immediately.
[0070] Once the buffered write data has been successfully written to the storage device (606), a deallocation communication is sent from the buffer (604) to the adjustable resource management module (602) (e.g., directly) so that the allocation slot in the buffer can be released as quickly as possible. In some embodiments, other components besides the resource requester (e.g., hardware or firmware CPU) can send the deallocation request. In contrast, some other resource management systems only receive deallocation communications from the resource requester. However, this delays the deallocation of the buffer and / or less efficient utilization of system resources.
[0071] For simplicity and ease of explanation, in this example, the deallocation communication is shown as originating from the buffer (604); this assumes that the resource (in this example, the buffer) has sufficient state information to know when the deallocation communication is issued (e.g., in this example, the host write data has been successfully transferred to the storage device (606) and the allocated buffer slot can be released). In some applications, the buffer (or other resource) does not know when the resource requester has completed the allocated buffer slot. In some such embodiments, another module or box (such as an intermediate manager or controller, and not the resource requester) that manages or supervises the resources and has the appropriate knowledge or information to know when to issue the deallocation communication generates the deallocation communication and sends it to the adjustable resource management module.
[0072] As shown in this figure, in some embodiments, Figure 1 The process further includes: in response to receiving a deallocation communication from the resource, deallocating the requested amount of resources. As described above, in some embodiments, Figure 1 The process further includes: in response to receiving a deallocation communication from the resource, deallocating the requested amount of the resource and updating an allocation count associated with the usage type identifier, including by accessing a mapping between the resource identifier and the usage type identifier stored in the resource state information (see, for example, stored in Figure 5 The resource status information in (500)).
[0073] Temporarily return to Figure 4A In some embodiments, some information stored in the adjustable resource configuration information is changed. The following figure describes an example of how the adjustable resource management module responds to or otherwise handles such a change.
[0074] Figure 7is a graph illustrating an embodiment of maximum values associated with an adjusted host write usage type. In this example, both the maximum value (700) of host writes and the allocation quantity (702) are shown. At the beginning of the graph (e.g., before time t0 (704)), host writes are allocated a maximum value (e.g., of buffer slots) of 512, and therefore both the maximum value (700) and the allocation quantity (702) are 512.
[0075] At time t0 (704), the maximum value (700) is reduced from 512 to 256. In this example, the already allocated resources are "grandfathered in." That is, the host is allowed to write to retain its 512 allocated buffer slots, even though after time t0 (704), the allocated number (702) of 512 exceeds the current maximum value (700) of 256. This may be desirable in certain applications because it allows the resource requester to complete its process and / or use of the allocated resources without any interruption.
[0076] At time t1 (706), the resource requester no longer requires the allocated resources and a deallocation occurs, thereby reducing the allocation quantity (702) from 512 to zero.
[0077] At time t2 (708), the resource requester desires 512 buffer slots and requests that amount. However, because the requested amount is greater than the current maximum of 256, the request is denied.
[0078] As shown in this example, in some embodiments, Figure 1 The process further includes: after granting the resource allocation request, updating the maximum value in the adjustable resource configuration information with a new maximum value that is strictly smaller than the requested amount, wherein the requested resource amount continues to be granted even after the adjustable resource configuration information is updated with the new maximum value.
[0079] In some embodiments, resource usage is monitored and resource configuration information is adjusted in real time to suit current usage patterns or traffic. The following figure describes an example process in this regard.
[0080] Figure 8 is a flow chart illustrating an embodiment of a process for adjusting resource configuration information in response to real-time usage. In some embodiments, the process is performed by Figure 2 In some embodiments, the CPU (212a-212b) is executed. Figure 1 The process is performed by combining the processes of
[0081] At 800, a first allocation amount associated with a first usage type identifier and a second allocation amount associated with a second usage type identifier are monitored, wherein the first usage type identifier and the second usage type identifier are associated with the same group identifier. For example, assuming that the system is a storage system (e.g., see Figure 2 ), and the first usage type identifier is associated with writing to the storage device (eg, a host), and the second usage type identifier is associated with reading from the storage device (eg, a host).
[0082] At 802, it is determined whether the first allocation satisfies a low activity test and whether the second allocation satisfies a high activity test. For example, resource status information (e.g., Figure 5 500 in ) to determine the amount of resources currently allocated to a particular usage type identifier. In some embodiments, a first allocation (e.g., the number of allocated buffer slots) satisfies the low activity test if it is less than a threshold (e.g., usage is less than 10% or 5% of the maximum for the usage type). Similarly, a second allocation may satisfy a high activity test if it is greater than a threshold (e.g., usage is more than 90% or 95% of the maximum for the usage type). In some embodiments, the low activity test and / or the high activity test takes into account allocations within a time window.
[0083] If at least one of the tests is not satisfied (804), monitoring (800) is continued. If both tests are satisfied (804), a first maximum value setting associated with the first usage type identifier is decreased at 806, and a second maximum value setting associated with the second usage type identifier is increased at 808. In other words, the adjustment of the first maximum value setting and the second maximum value setting is performed such that the minimum value of the group is not violated, and also such that the sum of the new maximum values of the usage types does not exceed the maximum value of the group.
[0084] For example, suppose Figure 2 The storage system shown in FIG. 1 switches to a state or mode in which the host ( 204 ) reads a large amount of information from the storage device ( 206 ) and is performing a small amount of writing or no writing. Figure 4A As shown in the example of (see table 400), host writes (422) may be in the same group as host reads (424) and therefore share a buffer slot. During periods of heavy reads and light writes, it may be desirable to increase the maximum value of pre-reads and decrease the maximum value of host writes because the system is doing too many reads and too few writes (or vice versa). Naturally, if traffic and / or usage patterns subsequently change, the resource configuration information may be adjusted again using the real-time information.
[0085] Although the foregoing embodiments have been described in some detail for the purpose of clarity of understanding, the invention is not limited to the details provided. There are many alternative ways to implement the invention. The disclosed embodiments are illustrative and not restrictive.
Claims
1. An adjustable resource management system, comprising: A controller configured to: receiving a resource allocation request, the resource allocation request comprising a usage type identifier and a requested amount of a resource, wherein the usage type identifier is associated with a group identifier; accessing the adjustable resource configuration information to obtain: (1) a maximum value associated with the usage type identifier, (2) a minimum value associated with the usage type identifier, and (3) a group limit associated with the group identifier; Access resource status information; determining whether to grant a resource allocation request based at least in part on the maximum value, the minimum value, the group limit, and the resource status information; If it is determined that the resource allocation request is allowed, allowing the resource allocation request; and If it is determined that the resource allocation request is not permitted, rejecting the resource allocation request; and A memory is configured to store adjustable resource configuration information and resource status information, wherein: The usage type identifier is associated with the first usage type; and Determining whether to grant the resource allocation request includes considering whether allocating the requested amount would prevent a second usage type having the same group identifier as the first usage type from being allocated a second minimum value associated with the second usage type.
2. The adjustable resource management system according to claim 1, wherein: The adjustable resource management system is implemented at least in part using one or more of: an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a general purpose integrated circuit.
3. The adjustable resource management system according to claim 1, wherein: The resource includes one or more of the following: hardware resources, buffers in hardware, RAID slots in hardware, firmware resources, front-end commands in firmware, or back-end commands in firmware.
4. The adjustable resource management system according to claim 1, wherein: The controller is further configured to: Receive new values of adjustable resource configuration information; determining whether the new value will violate a related value in the adjustable resource configuration information; and In the event that it is determined that the new value will violate the dependent value, the new value is discarded without writing the new value to the adjustable resource configuration information.
5. The adjustable resource management system according to claim 1, wherein: The controller is further configured to update the adjustable resource configuration information with a new value, wherein the new value is associated with one or more of: a new resource, an updated version of a resource, a new usage type, or an updated version of an existing usage type.
6. The adjustable resource management system according to claim 1, wherein: Granting the resource allocation request includes storing a mapping between the usage type identifier and the resource identifier in the resource state information.
7. The adjustable resource management system according to claim 1, wherein: The controller is further configured to, in response to receiving a deallocation communication from the resource, deallocate the requested amount of resources.
8. The adjustable resource management system according to claim 1, wherein: The controller is further configured to: In response to receiving a deallocation communication from the resource, deallocating the requested amount of resources; and An allocation count associated with the usage type identifier is updated, including by accessing a mapping between the resource identifier and the usage type identifier stored in the resource state information.
9. The adjustable resource management system according to claim 1, wherein: The controller is further configured to, after granting the resource allocation request, update a maximum value in the adjustable resource configuration information with a new maximum value that is strictly smaller than the requested amount, wherein the requested resource amount continues to be granted even after the adjustable resource configuration information is updated with the new maximum value.
10. An adjustable resource management system, comprising: A controller configured to: receiving a resource allocation request, the resource allocation request comprising a usage type identifier and a requested amount of a resource, wherein the usage type identifier is associated with a group identifier; accessing the adjustable resource configuration information to obtain: (1) a maximum value associated with the usage type identifier, (2) a minimum value associated with the usage type identifier, and (3) a group limit associated with the group identifier; Access resource status information; determining whether to grant a resource allocation request based at least in part on the maximum value, the minimum value, the group limit, and the resource status information; If it is determined that the resource allocation request is allowed, allowing the resource allocation request; and If it is determined that the resource allocation request is not permitted, rejecting the resource allocation request; and A memory configured to store adjustable resource configuration information and resource status information, Wherein, the controller is further configured as follows: monitoring a first allocated amount associated with a first usage type identifier and a second allocated amount associated with a second usage type identifier, wherein the first usage type identifier and the second usage type identifier are associated with a same group identifier; determining whether the first allocated amount satisfies a low activity test and whether the second allocated amount satisfies a high activity test; and When both the low activity test and the high activity test are satisfied: decreasing a first maximum value setting associated with the first usage type identifier; and A second maximum value setting associated with the second usage type identifier is increased.
11. A method comprising: receiving a resource allocation request including a usage type identifier and a requested amount of a resource, wherein the usage type identifier is associated with the group identifier; accessing the adjustable resource configuration information to obtain: (1) a maximum value associated with the usage type identifier, (2) a minimum value associated with the usage type identifier, and (3) a group limit associated with the group identifier; Access resource status information; determining whether to grant a resource allocation request based at least in part on the maximum value, the minimum value, the group limit, and the resource status information; If it is determined that the resource allocation request is allowed, allowing the resource allocation request; and If it is determined that the resource allocation request is not permitted, the resource allocation request is rejected, wherein: The usage type identifier is associated with the first usage type; and Determining whether to grant the resource allocation request includes considering whether allocating the requested amount would prevent a second usage type having the same group identifier as the first usage type from being allocated a second minimum value associated with the second usage type.
12. The method according to claim 11, wherein: The method is performed at least in part using one or more of: an application specific integrated circuit (ASIC), a field programmable gate array (FPGA), or a general purpose integrated circuit.
13. The method according to claim 11, wherein: The resource includes one or more of the following: hardware resources, buffers in hardware, RAID slots in hardware, firmware resources, front-end commands in firmware, or back-end commands in firmware.
14. The method according to claim 11, further comprising: Receive new values of adjustable resource configuration information; determining whether the new value will violate a related value in the adjustable resource configuration information; and In the event that it is determined that the new value will violate the dependent value, the new value is discarded without writing the new value to the adjustable resource configuration information.
15. The method according to claim 11, wherein: Granting the resource allocation request includes storing a mapping between the usage type identifier and the resource identifier in the resource state information.
16. The method according to claim 11, further comprising: in response to receiving a deallocation communication from the resource, deallocating the requested amount of the resource; and An allocation count associated with the usage type identifier is updated, including by accessing a mapping between the resource identifier and the usage type identifier stored in the resource state information.
17. The method according to claim 11, further comprising: After granting the resource allocation request, the maximum value in the adjustable resource configuration information is updated with a new maximum value that is strictly smaller than the requested amount, wherein the requested resource amount continues to be granted even after the adjustable resource configuration information is updated with the new maximum value.
18. The method according to claim 11, further comprising: monitoring a first allocated amount associated with a first usage type identifier and a second allocated amount associated with a second usage type identifier, wherein the first usage type identifier and the second usage type identifier are associated with a same group identifier; determining whether the first allocated amount satisfies a low activity test and whether the second allocated amount satisfies a high activity test; and When both the low activity test and the high activity test are satisfied: decreasing a first maximum value setting associated with the first usage type identifier; and A second maximum value setting associated with the second usage type identifier is increased.
