TW202232329A - Data arrangement method and memory storage system using persistent memory - Google Patents

Data arrangement method and memory storage system using persistent memory Download PDF

Info

Publication number
TW202232329A
TW202232329A TW110105060A TW110105060A TW202232329A TW 202232329 A TW202232329 A TW 202232329A TW 110105060 A TW110105060 A TW 110105060A TW 110105060 A TW110105060 A TW 110105060A TW 202232329 A TW202232329 A TW 202232329A
Authority
TW
Taiwan
Prior art keywords
memory
persistent
memory device
data
host system
Prior art date
Application number
TW110105060A
Other languages
Chinese (zh)
Other versions
TWI800795B (en
Inventor
侯冠宇
傅子瑜
Original Assignee
宏碁股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 宏碁股份有限公司 filed Critical 宏碁股份有限公司
Priority to TW110105060A priority Critical patent/TWI800795B/en
Publication of TW202232329A publication Critical patent/TW202232329A/en
Application granted granted Critical
Publication of TWI800795B publication Critical patent/TWI800795B/en

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A data arrangement method and a memory storage system using a persistent memory are disclosed. The method includes: activating a persistent memory in a host system; in a status that a connection between the host system and a memory device is established, storing a management table maintained by the memory device to the persistent memory; and in a data arrangement operation performed by the memory device, updating the management table in the persistent memory through the connection and copying target data from at least one first type memory unit to at least one second type memory unit by the memory device according to an updating result.

Description

使用持續性記憶體的資料整理方法與記憶體儲存系統Data organization method and memory storage system using persistent memory

本發明是有關於一種記憶體管理技術,且特別是有關於一種使用持續性記憶體的資料整理方法與記憶體儲存系統。The present invention relates to a memory management technology, and more particularly, to a data organization method and a memory storage system using persistent memory.

隨著記憶體儲存裝置的體積越做越小以及廠商成本考量,在記憶體儲存裝置中減少動態隨機存取記憶體(Dynamic Random Access Memory, DRAM)的容量與體積逐漸成為設計上的選擇之一。一般來說,在缺少DRAM(DRAM-less)的記憶體儲存裝置中,可藉由與主機系統共用記憶體(亦稱為主機系統記憶體緩衝器(Host Memory Buffer, HMB))的方式來彌補記憶體儲存裝置本身DRAM的不足。但是,基於目前的標準規範,主機系統所提供的記憶體都是揮發性記憶體(例如DRAM),其在非預期斷電時會導致資料遺失。因此,記憶體儲存裝置一般並不會將重要資料儲存於此HMB中,以避免突然斷電時的重要資料遺失而無法補救。受此限制,當DRAM-less的記憶體儲存裝置執行內部的資料整理(例如資料搬移)時,記憶體儲存裝置只能使用其內部容量更小的緩衝器(容量可能只有2~8MB)來執行資料整理,從而導致運作效率大幅下降。With the decreasing size of memory storage devices and the cost consideration of manufacturers, reducing the capacity and volume of dynamic random access memory (DRAM) in memory storage devices has gradually become one of the design choices. . Generally speaking, in a memory storage device lacking DRAM (DRAM-less), it can be compensated by sharing memory with the host system (also called Host Memory Buffer (HMB)). The insufficiency of DRAM in the memory storage device itself. However, based on current standard specifications, the memory provided by the host system is all volatile memory (eg, DRAM), which may cause data loss in the event of an unexpected power failure. Therefore, the memory storage device generally does not store the important data in the HMB, so as to avoid the loss of the important data when the power is suddenly turned off and cannot be recovered. Due to this limitation, when a DRAM-less memory storage device performs internal data organization (such as data movement), the memory storage device can only use its internal buffer with a smaller capacity (the capacity may only be 2~8MB) to perform Data collation, resulting in a significant drop in operational efficiency.

本發明提供一種使用持續性記憶體的資料整理方法與記憶體儲存系統,可使用主機系統端的持續性記憶體來提升記憶體儲存裝置執行內部資料整理的效率。The present invention provides a data sorting method and a memory storage system using persistent memory, which can use the persistent memory at the host system side to improve the efficiency of internal data sorting performed by a memory storage device.

本發明的實施例提供一種使用持續性記憶體的資料整理方法,其包括:啟用主機系統中的持續性記憶體;在所述主機系統與記憶體裝置之間的連線已建立的狀態下,將所述記憶體裝置所維護的管理表格儲存至所述持續性記憶體中;以及在所述記憶體裝置執行資料整理操作的過程中,所述記憶體裝置經由所述連線更新所述持續性記憶體中的所述管理表格,並根據更新結果將目標資料從所述記憶體裝置中的至少一第一類實體單元複製到所述記憶體裝置中的至少一第二類實體單元中進行儲存。An embodiment of the present invention provides a method for organizing data using persistent memory, which includes: enabling persistent memory in a host system; in a state where a connection between the host system and a memory device has been established, storing the management table maintained by the memory device in the persistent memory; and in the process of performing a data sorting operation on the memory device, the memory device updates the persistent memory via the connection and copying the target data from at least one entity unit of the first type in the memory device to at least one entity unit of the second type in the memory device according to the update result. store.

本發明的實施例另提供一種使用持續性記憶體的記憶體儲存系統,其包括主機系統與記憶體裝置。所述主機系統配置有持續性記憶體。所述記憶體裝置耦接至所述主機系統。所述主機系統用以啟用所述持續性記憶體。在所述主機系統與所述記憶體裝置之間的連線已建立的狀態下,所述記憶體裝置的記憶體控制器將所述記憶體裝置所維護的管理表格儲存至所述持續性記憶體中。在所述記憶體裝置執行資料整理操作的過程中,所述記憶體控制器經由所述連線更新所述持續性記憶體中的所述管理表格,並根據更新結果將目標資料從所述記憶體裝置中的至少一第一類實體單元複製到所述記憶體裝置中的至少一第二類實體單元中進行儲存。Embodiments of the present invention further provide a memory storage system using persistent memory, which includes a host system and a memory device. The host system is configured with persistent memory. The memory device is coupled to the host system. The host system is used to enable the persistent memory. In a state where the connection between the host system and the memory device has been established, the memory controller of the memory device stores the management table maintained by the memory device in the persistent memory in the body. During the process of performing the data sorting operation by the memory device, the memory controller updates the management table in the persistent memory via the connection, and deletes the target data from the memory according to the update result. At least one physical unit of the first type in the memory device is copied to at least one physical unit of the second type in the memory device for storage.

基於上述,主機系統可啟用其內部的持續性記憶體。在主機系統與記憶體裝置之間的連線已建立的狀態下,可將記憶體裝置所維護的管理表格儲存至所述持續性記憶體中。接著,在記憶體裝置執行資料整理操作的過程中,記憶體裝置可經由所述連線更新所述持續性記憶體中的管理表格,並根據更新結果將目標資料從記憶體裝置中的至少一第一類實體單元複製到至少一第二類實體單元中進行儲存。藉此,可有效提升記憶體儲存裝置執行內部資料整理的效率。Based on the above, the host system can enable its internal persistent memory. When the connection between the host system and the memory device is established, the management table maintained by the memory device can be stored in the persistent memory. Then, in the process of performing the data sorting operation on the memory device, the memory device can update the management table in the persistent memory through the connection, and according to the update result, the target data can be removed from at least one of the memory devices. The first type of physical unit is copied to at least one second type of physical unit for storage. In this way, the efficiency of the internal data arrangement of the memory storage device can be effectively improved.

圖1是根據本發明的一實施例所繪示的記憶體儲存系統的示意圖。請參照圖1,記憶體儲存系統10包括主機系統11與記憶體裝置12。主機系統11與記憶體裝置12之間的介面規範符合NVM Express(NVMe)介面標準。記憶體儲存系統10亦稱為NVMe儲存系統。FIG. 1 is a schematic diagram of a memory storage system according to an embodiment of the present invention. Referring to FIG. 1 , the memory storage system 10 includes a host system 11 and a memory device 12 . The interface specification between the host system 11 and the memory device 12 conforms to the NVM Express (NVMe) interface standard. The memory storage system 10 is also referred to as an NVMe storage system.

主機系統11耦接至記憶體裝置12並可將資料儲存至記憶體裝置12中或從記憶體裝置12中讀取資料。例如,主機系統11為可實質地與記憶體裝置12配合以儲存資料的任意系統,例如,電腦系統、數位相機、攝影機、通訊裝置、音訊播放器、視訊播放器或平板電腦等,而記憶體裝置12則可為隨身碟、記憶卡、固態硬碟(Solid State Drive, SSD)、安全數位(Secure Digital, SD)卡、小型快閃(Compact Flash, CF)卡或嵌入式儲存裝置等各式非揮發性記憶體儲存裝置。The host system 11 is coupled to the memory device 12 and can store data to or read data from the memory device 12 . For example, host system 11 is any system that can substantially cooperate with memory device 12 to store data, such as a computer system, digital camera, video camera, communication device, audio player, video player, or tablet, etc., while memory The device 12 can be a flash drive, a memory card, a Solid State Drive (SSD), a Secure Digital (SD) card, a Compact Flash (CF) card, or an embedded storage device. Non-volatile memory storage device.

主機系統11包括處理器111與持續性記憶體(persistent memory)112。處理器111耦接至持續性記憶體112。處理器111可運行作業系統(例如Windows或iOS等)並可負責主機系統11的部分或整體運作。例如,處理器111可包括中央處理單元(CPU)、或是其他可程式化之一般用途或特殊用途的微處理器、數位訊號處理器(Digital Signal Processor, DSP)、可程式化控制器、特殊應用積體電路(Application Specific Integrated Circuits, ASIC)、可程式化邏輯裝置(Programmable Logic Device, PLD)或其他類似裝置或這些裝置的組合。The host system 11 includes a processor 111 and a persistent memory 112 . The processor 111 is coupled to the persistent memory 112 . The processor 111 may run an operating system (eg, Windows or iOS, etc.) and may be responsible for part or the entire operation of the host system 11 . For example, the processor 111 may include a central processing unit (CPU), or other programmable general-purpose or special-purpose microprocessors, digital signal processors (DSPs), programmable controllers, special Application Specific Integrated Circuits (ASIC), Programmable Logic Device (PLD) or other similar devices or combinations of these devices.

持續性記憶體112配置於主機系統11中並用以儲存資料。持續性記憶體112在各位階的儲存媒體中的定位可介於傳統DRAM與固態硬碟(Solid state disk, SSD)之間。亦即,持續性記憶體112的資料存取速度雖稍慢於DRAM的資料存取速度,但持續性記憶體112的儲存容量可接近一般SSD的儲存容量。例如,假設傳統DRAM的儲存容量介於4GB至32GB之間,則持續性記憶體112的儲存容量可介於128GB至512GB之間或者更大。此外,持續性記憶體112的資料存取速度可例如為傳統SSD的資料存取速度的6倍以上。The persistent memory 112 is configured in the host system 11 and used to store data. Persistent memory 112 may be positioned between conventional DRAM and solid state disk (SSD) in various levels of storage media. That is, although the data access speed of the persistent memory 112 is slightly slower than the data access speed of the DRAM, the storage capacity of the persistent memory 112 can be close to that of a general SSD. For example, assuming that the storage capacity of conventional DRAM is between 4GB and 32GB, the storage capacity of persistent memory 112 may be between 128GB and 512GB or more. In addition, the data access speed of the persistent memory 112 may be, for example, more than 6 times that of the conventional SSD.

持續性記憶體112可選擇性地操作於揮發性模式與持續性模式。在揮發性模式中,儲存於持續性記憶體112中的資料會因主機系統11(突然的)斷電而遺失。也就是說,在揮發性模式中,持續性記憶體112的使用是類似於傳統DRAM,其可揮發性地儲存資料。在一實施例中,操作於揮發性模式的持續性記憶體112也可用來取代傳統DRAM或作為傳統DRAM的擴充。The persistent memory 112 can selectively operate in a volatile mode and a persistent mode. In volatile mode, data stored in persistent memory 112 is lost due to a (sudden) power failure of host system 11 . That is, in the volatile mode, persistent memory 112 is used similar to conventional DRAM, which can store data volatilely. In one embodiment, persistent memory 112 operating in a volatile mode can also be used to replace conventional DRAM or as an extension to conventional DRAM.

在持續性模式中,儲存於持續性記憶體112中的資料不會因主機系統11(突然的)斷電而遺失。也就是說,在持續性模式中,持續性記憶體112的使用是類似於SSD並可持續性地儲存資料。但是,相較於SSD是採用NAND封裝模型,持續性記憶體112是採用雙線記憶體模組(Dual In-line Memory Module, DIMM)封裝。因此,持續性記憶體112可相容於傳統上DRAM所使用的匯流排或通道。In persistent mode, the data stored in persistent memory 112 is not lost due to a (sudden) power failure of host system 11 . That is, in persistent mode, persistent memory 112 is used like an SSD and stores data sustainably. However, the persistent memory 112 is packaged in a Dual In-line Memory Module (DIMM), compared to the SSD in which the NAND package is used. Therefore, persistent memory 112 may be compatible with the busbars or channels conventionally used in DRAM.

在一實施例中,主機系統11還可包括其他儲存媒體(例如DRAM及/或SSD等)、電源供應電路(例如電池等)及各式輸入/輸出裝置(例如螢幕、鍵盤、滑鼠、觸控板、揚聲器、麥克風及/或網路介面卡等),本發明不加以限制。In one embodiment, the host system 11 may further include other storage media (eg, DRAM and/or SSD, etc.), power supply circuits (eg, batteries, etc.), and various input/output devices (eg, monitor, keyboard, mouse, touchscreen, etc.) control panel, speaker, microphone and/or network interface card, etc.), which is not limited in the present invention.

