Techniques for preserving the expected life of non-volatile memory
By establishing a write budget for applications in computing devices and controlling the write requests of SSDs, the SSD wear problem is solved, extending its life expectancy, and improving the reliability of storage devices.
Patent Information
- Application Number
- CN201980034193.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2018-09-19
- Filing Date
- 2019-04-11
- Publication Date
- 2024-11-19
- Estimated Expiration
- 2039-04-11
AI Technical Summary
Solid-state drives (SSDs) allow only a limited number of data writes before their overall reliability decreases, resulting in a shorter life expectancy, especially due to double write requests caused by an increase in applications, resulting in wear.
Receive metrics associated with the SSD through the computing device, establish a write budget for each application, and determine whether to issue a write request or take countermeasures such as notifying the user or delaying the write request to control the wear of the SSD Rate.
Effectively extend the expected life of the SSD, avoid wear caused by write amplification, and improve the reliability and service life of the storage device.
Smart Images

Figure CN112204514B_ABST
Abstract
Description
Technical Field
[0001] The embodiments describe techniques for preserving the expected life of a non-volatile memory (e.g., a solid-state drive (SSD)) communicatively coupled to a computing device. Specifically, the techniques involve establishing a write budget for an application to control the wear rate on the non-volatile memory based on the current health and expected life of the non-volatile memory. Background Art
[0002] A solid-state drive (SSD) is a type of storage device that shares a similar physical footprint with a conventional magnetic-based hard disk drive (HDD) (and provides similar functionality to a conventional magnetic-based HDD). It is noteworthy that a standard SSD utilizing "flash" non-volatile memory can provide various advantages over a standard HDD, such as significantly faster input / output (I / O) performance. For example, the average I / O latency speed provided by an SSD is generally better than that of an HDD because the I / O latency speed of an SSD is less affected when data is segmented across the entire storage block of the SSD. This is because the HDD includes a read head component that must be repositioned each time data is read / written, which creates a latency bottleneck when the average continuity of the written data decreases over time. In addition, when segmentation occurs within the HDD, it is necessary to perform a resource-intensive reorganization operation to improve or restore performance. In contrast, an SSD that is not limited by a read head component can retain I / O performance even if the level of data segmentation increases. SSDs also provide the benefit of increased shock resistance (because there are no moving parts), and generally speaking, are virtually unlimited form factor potential. These advantages, combined with the increased availability of SSDs at affordable prices to consumers, have made SSDs the preferred choice for mobile devices such as laptops, tablets, and smartphones.
[0003] Despite the benefits provided by SSDs, there are still some shortcomings that have not been addressed, including a phenomenon commonly referred to as "SSD wear," which affects the overall life of the SSD. Specifically, it is well known that the storage blocks of an SSD only allow data to be written to them a threshold number of times before their overall reliability begins to degrade. Unfortunately, the nature of SSD operations and the way they are used result in an increasing average number of write requests issued to the SSD, thereby compromising its expected life. For example, the average number of applications installed on a computing device increases over time, which directly leads to an increase in the number of write requests issued to the computing device's SSD. In addition, such write requests are typically multiplied in size due to write amplification, which is due to the SSD requiring that all pages within a given block be completely erased before new data is written to one or more pages. Specifically, when existing data within the page to be erased needs to be retained within the SSD, additional write commands are required to migrate the existing data to a new storage area within the SSD, exacerbating these problems.
[0004] Therefore, what is needed is a method for preserving the life expectancy of a non-volatile memory communicatively coupled to a computing device. Summary of the invention
[0005] One embodiment describes a method for preserving the expected life of a non-volatile memory that is communicatively coupled to a computing device. According to some embodiments, the method can be implemented by a computing device and includes the following steps: (1) receiving metrics associated with the non-volatile memory, (2) for each of a plurality of applications associated with the computing device: establishing a corresponding write budget for the application based on the metrics. According to some embodiments, the corresponding write budget for each application can also be based on a count of the plurality of applications. Additionally, the method can also include the following steps: (3) receiving a write request directed to the non-volatile memory from one of the plurality of applications, and (4) in response to determining that the write request does not violate the corresponding write budget of the application: issuing a write request to the non-volatile memory.
[0006] Other embodiments include a non-transitory computer-readable storage medium configured to store instructions that, when executed by a processor included in a computing device, cause the computing device to perform the steps of any of the above methods. Additional embodiments include a computing device configured to perform various steps of any of the above methods.
[0007] Other aspects and advantages of the embodiments described herein will become apparent from the following detailed description taken in conjunction with the accompanying drawings which illustrate by way of example the principles of the embodiments. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The included drawings are for illustrative purposes and are only used to provide examples of possible structures and arrangements of the disclosed apparatus and methods for providing wireless computing devices. These drawings in no way limit any changes in form and detail that may be made to the embodiments by those skilled in the art without departing from the spirit and scope of the embodiments. The embodiments will be readily understood by the following detailed description in conjunction with the accompanying drawings, in which like reference numerals refer to like structural elements.
[0009] Figure 1 A block diagram of a computing device that can be configured to implement the various techniques described herein is shown, according to some embodiments.
[0010] Figure 2 According to some embodiments, Figure 1 The components of a computing device are shown as a block diagram to provide additional context.
[0011] Figure 3 A method for generating write budgets for multiple applications according to some embodiments is shown.
[0012] Figure 4 A method for processing a write request issued by an application according to a write budget corresponding to the application is shown according to some embodiments.
[0013] Figure 5 A detailed view of a computing device that can be used to implement the various components described herein is shown according to some embodiments. DETAILED DESCRIPTION
[0014] Representative applications of the apparatus and methods according to the embodiments described in the present invention are provided in this section. These examples are provided only to add context and to help understand the described embodiments. It will therefore be apparent to those skilled in the art that the embodiments currently described may be practiced without some or all of these specific details. In other instances, well-known process steps are not described in detail to avoid unnecessarily obscuring the embodiments currently described. Other applications are possible, so that the following examples should not be considered restrictive.
[0015] The embodiments describe techniques for preserving the expected life of a non-volatile memory (e.g., a solid-state drive (SSD)) communicatively coupled to a computing device. According to some embodiments, the techniques may be implemented by a computing device and include the following steps: (1) receiving metrics associated with the non-volatile memory. According to some embodiments, the metrics may include at least one of the following attributes associated with the non-volatile memory: write cycle information, program / erase (PE) cycle information, write amplification information, bad block information, over-provisioning information, storage capacity information, configuration type information, event information, or age information.
[0016] Subsequently, the aforementioned metrics can be used to establish write budgets for multiple applications associated with the computing device. For example, the technology may also include the following steps: (2) for each of the multiple applications associated with the computing device: establish a corresponding write budget for the application based on these metrics. According to some embodiments, the corresponding write budget of each application may also be based on a count of multiple applications. In addition, the technology may also include the following steps: (3) receiving a write request directed to a non-volatile memory from one of the multiple applications, and (4) determining whether the write request violates the corresponding write budget of the application. Specifically, when the corresponding write budget of the application is not violated, the computing device may issue a write request to the non-volatile memory. Alternatively, when the corresponding write budget of the application is violated, the computing device may perform various countermeasures, including, for example, (i) providing notification to a user of the computing device and / or a developer of the application, (ii) delaying the issuance of a write request to the non-volatile memory, (iii) terminating the application, etc.
[0017] A more detailed discussion of these techniques is set forth below and described in conjunction with the accompanying figures, which show detailed illustrations of systems and methods that can be used to implement these techniques.
[0018] Figure 1 A block diagram 100 of a computing device 102 (e.g., a smart phone, a tablet computer, a laptop computer, a desktop computer, a server, etc.) is shown, which can be configured to implement the various techniques described herein. It should be understood that for simplicity, Figure 1 The various hardware components of computing device 102 shown in FIG. 1 are presented at a high level and are described below in conjunction with Figure 5A more detailed breakdown is provided. It should also be understood that the computing device 102 may include additional entities capable of implementing the various techniques described herein without departing from the scope of the present disclosure. It should also be understood that the entities described herein may be combined or split into additional entities without departing from the scope of the present disclosure. It should also be understood that the various entities described herein may be implemented using software-based or hardware-based approaches without departing from the scope of the present disclosure.
[0019] like Figure 1 As shown, the computing device 102 may include a processor 104, which in combination with a volatile memory 106 (e.g., dynamic random access memory (DRAM)) and a storage device 118 (e.g., a solid state drive (SSD), etc.) enables different software entities to be executed on the computing device 102. For example, the processor 104 may be configured to load various components of an operating system (OS) 108 into the volatile memory 106, and the OS is stored in a non-volatile memory 122 of the storage device 118 through firmware 120 executed on the storage device 118. In turn, the OS 108 may enable the computing device 102 to provide various available functions, such as loading / executing various software entities. Such entities may include, for example, one or more applications 110, a file system 112, a storage driver 114, and a budget engine 116. According to some embodiments, the application 110 may represent any application configured to execute within the OS 108, such as a system daemon, a user application, etc., wherein each application 110 is associated with a corresponding unique application identifier (ID) 111.
[0020] According to some embodiments, and as Figure 2 As shown in block diagram 200 of FIG. 1 , storage driver 114 may be configured to interact with budget engine 116, which generates write budget 117 for application 110. A preliminary step in generating write budget 117 may involve storage driver 114 receiving the latest operating information associated with storage device 118. Figure 2 As shown, such operational information is represented by a set of metrics 202 associated with the storage device 118, and may include write cycle information 204, program / erase (PE) cycle information 206, write amplification information 208, bad block information 210, over-provisioning information 212, storage capacity information 214, configuration type information 216, event information 218, and age information 220. According to some embodiments, the metrics 202 may be maintained by firmware 120 that controls the overall operation of the storage device 118. Additionally, the metrics may be maintained by the storage driver 114—e.g., the metrics 202 may be programmed into the storage driver 114 when the storage device 118 is added to the computing device 102, and updated by the storage driver 114 throughout the operation of the storage device 118.
[0021] In short, it is noted that, without departing from the scope of the present disclosure, each metric 202 may represent a set of values. For example, the write cycle information 204 may include information about: (1) write requests received by the firmware 120, (2) supplemental write requests issued by the firmware 120 to execute the write requests (e.g., due to write amplification), (3) an estimated number of write requests that the non-volatile memory 122 can reliably process before experiencing degradation, etc. It is noted that the aforementioned values are exemplary and not intended to be limiting. In addition, for a given metric 202, without departing from the scope of the present disclosure, each value in the value set may cover a subset of values representing various aspects of values within different time periods. For example, the above values (1) and (2) of the write cycle information 204 may include values in hours, days, weeks, months, etc. It is noted that the aforementioned time periods are exemplary and not intended to be limiting. Additionally, for a given metric 202, the budget engine 116 may use any method to analyze all of the above values to calculate values to effectively establish write budgets 117 that will maximize the availability of the non-volatile memory 122 while preserving its life. For example, the budget engine 116 may be configured to average values together, apply weights to different values, place values in variables of a formula, etc. It is noted that the foregoing calculations are exemplary and not intended to be limiting. Therefore, it should be understood that the foregoing concepts can be applied to any metric 202 at any level of granularity without departing from the scope of the present disclosure.
[0022] According to some embodiments, the write cycle information 204 may identify write requests that have been processed by the storage device 118. As described above, the write cycle information 204 may represent many aspects associated with the amount of write requests processed by the firmware 120. For example, the write cycle information 204 may cover additional write requests that were processed by the storage device 118 due to write amplification that occurred when processing incoming write requests. Similarly, write amplification may occur due to the fact that all pages within a given block of the non-volatile memory 122 must be completely erased before new data can be written to one or more pages. Notably, and according to some embodiments, such erasures may be quantified and represented by the PE cycle information 206 to further supplement the write cycle information 204. When existing data within the to-be-erased pages needs to be retained within the non-volatile memory 122, additional write requests may be required to migrate the existing data to a new storage area within the non-volatile memory 122, and these additional write requests may be added to the write cycle information 204. In this regard, in order to estimate the overall health of the non-volatile memory 122, the write cycle information 204 / PE cycle information 206 may be compared to a known number of operations that the storage device 118 is expected to process without issuing, for example, a maximum write cycle capacity. Then, the budget engine 116 may take the overall health into account when generating a write budget 117 for the application 110. For example, when the non-volatile memory 122 is in a poor health state during a time when it is expected to be in a good or excellent health state, the budget engine 116 may generate write budgets 117 that effectively reduce the number of write requests issued by the application 110 in an attempt to achieve the expected life of the non-volatile memory 122.
[0023] As described above, write amplification behavior can significantly affect the write cycle information 204 and the PE cycle information 206. Therefore, the write amplification information 208 can represent the average amplification factor observed by the firmware 120 when processing write requests. For example, on average, when each write request requires three additional write requests to be executed (due to write amplification), the write amplification information 208 can take a value of three. In this regard, the write amplification information 208 can affect the manner in which the budget engine 116 predicts the degradation rate of the non-volatile memory 122. For example, when the write amplification information 208 indicates a high value within a given time period, the budget engine 116 can reduce the write budget 117 to help reduce the wear of the non-volatile memory 122, which would otherwise occur if the write requests were not reduced. In a comparative example, when the write amplification information indicates a low value within a given time period, the budget engine 116 can increase the write budget 117 to enable the non-volatile memory 122 to be used at a higher rate while minimizing the impact on its expected life.
[0024] According to some embodiments, the bad block information 210 may describe an area of the non-volatile memory 122 that has been identified as unreliable by the firmware 120. This may be caused, for example, by manufacturing defects, excessive wear due to poor write distribution, physical impact, etc. In this regard, the bad block information 210 may represent the amount of storage capacity associated with the non-volatile memory 122 that is no longer available. In addition, the over-provisioning information 212 may indicate an area / size of the non-volatile memory 122 that has been reserved for use outside the normal operation of the computing device 102. Specifically, it is important that the storage device 118 has a reserved area of internal memory to ensure that the storage device 118 can remain able to perform data migration that typically occurs due to write amplification. In some cases, SSD manufacturers reserve a fixed area of internal memory before distributing their SSDs to customers. Alternatively, the operating system (OS) on which the SSD is placed on the computing device may, for example, reserve a fixed area of memory during formatting / OS installation. In light of the foregoing, the budget engine 116 may be configured to subtract the amount of storage capacity represented by the bad block information 210 (and the over-provisioning information 212) to identify the actual amount of available storage within the non-volatile memory 122, which may be represented by the storage capacity information 214. In this manner, the budget engine 116 may take the storage capacity information 214 into account when generating the write budget 117. For example, when the storage capacity information 214 indicates a low overall consumption of available storage space within the non-volatile memory 122, the budget engine 116 may increase the write budget 117. Specifically, because a large amount of available storage space may enable future write requests to be widely distributed throughout the non-volatile memory 122, the write budget 117 may be increased, thereby reducing the overall wear on a particular area of the non-volatile memory 122 that may otherwise occur.
[0025] Additionally, the configuration type information 216 may indicate various physical and operational aspects associated with the storage device 118 that affect its expected lifespan. According to some embodiments, the configuration type information 216 may identify the underlying physical aspects of the non-volatile memory 122, such as whether the non-volatile memory 122 is formed using NOR flash memory, NAND flash memory, etc. Additionally, the configuration type information 216 may indicate the configuration of the underlying physical aspects of the non-volatile memory 122, such as whether the non-volatile memory 122 is a single-level cell, a multi-level cell, a triple-level cell, a quad-level cell, etc. Additionally, the configuration type information 216 may indicate other operational aspects associated with the non-volatile memory 122, such as the voltage at which the non-volatile memory 122 operates, the frequency at which the non-volatile memory 122 operates, etc. According to some embodiments, the configuration type information 216 may be used by the budget engine 116 to calculate the expected lifespan of the non-volatile memory 122. For example, when the configuration type information 216 indicates that the non-volatile memory 122 is composed of NAND flash memory in a four-level cell configuration, the budget engine 116 can reduce the write budget 117 because the known lifetime of this configuration has a higher wear rate (compared to three-level cells, multi-level cells, and single-level cells). In a comparative example, when the configuration type information 216 indicates that the non-volatile memory 122 is composed of NAND flash memory in a single-level cell configuration, the budget engine 116 can increase the write budget 117, and this configuration has the lowest known wear rate.
[0026] In addition, event information 218 may represent various events that occur throughout the operation of storage device 118 that may affect its expected lifespan. For example, event information 218 may include a voltage surge event that may potentially damage the physical integrity of non-volatile memory 122. For another example, event information 218 may include a physical impact event that may potentially damage the physical integrity of non-volatile memory 122 (e.g., when computing device 102 is dropped). In yet another example, event information 218 may include a temperature change event that may potentially damage the physical integrity of non-volatile memory 122 (e.g., when computing device 102 is placed in an extremely cold or hot environment). In another example, event information 218 may include a humidity change event that may potentially damage the physical integrity of non-volatile memory 122 (e.g., when computing device 102 is exposed to liquid). It should be noted that the foregoing examples are not intended to be limiting, and event information 218 may cover any internal or external events that may potentially affect the expected lifespan of storage device 118. Additionally, it is noted that the computing device 102 may be configured to incorporate any components that enable the aforementioned events to be detected ( Figure 1218), such as a voltage sensor, a temperature sensor, an accelerometer, a humidity sensor, etc. In this way, the budget engine 116 can consider the impact of the event information 218 when generating the write budget 117. For example, the budget engine 116 can be configured to reduce the write budget 117 when the event information 218 indicates that a number of damage events (e.g., multiple drops, water damage, etc.) have occurred that may have reduced the expected life of the storage device 118.
[0027] Additionally, the age information 220 may represent various time aspects associated with the storage device 118 that may potentially affect its life expectancy. For example, the age information 220 may include the date of manufacture of the non-volatile memory 122, the total runtime of the non-volatile memory 122, the number of power cycles applied to the non-volatile memory 122, and the like. In this way, the budget engine 116 may further estimate the life expectancy of the non-volatile memory 122. For example, when the storage device 118 is older relative to its date of manufacture, but has a low total runtime / power cycle count, the budget engine 116 may ignore the older age of the storage device 118, which may otherwise erroneously indicate poor overall health. For another example, when the storage device 118 is younger relative to its date of manufacture, but has a high total runtime / power cycle count, the budget engine 116 may ignore the younger age of the storage device 118, which may otherwise erroneously indicate excellent overall health.
[0028] Please note that Figure 2 The various metrics 202 shown in and described above are not intended to represent an exhaustive list of information that may be analyzed by the budget engine 116 in generating the write budget 117. Rather, the budget engine 116 may be configured to analyze any available information associated with any physical, behavioral, operational, etc., aspects of the operation of the computing device 102 itself, the operation of the storage device 118 itself, and the like. In any case, the metrics 202 may be provided by the storage driver 114 to the budget engine 116, where the budget engine 116, in turn, establishes a corresponding write budget 117 for each of the applications 110. For example, the budget engine 116 may maintain, for each application 110, an entry that identifies: (1) a corresponding application ID 111 associated with the application 110 and (2) a corresponding write budget 117 generated for the application 110. Note that additional information may be included in the Figure 2 For example, without departing from the scope of the present disclosure, the budget engine 116 can maintain any information related to maintaining the corresponding write budget 117 for each application 110, such as the time when the corresponding write budget 117 was generated, the value used for the previously generated write budget 117, etc. In this regard, the budget engine 116 can selectively identify the write budget 117 that should be updated.
[0029] According to some embodiments, budget engine 116 may identify the number of applications 110 associated with computing device 102 and take that number into account when generating write budget 117. For example, when budget engine 116 identifies that only a single application 110 is associated with computing device 102 (e.g., an application 110 installed locally on computing device 102, or an application 110 executing on another computing device but accessing storage device 118 via computing device 102), budget engine 116 may provide a write budget 117 that takes into account all write requests that can be safely issued within a time frame corresponding to write budget 117. In contrast, when multiple applications 110 are associated with computing device 102, budget engine 116 may provide write budgets 117 that evenly split the number of write requests that can be safely issued within an expected time frame corresponding to write budget 117.
[0030] Additionally, it is noted that applications 110 may be associated with different priorities that affect the manner in which the budget engine 116 allocates the number of write requests that can be safely issued within the expected time frame corresponding to the write budget 117. For example, a high priority application 110 (e.g., a foreground application 110 that is frequently accessed by a user) may be assigned a high priority, while a low priority application 110 (e.g., a background application 110 that is infrequently accessed by a user) may be assigned a low priority. In this regard, when the budget engine 116 is generating a write budget 117 for an application 110, the priority of a given application 110 may be used as a weight. Additionally, some applications 110 (e.g., daemons of the OS 108 that control the overall operation of the computing device 102) may be exempted from operating under the requirements of the write budget 117 because such write budgets 117 may impair the ability of the user to interact with the computing device 102 in an intended manner. To implement the exemption, the storage driver 114 / budget engine 116 may be configured to identify applications 110 that are marked as exempt and ignore such applications 110 when generating and implementing the write budget 117.
[0031] With the write budget 117 established, the storage driver 114 can effectively control the manner in which write requests issued by the applications 110 are handled while the computing device 102 is operating. For example, some applications 110 can access their respective write budgets 117 through application programming interface (API) calls that coincide with the framework implemented by the storage driver 114 to make the write budget 117 available. In this way, the applications 110 can optionally self-regulate the number of write requests they issue based on the current state of their respective write budgets 117, with the intention of staying within their write budgets 117. In addition, the applications 110 can remain unaware of their respective write budgets 117, such that these applications rely on being notified by the storage driver 114 only when their write budgets 117 are approaching or have reached exhaustion. In either case, the write budget 117 can help preserve the expected life of the storage device 118, thereby enhancing the overall user experience.
[0032] According to some embodiments, various methods may be used when a given application 110 approaches or violates its corresponding write budget 117. According to some embodiments, these methods may include: providing notification to a user of the computing device 102 and / or a developer of the application 110, delaying the issuance of a write request issued by the application 110 to the non-volatile memory 122, terminating the application 110, etc. It is noted that the foregoing methods are not intended to represent an exhaustive list of responsive behaviors that may be implemented when a write budget 117 is challenged by an application 110. Rather, any reactive behavior may be utilized, including audible / visual notifications, operational changes, information logging, etc., without departing from the scope of the present disclosure.
[0033] Additionally, it is noted that budget engine 116 may be configured to monitor various conditions that indicate when budget engine 116 should generate an updated write budget 117. For example, budget engine 116 may be configured to update write budget 117 periodically (e.g., daily, weekly, etc.). As another example, budget engine 116 may be configured to update write budget 117 when the configuration of application 110 changes, such as the installation of a new application 110, the uninstallation of an existing application 110, the registration of a new remote application 110 (an application executing on a device other than computing device 102), a change in a property (e.g., priority) of application 110, etc. As another example, budget engine 116 may be configured to update write budget 117 in response to receiving a command, such as from a user of computing device 102, an administrator of computing device 102, a manufacturer of computing device 102, etc. It is noted that the foregoing examples are not intended to represent an exhaustive list of conditions that may be monitored by budget engine 116 when determining whether write budget 117 should be updated. Rather, the conditions may take into account any number of aspects associated with the overall operation of computing device 102 without departing from the scope of the present disclosure.
[0034] It is noted that the responsibilities of the storage driver 114, the budget engine 116, and the firmware 120 may be modified to implement the same or similar functionality described herein without departing from the scope of the present disclosure. For example, the storage driver 114 may implement all or a portion of the techniques implemented by the budget engine 116 / firmware 120 without departing from the scope of the present disclosure. For another example, the storage driver 114 may implement all or a portion of the responsibilities associated with managing the metrics 202 of the storage device 118 without departing from the scope of the present disclosure.
[0035] therefore, Figure 1 to Figure 2 An overview of the manner in which a computing device 102 may be configured to implement the techniques described herein is provided in accordance with some embodiments. Figure 3 to Figure 4 The illustrated approach provides a more detailed breakdown of the manner in which the storage driver 114, budget engine 116, and firmware 120 may be configured to operate.
[0036] Figure 3 1 shows a method 300 for generating a write budget 117 for an application 110 associated with a computing device 102 according to some embodiments. It should be noted that the responsibilities of the storage driver 114, the budget engine 116, and the firmware 120 may be modified to implement the same or similar functionality described herein without departing from the scope of the present disclosure. However, for clarity, the budget engine 116 is shown from the perspective of the firmware 120. Figure 3 Method 300.
[0037] like Figure 3 As shown, the method 300 begins at step 302, where the budget engine 116 receives the metric 202 associated with the non-volatile memory 122 of the storage device 118 (e.g., as described above in conjunction with Figure 1 to Figure 2 At step 304, the budget engine 116 performs steps 306, 308, and 310 for each of the applications 110 associated with the computing device 102. Specifically, at step 306, the budget engine 116 establishes a corresponding write budget 117 for the application 110 based on the metric 202 (e.g., as described above in conjunction with Figure 1 to Figure 2 At step 308, the budget engine 116 updates the corresponding write budget 117 based on the count of the application 110 (e.g., as described above in conjunction with Figure 1 to Figure 2 At step 310 , the budget engine 116 provides the corresponding write budget 117 to the application 110 .
[0038] At step 312, budget engine 116 determines whether the conditions for updating write budget 117 are met (e.g., as described above in conjunction with Figure 1 to Figure 2At step 312, if budget engine 116 determines that the condition for updating write budget 117 is met, method 300 returns to step 304, where subsequent steps are performed as previously described herein. Otherwise, method 300 repeats at step 312 until the condition is met.
[0039] Figure 4 1 shows a method 400 for processing a write request issued by an application 110 according to a write budget 117 corresponding to the application 110 according to some embodiments. Again, it should be noted that the responsibilities of the storage driver 114, the budget engine 116, and the firmware 120 may be modified to implement the same or similar functionality described herein without departing from the scope of the present disclosure. However, for clarity, the budget engine 116 is shown from the perspective of the firmware 120. Figure 4 Method 400.
[0040] According to some embodiments, and as Figure 4 As shown, method 400 begins at step 402, where budget engine 116 receives a write request from application 110. At step 404, budget engine 116 obtains the corresponding write budget 117 of application 110. At step 406, budget engine 116 determines whether the write request violates the corresponding write budget 117. At step 406, if budget engine 116 determines that the write request violates the corresponding write budget 117, method 400 proceeds to step 408, where budget engine 116 performs a specific action (e.g., as described above in conjunction with Figure 1 to Figure 2 However, at step 406 , if the budget engine 116 determines that the write request does not violate the corresponding write budget 117 , the method proceeds to step 410 , where the budget engine 116 issues a write request to the non-volatile memory 122 .
[0041] Figure 5 A detailed view of a computing device 500 that can be used to implement the various components described herein according to some embodiments is shown. Specifically, the detailed view shows Figure 1 The various components that may be included in the computing device 102 are shown. Figure 5As shown, the computing device 500 may include a processor 502 representing a microprocessor or controller for controlling the overall operation of the computing device 500. The computing device 500 may also include a user input device 508 that allows a user of the computing device 500 to interact with the computing device 500. For example, the user input device 508 may take a variety of forms, such as buttons, keypads, dials, touch screens, audio input interfaces, visual / image capture input interfaces, input in the form of sensor data, etc. Further, the computing device 500 may include a display 510 (screen display) that can be controlled by the processor 502 to display information to the user. The data bus 516 may facilitate data transmission between at least the storage device 540, the processor 502, and the controller 513. The controller 513 can be used to interact with and control different devices through the device control bus 514. The computing device 500 may also include a network / bus interface 511 coupled to the data link 512. In the case of a wireless connection, the network / bus interface 511 may include a wireless transceiver.
[0042] The computing device 500 also includes a storage device 540, which may include a single disk or multiple disks (e.g., SSDs), and includes a storage management module that manages one or more partitions within the storage device 540. In some embodiments, the storage device 540 may include flash memory, semiconductor (solid-state) memory, etc. The computing device 500 may also include a random access memory (RAM) 520 and a read-only memory (ROM) 522. The ROM 522 may store programs, utilities, or processes to be executed in a non-volatile manner. The RAM 520 may provide volatile data storage and store instructions related to the operation of the computing device 102.
[0043] The various aspects, embodiments, implementations or features of the embodiments may be used individually or in any combination. The various aspects of the embodiments may be implemented by software, hardware, or a combination of hardware and software. The embodiments may also be embodied as computer readable code on a computer readable medium. A computer readable medium is any data storage device that can store data that can be read by a computer system. Examples of such computer readable media include read-only memory, random access memory, CD-ROM, DVD, magnetic tape, hard disk drive, solid state drive, and optical data storage device. The computer readable medium may also be distributed in a network coupled computer system so that the computer readable code is stored and executed in a distributed manner.
[0044] For the purpose of illustration, the foregoing description uses specific nomenclature to provide a thorough understanding of the embodiments. However, it will be apparent to those skilled in the art that the embodiments can be practiced without specific details. Therefore, the foregoing description of specific embodiments is presented for the purpose of illustration and description. The foregoing description is not intended to be exhaustive or to limit the embodiments described to the precise form disclosed. It will be apparent to those of ordinary skill in the art that, in view of the above teachings, many modifications and variations are feasible.
Claims
1. A method for preserving an expected life of a non-volatile memory communicatively coupled to a computing device, the method comprising, at the computing device: receiving a metric associated with the non-volatile memory; For each application in a plurality of applications associated with the computing device: allocating a corresponding write budget to the application based on the metric; receiving a write request directed to the non-volatile memory from an application program among the plurality of applications; and In response to determining that the write request does not violate the corresponding write budget of the application: The write request is issued to the non-volatile memory. 2 . The method of claim 1 , wherein for each application in the plurality of applications, the corresponding write budget is further based on a count of the plurality of applications.
3. The method of claim 1 , wherein the metric comprises at least one of the following attributes associated with the non-volatile memory: Write cycle information, Program / Erase (PE) cycle information, Write amplification information, Bad block information, Over-provisioning information, Configuration type information, Storage capacity information, Event information, or Age information.
4. The method of claim 1 , further comprising, in response to determining that the write request violates the corresponding write budget of the application, performing at least one of the following actions: providing a notification to a user of the computing device and / or a developer of the application, delaying issuing the write request to the non-volatile memory, or Terminate the application.
5. The method according to claim 4, further comprising: An overall health score associated with the application is updated based on whether the write request violates or does not violate the corresponding write budget of the application.
6. The method of claim 1 , further comprising, in response to identifying that a condition is satisfied: receiving an updated metric associated with the non-volatile memory; and For each application in the plurality of applications associated with the computing device: A corresponding updated write budget is allocated to the application based on the metric.
7. The method of claim 6, wherein the condition comprises (i) passage of a threshold amount of time, or (ii) receipt of a command.
8. A computing device configured to preserve an expected life span of a non-volatile memory communicatively coupled to the computing device, the computing device comprising: means for receiving a metric associated with said non-volatile memory; Means for performing, for each of a plurality of applications associated with the computing device, the following operations: allocating a corresponding write budget to the application based on the metric; means for receiving a write request directed to the non-volatile memory from an application of the plurality of applications; and Means for performing, in response to determining that the write request does not violate the corresponding write budget of the application: The write request is issued to the non-volatile memory. 9 . The computing device of claim 8 , wherein for each application in the plurality of applications, the corresponding write budget is further based on a count of the plurality of applications.
10. The computing device of claim 8, wherein the metric comprises at least one of the following attributes associated with the non-volatile memory: Write cycle information, Program / Erase (PE) cycle information, Write amplification information, Bad block information, Over-provisioning information, Configuration type information, Storage capacity information, Event information, or age information.
11. The computing device of claim 8, further comprising means for performing at least one of the following actions in response to determining that the write request violates the corresponding write budget of the application: providing a notification to a user of the computing device and / or a developer of the application, delaying issuing the write request to the non-volatile memory, or Terminate the application.
12. The computing device of claim 11, further comprising: Means for updating an overall health score associated with the application program based on whether the write request violates or does not violate the corresponding write budget of the application program.
13. The computing device of claim 8, further comprising means for, in response to identifying that a condition is satisfied, performing the following operations: receiving an updated metric associated with the non-volatile memory; and For each application in the plurality of applications associated with the computing device: A corresponding updated write budget is allocated to the application based on the metric.
14. The computing device of claim 13, wherein the condition comprises (i) the passage of a threshold amount of time, or (ii) receiving a command.
15. A computing device configured to preserve an expected life span of a non-volatile memory communicatively coupled to the computing device, the computing device comprising: at least one processor; and at least one memory storing instructions that, when executed by the at least one processor, cause the computing device to: receiving a metric associated with the non-volatile memory; For each application in a plurality of applications associated with the computing device: allocating a corresponding write budget to the application based on the metric; receiving a write request directed to the non-volatile memory from an application program among the plurality of applications; and In response to determining that the write request does not violate the corresponding write budget of the application: The write request is issued to the non-volatile memory.
16. The computing device of claim 15, wherein for each application in the plurality of applications, the corresponding write budget is further based on a count of the plurality of applications.
17. The computing device of claim 15, wherein the metric comprises at least one of the following attributes associated with the non-volatile memory: Write cycle information, Program / Erase (PE) cycle information, Write amplification information, Bad block information, Over-provisioning information, Configuration type information, Storage capacity information, Event information, or age information.
18. The computing device of claim 15, wherein the at least one processor further causes the computing device to perform at least one of the following actions in response to determining that the write request violates the corresponding write budget of the application: providing a notification to a user of the computing device and / or a developer of the application, delaying issuing the write request to the non-volatile memory, or Terminate the application.
19. The computing device of claim 18, wherein the at least one processor further causes the computing device to: An overall health score associated with the application is updated based on whether the write request violates or does not violate the corresponding write budget of the application.
20. The computing device of claim 15, wherein the at least one processor further causes the computing device, in response to identifying that a condition is satisfied: receiving an updated metric associated with the non-volatile memory; and For each application in the plurality of applications associated with the computing device: A corresponding updated write budget is allocated to the application based on the metric.
