TW202001565A - Method for managing flash memory module and associated flash memory controller and electronic device - Google Patents
Method for managing flash memory module and associated flash memory controller and electronic device Download PDFInfo
- Publication number
- TW202001565A TW202001565A TW107121232A TW107121232A TW202001565A TW 202001565 A TW202001565 A TW 202001565A TW 107121232 A TW107121232 A TW 107121232A TW 107121232 A TW107121232 A TW 107121232A TW 202001565 A TW202001565 A TW 202001565A
- Authority
- TW
- Taiwan
- Prior art keywords
- data table
- garbage collection
- demand data
- flash memory
- read
- 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/0253—Garbage collection, i.e. reclamation of unreferenced memory
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/07—Responding to the occurrence of a fault, e.g. fault tolerance
- G06F11/0703—Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
- G06F11/0751—Error or fault detection not based on redundancy
- G06F11/0754—Error or fault detection not based on redundancy by exceeding limits
- G06F11/076—Error or fault detection not based on redundancy by exceeding limits by exceeding a count or rate limit, e.g. word- or bit count limit
-
- 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/0292—User address space allocation, e.g. contiguous or non contiguous base addressing using tables or multilevel address translation means
-
- 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/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/0608—Saving storage space on storage systems
-
- 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/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0655—Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
- G06F3/0658—Controller construction arrangements
-
- 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
- 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
- G06F2212/00—Indexing scheme relating to accessing, addressing or allocation within memory systems or architectures
- G06F2212/10—Providing a specific technical effect
- G06F2212/1041—Resource optimization
- G06F2212/1044—Space efficiency improvement
-
- 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)
- Quality & Reliability (AREA)
- Memory System (AREA)
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
Description
本發明係有關於快閃記憶體,尤指一種管理快閃記憶體模組的方法及相關的快閃記憶體控制器及電子裝置。The present invention relates to flash memory, in particular to a method for managing flash memory modules and related flash memory controllers and electronic devices.
在傳統的快閃記憶體控制器中,若是在短時間內很多區塊有垃圾收集(garbage collection)的需求時,快閃記憶體控制器會根據預設的優先性順序來依序對區塊進行垃圾收集操作,例如先對有耗損平均(wear-leveling)需求的區塊進行垃圾收集操作…等等。然而,由於每一個區塊需要進行垃圾收集操作的考慮因素很多,除了耗損平均需求之外可能還有讀取回收(read reclaim)需求或是讀取更新(read refresh)需求,因此,先前技術中單純根據預設的優先性來決定區塊進行垃圾收集操作的順序並無法考慮到區塊的實際的需求。另外,由於垃圾收集操作所需的時間較多,因此一般來說不可能一次就將所有具有垃圾收集需求的區塊全部完成,因此先前技術中的做法很有可能會使得部分預設優先性順序較低的區塊一直無法進行垃圾收集操作,因而導致可能的資料損失(data loss)。In a traditional flash memory controller, if many blocks have garbage collection requirements in a short time, the flash memory controller will sequentially order the blocks according to the preset priority order Carry out garbage collection operations, such as first performing garbage collection operations on blocks with wear-leveling requirements...etc. However, because there are many considerations for each block that requires garbage collection operations, in addition to the average wear and tear requirements, there may be read reclaim or read refresh requirements. Therefore, in the prior art Simply determining the order in which blocks perform garbage collection operations based on preset priorities does not take into account the actual needs of the blocks. In addition, because the garbage collection operation requires more time, it is generally impossible to complete all blocks with garbage collection requirements at one time, so the practice in the prior art is likely to make some preset priorities The lower blocks have been unable to perform garbage collection operations, resulting in possible data loss.
因此,本發明的目的之一在於設計一種管理快閃記憶體模組的方法,其透過建立一垃圾收集對照表,以記錄每一個區塊目前需要進行垃圾收集操作的優先性,以供快閃記憶體控制器進行垃圾收集操作時的參考,以解決先前技術中的問題。Therefore, one of the objects of the present invention is to design a method for managing flash memory modules by establishing a garbage collection comparison table to record the priority of each block currently required for garbage collection operations for flash The memory controller refers to the garbage collection operation to solve the problems in the prior art.
在本發明的一個實施例中,揭露了一種管理一快閃記憶體模組的方法,其中該快閃記憶體模組包含了多個區塊,以及該方法包含有:建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In one embodiment of the present invention, a method for managing a flash memory module is disclosed, wherein the flash memory module includes a plurality of blocks, and the method includes: establishing a garbage collection comparison table , Where the garbage collection comparison table records multiple pieces of importance information corresponding to the multiple blocks, where each piece of importance information is used to indicate the priority of the corresponding block for a garbage collection operation; and When the flash memory module needs to perform the garbage collection operation, it refers to the garbage collection comparison table to determine a specific block that needs to be prioritized for the garbage collection operation, and starts the garbage collection operation from the specific block.
在本發明的另一個實施例中,揭露了一種快閃記憶體控制器,其中該快閃記憶體控制器係用來存取一快閃記憶體模組,該快閃記憶體模組包含了多個區塊,且該快閃記憶體控制器包含有用來執行該程式碼的一唯讀記憶體以及用來執行該程式碼以控制對該快閃記憶體模組之存取的一微處理器。在該快閃記憶體控制器的操作中,該微處理器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該微處理器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In another embodiment of the invention, a flash memory controller is disclosed, wherein the flash memory controller is used to access a flash memory module, the flash memory module includes Multiple blocks, and the flash memory controller includes a read-only memory for executing the code and a micro-processing for executing the code to control access to the flash memory module Device. In the operation of the flash memory controller, the microprocessor establishes a garbage collection comparison table, wherein the garbage collection comparison table records a plurality of importance information corresponding to the plurality of blocks, each of which is important Sex information is used to indicate the priority of a garbage collection operation for the corresponding block; and when the flash memory module needs to perform the garbage collection operation, the microprocessor refers to the garbage collection comparison table to determine It is necessary to prioritize a specific block of the garbage collection operation, and start the garbage collection operation from the specific block.
在本發明的另一個實施例中,揭露了一種電子裝置,其包含有包含多個區塊的一快閃記憶體模組以及用來存取該快閃記憶體模組的一快閃記憶體控制器。在該電子裝置的操作中,該快閃記憶體控制器建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性;以及當該快閃記憶體模組需要進行該垃圾收集操作時,該快閃記憶體控制器參考該垃圾收集對照表以決定出需要優先進行該垃圾收集操作的一特定區塊,並由該特定區塊開始進行該垃圾收集操作。In another embodiment of the present invention, an electronic device is disclosed, which includes a flash memory module including a plurality of blocks and a flash memory for accessing the flash memory module Controller. During the operation of the electronic device, the flash memory controller creates a garbage collection comparison table, wherein the garbage collection comparison table records a plurality of importance information corresponding to the plurality of blocks, each of which is important The information is used to indicate the priority of a garbage collection operation for the corresponding block; and when the flash memory module needs to perform the garbage collection operation, the flash memory controller refers to the garbage collection comparison table to It is determined that a specific block that needs to be prioritized for the garbage collection operation is started from the specific block.
第1圖為依據本發明一實施例之一種記憶裝置100的示意圖。記憶裝置100包含有一快閃記憶體(Flash Memory)模組120以及一快閃記憶體控制器110,且快閃記憶體控制器110用來存取快閃記憶體模組120。依據本實施例,快閃記憶體控制器110包含一微處理器112、一唯讀記憶體(Read Only Memory, ROM)112M、一控制邏輯114、一緩衝記憶體116、與一介面邏輯118。唯讀記憶體112M係用來儲存一程式碼112C,而微處理器112則用來執行程式碼112C以控制對快閃記憶體模組120之存取(Access)。控制邏輯114包含了一編碼器132以及一解碼器134,其中編碼器132用來對寫入到快閃記憶體模組120中的資料進行編碼以產生對應的校驗碼(或稱,錯誤更正碼(Error Correction Code),ECC),而解碼器134用來將從快閃記憶體模組120所讀出的資料進行解碼。FIG. 1 is a schematic diagram of a
於典型狀況下,快閃記憶體模組120包含了多個快閃記憶體晶片,而每一個快閃記憶體晶片包含複數個區塊(Block),而快閃記憶體控制器110對快閃記憶體模組120進行抹除資料運作係以區塊為單位來進行。另外,一區塊可記錄特定數量的資料頁(Page),其中快閃記憶體控制器110對快閃記憶體模組120進行寫入資料之運作係以資料頁為單位來進行寫入。在本實施例中,快閃記憶體模組120為一立體NAND型快閃記憶體(3D NAND-type flash)模組。Under typical conditions, the
實作上,透過微處理器112執行程式碼112C之快閃記憶體控制器110可利用其本身內部之元件來進行諸多控制運作,例如:利用控制邏輯114來控制快閃記憶體模組120之存取運作(尤其是對至少一區塊或至少一資料頁之存取運作)、利用緩衝記憶體116進行所需之緩衝處理、以及利用介面邏輯118來與一主裝置(Host Device)130溝通。緩衝記憶體116係以隨機存取記憶體(Random Access Memory,RAM)來實施。例如,緩衝記憶體116可以是靜態隨機存取記憶體(Static RAM,SRAM),但本發明不限於此。In practice, the
在一實施例中,記憶裝置100可以是可攜式記憶裝置(例如:符合SD/MMC、CF、MS、XD標準之記憶卡),且主裝置130為一可與記憶裝置連接的電子裝置,例如手機、筆記型電腦、桌上型電腦…等等。而在另一實施例中,記憶裝置100可以是固態硬碟或符合通用快閃記憶體儲存(Universal Flash Storage,UFS)或嵌入式多媒體記憶卡(Embedded Multi Media Card,EMMC)規格之嵌入式儲存裝置,以設置在一電子裝置中,例如設置在手機、筆記型電腦、桌上型電腦之中,而此時主裝置130可以是該電子裝置的一處理器。In one embodiment, the
在快閃記憶體控制器110讀取快閃記憶體模組120的過程中,快閃記憶體控制器110會根據存取過程所得到的資訊以建立/更新一耗損平均需求資料表、一讀取回收需求資料表以及一讀取更新需求資料表。具體來說,先參考第2圖,其為根據本發明一實施例之耗損平均需求資料表200的示意圖。參考第2圖,假設快閃記憶體模組120中具有多個區塊B1、B2、B3、…,則耗損平均需求資料表200便可以記錄該多個區塊中抹除次數高於一第一臨界值的區塊及其抹除次數,其中該抹除次數指的是從快閃記憶體控制器110與快閃記憶體模組120連結後開始運作便開始計算的總抹除次數。舉例來說,假設該第一臨界值為60,則由於區塊B9、B6、B1、B7的抹除次數分別為高於60次的86、62、95、63次,則耗損平均需求資料表200便會將區塊B9、B6、B1、B7及其抹除次數記錄在其中,而其餘的區塊由於抹除次數不高於60次或是屬於空白區塊,因此並未記錄在耗損平均需求資料表200中。During the process of the
第3圖為根據本發明一實施例之讀取回收需求資料表300的示意圖。參考第3圖,假設快閃記憶體模組120中具有如第2圖所示的多個區塊B1、B2、B3、…,則讀取回收需求資料表300便可以記錄該多個區塊中位元錯誤量高於一第二臨界值的區塊及其位元錯誤量。舉例來說,假設該第二臨界值為50個位元,則由於區塊B3、B9、B2、B5、B1的位元錯誤量分別為高於50次的56、58、65、68、52次,則讀取回收需求資料表300便會將區塊B3、B9、B2、B5、B1及其位元錯誤量記錄在其中。在本實施例中,讀取回收需求資料表300係為一佇列(queue),而上述的位元錯誤量係由快閃記憶體控制器110在讀取一區塊中任一資料頁的一區段(sector)或是一組塊(chunk)後進行解碼所得到,亦即當快閃記憶體控制器110在讀取區塊時若是發現所解碼之區段/組塊的位元錯誤量高於50,快閃記憶體控制器110才會將該區塊加入到讀取回收需求資料表300。FIG. 3 is a schematic diagram of reading a recycling demand data table 300 according to an embodiment of the invention. Referring to FIG. 3, assuming that the
第4圖為根據本發明一實施例之讀取更新需求資料表400的示意圖。參考第4圖,假設快閃記憶體模組120中具有如第2圖所示的多個區塊B1、B2、B3、…,則讀取更新需求資料表400便可以記錄該多個區塊中讀取次數高於一第三臨界值的區塊及其讀取次數。舉例來說,假設該第三臨界值為8000,則由於區塊B1、B4、B3的讀取次數分別為高於8000次的8012、8045、11210次,則讀取更新需求資料表400便會將區塊B1、B4、B3及其讀取次數記錄在其中。在本實施例中,更新需求資料表400僅繪示了佇列的部分,而在實作上更新需求資料表400亦可包含記錄了每一個區塊之讀取次數的一記錄表,而當快閃記憶體控制器110發出一讀取命令以要求讀取一區塊的資料時,便會將該區塊的讀取次數加上“1”,而當該區塊的內容被抹除後重新寫入資料時,該記錄表中該區塊的讀取次數便會重新開始計算。FIG. 4 is a schematic diagram of reading the update requirement data table 400 according to an embodiment of the invention. Referring to FIG. 4, assuming that the
在本實施例中,上述的耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400係隨著快閃記憶體控制器110存取快閃記憶體模組120的過程中不斷地更新於快閃記憶體模組120中,並且可暫存一份在緩衝記憶體116中。In the present embodiment, the above-mentioned wear-out average demand data table 200, read recycling demand data table 300, and read update demand data table 400 are used by the
在本實施例中,快閃記憶體控制器110會根據上述耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400的內容來建立一垃圾收集對照表,其中該垃圾收集對照表記錄了分別對應到該多個區塊的多個重要性資訊,其中每一個重要性資訊用以表示所對應之區塊需要進行一垃圾收集操作的優先性。參考第5圖,其為根據本發明一實施例之垃圾收集對照表500的示意圖。如第5圖所示,垃圾收集對照表500可以記錄每一個區塊B1、B2、B3、…的重要性資訊,其中該重要性資訊係由每一個區塊在耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400內的資訊所計算得到。具體來說,本實施例中係假設耗損平均需求的重要性大於讀取回收需求,且讀取回收需求的重要性大於讀取更新需求,因此假設耗損平均需求、讀取回收需求以及讀取更新需求的權重分別為4、2、1。因此,以區塊B1為例,由於在耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400都有記錄區塊B1,亦即區塊B1同時具有耗損平均需求、讀取回收需求以及讀取更新需求,因此區塊B1的重要性資訊可以計算如下:4*1+2*1+1*1=7;另外以區塊B3為例,由於區塊B3僅被記錄在讀取回收需求資料表300以及讀取更新需求資料表400中,亦即區塊B3僅具讀取回收需求以及讀取更新需求,因此區塊B3的重要性資訊可以計算如下:4*0+2*1+1*1=3。如上所述,由於每一個區塊的重要性資訊係同時參考耗損平均需求、讀取回收需求以及讀取更新需求來計算出來,因此可以確實反映出每一個區塊需要進行垃圾收集操作的優先性,亦即第5圖所示之重要性資訊的數值越高的需要優先進行垃圾收集操作。In this embodiment, the
在本實施例中,若是有兩個區塊的重要性資訊相同,例如第5圖的區塊B6、B7的重要性資訊都是“4”,則需要重新參考耗損平均需求資料表200、讀取回收需求資料表300及/或讀取更新需求資料表400的內容來決定出其優先順序。舉例來說,由於在第2圖中的耗損平均需求資料表200記錄了區塊B7的抹除次數高於區塊B6的抹除次數,因此快閃記憶體控制器110會判斷區塊B7進行垃圾收集操作的優先性會高於區塊B6。In this embodiment, if the importance information of two blocks is the same, for example, the importance information of blocks B6 and B7 in FIG. 5 are both "4", then it is necessary to refer again to the average wear and tear demand data table 200, read Retrieve the demand data table 300 and/or read the contents of the updated demand data table 400 to determine its priority. For example, since the wear-out average demand data table 200 in FIG. 2 records that the number of erases of block B7 is higher than the number of erases of block B6, the
在本實施例中,當快閃記憶體控制器110需要對快閃記憶體模組120進行垃圾收集操作時,其會根據垃圾收集對照表500所記錄的重要性資訊來依序對區塊B1、B9、B7、B6、B3、B5、B2、B4進行垃圾收集操作,亦即將其中的有效資料搬移到另外的空白區塊當中,並在一區塊內的所有有效資料都完成搬移之後將該區塊抹除或是標記為無效。In this embodiment, when the
如上所述,由於每一個區塊的重要性資訊係同時參考耗損平均需求、讀取回收需求以及讀取更新需求來計算出來,因此重要性資訊較高的區塊通常會同時具有兩個以上的需求,因此對優先對重要性資訊較高的區塊先進行垃圾收集操作可以同時完成兩個以上的需求,以提升快閃記憶體控制器110的效率。以第5圖為例來說明,由於重要性資訊最高的區塊B1同時具有耗損平均需求、讀取回收需求以及讀取更新需求,因此優先對區塊B1進行垃圾收集操作可以同時完成這三個需求,且也可以快速地釋放出讀取回收需求資料表300以及讀取更新需求資料表400的空間,避免佇列過溢(queue overflow)的情形。As mentioned above, since the importance information of each block is calculated by simultaneously referring to the average consumption demand, read recycling demand, and read update demand, a block with higher importance information usually has more than two Therefore, more than two requirements can be fulfilled at the same time by first performing garbage collection operations on the blocks with higher priority information to improve the efficiency of the
在本發明的另一個實施例中,垃圾收集對照表500可以僅根據耗損平均需求資料表200、讀取回收需求資料表300以及讀取更新需求資料表400中其中兩個資料表來建立,亦即垃圾收集對照表500可以僅反應每一個區塊的耗損平均需求以及讀取回收需求、或是僅反應每一個區塊的耗損平均需求以及讀取更新需求、或是僅反應每一個區塊的讀取回收需求以及讀取更新需求,這些設計上的變化均應隸屬於本發明的範疇。In another embodiment of the present invention, the garbage collection comparison table 500 can be created based on only two of the average wear and tear demand data table 200, the read recycling demand data table 300, and the read update demand data table 400. That is, the garbage collection comparison table 500 can only reflect the average wear and tear requirements and read recovery requirements of each block, or only the average wear and tear requirements and read and update requirements of each block, or only the response of each block. Reading and recycling requirements and reading and updating requirements, these design changes should all fall within the scope of the present invention.
需注意的是,第5圖所示之垃圾收集對照表500僅為一範例說明,而並非是作為本發明的限制。在其他的實施例中,垃圾收集對照表500可以僅記錄每一個區塊的編號及其重要性資訊的數值,且該重要性數值可以使用不同的記錄方式,只要垃圾收集對照表500所記錄的內容可以反映出每一個區塊對於垃圾收集操作的優先順序,其記錄方式可以由其他不同方式來呈現。It should be noted that the garbage collection comparison table 500 shown in FIG. 5 is only an example, and is not intended to be a limitation of the present invention. In other embodiments, the garbage collection comparison table 500 may only record the number of each block and the value of its importance information, and the importance value may use different recording methods, as long as the garbage collection comparison table 500 records The content can reflect the priority of each block for the garbage collection operation, and its recording method can be presented in other different ways.
在本發明的一實施例中,上述垃圾收集操作係在快閃記憶體模組120進行一背景掃描(background scan)的過程中進行,亦即快閃記憶體控制器110會週期性地或是根據一排程來決定是否開始進行垃圾收集操作,而當快閃記憶體控制器110決定要進行垃圾收集操作時,快閃記憶體控制器110才會參考第5圖所示之垃圾收集對照表500來決定由那些區塊優先開始進行。需注意的是,垃圾收集操作亦可以由其他機制所觸發,例如當快閃記憶體模組120內的可使用區塊(空白區塊)的數量不足時,而既然本實施例中的垃圾收集操作係在背景掃描中進行,則其區塊的決定順序便僅需要參考垃圾收集對照表500,而不需要考慮到其他類似可使用區塊不足的因素。In an embodiment of the present invention, the above garbage collection operation is performed during a background scan performed by the
第6圖為根據本發明一實施例之管理一快閃記憶體模組的方法的流程圖。參考以上第1~5圖所揭露的內容,第6圖的流程如下所述:FIG. 6 is a flowchart of a method for managing a flash memory module according to an embodiment of the invention. With reference to the contents disclosed in Figures 1 to 5 above, the flow in Figure 6 is as follows:
步驟600:流程開始。Step 600: The process begins.
步驟602:建立垃圾收集對照表,其中垃圾收集對照表記錄了分別對應到多個區塊的多個重要性資訊。Step 602: Create a garbage collection comparison table, where the garbage collection comparison table records multiple pieces of importance information corresponding to multiple blocks, respectively.
步驟604:當快閃記憶體控制器準備對快閃記憶體模組進行垃圾收集操作時,參考垃圾收集對照表以決定出需要優先進行該垃圾收集操作的特定區塊,並由特定區塊開始進行垃圾收集操作。Step 604: When the flash memory controller prepares to perform a garbage collection operation on the flash memory module, refer to the garbage collection comparison table to determine the specific block that needs to be prioritized for the garbage collection operation, and start from the specific block Perform garbage collection operations.
簡要歸納本發明,在本發明之管理快閃記憶體模組的方法及相關的快閃記憶體控制器中,其透過建立一垃圾收集對照表,以記錄每一個區塊目前需要進行垃圾收集操作的優先性,以供快閃記憶體控制器進行垃圾收集操作時的參考。由於垃圾收集對照表係動態地隨著快閃記憶體控制器存取快閃記憶體模組的過程中不斷地更新,因此垃圾收集對照表可以確實反映出正確的優先順序,以使得垃圾收集操作更有效率。 以上所述僅為本發明之較佳實施例,凡依本發明申請專利範圍所做之均等變化與修飾,皆應屬本發明之涵蓋範圍。To briefly summarize the present invention, in the method for managing flash memory modules and related flash memory controllers of the present invention, it establishes a garbage collection comparison table to record that each block currently needs garbage collection operations The priority of the flash memory controller for the garbage collection operation of the reference. Since the garbage collection comparison table is dynamically updated as the flash memory controller accesses the flash memory module, the garbage collection comparison table can indeed reflect the correct priority order, so that the garbage collection operation more efficient. The above are only the preferred embodiments of the present invention, and all changes and modifications made in accordance with the scope of the patent application of the present invention shall fall within the scope of the present invention.
100‧‧‧記憶裝置
110‧‧‧快閃記憶體控制器
112‧‧‧微處理器
112C‧‧‧程式碼
112M‧‧‧唯讀記憶體
114‧‧‧控制邏輯
116‧‧‧緩衝記憶體
118‧‧‧介面邏輯
120‧‧‧快閃記憶體模組
130‧‧‧主裝置
132‧‧‧編碼器
134‧‧‧解碼器
200‧‧‧耗損平均資料表
300‧‧‧讀取回收資料表
400‧‧‧讀取更新資料表
500‧‧‧垃圾收集對照表
600~604‧‧‧步驟
B0~B9‧‧‧區塊
100‧‧‧
第1圖為依據本發明一實施例之一種記憶裝置的示意圖。 第2圖為根據本發明一實施例之耗損平均需求資料表的示意圖。 第3圖為根據本發明一實施例之讀取回收需求資料表的示意圖。 第4圖為根據本發明一實施例之讀取更新需求資料表的示意圖。 第5圖為根據本發明一實施例之垃圾收集對照表的示意圖。 第6圖為根據本發明一實施例之管理一快閃記憶體模組的方法的流程圖。FIG. 1 is a schematic diagram of a memory device according to an embodiment of the invention. FIG. 2 is a schematic diagram of a wear-out average demand data table according to an embodiment of the invention. FIG. 3 is a schematic diagram of reading a recycling demand data table according to an embodiment of the invention. FIG. 4 is a schematic diagram of reading an update requirement data table according to an embodiment of the invention. FIG. 5 is a schematic diagram of a garbage collection comparison table according to an embodiment of the present invention. FIG. 6 is a flowchart of a method for managing a flash memory module according to an embodiment of the invention.
500‧‧‧垃圾收集對照表 500‧‧‧ garbage collection comparison table
B0~B9‧‧‧區塊 Block B0~B9‧‧‧
Claims (20)
Priority Applications (3)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107121232A TW202001565A (en) | 2018-06-21 | 2018-06-21 | Method for managing flash memory module and associated flash memory controller and electronic device |
CN201810750679.4A CN110633047A (en) | 2018-06-21 | 2018-07-10 | Method for managing flash memory module and related flash memory controller and electronic device |
US16/260,011 US20190391916A1 (en) | 2018-06-21 | 2019-01-28 | Method for managing flash memory module and associated flash memory controller and electronic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
TW107121232A TW202001565A (en) | 2018-06-21 | 2018-06-21 | Method for managing flash memory module and associated flash memory controller and electronic device |
Publications (1)
Publication Number | Publication Date |
---|---|
TW202001565A true TW202001565A (en) | 2020-01-01 |
Family
ID=68968194
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
TW107121232A TW202001565A (en) | 2018-06-21 | 2018-06-21 | Method for managing flash memory module and associated flash memory controller and electronic device |
Country Status (3)
Country | Link |
---|---|
US (1) | US20190391916A1 (en) |
CN (1) | CN110633047A (en) |
TW (1) | TW202001565A (en) |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102578188B1 (en) * | 2018-05-15 | 2023-09-14 | 에스케이하이닉스 주식회사 | Memory controller and operating method thereof |
US11200113B2 (en) * | 2020-01-14 | 2021-12-14 | Intel Corporation | Auto-increment write count for nonvolatile memory |
KR20210111527A (en) * | 2020-03-03 | 2021-09-13 | 에스케이하이닉스 주식회사 | Apparatus and method for performing garbage collection in a memory system |
US12061814B2 (en) | 2021-01-25 | 2024-08-13 | Pure Storage, Inc. | Using data similarity to select segments for garbage collection |
KR20220122064A (en) * | 2021-02-26 | 2022-09-02 | 에스케이하이닉스 주식회사 | Data storage device and its operation method |
US11961547B2 (en) * | 2022-02-09 | 2024-04-16 | Micron Technology, Inc. | Techniques for memory system refresh |
CN115454710B (en) * | 2022-11-10 | 2023-03-24 | 珠海妙存科技有限公司 | Flash memory data reading method and device, electronic equipment and storage medium |
Family Cites Families (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR100789406B1 (en) * | 2006-11-03 | 2007-12-28 | 삼성전자주식회사 | Flash memory system and its garbage collection method |
US8595572B2 (en) * | 2009-04-08 | 2013-11-26 | Google Inc. | Data storage device with metadata command |
US8266501B2 (en) * | 2009-09-29 | 2012-09-11 | Micron Technology, Inc. | Stripe based memory operation |
US8626986B2 (en) * | 2010-06-30 | 2014-01-07 | Sandisk Technologies Inc. | Pre-emptive garbage collection of memory blocks |
US8706983B2 (en) * | 2010-06-30 | 2014-04-22 | Sandisk Technologies Inc. | Garbage collection of memory blocks using volatile memory |
KR101774496B1 (en) * | 2010-12-08 | 2017-09-05 | 삼성전자주식회사 | Non-volatile memory device, devices having the same, method of operating the same |
US8589761B2 (en) * | 2011-05-31 | 2013-11-19 | Micron Technology, Inc. | Apparatus and methods for providing data integrity |
KR102164630B1 (en) * | 2013-06-28 | 2020-10-12 | 삼성전자주식회사 | Memory controller, and operation method of the memory controller |
EP3049962B1 (en) * | 2013-09-27 | 2019-10-23 | Intel Corporation | Mechanism for facilitating dynamic and proactive data management for computing devices |
KR102727958B1 (en) * | 2016-12-28 | 2024-11-11 | 에스케이하이닉스 주식회사 | Memory system and operating method of memory system |
-
2018
- 2018-06-21 TW TW107121232A patent/TW202001565A/en unknown
- 2018-07-10 CN CN201810750679.4A patent/CN110633047A/en active Pending
-
2019
- 2019-01-28 US US16/260,011 patent/US20190391916A1/en not_active Abandoned
Also Published As
Publication number | Publication date |
---|---|
US20190391916A1 (en) | 2019-12-26 |
CN110633047A (en) | 2019-12-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110908925B (en) | High-efficiency garbage collection method, data storage device and controller thereof | |
TWI692690B (en) | Method for accessing flash memory module and associated flash memory controller and electronic device | |
TW202001565A (en) | Method for managing flash memory module and associated flash memory controller and electronic device | |
US10474573B2 (en) | Method for managing flash memory module and associated flash memory controller and electronic device | |
CN111475425B (en) | Method for managing flash memory module and related flash memory controller and electronic device | |
TWI659304B (en) | Method for accessing flash memory module and associated flash memory controller and electronic device | |
TWI748410B (en) | Method and apparatus for performing block management regarding non-volatile memory | |
CN107590080B (en) | Mapping table updating method, memory control circuit unit and memory storage device | |
CN101630233B (en) | Data access method, storage system and controller for flash memory | |
TWI459198B (en) | Memory storage device, memory controller thereof, and method for identifying valid data | |
CN102890655B (en) | Memory storage device, its memory controller and effective data identification method | |
CN111338562B (en) | Data storage device and data processing method | |
TWI748542B (en) | Electronic device, flash memory controller and method for performing garbage collection operation on flash memory module | |
TW202013183A (en) | High efficiency garbage collection method, and associated data storage device and controller thereof | |
CN111488118A (en) | Method for managing flash memory module and related flash memory controller and electronic device | |
TWI670598B (en) | Method for managing flash memory module and associated flash memory controller and electronic device | |
TWI873852B (en) | Flash memory controller, memory device and associated control method | |
US12147670B2 (en) | Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table regions | |
TWI864944B (en) | Method for controlling flash memory module and associated flash memory controller and memory device | |
US12130743B2 (en) | Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table search | |
US20250094058A1 (en) | Control method of memory device, and associated flash memory controller and memory device | |
US20240232074A1 (en) | Method and apparatus for performing data access management of memory device in predetermined communications architecture with aid of unbalanced table update | |
TWI653630B (en) | Method for accessing flash memory module and related flash memory controller and electronic device | |
TW202512194A (en) | Flash memory controller, memory device and associated control method |