記憶體裝置12包括記憶體控制器(亦稱為快閃記憶體控制器)121與非揮發性記憶體模組122。記憶體控制器121可用以控制非揮發性記憶體模組122。例如,記憶體控制器121可控制非揮發性記憶體模組122執行資料的讀取、寫入及抹除。The memory device 12 includes a memory controller (also called a flash memory controller) 121 and a non-volatile memory module 122 . The memory controller 121 can be used to control the non-volatile memory module 122 . For example, the memory controller 121 can control the non-volatile memory module 122 to perform data reading, writing and erasing.

非揮發性記憶體模組122用以非揮發性的儲存資料。例如,非揮發性記憶體模組122可包含多個實體單元。每一個實體單元可包含多個記憶胞。每一個記憶胞可藉由臨界電壓的改變來儲存資料。須注意的是,同一個實體單元中的多個記憶胞可被同時程式化(例如施加寫入電壓)以儲存資料。例如,一個實體單元可為一個實體扇、實體頁或其他實體管理單元。The non-volatile memory module 122 is used for non-volatile storage of data. For example, the non-volatile memory module 122 may include multiple physical units. Each physical unit can contain multiple memory cells. Each memory cell can store data by changing the threshold voltage. It should be noted that multiple memory cells in the same physical unit can be programmed simultaneously (eg, applying a write voltage) to store data. For example, an entity unit may be an entity fan, entity page, or other entity management unit.

