Method of operating a memory controller, method of operating a host, and storage device

By introducing fragmentation and lifetime estimation modules into the memory controller, the memory status is analyzed and garbage collection limit indications are generated, which solves the problem of memory device lifespan damage caused by frequent garbage collection and achieves extended memory device lifespan and stable performance.

CN113821454BActive Publication Date: 2026-04-14SAMSUNG ELECTRONICS CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SAMSUNG ELECTRONICS CO LTD
Filing Date
2021-05-18
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In the prior art, although frequent garbage collection operations improve the fragmentation state of memory blocks, they increase the damage to the lifespan of the storage device and lead to the degradation of device performance.

Method used

By introducing fragmentation level estimators and lifetime estimators into the memory controller, the fragmentation status and lifetime of the memory are analyzed, generating analysis results that indicate whether garbage collection is restricted, thus preventing excessive garbage collection operations initiated by the host.

Benefits of technology

It reduces storage device lifespan damage, extends storage device lifespan, and avoids performance degradation caused by frequent garbage collection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113821454B_ABST
    Figure CN113821454B_ABST
Patent Text Reader

Abstract

An operating method of a memory controller is provided. The method can include receiving a state analysis request of a memory from a host, determining a fragmentation state of the memory, determining a life condition of the memory, generating an analysis result indicating whether garbage collection is limited based on the fragmentation state and the life condition, and providing the analysis result to the host.
Need to check novelty before this filing date? Find Prior Art

Description

[0001] Cross-references to related applications

[0002] This application claims priority to Korean Patent Application No. 10-2020-0075084, filed on June 19, 2020, with the Korean Intellectual Property Office, the disclosure of which is incorporated herein by reference in its entirety. Technical Field

[0003] The example implementation relates to a method of operating a memory controller, a method of operating a host, and / or a storage device. Background Technology

[0004] When invalid data increases in a memory block, the storage device can perform garbage collection to improve the fragmentation state of the memory block by moving valid data from the memory block and erasing the memory block to ensure free blocks.

[0005] Garbage collection can be performed upon request from the host (i.e., host-initiated garbage collection). For example, if the storage device becomes too fragmented and experiences performance degradation, the host can request garbage collection of the storage device to restore performance.

[0006] Incidentally, while frequent garbage collection ensures a large number of free blocks and improves the performance of the storage device, it also increases the number of erase operations, which can damage the lifespan of the storage device. Summary of the Invention

[0007] At least some example implementations provide a method of operating a memory controller that prohibits (or, alternatively, prevents) excessive occurrence of host-initiated garbage collection in order to reduce (or, alternatively, minimize) damage to the lifetime of the storage device.

[0008] At least some example implementations also provide a storage device that prohibits (or, alternatively, prevents) excessive occurrence of host-initiated garbage collection in order to reduce (or, alternatively, minimize) damage to the lifetime of the storage device.

[0009] At least some example implementations also provide a method of operating a host that prohibits (or alternatively prevents) excessive occurrence of host-initiated garbage collection in order to reduce (or alternatively minimize) damage to the lifespan of the storage device.

[0010] However, the exemplary embodiments are not limited to those described herein. The following and other exemplary embodiments will become more apparent to those skilled in the art upon reference to the detailed description of the present disclosure given below.

[0011] According to an example embodiment of this disclosure, a method of operating a memory controller may include: receiving a memory status analysis request from a host; determining the fragmentation state of the memory; determining the lifetime status of the memory; generating an analysis result indicating whether garbage collection is restricted based on at least one of the fragmentation state and the lifetime status; and providing the analysis result to the host.

[0012] According to an exemplary embodiment of this disclosure, a method of operating a memory controller may include: receiving a first state analysis request for memory from a host; providing a first analysis result of memory to the host in response to the first state analysis request; receiving a first garbage collection execution request for memory from the host; performing a garbage collection operation on a first memory region of memory, the first memory region having a first size; receiving a second state analysis request for memory from the host; providing a second analysis result of memory to the host in response to the second state analysis request; receiving a second garbage collection execution request for memory from the host; and performing a garbage collection operation on a second memory region of memory, the second memory region having a second size different from the first size of the first memory region.

[0013] According to an example embodiment of this disclosure, a method of operating a memory controller may include: receiving a memory status analysis request from a host; determining the fragmentation status of the memory; calculating the expected lifetime of the memory based on a write amplification factor (WAF) in response to the memory fragmentation status being higher than a fragmentation threshold; determining whether the expected lifetime meets the desired lifetime; determining whether the host write count is within a restricted segment in response to the memory's expected lifetime not meeting the desired lifetime; generating an analysis result indicating that garbage collection is restricted in response to the host write count being within the restricted segment; and providing fragmentation information and the analysis result to the host, the fragmentation information indicating the fragmentation status of the memory.

