KR101157763B1 - Variable space page mapping method and apparatus for flash memory device with trim command processing - Google Patents
Variable space page mapping method and apparatus for flash memory device with trim command processing Download PDFInfo
- Publication number
- KR101157763B1 KR101157763B1 KR1020100135998A KR20100135998A KR101157763B1 KR 101157763 B1 KR101157763 B1 KR 101157763B1 KR 1020100135998 A KR1020100135998 A KR 1020100135998A KR 20100135998 A KR20100135998 A KR 20100135998A KR 101157763 B1 KR101157763 B1 KR 101157763B1
- Authority
- KR
- South Korea
- Prior art keywords
- block
- fusion
- group
- memory management
- blocks
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0238—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory
- G06F12/0246—Memory management in non-volatile memory, e.g. resistive RAM or ferroelectric memory in block erasable memory, e.g. flash memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/0223—User address space allocation, e.g. contiguous or non contiguous base addressing
- G06F12/023—Free address space management
- G06F12/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/0802—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches
- G06F12/0891—Addressing of a memory level in which the access to the desired data or data block requires associative addressing means, e.g. caches using clearing, invalidating or resetting means
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F12/00—Accessing, addressing or allocating within memory systems or architectures
- G06F12/02—Addressing or allocation; Relocation
- G06F12/08—Addressing or allocation; Relocation in hierarchically structured memory systems, e.g. virtual memory systems
- G06F12/10—Address translation
- G06F12/1009—Address translation using page tables, e.g. page table structures
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/064—Management of blocks
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7201—Logical to physical mapping or translation of blocks or pages
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/72—Details relating to flash memory management
- G06F2212/7205—Cleaning, compaction, garbage collection, erase control
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Human Computer Interaction (AREA)
- Memory System (AREA)
Abstract
A method and apparatus for implementing a Flash Translation Layer (FTL) in a storage device including a flash memory and processing it when a TRIM command is given are provided. The FTL of the present invention stores data by applying a page mapping scheme to a block included in a fusion group, and a page invalidated by a TRIM command in an FTL that applies a block mapping scheme to a block included in a sequential group or sequentially stores data. Considering this, we propose a cost model and processing method that can optimally classify blocks into fusion or sequential groups. The present invention can improve the overall efficiency of the flash memory storage device by increasing the efficiency of the garbage collection operation of the FTL performed using the limited spare block. The present invention also proposes a method of using the difference between the reference model and the actually measured value in order to increase the accuracy in predicting the utilization of the garbage collection target block from the total fusion region utilization in calculating the cost model.
Description
The present invention relates to a memory device and a method for managing the memory device, and more particularly, to a memory device and a method for managing the memory device based on non-volatile memory.
Storage devices for storing data may include magnetic disks, semiconductor memories, and the like. Since storage devices have different physical characteristics by type, a management method corresponding to the physical characteristics is required.
Magnetic disks have been widely used as conventional storage devices. Magnetic disks have an average read / write time of a few milliseconds per kilobyte. In addition, the magnetic disk has a characteristic that the read / write time is different because the time that the arm arrives varies depending on the physical location where the data is stored.
Recently, nonvolatile memory devices, which have shorter read / write times, consume less power, and occupy smaller volumes than magnetic disks, are rapidly replacing magnetic disks. This is a possible result because the capacity of the nonvolatile memory device has been increased.
A nonvolatile memory device is a semiconductor memory device capable of electrically reading, writing, and erasing and maintaining stored data even without a power supply. In addition to writing, the process of storing data for nonvolatile memory devices is also called programming.
Programming of the nonvolatile memory device may be performed in units of pages, and erase may be performed in units of blocks. The block may include a plurality of pages. The controller of the nonvolatile memory device may provide a logical address to an external host or processor, and may provide a physical address to the nonvolatile memory device. The controller may manage the nonvolatile memory device using the physical address and convert the physical address into a logical address or a logical address into a physical address. The layer in which the physical address and logical address translation is performed is sometimes referred to as a flash translation layer. Operations such as determination, classification, and sorting performed in the FTL are also called management methods of the flash memory device.
The present invention provides a memory management apparatus and method for managing a plurality of blocks of a nonvolatile memory into a sequential group and a fusion group, and processing the blocks when a TRIM command is given.
In calculating the cost model, the present invention uses the error information between the reference model and the actual measured value to increase the accuracy when predicting the utilization rate of the garbage collection target block from the total fusion group utilization rate. It provides a technique to accurately infer the utilization rate of.
The memory management apparatus or method according to an embodiment of the present invention may designate and manage out-of-order blocks and spare blocks as a fusion group in order to increase the efficiency of garbage collection operations using limited spare blocks.
The memory management apparatus or method according to an embodiment of the present invention may designate blocks in which data is sequentially stored in a sequential group and separately manage them in order to reduce reuse costs of blocks in which data is sequentially stored.
The apparatus or method for managing a memory according to an embodiment of the present invention may apply a page mapping technique in a block selected as a fusion group in order to reduce a data update cost due to an out of order reference operation.
A memory management apparatus or method according to an embodiment of the present invention distinguishes sequential references and nonsequential references and reduces switch merge or garbage collection for each reference operation in order to reduce data update costs for the entire nonvolatile memory. Garbage collection operations can be optionally applied.
Memory management apparatus or method according to an embodiment of the present invention, when the TRIM command is given, when the utilization (utilization) of the sequential block in which the data is stored by the TRIM command or the previous TRIM command is lowered (management) by moving it to a fusion group can do.
The memory management apparatus or method according to an embodiment of the present invention may establish and use a mathematical model for a reference operation cost and a garbage collection operation cost to optimize a fusion group. This mathematical model calculates the reference operation cost and garbage collection operation cost in consideration of the number of sectors invalidated by the TRIM instruction.
The memory management apparatus or method according to an embodiment of the present invention measures an error with a standard reference utilization derived mathematically or by sample survey from the group utilization in predicting the utilization of the garbage collection target block from the convergence group utilization, By using the error information, the prediction value may be corrected to accurately predict the utilization rate of the garbage collection target block.
A memory management apparatus according to an embodiment of the present invention includes a block designation unit that divides a plurality of blocks included in a nonvolatile memory into a sequential group and a fusion group based on the locality of an access operation for each of the plurality of blocks, and The data sector may be sequentially stored in the blocks included in the sequential group, and the map unit may be configured to store the data sectors by applying a page mapping technique to the blocks included in the fusion group.
According to an embodiment of the present invention, a memory management method includes dividing an entire flash memory block into a meta block storing a map, a data block storing data, and an initial spare block, and a plurality of blocks included in the nonvolatile memory. Determining a locality of an access operation for each, dividing each of the plurality of data blocks into sequential blocks, non-sequential blocks, and free blocks based on the determined locality, the non-sequential block, and the initial free block Designating a part of as a fusion group, and storing a data sector by applying a page mapping technique to a block included in the fusion group.
According to an embodiment of the present invention, when a TRIM command is given to a storage device, invalidating a sector when the target sector of the TRIM command exists in a sequential block or in a fusion group, Updating the map to display on the map, and incorporating the sequential block into the fusion group by appropriate decision criteria when there are a large number of invalidated sectors in the sequential block.
In the memory management method according to an embodiment of the present invention, calculating the utilization of the fusion group in consideration of the number of initial free blocks and data blocks included in the fusion group and the number of sectors invalidated by the TRIM command, Calculating the page update cost of the fusion group based on utilization, and providing a minimum page update cost by estimating the page update cost when including another data block in the fusion group or removing an existing data block from the fusion group. Estimating the utilization rate of the fusion group, and may include adding a new data block to the fusion group or removing an existing data block from the fusion group due to the prediction result.
A memory management apparatus or method according to an embodiment of the present invention designates and manages a data block showing some out of order write locality and some initial free blocks as a fusion group, thereby making a garbage collection operation using a limited number of free blocks. Can increase the efficiency.
Memory management apparatus or method according to an embodiment of the present invention can reduce the reuse cost of the blocks in which data is sequentially stored by designating the blocks in which the data is sequentially stored in a sequential group and separately managed.
The apparatus or method for managing memory according to an embodiment of the present invention can reduce data update costs due to non-sequential reference operations by applying a page mapping technique in a block selected as a fusion group.
An apparatus or method for managing memory according to an embodiment of the present invention distinguishes sequential references and nonsequential references and selectively applies merge or garbage collection operations to each reference operation, thereby updating data for the entire nonvolatile memory. Can be reduced.
Memory management apparatus or method according to an embodiment of the present invention to improve the performance by flexibly coping with the reference pattern by dynamically converting the blocks belonging to the fusion group into a sequential block, and dynamically including the sequential blocks in the fusion group Can be.
The memory management apparatus or method according to an embodiment of the present invention may optimize the page update cost of the fusion group by establishing and using a mathematical model of the reference operation cost and the garbage collection operation cost.
A memory management apparatus or method according to an embodiment of the present invention updates a map to invalidate a TRIM command when it is given a sector belonging to a sequential block or a fusion group, and performs such invalidation when performing a garbage collection or merge operation. Calculate the fusion group utilization to minimize page update cost by considering invalidated sectors in the mathematical model, and move the data block between the fusion group and the sequential group so that the utilization rate is the same. Can be minimized.
In the memory management apparatus or method according to an embodiment of the present invention, when the mathematical model predicts the utilization rate of the garbage collection target block from the utilization rate of the fusion group, the memory management apparatus or method may more accurately predict the error rate based on the error rate from the standard reference utilization rate.
1 is a diagram illustrating an example of a
2 is a diagram illustrating a
3 is a diagram illustrating an example of an operation of the
4 is a diagram illustrating an example of an operation of the
FIG. 5 is a diagram illustrating an example of a fusion operation and a garbage collection operation of the
FIG. 6 is a diagram illustrating an example of a TRIM command operation of the
FIG. 7 is a diagram illustrating an example of a fusion operation in which the
FIG. 8 is a diagram illustrating an example of a defusion operation of the
FIG. 9 is a diagram illustrating an example in which the
FIG. 10 is a diagram illustrating an example in which the
11 is a diagram illustrating a hit ratio when the number of logical blocks included in a fusion group changes.
12 is a diagram illustrating a page update cost graph when the number of logical blocks included in a fusion group changes.
Hereinafter, with reference to the accompanying drawings a preferred embodiment according to an embodiment of the present invention will be described in detail. However, the present invention is not limited or limited by the embodiments. Like reference symbols in the drawings denote like elements.
The memory management method proposed in the present invention adds TRIM command processing to Variable Space Page Mapping (VSPM) specified in Patent No. 10-0965051, "Variable with added TRIM command processing. Space page Mapping with TRIM command processing, but it is obvious to those skilled in the art that such names should not be interpreted to limit the scope of the present invention. In predicting the utilization rate of the garbage collection target block in the variable space page mapping (VSPM) specified in Patent No. 10-0965051, an error rate-based correction technique is applied to provide a more precise prediction method.
As used herein, a memory device is a concept including a storage device for storing data and a non-volatile memory.
1 is a diagram illustrating an example of a
The memory management apparatus may divide the plurality of blocks of the
The
A block in which logical data such as sector data recognized by a higher layer such as a file system in a memory management apparatus is stored may be referred to as a data block. Such data blocks may be in
In this specification, the "physical block" and the "physical page" mean a block and a page of the
The memory management apparatus may designate a block in which logical pages are sequentially stored in the logical blocks among the plurality of blocks of the
The memory management apparatus may designate some of the blocks in which data is stored and the spare blocks among the plurality of blocks of the
The
As described above, in the present specification, 'physical block' and 'physical page' refer to blocks and pages of the
The memory management method proposed in the present invention may be referred to as Variable Space Page Mapping (VSPM). However, it is apparent to those skilled in the art that the name VSPM should be interpreted so as not to limit the scope of the present invention.
When the memory management device uses a block mapping scheme, one entry in the map maps (maps) a logical block to one or more physical blocks, and one entry in the map maps a logical block number to a physical block number or a physical block number to a logical block. Map by number. Alternatively, when a memory management device, such as a fusion group, applies page mapping techniques, certain logical blocks are not mapped to specific physical blocks and each logical page is mapped to a physical page independently, so that one entry in the map is logical. Map page numbers to physical page numbers or physical page numbers to logical page numbers.
2 is a diagram illustrating a
The
The
The software layer on top of the
According to an embodiment of the present invention, the
The
The
Hosts tend to read or write data stored in
Hosts, on the other hand, tend to access data once they have accessed it. The host accesses the data once it has been accessed in a relatively close time, sometimes referred to as temporal locality.
The
Conversely, if the access operation accesses discrete data or if the number of consecutive data is less than the threshold, the
The
The
The
The
Some of the spare blocks in which no data is initially stored may be assigned to the
Some of the
The
Although the
The
The first condition is when the number of valid pages of the first block is equal to or greater than a first threshold value or when the block utilization of the first block is lower than the utilization of the
Here, the block utilization of the first block may be a valid page number among the number of pages in the first block.
Meanwhile, in some cases, the first condition may include application examples of various cases depending on the situation in addition to the two cases.
The meaning of the utilization of the block or the utilization of the
On the contrary, when it is determined by the
However, in some cases, when it is not desirable to move the second block to the fusion group, for example, when it is determined that it does not help to lower the utilization rate of the fusion group, the
If the second block is not moved to the fusion group, the
The
Within the block designated by
The
The
When the page mapping scheme serves as a superset of the block mapping scheme, the
According to an embodiment of the present invention, when a TRIM command is transmitted to a sector so that valid data no longer exists in the page occupied by the sector, the page may be invalidated. Such invalidated pages may exist in sequential groups and may also exist in
When a page is invalidated by the TRIM command, the
When a page existing in a sequential block is invalidated, the
If no invalidated page exists, the utilization of the
However, according to an embodiment of the present invention, when the page invalidated by the TRIM command exists in the
The
3 is a diagram illustrating an example of an operation of the
The
The
The
4A is a diagram illustrating an example of an operation of the
Fusion group 400 initially includes physical blocks B2 ', B1', B0 'that are some of the total spare blocks. Block numbers with a '(prime) symbol, such as B2', B1 ', B0', refer to a particular physical block included in the fusion group 400.
Blocks B2 ', B1', and B0 'may or may not be erased. If not, the
The sequential area includes sequential blocks B3, B2, B1, and B0 in which pages are stored according to sequential conditions. Block numbers B3, B2, B1, and B0 in the sequential area indicate logical block numbers. Block mapping scheme is applied to blocks existing in the sequential region. Accordingly, logical block numbers B3, B2, B1, and B0 may be mapped to specific physical block numbers through a block mapping technique.
The sequential block B1 included in the sequential group stores logical pages P10, P11, P12, P13, and P14. The sequential block B2 stores logical pages P20, P21, P22, P23, and P24.
Since the page mapping technique is applied to the fusion group 400, one logical block may not correspond to one physical block. More precisely, there is no logical block concept in fusion group 400.
However, the
Referring to FIG. 4B, when the logical page P03 included in the logical block B0 is changed, the
The
The logical page P03 changed in FIG. 4B is written in the first page of the buffering block B2 'within the fusion region, and P03 of B3' is invalidated. In the following, an X on the page number indicates that the page is invalid.
Each logical block within a fusion group is limited to a specific physical block and is not mapped. For example, the logical block B0 included in the fusion group does not correspond to a specific physical block. Pages P00, P01, P02, P03, and P04, which now belong to logical block B0, can exist in any block in the fusion group.
5 illustrates a fusion calculation process according to an embodiment of the present invention.
When writing to P11 of logical block B1 existing in the sequential group of FIG. 4 is requested, the
In FIG. 5A, the logical page P11 included in the logical block B1 is now written to the second page of the buffering block B2 '. When a write to P14 is requested, a new logical page P14 is written to the third page of B2 '. In addition, existing pages corresponding to existing P11 or P14 at B4 'are invalidated.
When writes to P00 and P01 are requested in FIG. 5A, they are written to the fourth and fifth pages of the buffering block B2 ', and the existing pages corresponding to P00 or P01 at B3' are invalidated. .
Then, all pages of the buffering block B2 'are used in FIG.
According to an embodiment of the present invention, when the number of empty blocks in the fusion group is equal to or less than a threshold value, the
5B is a diagram illustrating an example of garbage collection operation according to an embodiment of the present invention.
Referring back to FIG. 5A, the
For example, it is assumed that the
The
For example, in FIG. 5B, the block B1 ′ is selected as the buffering block. If B1 'has not been erased, B1' is erased. The
The
However, the present invention is not limited to some embodiments, and in other embodiments, it may not maintain empty blocks in the fusion group 600, in which case it is necessary to bring empty blocks out of the
In addition, the
Referring to FIG. 6A, when a write to the logical page P14 existing in the fusion group 600 is requested, P14 is written to the third page of the buffering block B1 ', and the existing logical page P14 in the block B4'. Is invalidated.
According to an embodiment of the present invention, the
Referring to (b) of FIG. 6, for example, a TRIM command is requested for a sector existing in P22, P23, P24, P02, and P03. In this case, the
According to an embodiment of the present invention, after performing this invalidation process, the utilization rate of the first logical block B2 in which the
Here, the first condition may be a condition that satisfies various criteria, such as a case where the utilization rate of the logic block B2 is equal to or less than a first threshold value (for example, a value such as 0.4) or lower than the utilization rate of the fusion group 600. .
7 illustrates that the
In FIG. 7, the logical block B2 no longer exists in the sequential region, and the physical block used by the logical block B2 is included in the fusion region.
FIG. 8 is a diagram illustrating an example of a defusion operation of the
7 and 8, pages P02 and P03 of logical block B0 are no longer present in any area by the TRIM command. The remaining logical pages of the logical block B0 are stored in the physical blocks B2 'and B1'.
The
The
Since the
As shown in (b) of FIG. 8, when the number of empty blocks in the fusion group 800 is less than the threshold value (2 in this example) after the de-fusion operation, the
In this case, the
The
If the number of valid pages present in the garbage collection target block is greater than the number of unused pages present in the buffering block, separate garbage collection may be needed to create a new buffering block while copying the pages.
In this case, a separate garbage collection operation is performed using the remaining empty block B0 'to create a new buffering block. Then use the newly created buffering block to continue the copy you were doing in the original garbage collection.
Then, as the garbage collection operation completes, the fusion group 800 has an empty block above the threshold (2 in this example).
In FIG. 9B, the fusion group 800 includes two empty blocks B2 'and B0'.
When a new write request arrives, it is processed using the unused page of the buffering block B1 '. And subsequent requests are processed while applying the operations repeatedly.
Meanwhile, referring again to FIG. 2, the
For convenience of description, the ratio of the access operation to the
When there are no pages invalidated by the TRIM command, when the number of logical blocks participating in the
For example, assuming that 10 spare blocks are fixedly included in the
If there is a page invalidated by the TRIM instruction, the utilization of the
It is assumed that the
Also, whenever a logical block belonging to a sequential group moves to a
When the page of the sequential block is referred to, the
The
Assume that the number of pages per block of flash memory is N P. In addition, it is assumed that the total number of valid pages in the
The utilization rate of one logical block is determined by the number of valid pages in the logical block. If the utilization rate of a logical block is U B , and there is no invalid page in the logical block, there are N p valid pages in this logical block, in which case the utilization rate of the logical block U B is 1 (= N p / N p ). If there is an invalid page N p_inv in the logical block, the utilization rate U B of the logical block is (N p -N p_inv ) / N p .
If a logical block belonging to the sequential group has an invalid page by the TRIM command, the utilization rate of the
Moving a block from the sequential group to the
Utilization factor is moving the U B block to the utilization factor U F fusion group 130
Eventually, the
The
As the number of logical blocks participating in the
On the other hand, as the number of logical blocks participating in the
When a write is requested to a page (sector) in the
Hosts are more likely to refer to sector data with temporal and spatial locality, so if a relatively recently referenced (or updated) logical page (sector) is included in the
On the other hand, as the utilization of the
The
To maintain optimal utilization of the fusing group, include a few more logical blocks in the fusing group or remove them from the fusing group, or include or remove some valid pages in the fusing group to achieve fusing group utilization U F. When X changes from X to X ', the page update cost of the entire flash memory storage device should be predictable. If the page update cost is less than the current page update cost, the
The utilization rate U F of the fusion group may be calculated by the
11 is a graph illustrating a curve G F of a utilization rate of a fusion group according to the number of logical blocks included in the fusion group when the number of initial free blocks is given. Hereinafter, the utilization curve of the fusion group is referred to as G F.
The curve of FIG. 10 is a graph drawn according to the number of logical blocks included in the fusion group for convenience, and it is obvious that such a utilization graph is also possible according to the number of effective pages included in the fusion group. The embodiments described below will be described based on the number of logical blocks included in the fusion group for convenience, but this is obviously applicable to the example of using the effective number of pages.
The
When the utilization rate of the current fusion group is U F , the
In summary, it is assumed that the
The
One example of a reference curve is the equation used in the study of the Log-structured File System (LFS). In this study, the relationship between the utilization U D of the entire file system and the utilization U S of the segment to be cleaned (garbage collection) was estimated as shown in Equation 2. Applying this formula to the flash memory storage device, it assigns the U D instead of U F, and also the relationship between the U S instead Substituting U B, utilization U B of the fused group usage rate U F and of non-collection of the current block It can also be applied to analogy. However, it is obvious that the reference curve is not limited to this one example, and that the reference curve can be derived by using other equations or by collecting experimental results.
Obviously, these reference curves are measured from standard workloads and cannot be accurately applied to a variety of actual workloads. In addition, when there are pages invalidated in the fusion group by the TRIM command, the reference pattern may have a higher concentration. As a result, predicting garbage collection target block utilization from the fusion group utilization may have a lot of errors. Therefore, a method for correcting such an error may be necessary.
It is assumed that the
Various methods can be applied as the correction equation, and one example is as follows. First, a relation value C as shown in Equation 7 is calculated from U F , U R , and U B that can be measured from the current memory management device configuration.
The garbage collection target block utilization rate U B ′ may be calculated when the fusion group utilization rate is an unknown value U F 'using the relation value C. As an example, when the fusion group utilization rate is U F ', and the value on the graph G R is U R ', U B 'is calculated as in Equation 7. And if we calculate all the different U B ', we can draw the graph G B.
In another example, the same but different forms exist. For example, the relation values C and U B ′ may be calculated as shown in
10 shows a graph G B inferred by the above correction equation. The
Each time a logical block is included in a fusion group, the utilization rate of the fusion group increases, and the hit ratio r of the fusion group also increases. 11 shows that the hit ratio r of the fusion group increases with the number of logical blocks. When a hit ratio graph according to an increase in utilization rate of the fusion group is given as shown in FIG. 11,
The
In FIG. 12, the left side of the optimal point increases steeply in the page update cost, while the right side slowly increases the page update cost. In a real computing environment, workloads can vary significantly, so the optimal point must change frequently. Given these changes and measurement errors, a safe point that is shifted δ to the right than the optimal point may be more appropriate in a real environment. The
In this specification, the cost of an operation means a resource needed for the operation to be performed. The resource may mean, for example, time, or may mean energy consumption or space of the
The
To define the cost of the defusion operation, the cost of the page update of the
The utilization U F of the
If the utilization of the file system in the LFS is U D , the utilization U S of the segment to be cleaned may be defined as in
Where ln means natural logarithm.
The average cost C GC of the garbage collection operation may be defined as in Equation 2 below.
Where N P is the number of pages a block can contain, C CP is the cost of copying a page from one block to another block, and C E is the erase cost of the block. U B is the utilization rate of the garbage collection target block and can be inferred from the graph G B when the fusion group utilization rate is a specific value.
The garbage collection operation is performed by erasing the block at the cost of C E to generate a spare block, and copying U B x N P pages from the block selected as the target of the garbage collection operation to the generated free block.
When the garbage collection operation is performed, the block to which the page is copied becomes a write buffering block, and the write buffering block has (1-U B ) x N P empty pages for writing new data. Thus, on average, each
Since the map update cost is assumed to be small, the garbage collection operation cost does not include the map update cost. However, it is obvious that the following formula including the cost of updating the map is possible. In the formula below, C M is the map update cost.
C GC = U B x N P x C CP + C E + C M
The garbage collection cost to be shared when performing a page write operation is as follows, and this cost is defined as the average page write cost. The average page write cost C PW may be defined as in Equation 4 below. If the page write requires a map update, it is obvious that the page update cost C M can be added to the right side of Equation 4 below.
The de-fusion operation selects the de-fusion target logical block, then erases the empty block at the cost of C E , and copies all the pages of the de-fusion target logical block distributed in the
If the number of empty blocks in the
In order for the
If the probability of the reference (update request) to the page in the fusion group among the update requests to the
The average write cost Cavgw of the
The reference probability r depends on the utilization U F of the
Depending on the application, the host may access the
Although the reference probability r increases as the utilization rate U F increases, the increasing tendency of the reference probability r may be saturated according to the access tendency of the host.
For example, when the host accesses the
As the utilization U F increases from a value close to zero, the average write cost Cavgw decreases as the reference probability r increases. However, as the utilization U F increases further, the increasing tendency of the reference probability r slows down, and the cost of garbage collection operations increases, causing the average write cost Cavgw to increase again.
Therefore, the
If
Since the
The
The
Method performed in the
The flash memory device and / or the memory controller according to an embodiment of the present invention may be implemented using various types of packages. For example, a flash memory device and / or a memory controller according to an embodiment of the present invention may be a package on package (PoP), ball grid arrays (BGAs), chip scale packages (CSPs), plastic leaded chip carrier (PLCC), Plastic Dual In-Line Package (PDIP), Die in Waffle Pack, Die in Wafer Form, Chip On Board (COB), Ceramic Dual In-Line Package (CERDIP), Plastic Metric Quad Flat Pack (MQFP), Thin Quad Flatpack ( TQFP), Small Outline (SOIC), Shrink Small Outline Package (SSOP), Thin Small Outline (TSOP), Thin Quad Flatpack (TQFP), System In Package (SIP), Multi Chip Package (MCP), Wafer-level Fabricated Package (WFP), Wafer-Level Processed Stack Package (WSP), and the like.
The flash memory device and the memory controller may constitute a memory card. In this case, the memory controller may be configured to communicate with an external (eg, host) via one of various interface protocols such as USB, MMC, PCI-E, SATA, PATA, SCSI, ESDI, IDE, and the like.
The flash memory device is a nonvolatile memory device that can maintain stored data even when power is cut off. With the increasing use of mobile devices such as cellular phones, PDAs, digital cameras, portable game consoles, and MP3Ps, flash memory devices may become more widely used as code storage as well as data storage. Flash memory devices can also be used for home applications such as HDTV, DVD, routers, and GPS.
A computing system or host according to one embodiment of the invention includes a microprocessor, a user interface, a modem such as a baseband chipset, a memory controller, and a flash memory device electrically connected to a bus. The flash memory device will store, via the memory controller, N-bit data (N is an integer greater than or equal to 1) processed / to be processed by the microprocessor. When the computing system according to an embodiment of the present invention is a mobile device, a battery for supplying an operating voltage of the computing system will be further provided.
Those skilled in the art that the computing system according to an embodiment of the present invention may further be provided with an application chipset, a camera image processor (CIS), a mobile DRAM, and the like. Self-explanatory The memory controller and the flash memory device may, for example, constitute a solid state drive / disk (SSD) that uses nonvolatile memory to store data.
As described above, the present invention has been described by way of limited embodiments and drawings, but the present invention is not limited to the above embodiments, and those skilled in the art to which the present invention pertains various modifications and variations from such descriptions. This is possible.
Therefore, the scope of the present invention should not be limited to the described embodiments, but should be determined by the equivalents of the claims, as well as the claims.
100: memory management unit
110: metablock
120: sequential group
130: fusion group
140: free block
Claims (16)
When a TRIM instruction arrives for data belonging to a block included in the sequential group or the fusion group, the page associated with the TRIM instruction is invalidated and the invalidation is reflected to the sequential group by a block mapping technique. A mapping section that stores data sectors in a group by a page mapping technique.
Memory management device comprising a.
The block designation unit,
The TRIM command invalidates some or all of the pages of the sequential block, and moves at least a portion of the sequential blocks to the fusion group when the utilization rate of the sequential block is less than or equal to a threshold.
Memory Management Unit.
The block designation unit,
Maintain two or more empty blocks in a fusion group or maintain two or more empty blocks in free block space for garbage collection and defusion operations, and pages invalidated by the TRIM instruction are ignored without copying when performing the defusion operation. doing,
Memory Management Unit.
The block designation unit,
Considering the page invalidated by the TRIM command, the utilization rate of the fusion group is determined, and the utilization rate of the fusion group, the garbage collection cost, the average cost of the de-fusion operation, and the access operation for the fusion group and the sequential group are determined. Using the ratio to obtain the average page write cost of the memory management device,
Memory Management Unit.
The block designation unit,
Determine an optimal value of the number of blocks or valid pages in the fusion group based on the calculated average page write cost of the memory management device, and incrementally increase the number of blocks or the effective pages in the fusion group to reach the optimal value; To perform a defusion operation or a fusion operation,
Memory Management Unit.
The block designation unit,
A safety value obtained by adding a margin δ to an optimal value of the number of blocks or pages in the fusion group so as to provide stability against changes in the workload in consideration of sudden changes in the workload and measurement errors for the memory management device. Calculate, and then gradually apply a defusion operation or a fusion operation to reach the safe value,
Memory Management Unit.
The block designation unit,
In deriving the utilization of the garbage collection target block from the utilization of the fusion group, the reference graph derived from the standard workload is used, the difference between the actual measured value and the reference graph is measured, the correction data are obtained, and the correction data is obtained. To derive the utilization rate of the garbage collection target block,
Memory Management Unit.
The block designation unit,
Creating a plurality of empty blocks by performing a de-fusion operation in advance in system idle time of the computing system associated with the memory management apparatus;
Memory Management Unit.
Invalidating a page associated with the TRIM instruction when a TRIM instruction arrives for data belonging to a block included in the sequential group or a fusion group; And
Reflecting the invalidation, storing data sectors in the sequential group by a block mapping technique and in the fusion group by a page mapping technique.
Memory management method comprising a.
Invalidating part or all of the pages of the sequential block due to the TRIM command and moving at least a portion of the sequential block to the fusion group when the utilization rate of the sequential block is less than or equal to a threshold;
Further comprising, a memory management method.
Considering the page invalidated by the TRIM command, the utilization rate of the fusion group is determined, and the utilization rate of the fusion group, the garbage collection cost, the average cost of the de-fusion operation, and the access operation for the fusion group and the sequential group are determined. Calculating an average page write cost of the memory management device using a ratio
Further comprising, a memory management method.
Determining an optimal value of the number of blocks or valid pages in the fusion group based on the calculated average page write cost of the memory management device; And
Performing a fusion decommissioning operation or a fusion operation so that the number of blocks or the valid pages in the fusion group reaches the optimal value
Further comprising, a memory management method.
The determining of the optimal value may include determining an optimal value of the number of blocks or pages in the fusion group so as to provide stability against changes in the workload in consideration of sudden changes in the workload and measurement errors for the memory management apparatus. Calculate the safety value plus margin δ,
The step of performing a de-fusion operation or a fusion operation gradually includes applying a de-fusion operation or a fusion operation gradually to reach the safe value.
Memory management method.
When deriving the utilization of the garbage collection target block from the utilization of the fusion group, the reference graph derived from the standard workload is used, the difference between the actual measured value and the reference graph is measured, the correction data are obtained, and the correction data are obtained. Deriving the utilization rate of the garbage collection target block by using a memory management method.
Creating a plurality of empty blocks by performing a de-fusion operation in advance during system idle time of the computing system using the memory management method.
Further comprising, a memory management method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100135998A KR101157763B1 (en) | 2010-12-27 | 2010-12-27 | Variable space page mapping method and apparatus for flash memory device with trim command processing |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100135998A KR101157763B1 (en) | 2010-12-27 | 2010-12-27 | Variable space page mapping method and apparatus for flash memory device with trim command processing |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101157763B1 true KR101157763B1 (en) | 2012-06-25 |
Family
ID=46689128
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100135998A KR101157763B1 (en) | 2010-12-27 | 2010-12-27 | Variable space page mapping method and apparatus for flash memory device with trim command processing |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101157763B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019226205A1 (en) * | 2018-05-22 | 2019-11-28 | Western Digital Technologies, Inc. | Multiple sets of trim parameters |
US11249897B2 (en) | 2019-08-28 | 2022-02-15 | SK Hynix Inc. | Data storage device and operating method thereof |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090053901A (en) * | 2006-08-04 | 2009-05-28 | 쌘디스크 코포레이션 | Phased garbage collection |
KR20090107098A (en) * | 2008-04-08 | 2009-10-13 | 재단법인서울대학교산학협력재단 | Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems |
KR20100037319A (en) * | 2008-10-01 | 2010-04-09 | 서울시립대학교 산학협력단 | Variable space page mapping method and apparatus for flash memory device |
KR100977709B1 (en) | 2008-08-20 | 2010-08-24 | 주식회사 셀픽 | A flash memory storage device and a manage method using the same |
-
2010
- 2010-12-27 KR KR1020100135998A patent/KR101157763B1/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20090053901A (en) * | 2006-08-04 | 2009-05-28 | 쌘디스크 코포레이션 | Phased garbage collection |
KR20090107098A (en) * | 2008-04-08 | 2009-10-13 | 재단법인서울대학교산학협력재단 | Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems |
KR100977709B1 (en) | 2008-08-20 | 2010-08-24 | 주식회사 셀픽 | A flash memory storage device and a manage method using the same |
KR20100037319A (en) * | 2008-10-01 | 2010-04-09 | 서울시립대학교 산학협력단 | Variable space page mapping method and apparatus for flash memory device |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019226205A1 (en) * | 2018-05-22 | 2019-11-28 | Western Digital Technologies, Inc. | Multiple sets of trim parameters |
US10705758B2 (en) | 2018-05-22 | 2020-07-07 | Western Digital Technologies, Inc. | Multiple sets of trim parameters |
US11416175B2 (en) | 2018-05-22 | 2022-08-16 | Western Digital Technologies, Inc. | Multiple sets of trim parameters |
US11907583B2 (en) | 2018-05-22 | 2024-02-20 | Western Digital Technologies, Inc. | Multiple sets of trim parameters |
US11249897B2 (en) | 2019-08-28 | 2022-02-15 | SK Hynix Inc. | Data storage device and operating method thereof |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR100965051B1 (en) | Variable space page mapping method and apparatus for flash memory device | |
US10713161B2 (en) | Memory system and method for controlling nonvolatile memory | |
US11474702B2 (en) | Storage device that writes data from a host during garbage collection | |
US10789162B2 (en) | Memory system and method for controlling nonvolatile memory | |
US11893238B2 (en) | Method of controlling nonvolatile semiconductor memory | |
US11355197B2 (en) | Memory system with nonvolatile cache and control method thereof | |
KR101553532B1 (en) | Storage device | |
US20150127889A1 (en) | Nonvolatile memory system | |
JP2020529679A (en) | Extending SSD lifespan | |
KR101017067B1 (en) | Locality-Aware Garbage Collection Technique for NAND Flash Memory-Based Storage Systems | |
WO2017022082A1 (en) | Flash memory package and storage system including flash memory package | |
KR101456370B1 (en) | Method and device for management of storage | |
KR101157763B1 (en) | Variable space page mapping method and apparatus for flash memory device with trim command processing | |
US11972143B2 (en) | Techniques for balancing write commands on solid state storage devices (SSDs) | |
JP6721765B2 (en) | Memory system and control method | |
US12019872B2 (en) | Storage device that writes data from a host during garbage collection | |
JP6666405B2 (en) | Memory system and control method | |
JP6552701B2 (en) | Memory system and control method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20150611 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20160503 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20180530 Year of fee payment: 7 |