非揮發性記憶體模組122可包括單階胞(single level cell, SLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存1個位元的快閃記憶體模組)、多階胞(multi level cell, MLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存2個位元的快閃記憶體模組)、三階胞(triple level cell, TLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存3個位元的快閃記憶體模組)、四階胞(quad level cell, QLC)NAND型快閃記憶體模組(即,一個記憶胞可儲存4個位元的快閃記憶體模組)及/或其他類型的快閃記憶體模組。The non-volatile memory module 122 may include a single level cell (SLC) NAND type flash memory module (ie, a flash memory module in which one memory cell can store 1 bit), multiple Multi level cell (MLC) NAND type flash memory modules (ie, a memory cell can store 2 bits of flash memory modules), triple level cell (TLC) NAND type Flash memory modules (ie, one memory cell can store 3-bit flash memory modules), quad level cell (QLC) NAND-type flash memory modules (ie, one memory The cells can store 4-bit flash memory modules) and/or other types of flash memory modules.

非揮發性記憶體模組122包括儲存區(亦稱為快取區)1221與儲存區1222。儲存區1221中的每一個實體單元亦稱為第一類實體單元。儲存區1222中的每一個實體單元亦稱為第二類實體單元。儲存區1221中的單一個實體單元用以儲存n個位元。儲存區1222中的單一個實體單元用以儲存m個位元。m與n皆為正整數,且m大於n。在一實施例中,n可為1且m可為2、3或4。The non-volatile memory module 122 includes a storage area (also called a cache area) 1221 and a storage area 1222 . Each physical unit in the storage area 1221 is also called a first-type physical unit. Each physical unit in the storage area 1222 is also referred to as a second-type physical unit. A single physical unit in the storage area 1221 is used to store n bits. A single physical unit in the storage area 1222 is used to store m bits. Both m and n are positive integers, and m is greater than n. In one embodiment, n may be 1 and m may be 2, 3, or 4.