[0014] According to an example embodiment of this disclosure, a storage device may include: a memory; and a memory controller configured to analyze the fragmentation state and lifetime of the memory based on a status analysis request from a host, and to generate an analysis result indicating whether garbage collection of the memory is restricted based on at least one of the fragmentation state or lifetime.

[0015] According to an example embodiment of this disclosure, a method of operating a host may include: requesting a storage device to perform a first state analysis of a memory included in the storage device; and in response to the first state analysis, receiving from the memory first fragmentation information indicating that the memory is fragmented and a first analysis result indicating that garbage collection of the memory is restricted. Attached Figure Description

[0016] The above and other aspects and features of this disclosure will become more apparent from the detailed description of exemplary embodiments thereof with reference to the accompanying drawings, in which:

[0017] Figure 1 This is a block diagram illustrating the operation method of a memory controller according to some exemplary embodiments of the present disclosure;

[0018] Figure 2 It is used for explanation Figure 1 Example block diagram of a memory controller;

[0019] Figure 3 This is a flowchart illustrating the operation method of a memory controller according to some exemplary embodiments of the present disclosure;

[0020] Figure 4 and Figure 5 This is a diagram illustrating an operation method of a memory controller according to a first exemplary embodiment of the present disclosure;

[0021] Figure 6 This is a diagram illustrating the operation method of a memory controller according to a second exemplary embodiment of the present disclosure;

[0022] Figures 7 to 9 This is a diagram illustrating the operation method of a memory controller according to a third exemplary embodiment of the present disclosure;

[0023] Figure 10 This is a flowchart illustrating the operation method of a memory controller according to a fourth exemplary embodiment of the present disclosure;

[0024] Figure 11 and Figure 12 This is a diagram illustrating the operation method of a memory controller according to a fourth exemplary embodiment of the present disclosure;

[0025] Figure 13 These are diagrams illustrating an operation method of a memory controller according to a fifth exemplary embodiment of the present disclosure; and

[0026] Figure 14 This is a diagram illustrating the operation method of a memory controller according to a sixth exemplary embodiment of the present disclosure. Detailed Implementation

[0027] Hereinafter, various exemplary embodiments of the present disclosure will be described with reference to the accompanying drawings.

[0028] Figure 1 This is a block diagram illustrating the operation method of a memory controller according to some exemplary embodiments of the present disclosure. Figure 2 It is used for explanation Figure 1 Example block diagram of a memory controller.

[0029] First, refer to Figure 1 The host 200 and the storage device 100 are electrically connected to each other, and the storage device 100 can be operated upon request from the host 200.

[0030] The host 200 provides the storage device 100 with a status analysis request (AR) for the memory installed in the storage device 100.

[0031] Storage device 100 analyzes the state of the memory and provides the host 200 with analysis results RSP indicating whether garbage collection is restricted.

[0032] For example, analyzing the state of memory can include determining / analyzing the fragmentation state of the memory and the lifetime of the memory.

[0033] Here, the analysis result RSP may include, for example, "Required," "Not Required," and "Limited." "Required" means that memory fragmentation is increasing and garbage collection is required; "Not Required" means that memory fragmentation is below reference and garbage collection is not required. "Limited" means that memory fragmentation is increasing, but garbage collection is limited for other reasons (e.g., lifespan limitations). The analysis result RSP is not limited to required, not required, and limited, and may be expressed in other forms. Additionally, the reason for limitation may be indicated as "due to lifespan limitation."

[0034] In addition, when the storage device 100 provides the analysis result RSP to the host 200, at least one of the fragmentation status and lifetime status can be provided together.

[0035] Here, the fragmentation status may indicate only whether the memory is fragmented, and may also indicate the fragmentation level (e.g., one of levels 1 to 5). The fragmentation status may also be indicated by color and may be indicated as yes / no or 1 / 0.

[0036] Additionally, lifespan status can indicate only whether the lifespan status is good or bad, and can indicate a poor level (e.g., one of level 1 to 5). Lifespan status can also be indicated by color and can be indicated as yes / no or 1 / 0.

[0037] Furthermore, according to the design, not only fragmentation status and lifetime conditions, but also host write count or write amplification factor (WAF) can be provided to host 200.

[0038] Host 200 may receive the analysis result RSP and, with reference to the analysis result RSP, provide a garbage collection execution request ER to storage device 100. Host 200 may (but is not limited to) provide the garbage collection execution request ER only when the analysis result RSP is "needed".