在一實施例中,儲存區1221中的每一個實體單元可基於虛擬SLC(pSLC)模式來程式化。因此,儲存區1221中經程式化的單一個記憶胞可儲存1個位元。在一實施例中,儲存區1222中的每一個實體單元可基於TLC或QLC模式來程式化。因此,儲存區1222中經程式化的單一個記憶胞可儲存3或4個位元。In one embodiment, each physical unit in storage area 1221 may be programmed based on a virtual SLC (pSLC) mode. Therefore, a single memory cell programmed in storage area 1221 can store 1 bit. In one embodiment, each physical unit in storage area 1222 may be programmed based on TLC or QLC mode. Thus, a single memory cell programmed in storage area 1222 can store 3 or 4 bits.

在一實施例中,記憶體裝置12中可不具有DRAM,故記憶體裝置12可亦稱為DRAM-less記憶體裝置。在一實施例中,記憶體控制器121及/或非揮發性記憶體模組122可具有靜態隨機存取記憶體(Static Random Access Memory, SRAM)。例如,記憶體控制器121及/或非揮發性記憶體模組122中的SRAM的儲存空間可約為2至8MB或者更大。In one embodiment, the memory device 12 may not have DRAM, so the memory device 12 may also be referred to as a DRAM-less memory device. In one embodiment, the memory controller 121 and/or the non-volatile memory module 122 may have static random access memory (SRAM). For example, the storage space of the SRAM in the memory controller 121 and/or the non-volatile memory module 122 may be about 2 to 8 MB or more.

在一實施例中,主機系統11的處理器111可啟用持續性記憶體112。例如,處理器111可將指示持續性記憶體112之使用狀態的指示值從位元“0(停用)”更新為位元“1(啟用)”。此外,處理器111可設定持續性記憶體112中允許提供給記憶體裝置12使用的儲存空間之容量。例如,處理器111可設定持續性記憶體112中的500MB的儲存空間可供記憶體裝置12使用。In one embodiment, the processor 111 of the host system 11 may enable persistent memory 112 . For example, the processor 111 may update the indication value indicating the usage state of the persistent memory 112 from the bit "0 (disabled)" to the bit "1 (enabled)". In addition, the processor 111 can set the capacity of the storage space in the persistent memory 112 that is allowed to be provided to the memory device 12 . For example, the processor 111 can set a storage space of 500MB in the persistent memory 112 for the memory device 12 to use.

在一實施例中,主機系統11可與記憶體裝置12執行交握(handshake)程序。例如,在交握程序中,主機系統11與記憶體裝置12可相互傳遞一或多種訊號來進行相互驗證。此交握程序可用以建立主機系統11與記憶體裝置12之間的連線。此連線亦符合NVMe介面標準。In one embodiment, the host system 11 may execute a handshake procedure with the memory device 12 . For example, in the handshake procedure, the host system 11 and the memory device 12 may communicate one or more signals to each other for mutual authentication. The handshake procedure can be used to establish a connection between the host system 11 and the memory device 12 . This connection also conforms to the NVMe interface standard.

在一實施例中,在主機系統11與記憶體裝置12之間的連線已建立的狀態下,記憶體裝置12的記憶體控制器121可將記憶體裝置12所維護的一或多個管理表格儲存至主機系統11的持續性記憶體112中。例如,所述管理表格可包括原先儲存於非揮發性記憶體模組122中的邏輯至實體映射表。此邏輯至實體映射表可記載與非揮發性記憶體模組122中的某些實體單元有關的邏輯至實體映射資訊。例如,此邏輯至實體映射資訊可包括非揮發性記憶體模組122中的某一個實體單元與某一個邏輯單元之間的映射資訊。其中,一個邏輯單元可以是指一或多個邏輯位址。In one embodiment, in a state where the connection between the host system 11 and the memory device 12 is established, the memory controller 121 of the memory device 12 can manage one or more items maintained by the memory device 12 . The table is stored in the persistent memory 112 of the host system 11 . For example, the management table may include a logical-to-physical mapping table originally stored in the non-volatile memory module 122 . The logical-to-physical mapping table may record logical-to-physical mapping information related to certain physical units in the non-volatile memory module 122 . For example, the logic-to-physical mapping information may include mapping information between a certain physical unit and a certain logical unit in the non-volatile memory module 122 . Wherein, a logical unit may refer to one or more logical addresses.

在一實施例中,記憶體控制器121可執行資料整理操作。此資料整理操作可將儲存於儲存區1221中的有效資料(亦稱為目標資料)複製到儲存區1222中進行集中儲存。其中有效資料是指當前有被邏輯單元映射的資料。例如,在此資料整理操作中,儲存區1221中的m個(例如3或4個)第一類實體單元所儲存的有效資料可被複製到儲存區1222中的n個(例如1個)第二類實體單元中進行集中儲存。爾後,儲存區1221中有效資料已被複製的第一類實體單元可被關聯至閒置池(free pool)並可在下次使用前被抹除,從而達到釋放儲存區1221中的可用空間之目的。In one embodiment, the memory controller 121 may perform data sorting operations. The data sorting operation can copy the valid data (also called target data) stored in the storage area 1221 to the storage area 1222 for centralized storage. The valid data refers to the data currently mapped by the logical unit. For example, in this data sorting operation, the valid data stored in m (eg, 3 or 4) first-type physical units in the storage area 1221 can be copied to n (eg, 1) first-type physical units in the storage area 1222 Centralized storage is carried out in the second-class entity unit. Afterwards, the first type of entity unit in the storage area 1221 whose valid data has been copied can be associated with a free pool and can be erased before the next use, so as to release the free space in the storage area 1221 .