[0039] Storage device 100 may perform garbage collection in response to a garbage collection execution request ER and provide its result ERSP to host 200. For example, the garbage collection result ERSP may be "complete" or "paused". "Completed" means that garbage collection has been completed, and "paused" means that another request (e.g., write) was entered from host 200 while garbage collection was being performed, and garbage collection was paused. The analysis result RSP is not limited to complete, paused, etc., and may be expressed in other forms.

[0040] Reference Figure 2 The storage device 100 may include a memory 110 and a memory controller 150. The memory 110 and the memory controller 150 are electrically connected to each other, and the memory 110 operates according to the instructions of the memory controller 150 and provides the operation results to the memory controller 150.

[0041] The memory controller 150 may be implemented using processing circuitry, such as hardware including logic circuitry, hardware / software combinations such as processors executing software, or combinations thereof. For example, although the processing circuitry is represented as a CPU, the processing circuitry may include (but is not limited to) a CPU, an arithmetic logic unit (ALU), a digital signal processor, a microcomputer, a field-programmable gate array (FPGA), a system-on-a-chip (SoC), a programmable logic unit, a microprocessor, or an application-specific integrated circuit (ASIC), etc.

[0042] The processing circuitry included in the memory controller 150 can be configured as a dedicated computer, for example, by logic circuitry or a processor that executes software, to perform the functions of the fragmentation level estimator 160, the lifetime estimator 170, and the garbage collection control module 180.

[0043] Fragmentation level estimator 160 is a module that estimates / determines the fragmentation state of memory 110. For example, the percentage of invalid data in a memory block may be considered. The amount of invalid data in a memory block may also be measured, and it may be determined whether the measured amount exceeds a reference value. If the measured amount exceeds the reference value, the memory block may be determined to be fragmented.

[0044] The lifetime estimator 170 is a module that estimates / determines the lifetime of memory 110. The lifetime estimator 170 estimates, for example, how long a memory block can be used if it is used in substantially the same trend (or in substantially the same manner) as at a determined point in time. In this way, it determines whether the expected lifetime is met (or the guaranteed lifetime). For example, the expected lifetime estimated by the lifetime estimator 170 may be 70 Total Byte Written (TBW), but the guaranteed lifetime may be 100 TBW. In this case, the lifetime estimator 170 may determine that the expected lifetime of memory 110 does not meet the guaranteed lifetime.

[0045] The garbage collection control module 180 is a module that controls the garbage collection operation of the memory 110. Specifically, the garbage collection control module 180 can control the memory 110 to perform garbage collection operations upon request from the host 200. Furthermore, the garbage collection control module 180 can generate an analysis result RSP of the current state of the memory 110 based on the fragmentation state determined by the fragmentation level estimator 160 and the lifetime condition determined by the lifetime estimator 170. As described above, the analysis result RSP can be "needed," "not needed," "limited," etc.

[0046] Storage device 100 may be (but is not limited to) an embedded multimedia card (eMMC), universal flash storage (UFS), or solid state drive (SSD).

[0047] Figure 3 This is a flowchart illustrating the operation method of a memory controller according to some exemplary embodiments of the present disclosure.

[0048] Reference Figure 3 Before requesting storage device 100 to perform garbage collection, host 200 sends a Status Analysis Request (AR) to storage device 100 to check the memory status of storage device 100.

[0049] In operation S10, when a status analysis request AR is received from the host 200, the memory controller 150 determines the fragmentation status of the memory.

[0050] In operation S20, the memory controller 150 determines the lifetime of the memory.

[0051] In operation S30, the memory controller 150 generates an analysis result RSP indicating whether garbage collection should be restricted based on the determined fragmentation state and lifetime status.

[0052] Specifically, if the memory is fragmented and the memory controller 150 determines that the expected lifetime of the memory does not meet the desired lifetime, the analysis result regarding whether to limit garbage collection may be further considered when generating a host write count indication. Here, further consideration of the host write count includes determining whether the host write count is within a restricted segment. If the host write count is within the restricted segment, an analysis result restricting garbage collection is generated; if the host write count is outside the restricted segment, an analysis result requiring garbage collection is generated. The size of the restricted segment may vary depending on the expected lifetime of the memory.

[0053] On the other hand, if the memory controller 150 determines that the memory is not fragmented, the memory controller 150 may generate an analysis result indicating that garbage collection is not required.

[0054] In operation S40, the memory controller 150 provides the analysis result RSP to the host. At least one of the determined fragmentation state and lifetime status may also be provided to the host.