在一實施例中,在執行所述資料整理操作的過程中,記憶體控制器121可經由前述主機系統11與記憶體裝置12之間的連線來更新持續性記憶體112中的所述管理表格,並根據更新結果將所述目標資料從所述儲存區1221中的m個(例如3或4個)第一類實體單元複製到所述儲存區1222中的n個(例如1個)第二類實體單元中進行儲存。In one embodiment, the memory controller 121 can update the management in the persistent memory 112 via the aforementioned connection between the host system 11 and the memory device 12 during the execution of the data sorting operation. form, and copy the target data from m (eg, 3 or 4) first-type entity units in the storage area 1221 to n (eg, 1) first-type entity units in the storage area 1222 according to the update result Storage in the second type of entity unit.

在一實施例中,記憶體控制器121可根據與所述目標資料有關的新的邏輯至實體映射資訊來更新持續性記憶體112中的所述管理表格。例如,假設原先從非揮發性記憶體模組122中讀取出來的管理表格(即邏輯至實體映射表)記載了與所述目標資料有關的舊的邏輯至實體映射資訊。此舊的邏輯至實體映射資訊可反映原先用以儲存所述目標資料的舊的實體單元(即第一類實體單元)與所述目標資料所屬的邏輯單元之間的舊的映射關係。In one embodiment, memory controller 121 may update the management table in persistent memory 112 according to new logical-to-physical mapping information related to the target data. For example, it is assumed that the management table (ie, the logical-to-physical mapping table) originally read from the non-volatile memory module 122 records the old logical-to-physical mapping information related to the target data. The old logical-to-physical mapping information can reflect the old mapping relationship between the old physical unit (ie, the first type of physical unit) originally used to store the target data and the logical unit to which the target data belongs.

在將此管理表格儲存至持續性記憶體112之後,記憶體控制器121可在持續性記憶體112中對此管理表格中的資訊進行修改與更新。例如,記憶體控制器121可在持續性記憶體112中,將與所述目標資料有關的舊的邏輯至實體映射資訊更新為與所述目標資料有關的新的邏輯至實體映射資訊。此新的邏輯至實體映射資訊可反映在所述資料整理操作中,用以儲存所述目標資料的新的實體單元(即第二類實體單元)與所述目標資料所屬的邏輯單元之間的新的映射關係。也就是說,持續性記憶體112中的經更新的所述管理表格可反映所述資料整理操作中,最終用來儲存所述目標資料的實體單元(即第二類實體單元)與所述目標資料所屬的邏輯單元之間的新的映射關係。After the management table is stored in the persistent memory 112 , the memory controller 121 can modify and update the information in the management table in the persistent memory 112 . For example, memory controller 121 may update old logical-to-physical mapping information related to the target data with new logical-to-physical mapping information related to the target data in persistent memory 112 . This new logical-to-physical mapping information can be reflected in the data sorting operation, and the relationship between the new physical unit (ie, the second type of physical unit) for storing the target data and the logical unit to which the target data belongs New mapping relationship. That is to say, the updated management table in the persistent memory 112 can reflect the physical unit (ie, the second type of physical unit) that is finally used to store the target data in the data sorting operation and the target A new mapping relationship between the logical units to which the data belongs.

在一實施例中,在完成所述資料整理操作後,記憶體控制器121可將經更新的所述管理表格從持續性記憶體112中讀取回來並將其回存至非揮發性記憶體模組122中。爾後,當需要存取所述目標資料時,記憶體控制器121可根據此管理表格來決定目前用以儲存所述目標資料的實體單元。In one embodiment, after completing the data sorting operation, the memory controller 121 may read the updated management table back from the persistent memory 112 and store it back to the non-volatile memory in module 122. Then, when the target data needs to be accessed, the memory controller 121 can determine the physical unit currently used to store the target data according to the management table.

在一實施例中,主機系統11的處理器111還可將持續性記憶體112中允許提供給記憶體裝置12使用的儲存空間配置為操作於所述持續性模式。在所述持續性模式下,儲存於持續性記憶體112中的所述管理表格將不會因為主機系統11發生非預期斷電而遺失。藉此,可提高記憶體裝置12執行所述資料整理操作的可靠度。In one embodiment, the processor 111 of the host system 11 may also configure the storage space in the persistent memory 112 that is allowed to be provided for use by the memory device 12 to operate in the persistent mode. In the persistent mode, the management table stored in the persistent memory 112 will not be lost due to unexpected power failure of the host system 11 . Thereby, the reliability of the memory device 12 to perform the data sorting operation can be improved.

在一實施例中,若記憶體裝置12為DRAM-less記憶體裝置(即記憶體裝置12中不具有DRAM或DRAM的儲存空間不足),在不使用主機系統11中的持續性記憶體112(或者只能使用主機系統11中的DRAM等揮發性記憶體)的前提下,記憶體裝置12只能單純使用記憶體控制器121及/或非揮發性記憶體模組122中的SRAM來儲存所述管理表格。若所述管理表格的資料量大於所述SRAM的容量,則所述管理表格需要在所述資料整理操作的執行過程中分批儲存至所述SRAM中進行查詢與修改,從而導致所述資料整理操作的執行效率降低。In one embodiment, if the memory device 12 is a DRAM-less memory device (ie, the memory device 12 does not have DRAM or the storage space of the DRAM is insufficient), the persistent memory 112 ( Or under the premise that only volatile memory such as DRAM in the host system 11 can be used), the memory device 12 can only use the SRAM in the memory controller 121 and/or the non-volatile memory module 122 to store all the data. the management form. If the data volume of the management table is greater than the capacity of the SRAM, the management table needs to be stored in batches in the SRAM for query and modification during the execution of the data sorting operation, thereby causing the data sorting The execution efficiency of the operation is reduced.