[0055] Figure 4 and Figure 5 This is a diagram illustrating an operation method of a memory controller according to a first exemplary embodiment of the present disclosure. Specifically, Figure 4 and Figure 5 This indicates that the analysis results are unnecessary.

[0056] Reference Figure 4 In operation S210, the host 200 provides the storage device 100 with a memory status analysis request AR.

[0057] Subsequently, in operation S220, the storage device 100 determines the fragmentation state of the memory and the lifetime status of the memory in response to the status analysis request AR.

[0058] As mentioned above, the fragmentation status can be determined by considering the ratio of invalid data in the memory block.

[0059] The remaining lifespan of a memory block can be determined by estimating how long it will remain in use if the memory block is used at a rate substantially the same as at a given point in time.

[0060] Specifically, refer to Figure 5 The x-axis represents total bytes written (TBW), and the y-axis represents the erase count (EC). When the number of erases on a memory block reaches the maximum EC, the memory controller 150 can determine that the memory block has reached the end of its lifespan. Assume the current state of the memory is 70 TBW and the expected lifespan (guaranteed lifespan) is 100 TBW.

[0061] Label 610 is the reference lifeline, while labels 620a and 620b together refer to the actual lifeline of the memory block.

[0062] Reference lifeline 610 and actual lifelines 620a and 620b take into account the write amplification factor (WAF). In addition to writes based on write requests from host 200, memory performs additional write operations for other reasons (e.g., garbage collection). WAF can be defined as "actual writes / host-requested writes". If WAF is 1, it means there are no unnecessary write operations other than those requested by host 200. Therefore, it is determined that when WAF is close to 1, efficient write operations are performed.

[0063] Consider a reasonable WAF to determine the slope of reference lifeline 610. Referring to reference lifeline 610, it can be confirmed that even if the write size reaches 100TBW, the number of erases does not reach the maximum EC.

[0064] The slope of segment 620a in the real lifelines 620a and 620b corresponding to write sizes from 0 to 70 TBW can be calculated based on the actual way the memory is used. In other words, segment 620a in the real lifelines 620a and 620b corresponding to write sizes from 0 to 70 TBW reflects the actual WAF.

[0065] Additionally, assuming the use of a trend substantially the same as that at a given time point (i.e., 70TBW) (i.e., a slope substantially the same as that between 0 and 70TBW), the segments 620b corresponding to write sizes 70TBW to 100TBW in the true lifelines 620a and 620b are estimated by, for example, extrapolation.

[0066] Methods for estimating the true lifelines 620a and 620b may include (for example, but not limited to) regression analysis.

[0067] Referring to the real lifelines 620a and 620b, although the real lifelines 620a and 620b have a steeper slope than the reference lifeline 610, it can still be confirmed that the number of erases has not reached the maximum EC even if the write size reaches 100TBW.

[0068] Refer again Figure 4 Based on reference Figure 5 The resulting data (in which storage device 100 performs a memory status analysis at the request of host 20) shows that storage device 100 determines the fragmentation status to be unfragmented (no) and the lifetime status to be good (yes).

[0069] Subsequently, in operation S230, the storage device 100 generates an analysis result RSP based on the fragmentation state and lifetime status, and provides it to the host 200. Since the memory is not fragmented, the analysis result RSP indicates that garbage collection is not required.

[0070] Figure 6 This is a diagram illustrating an operation method of a memory controller according to a second exemplary embodiment of the present disclosure. Specifically, Figure 6 This explains the situations in which the results need to be analyzed. For ease of explanation, the main focus will be on the explanation and usage. Figure 4 and Figure 5 The different points explained.

[0071] Reference Figure 6In operation S210, the host 200 provides the storage device 100 with a memory status analysis request AR.

[0072] Subsequently, in operation S220, the storage device 100 determines the fragmentation state of the memory and the lifetime of the memory in response to the state analysis request AR. As part of the memory state analysis (e.g., referring to...), Figure 5 The state analysis discussed, but with different total written bytes, erase count and / or write amplification values, shows that the fragmentation state is fragmented (yes) and the lifetime condition is analyzed as good (yes).

[0073] Subsequently, in operation S230, the storage device 100 generates an analysis result RSP based on the fragmentation state and lifetime status, and provides it to the host 200. Since the memory is fragmented and has a good lifetime status, the analysis result RSP indicates that garbage collection is required.

[0074] Subsequently, in operation S240, host 200 confirms the analysis result RSP and provides a garbage collection execution request ER.

[0075] Subsequently, in operation S250, storage device 100 performs garbage collection (GC).

[0076] In operation S260, storage device 100 provides host 200 with garbage collection result ERSP indicating that garbage collection (GC) is complete.