在一實施例中,假設記憶體裝置12為DRAM-less記憶體裝置(即記憶體裝置12中不具有DRAM或DRAM的儲存空間不足)。然而,在可以使用主機系統11中的持續性記憶體112(且可使用的持續性記憶體112中的儲存空間是操作於持續性模式)的前提下,藉由大容量且具有資料持續性的持續性記憶體112來儲存所述管理表格,可有效提高所述資料整理操作的執行效率。In one embodiment, it is assumed that the memory device 12 is a DRAM-less memory device (ie, the memory device 12 does not have DRAM or the storage space of DRAM is insufficient). However, under the premise that the persistent memory 112 in the host system 11 can be used (and the storage space in the usable persistent memory 112 is operated in the persistent mode), by means of a large-capacity and data-persistent memory The persistent memory 112 is used to store the management table, which can effectively improve the execution efficiency of the data sorting operation.

在一實施例中,無論記憶體裝置12是否具有足夠的DRAM儲存空間,在執行所述資料整理操作的過程中,執行所述資料整理操作所需的管理表格可以一次性的傳送至主機系統11的持續性記憶體112中進行儲存、查詢及更新,從而提高所述資料整理操作的執行效率。在完成所述資料整理操作後,持續性記憶體112中經更新的所述管理表格可以再回存至記憶體裝置12的非揮發性記憶體模組122中,以供後續使用。In one embodiment, regardless of whether the memory device 12 has sufficient DRAM storage space, during the process of performing the data sorting operation, the management table required for performing the data sorting operation can be transmitted to the host system 11 at one time. The storage, query and update are performed in the persistent memory 112 of the data, thereby improving the execution efficiency of the data sorting operation. After the data sorting operation is completed, the updated management table in the persistent memory 112 can be restored to the non-volatile memory module 122 of the memory device 12 for subsequent use.

圖2是根據本發明的一實施例所繪示的使用持續性記憶體的資料整理方法的流程圖。請參照圖2,在步驟S201中,啟用主機系統中的持續性記憶體。在步驟S202中,在所述主機系統與記憶體裝置之間的連線已建立的狀態下,將所述記憶體裝置所維護的管理表格儲存至所述持續性記憶體中。在步驟S203中,在所述記憶體裝置執行資料整理操作的過程中,所述記憶體裝置經由所述連線更新所述持續性記憶體中的所述管理表格,並根據更新結果將目標資料從所述記憶體裝置中的至少一第一類實體單元複製到所述記憶體裝置中的至少一第二類實體單元中進行儲存。FIG. 2 is a flowchart of a method for organizing data using persistent memory according to an embodiment of the present invention. Referring to FIG. 2, in step S201, the persistent memory in the host system is enabled. In step S202, when the connection between the host system and the memory device has been established, the management table maintained by the memory device is stored in the persistent memory. In step S203, during the process of performing the data sorting operation on the memory device, the memory device updates the management table in the persistent memory via the connection, and organizes the target data according to the update result. Copying from at least one physical unit of the first type in the memory device to at least one physical unit of the second type in the memory device for storage.

然而,圖2中各步驟已詳細說明如上,在此便不再贅述。值得注意的是,圖2中各步驟可以實作為多個程式碼或是電路,本發明不加以限制。此外,圖2的方法可以搭配以上範例實施例使用,也可以單獨使用,本發明不加以限制。However, each step in FIG. 2 has been described above in detail, and will not be repeated here. It should be noted that each step in FIG. 2 can be implemented as a plurality of program codes or circuits, which is not limited by the present invention. In addition, the method of FIG. 2 can be used in conjunction with the above exemplary embodiments, and can also be used alone, which is not limited by the present invention.

綜上所述,本發明提出的實施例可在記憶體裝置執行內部的資料整理操作時,使用主機系統端具有資料持續性的持續性記憶體來儲存執行所述資料整理操作所需的管理表格。藉此,可有效提升記憶體儲存裝置執行內部資料整理的操作效率。To sum up, the embodiments of the present invention can use persistent memory with data persistence on the host system side to store the management table required for performing the data sorting operation when the memory device performs the internal data sorting operation. . In this way, the operation efficiency of the internal data arrangement performed by the memory storage device can be effectively improved.

雖然本發明已以實施例揭露如上,然其並非用以限定本發明,任何所屬技術領域中具有通常知識者,在不脫離本發明的精神和範圍內,當可作些許的更動與潤飾,故本發明的保護範圍當視後附的申請專利範圍所界定者為準。Although the present invention has been disclosed above by the embodiments, it is not intended to limit the present invention. Anyone with ordinary knowledge in the technical field can make some changes and modifications without departing from the spirit and scope of the present invention. Therefore, The protection scope of the present invention shall be determined by the scope of the appended patent application.

10:記憶體儲存系統 11:主機系統 111:處理器 112:持續性記憶體 12:記憶體裝置 121:記憶體控制器 122:非揮發性記憶體模組 1221, 1222:儲存區 S201~S203:步驟 10: Memory Storage System 11: Host system 111: Processor 112: persistent memory 12: Memory device 121: Memory Controller 122: Non-volatile memory module 1221, 1222: Storage area S201~S203: Steps