[0077] Figures 7 to 9 This is a diagram illustrating an operation method of a memory controller according to a third exemplary embodiment of the present disclosure. Specifically, Figures 7 to 9 This section explains the limitations of the analysis results. For clarity, the main explanations and usage will be discussed. Figures 4 to 6 The different points explained.

[0078] Reference Figure 7 In operation S211, the host 200 provides the storage device 100 with a first state analysis request AR1 for the memory.

[0079] Subsequently, in operation S221, the storage device 100 performs a first state analysis of the memory in response to the first state analysis request AR1. Specifically, the storage device 100 determines the fragmentation state of the memory and the lifetime of the memory.

[0080] As a result of the memory state analysis, the fragmentation state is fragmented (yes), and the lifetime condition is analyzed as poor (no). Here, reference will be made to... Figure 8 A detailed analysis of the lifespan situation is provided. (Refer to...) Figure 8The x-axis represents total bytes written (TBW), and the y-axis represents the erase count (EC). Assume the current state of the memory is 30 TBW and the expected lifetime (guaranteed lifetime) is 100 TBW. Label 610 indicates the reference lifeline, and label 630 indicates the actual lifeline.

[0081] If the slope of the true lifetime line 630 after the determined time point (the current state) (i.e., after a write size of 30 TBW) is the same as the slope before the determined time point (i.e., between write sizes of 0 and 30 TBW), then the expected lifetime (guaranteed lifetime) of the memory is not expected to be met. That is, because the slope of the true lifetime line 630 is steep enough, the maximum erase count is reached at approximately 70 TBW (before the expected lifetime of 100 TBW). Therefore, the memory controller 150 determines the lifetime condition as poor (No).

[0082] If the memory is fragmented and it is determined that the expected lifetime of the memory will not meet the desired lifetime, a limit segment is set associated with the host write count (i.e., host write size). The host write count (i.e., host write size) refers to the amount of data written based on the host's write requests.

[0083] The size of the limiting section can be preset. Regardless of the severity of the lifespan condition, the size of the limiting section can be 30 TBW.

[0084] Furthermore, the size of the limiting segment can be varied depending on the severity of the lifetime condition (i.e., based on the expected lifetime). For example, if the expected lifetime is 70% of the desired lifetime (i.e., if the desired lifetime is 100 TBW, but the expected lifetime is 70 TBW), then the size of the limiting segment can be 30 TBW. Alternatively, if the expected lifetime is 60% of the desired lifetime, then the size of the limiting segment is 40 TBW (which can be an increase of more than 30 TBW). If the expected lifetime is 80% of the desired lifetime, then the size of the limiting segment is 20 TBW (which can be a decrease from 30 TBW).

[0085] For example, if the size of the restricted section is set to 30 TBW, the restricted section will change from 30 TBW to 60 TBW because the time point is determined to be 30 TBW.

[0086] In operation S231, the storage device 100 provides the host 200 with the first analysis result RSP1 of the memory. Since the memory is fragmented and has a poor lifespan, the first analysis result RSP1 may be "due to lifespan limitation".

[0087] The host 200 receives and acknowledges the provision of the first analysis result RSP1 from the storage device 100, and the host 200 does not request the storage device 100 to perform garbage collection.

[0088] Subsequently, after a period of time, in operation S212, host 200 may provide storage device 100 with a second state analysis request AR2 for the memory.

[0089] In operation S222, the storage device 100 performs a second state analysis of the memory in response to the second state analysis request AR2. As a result of the memory state analysis, the fragmentation state is fragmented (yes), and the lifetime condition is analyzed as poor (no).

[0090] If the memory is fragmented and it is determined that the expected lifetime of the memory does not meet the desired lifetime, then the host write count is further considered. Further consideration of the host write count means determining whether the host write count is within the limit segment. As mentioned above, if the limit segment is 30 TBW to 60 TBW (i.e., the size of the limit segment is 30 TBW) and the current state of the memory is 40 TBW, then since 40 TBW is within the limit segment, the second analysis result RSP2 can be "due to lifetime limitation".

[0091] In operation S232, storage device 100 provides the second analysis result RSP2 of the memory to host 200.

[0092] The host 200 receives and acknowledges the second analysis result RSP2 from the storage device 100, and the host 200 does not request the storage device 100 to perform garbage collection.

[0093] Subsequently, after an additional period of time, in operation S213, host 200 may provide storage device 100 with a third state analysis request AR3 for the memory.

[0094] In operation S223, the storage device 100 performs a third state analysis of the memory in response to the third state analysis request AR3. As a result of the memory state analysis, the fragmentation state is fragmented (yes), and the lifetime condition is analyzed as poor (no).