圖1是根據本發明的一實施例所繪示的記憶體儲存系統的示意圖。 圖2是根據本發明的一實施例所繪示的使用持續性記憶體的資料整理方法的流程圖。 FIG. 1 is a schematic diagram of a memory storage system according to an embodiment of the present invention. FIG. 2 is a flowchart of a method for organizing data using persistent memory according to an embodiment of the present invention.

S201~S203:步驟 S201~S203: Steps

Claims (10)

一種使用持續性記憶體的資料整理方法,包括: 啟用一主機系統中的一持續性記憶體; 在該主機系統與一記憶體裝置之間的一連線已建立的狀態下,將該記憶體裝置所維護的一管理表格儲存至該持續性記憶體中;以及 在該記憶體裝置執行一資料整理操作的過程中,該記憶體裝置經由該連線更新該持續性記憶體中的該管理表格,並根據一更新結果將一目標資料從該記憶體裝置中的至少一第一類實體單元複製到該記憶體裝置中的至少一第二類實體單元中進行儲存。 A data organization method using persistent memory, comprising: enabling a persistent memory in a host system; In a state where a connection between the host system and a memory device is established, a management table maintained by the memory device is stored in the persistent memory; and During the process of performing a data sorting operation by the memory device, the memory device updates the management table in the persistent memory via the connection, and changes a target data from the data in the memory device according to an update result. At least one physical unit of the first type is copied to at least one physical unit of the second type in the memory device for storage. 如請求項1所述的使用持續性記憶體的資料整理方法,其中該持續性記憶體可操作於一揮發性模式與一持續性模式, 在該揮發性模式中,儲存於該持續性記憶體中的資料會因該主機系統斷電而遺失,並且 在該持續性模式中,儲存於該持續性記憶體中的該資料不會因該主機系統斷電而遺失。 The data organizing method using persistent memory as claimed in claim 1, wherein the persistent memory can operate in a volatile mode and a persistent mode, In the volatile mode, data stored in the persistent memory is lost due to power loss of the host system, and In the persistent mode, the data stored in the persistent memory is not lost due to power failure of the host system. 如請求項2所述的使用持續性記憶體的資料整理方法,更包括: 將該持續性記憶體的至少一部分儲存空間配置為操作於該持續性模式,且該管理表格是儲存於操作於該持續性模式的該至少一部分儲存空間。 The data organizing method using persistent memory as described in claim 2, further comprising: At least a portion of the storage space of the persistent memory is configured to operate in the persistent mode, and the management table is stored in the at least a portion of the storage space that operates in the persistent mode. 如請求項1所述的使用持續性記憶體的資料整理方法,其中該至少一第一類實體單元與該至少一第二類實體單元皆包含於該記憶體裝置的一非揮發性記憶體模組中,該至少一第一類實體單元中的單一個記憶胞用以儲存n個位元,該至少一第二類實體單元中的單一個記憶胞用以儲存m個位元,m與n皆為正整數,且m大於n。The data collation method using persistent memory as claimed in claim 1, wherein the at least one first-type physical unit and the at least one second-type physical unit are both included in a non-volatile memory model of the memory device In the group, a single memory cell in the at least one first type of physical unit is used to store n bits, a single memory cell in the at least one second type of physical unit is used to store m bits, m and n All are positive integers, and m is greater than n. 如請求項1所述的使用持續性記憶體的資料整理方法,其中該管理表格包括邏輯至實體映射表。The data organizing method using persistent memory as claimed in claim 1, wherein the management table includes a logic-to-entity mapping table. 一種使用持續性記憶體的記憶體儲存系統,包括: 一主機系統,配置有一持續性記憶體;以及 一記憶體裝置,耦接至該主機系統, 其中該主機系統用以啟用該持續性記憶體, 在該主機系統與該記憶體裝置之間的一連線已建立的狀態下,該記憶體裝置的一記憶體控制器將該記憶體裝置所維護的一管理表格儲存至該持續性記憶體中,並且 在該記憶體裝置執行一資料整理操作的過程中,該記憶體控制器經由該連線更新該持續性記憶體中的該管理表格,並根據一更新結果將一目標資料從該記憶體裝置中的至少一第一類實體單元複製到該記憶體裝置中的至少一第二類實體單元中進行儲存。 A memory storage system using persistent memory, comprising: a host system configured with a persistent memory; and a memory device coupled to the host system, wherein the host system is used to enable the persistent memory, In a state that a connection between the host system and the memory device has been established, a memory controller of the memory device stores a management table maintained by the memory device in the persistent memory ,and During the process of performing a data sorting operation on the memory device, the memory controller updates the management table in the persistent memory via the connection, and removes a target data from the memory device according to an update result The at least one first-type physical unit of the memory device is copied to at least one second-type physical unit in the memory device for storage. 如請求項6所述的使用持續性記憶體的記憶體儲存系統,其中該持續性記憶體可操作於一揮發性模式與一持續性模式, 在該揮發性模式中,儲存於該持續性記憶體中的資料會因該主機系統斷電而遺失,並且 在該持續性模式中,儲存於該持續性記憶體中的該資料不會因該主機系統斷電而遺失。 The memory storage system using persistent memory as claimed in claim 6, wherein the persistent memory is operable in a volatile mode and a persistent mode, In the volatile mode, data stored in the persistent memory is lost due to power loss of the host system, and In the persistent mode, the data stored in the persistent memory is not lost due to power failure of the host system. 如請求項7所述的使用持續性記憶體的記憶體儲存系統,其中該主機系統更用以將該持續性記憶體的至少一部分儲存空間配置為操作於該持續性模式,並且 該管理表格是儲存於操作於該持續性模式的該至少一部分儲存空間。 The memory storage system using persistent memory as claimed in claim 7, wherein the host system is further configured to configure at least a portion of the storage space of the persistent memory to operate in the persistent mode, and The management table is stored in the at least a portion of the storage space operating in the persistent mode. 如請求項6所述的使用持續性記憶體的記憶體儲存系統,其中該至少一第一類實體單元與該至少一第二類實體單元皆包含於該記憶體裝置的一非揮發性記憶體模組中,該至少一第一類實體單元中的單一個記憶胞用以儲存n個位元,該至少一第二類實體單元中的單一個記憶胞用以儲存m個位元,m與n皆為正整數,且m大於n。The memory storage system using persistent memory as claimed in claim 6, wherein both the at least one first type physical unit and the at least one second type physical unit are included in a non-volatile memory of the memory device In the module, a single memory cell in the at least one first type entity unit is used to store n bits, a single memory cell in the at least one second type entity unit is used to store m bits, m and n are all positive integers, and m is greater than n. 如請求項6所述的使用持續性記憶體的記憶體儲存系統,其中該管理表格包括邏輯至實體映射表。The memory storage system using persistent memory of claim 6, wherein the management table includes a logic-to-entity mapping table.
TW110105060A 2021-02-09 2021-02-09 Data arrangement method and memory storage system using persistent memory TWI800795B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
TW110105060A TWI800795B (en) 2021-02-09 2021-02-09 Data arrangement method and memory storage system using persistent memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
TW110105060A TWI800795B (en) 2021-02-09 2021-02-09 Data arrangement method and memory storage system using persistent memory