[0095] Since the memory is fragmented and the expected lifetime of the memory is determined to be less than the expected lifetime, host write counts are further considered. If the limit segment is 30TBW to 60TBW and the current state of the memory is 65TBW, then since 65TBW is outside the limit segment, a third analysis result RSP3 indicating "requires" garbage collection is generated.

[0096] In operation S233, storage device 100 generates a third analysis result RSP3 indicating that the memory now “needs” garbage collection and provides it to host 200.

[0097] In operation S240, host 200 confirms the third analysis result RSP3 and provides a garbage collection execution request ER.

[0098] In operation S250, storage device 100 performs garbage collection (GC).

[0099] In operation S260, storage device 100 provides host 200 with garbage collection result ERSP indicating that garbage collection (GC) is complete.

[0100] According to the memory controller operation method of the third exemplary embodiment of this disclosure, since the garbage collection operation when the host write count is within the restricted segment is restricted, the lifetime damage caused by garbage collection operation can be reduced.

[0101] For example, such as Figure 9 As shown, if waste collection operations are not restricted, the slope remains as in label 630, and the expected lifetime becomes 70 TBW. On the other hand, it can be seen that by restricting waste collection operations during the restricted section, the slope becomes smaller as in label 650, and the expected lifetime meets the desired lifetime of 100 TBW.

[0102] Figure 10 This is a flowchart illustrating an operation method of a memory controller according to a fourth exemplary embodiment of this disclosure. The flowchart will be used to illustrate the derivation... Figures 4 to 9 The process of analyzing the results RSP, RSP1 to RSP3 is explained.

[0103] Reference Figure 10 In operation S410, a status analysis request is provided from host 200.

[0104] In operation S420, memory controller 150 predicts the fragmentation level (or fragmentation state).

[0105] In operation S425, memory controller 150 determines whether the memory is fragmented.

[0106] In operation S451, if the memory controller 150 determines that the memory is not fragmented (no), the analysis result RSP becomes “no garbage collection needed”, and the memory controller 150 then updates the result in operation S460 (discussed below).

[0107] On the other hand, in operation S430, if the memory controller 150 determines that the memory is fragmented (yes), it predicts the memory's lifetime (i.e., expected lifetime).

[0108] In operation S435, the memory controller 150 determines whether the lifetime condition is stable.

[0109] In operation S441, when the memory controller 150 determines that the lifetime condition is stable (operation S435 is no), the trigger state changes to the enable state. Then, in operation S453, the memory controller 150 sets the analysis result RSP to indicate "need" garbage collection.

[0110] On the other hand, in operation S440, when the memory controller 150 determines that the lifetime condition is unstable (yes in operation S435), the memory controller 150 updates the trigger state. The update of the trigger state is based on whether the host write count is within the limit segment. If the host write count is within the limit segment, the trigger state is updated to the limit segment. If the host write count is outside the limit segment, the trigger state is not updated to the limit state.

[0111] In operation S445, the memory controller 150 determines whether the update trigger state is a restricted state.

[0112] In operation S453, if the trigger state is not a restricted state (operation S445 is no), the memory controller 150 updates the analysis result RSP to indicate that garbage collection is "needed".

[0113] Conversely, in operation S452, if the trigger state is a limited state (operation S445 is yes), the memory controller 150 updates the analysis result RSP to indicate "due to lifetime limitation".

[0114] In operation S460, the memory controller 150 provides the analysis results to the host 200, wherein the analysis results may be unnecessary (S451), necessary (S453), or due to lifespan limitation (S452).

[0115] Figure 11 and Figure 12 This is a diagram illustrating the operation method of a memory controller according to a fourth exemplary embodiment of the present disclosure.

[0116] Reference Figure 11 The x-axis indicates the host write count HWC. Figure 11 This shows the state of the memory during host write counting.

[0117] Host-initiated garbage collection can be performed in segments of memory where the memory status is "needed" (see reference 511).

[0118] Subsequently, after the host-initiated garbage collection is completed, the state of the memory during a given host write count can be "unnecessary" (see label 512).

[0119] Subsequently, after performing a given host write count without garbage collection, the memory may become fragmented, but the memory's lifetime condition may be unstable, and therefore, the memory state may be limited "(due to lifetime limitation)" (see reference numeral 513). If using... Figure 7 As explained, when the host write count is within the expected (or alternatively, preset) limit segment, the memory state changes to "Limited (due to lifetime limitation)". The size of the limit segment is shown as L0.

[0120] Subsequently, if the host write count exceeds the expected (or alternatively, preset) limit segment L0, the memory state changes back to "needed" (see reference numeral 514).

[0121] Reference Figure 12 Host-initiated garbage collection is performed on segments of memory where the memory state is "needed" (see reference 521). Subsequently, after the host-initiated garbage collection is completed, the memory state changes to "not needed" (see reference 522). Subsequently, after a given host write count is performed without garbage collection, the memory becomes fragmented, but since the lifetime of the memory is uncertain, the memory state may be "limited (due to lifetime limitation)" (see reference 523).

[0122] Subsequently, if the host write count exceeds the expected (or alternatively, preset) limit segment L0, the memory state changes back to "needed" (see reference 524). Then, after host-initiated garbage collection completes, the memory state changes to "not needed" (see reference 525). Subsequently, after a given host write count is achieved without garbage collection, the memory becomes fragmented, but its lifetime is unpredictable, and the memory state may be "limited (due to lifetime limitation)" (see reference 526).

[0123] On the other hand, the size L1 of the restriction segment 523 and the size L2 of the restriction segment 526 are different from each other. As shown, the size L2 of the restriction segment 526 can be greater than the size L1 of the restriction segment 523.

[0124] That is, as the host write count increases, the memory's lifespan can gradually deteriorate. Therefore, if the host write count is relatively low, the size of the limit segment (i.e., see limit segment 523) can be reduced, and if the host write count is relatively high, the size of the limit segment can be increased (i.e., see limit segment 526). Increasing the size of the limit segment can reduce the frequency of host-initiated garbage collection. Therefore, memory lifespan damage due to garbage collection can be reduced.

[0125] Figure 13This is a diagram illustrating an operation method of a memory controller according to a fifth exemplary embodiment of the present disclosure. For ease of explanation, the description will primarily focus on its use. Figure 12 The different points explained.

[0126] Reference Figure 13 As the host write count (HWC) increases, the memory state can be repeatedly changed to Required 521, Not Required 522, Restricted 523, Required 524, Not Required 525, and Restricted 526. At the segment where the memory state is "Required 521", a host-initiated first garbage collection is performed, and at the segment where the memory state is "Required 524", a host-initiated second garbage collection is performed.

[0127] On the other hand, the size of the first garbage collection memory region 1310 may differ from the size of the second garbage collection memory region 1320.

[0128] As the host write count increases, the lifetime of the memory can gradually deteriorate. Therefore, if the host write count is relatively low, the size of the garbage collection memory region can be increased (i.e., see memory region 1310), and if the host write count is relatively high, the size of the garbage collection memory region can be decreased (i.e., see memory region 1320). By reducing the size of the garbage collection memory region, the memory region with impaired lifetime can be reduced.

[0129] Figure 14 This is a diagram illustrating the operation method of a memory controller according to a sixth exemplary embodiment of the present disclosure.

[0130] Reference Figure 14 The host 200 can provide mode control signals MCS1 and MCS2 to the memory controller 150 to perform mode switching associated with garbage collection.

[0131] Specifically, in operation S270, the host 200 may provide a first mode control signal MCS1 to the storage device 100. According to the first mode control signal MCS1, the storage device 100 is in a first mode (e.g., performance mode).

[0132] Subsequently, in operation S271, host 200 may provide storage device 100 with a first state analysis request AR1.

[0133] In response, in operation S272, storage device 100 analyzes the state of the memory. For example, based on the analysis results, storage device 100 may determine that the memory is fragmented and that the expected lifetime of the memory is not meeting the desired lifetime. Since there is a first mode where memory performance takes precedence over lifetime, even if the expected lifetime of the memory is determined to be not meeting the desired lifetime, the first analysis result RSP1 indicates a need.

[0134] In operation S273, storage device 100 provides the first analysis result RSP1 to host 200. Although not shown separately, a host-initiated garbage collection will be performed later.

[0135] In operation S275, the host 200 may provide a second mode control signal MCS2 to the storage device 100. According to the second mode control signal MCS2, the storage device 100 may be in a second mode (e.g., lifetime mode).

[0136] Subsequently, in operation S276, host 200 may provide storage device 100 with a second state analysis request AR2.

[0137] In response, in operation S277, storage device 100 analyzes the state of the memory. For example, storage device 100 may determine that the memory is fragmented and that the expected lifetime of the memory does not meet the desired lifetime. Since there is a second mode in which the lifetime of the memory takes precedence over performance, even if the memory is determined to be fragmented, the second analysis result RSP2 indicates a limitation (due to lifetime limitation).

[0138] although Figure 14 This means that the second mode is executed after the first mode, but the second mode can be executed earlier and the first mode can be executed later.