Publications (2)

Publication Number Publication Date
TW202232329A true TW202232329A (en) 2022-08-16
TWI800795B TWI800795B (en) 2023-05-01

Family

ID=83782639

Family Applications (1)

Application Number Title Priority Date Filing Date
TW110105060A TWI800795B (en) 2021-02-09 2021-02-09 Data arrangement method and memory storage system using persistent memory

Country Status (1)

Country Link
TW (1) TWI800795B (en)

Family Cites Families (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI428747B (en) * 2008-12-12 2014-03-01 Silicon Motion Inc Data managing method for non-volatile memory and non-volatile memory device using the same
TWI448892B (en) * 2011-09-06 2014-08-11 Phison Electronics Corp Data moving mehod, memory controller and memory storage apparatus
TWI521346B (en) * 2011-12-15 2016-02-11 群聯電子股份有限公司 Data merging method for non-volatile memory and controller and stoarge apparatus using the same
WO2017066601A1 (en) * 2015-10-16 2017-04-20 Huang Yiren Ronnie Method and apparatus for providing hybrid mode to access ssd drive
CN108121664A (en) * 2016-11-28 2018-06-05 慧荣科技股份有限公司 data storage device and operation method thereof
TWI691839B (en) * 2016-11-28 2020-04-21 慧榮科技股份有限公司 Method for data management
CN110543430B (en) * 2018-05-28 2023-08-01 上海磁宇信息科技有限公司 Storage device using MRAM
US10754785B2 (en) * 2018-06-28 2020-08-25 Intel Corporation Checkpointing for DRAM-less SSD
JP2020030527A (en) * 2018-08-21 2020-02-27 キオクシア株式会社 Storage device and program
KR20200046264A (en) * 2018-10-24 2020-05-07 삼성전자주식회사 Data storage device using host memory buffer and method of operating the same
US11249648B2 (en) * 2019-07-26 2022-02-15 Kioxia Corporation Transfer and processing unit for IOD SSD

Also Published As

Publication number Publication date
TWI800795B (en) 2023-05-01

Similar Documents

Publication Publication Date Title
US9720616B2 (en) Data-retention controller/driver for stand-alone or hosted card reader, solid-state-drive (SSD), or super-enhanced-endurance SSD (SEED)
US10296224B2 (en) Apparatus, system and method for increasing the capacity of a storage device available to store user data
US8180953B2 (en) Data accessing method for flash memory, and storage system and controller system thereof
CN104423888B (en) Method for writing data, memorizer control circuit unit and memory storage apparatus
CN107402716B (en) Data writing method, memory control circuit unit and memory storage device
US9619380B2 (en) Data writing method, memory control circuit unit and memory storage apparatus
US20200218653A1 (en) Controller, data storage device, and operating method thereof
TWI698749B (en) A data storage device and a data processing method
TWI479315B (en) Memory storage device, memory controller thereof, and method for programming data thereof
TWI523030B (en) Method for managing buffer memory, memory controllor, and memory storage device
KR20200114212A (en) Data storage device and operating method thereof
US11853554B2 (en) Aligned and unaligned data deallocation
KR20220085708A (en) Logical to physical address indirection table in a persistent memory in a solid state drive
US8738847B2 (en) Data writing method, and memory controller and memory storage apparatus using the same
KR20190091035A (en) Memory system and operating method thereof
US11144245B2 (en) Memory control method, memory storage device and memory control circuit unit
US20230236765A1 (en) Storage controller performing active zone refresh, method of operating storage controller, and method of operating storage device having storage controller
KR102589609B1 (en) Snapshot management in partitioned storage
US20230126685A1 (en) Storage device and electronic system
US11586379B2 (en) Memory system and method of operating the same
US8832358B2 (en) Data writing method, memory controller and memory storage apparatus
CN113138720B (en) Data storage method, memory control circuit unit and memory storage device
US20210151098A1 (en) Utilizing nand buffer for dram-less multilevel cell programming
TW202232329A (en) Data arrangement method and memory storage system using persistent memory
KR20230037255A (en) Method for managing event log, controller and storage device