[0139] Those skilled in the art will understand that many variations and modifications can be made to the exemplary embodiments without substantially departing from the principles of the exemplary embodiments. Therefore, the exemplary embodiments of the inventive concept disclosed herein are used only in a general and descriptive sense and are not intended to be limiting.

Claims

1. A method for operating a memory controller, the method comprising: Receive a memory status analysis request from the host; Determine the fragmentation state of the memory; Determine the lifetime of the memory; An analysis result indicating whether waste collection is restricted is generated based on the fragmentation state and the lifetime status; as well as The analysis results are provided to the host computer. The generation of the analysis results includes: In response to the memory being fragmented and the lifetime condition being that the expected lifetime of the memory is determined to be less than the expected lifetime, a determination is made based on the host write count to determine whether garbage collection is restricted. Determining whether garbage collection is restricted based on the host write count includes: Determine whether the host write count is within the restricted range. The generation of the analysis results also includes: In response to the host write count being within the restricted segment, an analysis result indicating that garbage collection is restricted is generated, and In response to the host write count being outside the restricted section, an analysis result indicating that the garbage collection is required is generated.

2. The method according to claim 1, further comprising: The size of the restricted segment is adjusted based on the expected lifetime of the memory.

3. The method according to claim 1, wherein, The generation of the analysis results includes: In response to the memory's fragmentation state falling below a fragmentation threshold, an analysis result indicating that garbage collection is not required is generated.

4. The method according to claim 1, further comprising: In response to providing the analysis results to the host, a garbage collection execution request is received from the host; In response to the garbage collection execution request, a garbage collection operation is performed on the garbage collection memory region of the memory; as well as The size of the garbage collection memory region is adjusted based on the lifetime of the memory.

5. The method according to claim 1, further comprising: The host is provided with the fragmentation status and the lifetime information.

6. The method according to claim 1, wherein, Determining the lifetime status of the memory includes: Expected lifetime is calculated based on the write amplification factor.

7. The method according to claim 1, further comprising: Receive mode control signals from the host, wherein generating the analysis results includes: In response to a mode control signal indicating a first mode, the analysis results are generated based on the fragmentation state and the lifetime condition. In response to a mode control signal indicating a second mode, the analysis results are generated based on the fragmentation state without considering the lifetime condition.

8. The method according to claim 1, wherein, The memory is contained in one of an embedded multimedia card, a general-purpose flash memory, or a solid-state drive.

9. A method of operating a memory controller, the method comprising: Receive the first state analysis request from the host memory; In response to the first state analysis request, the first analysis result of the memory is provided to the host; Receive a first garbage collection execution request from the host for the memory; A garbage collection operation is performed on a first memory region of the memory, the first memory region having a first size; Receive a second state analysis request for the memory from the host; In response to the second state analysis request, the second analysis result of the memory is provided to the host; Receive a second garbage collection execution request from the host for the memory; as well as The garbage collection operation is performed on a second memory region of the memory, the second memory region having a second size, which is different from the first size of the first memory region. The method further includes, after performing the garbage collection operation on the first memory region and before receiving the second state analysis request for the memory from the host: Receive a third state analysis request for the memory from the host; and In response to the third state analysis request, a third analysis result of the memory is provided to the host, the third analysis result indicating that the garbage collection operation on the memory is restricted. In response to the memory being fragmented, the expected lifetime of the memory being determined to be less than the expected lifetime, and the host write count being within a restricted range, the third analysis result indicating that the garbage collection operation is restricted is generated.

10. The method according to claim 9, wherein, The second size is smaller than the first size.

11. A storage device comprising: Memory; as well as The memory controller is configured as follows: The fragmentation status and lifetime of the memory are analyzed based on the status analysis request from the host, and An analysis result indicating whether garbage collection of the memory is restricted is generated based on the fragmentation state and the lifetime status. In response to the memory being fragmented and the expected lifetime of the memory being determined to be less than the expected lifetime, the analysis results are generated by determining whether garbage collection is restricted based on host write counts. The memory controller is configured to determine whether garbage collection is restricted based on the host write count by: Determine whether the host write count is within the restricted range. In response to the host write count being within the restricted segment, an analysis result indicating that the garbage collection is restricted is generated, and In response to the host write count being outside the restricted section, an analysis result indicating that the garbage collection is required is generated.

12. The storage device according to claim 11, wherein, The memory controller is configured to adjust the size of the restricted segment based on the expected lifetime of the memory.

Citation Information

Patent Citations

  • Airbag apparatus of vehicle

    KR1020200075084A

  • Solid-state memory corruption mitigation

    US20150324282A1

  • Information processing system, storage control apparatus, storage control method, and storage control program

    US20180196619A1